Class BaseClientService.Initializer
An initializer class for the client service.
Inherited Members
Namespace: Google.Apis.Services
Assembly: Google.Apis.dll
Syntax
public class BaseClientService.Initializer
Constructors
Initializer()
Constructs a new initializer with default values.
Declaration
public Initializer()
Properties
ApiKey
Gets or sets the API Key. Default value is null
.
Declaration
public string ApiKey { get; set; }
Property Value
Type | Description |
---|---|
string |
ApplicationName
Gets or sets Application name to be used in the User-Agent header. Default value is null
.
Declaration
public string ApplicationName { get; set; }
Property Value
Type | Description |
---|---|
string |
BaseUri
Gets or sets the base URI to use for the service. If the value is null
,
the default base URI for the service is used.
Declaration
public string BaseUri { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultExponentialBackOffPolicy
Get or sets the exponential back-off policy used by the service. Default value is
UnsuccessfulResponse503
, which means that exponential back-off is used on 503 abnormal HTTP
response.
If the value is set to None
, no exponential back-off policy is used, and it's up to the user to
configure the Google.Apis.Http.ConfigurableMessageHandler in an
Google.Apis.Http.IConfigurableHttpClientInitializer to set a specific back-off
implementation (using Google.Apis.Http.BackOffHandler).
Declaration
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Property Value
Type | Description |
---|---|
ExponentialBackOffPolicy |
GZipEnabled
Gets or sets whether this service supports GZip. Default value is true
.
Declaration
public bool GZipEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
HttpClientFactory
Gets or sets the factory for creating HttpClient instance. If this property is not set the service uses a new Google.Apis.Http.HttpClientFactory instance.
Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
Type | Description |
---|---|
IHttpClientFactory |
HttpClientInitializer
Gets or sets a HTTP client initializer which is able to customize properties on Google.Apis.Http.ConfigurableHttpClient and Google.Apis.Http.ConfigurableMessageHandler.
Declaration
public IConfigurableHttpClientInitializer HttpClientInitializer { get; set; }
Property Value
Type | Description |
---|---|
IConfigurableHttpClientInitializer |
HttpClientTimeout
The timeout to set on HttpClient instances used by the service. May be null, in which case the default timeout values on HttpClient instances used by this service will be left unchanged.
Declaration
public TimeSpan? HttpClientTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan? |
MaxUrlLength
Maximum allowed length of a URL string for GET requests. Default value is 2048
. If the value is
set to 0
, requests will never be modified due to URL string length.
Declaration
public uint MaxUrlLength { get; set; }
Property Value
Type | Description |
---|---|
uint |
Serializer
Gets or sets the serializer. Default value is Google.Apis.Json.NewtonsoftJsonSerializer.
Declaration
public ISerializer Serializer { get; set; }
Property Value
Type | Description |
---|---|
ISerializer |
UniverseDomain
The universe domain to connect to, or null to use the default universe domain DefaultUniverseDomain.
Declaration
public string UniverseDomain { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
UniverseDomain is used to build the endpoint to connect to, unless BaseUri is set, in which case BaseUri will be used without further modification. UniverseDomain may also be used by the credential, if any, to validate against its own universe domain.
ValidateParameters
Determines whether request parameters are validated (client-side) by default. Defaults to true. This can be overridden on a per-request basis using ValidateParameters.
Declaration
public bool ValidateParameters { get; set; }
Property Value
Type | Description |
---|---|
bool |
VersionHeaderBuilder
Builder for the x-goog-api-client header, collecting version information. Services automatically add the API library version to this. Most users will never need to configure this, but higher level abstraction Google libraries may add their own version here.
Declaration
public VersionHeaderBuilder VersionHeaderBuilder { get; }
Property Value
Type | Description |
---|---|
VersionHeaderBuilder |