Show / Hide Table of Contents

Class BaseClientService.Initializer

An initializer class for the client service.

Inheritance
System.Object
BaseClientService.Initializer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Services
Assembly: Google.Apis.dll
Syntax
public class 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
System.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
System.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
System.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 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
Google.Apis.Http.ExponentialBackOffPolicy

GZipEnabled

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

Declaration
public bool GZipEnabled { get; set; }
Property Value
Type Description
System.Boolean

HttpClientFactory

Gets or sets the factory for creating System.Net.Http.HttpClient instance. If this property is not set the service uses a new HttpClientFactory instance.

Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
Type Description
Google.Apis.Http.IHttpClientFactory

HttpClientInitializer

Gets or sets a HTTP client initializer which is able to customize properties on Google.Apis.Http.ConfigurableHttpClient and ConfigurableMessageHandler.

Declaration
public IConfigurableHttpClientInitializer HttpClientInitializer { get; set; }
Property Value
Type Description
Google.Apis.Http.IConfigurableHttpClientInitializer

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
System.UInt32

Serializer

Gets or sets the serializer. Default value is NewtonsoftJsonSerializer.

Declaration
public ISerializer Serializer { get; set; }
Property Value
Type Description
Google.Apis.ISerializer

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
System.Boolean

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
In This Article
Back to top