Class BaseClientService.Initializer (1.55.0)

public class Initializer

An initializer class for the client service.

Inheritance

Object > BaseClientService.Initializer

Namespace

Google.Apis.Services

Assembly

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ExponentialBackOffPolicy

GZipEnabled

public bool GZipEnabled { get; set; }

Gets or sets whether this service supports GZip. Default value is true.

Property Value
TypeDescription
Boolean

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
TypeDescription
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
TypeDescription
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
TypeDescription
UInt32

Serializer

public ISerializer Serializer { get; set; }

Gets or sets the serializer. Default value is NewtonsoftJsonSerializer.

Property Value
TypeDescription
ISerializer

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
TypeDescription
Boolean

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
TypeDescription
VersionHeaderBuilder

Extension Method