public class BaseClientService.Initializer
An initializer class for the client service.
Namespace
Google.Apis.ServicesAssembly
Google.Apis.dll
Constructors
Initializer()
public Initializer()
Constructs a new initializer with default values.
Properties
ApiKey
public string ApiKey { get; set; }
Gets or sets the API Key. Default value is null
.
Property Value | |
---|---|
Type | Description |
string |
ApplicationName
public string ApplicationName { get; set; }
Gets or sets Application name to be used in the User-Agent header. Default value is null
.
Property Value | |
---|---|
Type | Description |
string |
BaseUri
public string BaseUri { get; set; }
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.
Property Value | |
---|---|
Type | Description |
string |
DefaultExponentialBackOffPolicy
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Indicates which of exceptions and / or HTTP status codes are automatically retried using exponential backoff. The default value is UnsuccessfulResponse503 which means HTTP Status code 503 will be retried with exponential backoff. If set to None no automatic retries will happen. Calling code may still specify custom retries by configuring HttpClient.
Property Value | |
---|---|
Type | Description |
ExponentialBackOffPolicy |
GZipEnabled
public bool GZipEnabled { get; set; }
Gets or sets whether this service supports GZip. Default value is true
.
Property Value | |
---|---|
Type | Description |
bool |
HttpClientFactory
public IHttpClientFactory HttpClientFactory { get; set; }
Gets or sets the factory for creating HttpClient instance. If this property is not set the service uses a new HttpClientFactory instance.
Property Value | |
---|---|
Type | Description |
IHttpClientFactory |
HttpClientInitializer
public IConfigurableHttpClientInitializer HttpClientInitializer { get; set; }
Gets or sets a HTTP client initializer which is able to customize properties on ConfigurableHttpClient and ConfigurableMessageHandler.
Property Value | |
---|---|
Type | Description |
IConfigurableHttpClientInitializer |
HttpClientTimeout
public TimeSpan? HttpClientTimeout { get; set; }
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.
Property Value | |
---|---|
Type | Description |
TimeSpan |
MaxUrlLength
public uint MaxUrlLength { get; set; }
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.
Property Value | |
---|---|
Type | Description |
uint |
Serializer
public ISerializer Serializer { get; set; }
Gets or sets the serializer. Default value is NewtonsoftJsonSerializer.
Property Value | |
---|---|
Type | Description |
ISerializer |
UniverseDomain
public string UniverseDomain { get; set; }
The universe domain to connect to, or null to use the default universe domain DefaultUniverseDomain.
Property Value | |
---|---|
Type | Description |
string |
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
public bool ValidateParameters { get; set; }
Determines whether request parameters are validated (client-side) by default. Defaults to true. This can be overridden on a per-request basis using ValidateParameters.
Property Value | |
---|---|
Type | Description |
bool |
VersionHeaderBuilder
public VersionHeaderBuilder VersionHeaderBuilder { get; }
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.
Property Value | |
---|---|
Type | Description |
VersionHeaderBuilder |