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; }
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 ConfigurableMessageHandler in an
IConfigurableHttpClientInitializer to set a specific back-off
implementation (using BackOffHandler).
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 |
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 |