TimeZoneClientBuilder Class

  • java.lang.Object
    • com.azure.maps.timezone.TimeZoneClientBuilder

Implements

public final class TimeZoneClientBuilder
implements AzureKeyCredentialTrait<TimeZoneClientBuilder>, AzureSasCredentialTrait<TimeZoneClientBuilder>, TokenCredentialTrait<TimeZoneClientBuilder>, HttpTrait<TimeZoneClientBuilder>, ConfigurationTrait<TimeZoneClientBuilder>, EndpointTrait<TimeZoneClientBuilder>

Builder class used to instantiate both synchronous and asynchronous TimeZoneClient clients.

Constructor Summary

Constructor Description
TimeZoneClientBuilder()

Default constructor for the builder class; Create an instance of the TimeZoneClientBuilder.

Method Summary

Modifier and Type Method and Description
TimeZoneClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

Adds a custom Http pipeline policy.

TimeZoneAsyncClient buildAsyncClient()

Builds an instance of TimeZoneAsyncClient async client.

TimeZoneClient buildClient()

Builds an instance of TimeZoneClient sync client.

TimeZoneClientBuilder clientOptions(ClientOptions clientOptions)

Sets The client options such as application ID and custom headers to set on a request.

TimeZoneClientBuilder configuration(Configuration configuration)

Sets The configuration store that is used during construction of the service client.

TimeZoneClientBuilder credential(AzureKeyCredential keyCredential)

Sets the AzureKeyCredential used to authenticate HTTP requests.

TimeZoneClientBuilder credential(AzureSasCredential sasCredential)

Sets the AzureSasCredential used to authenticate HTTP requests.

TimeZoneClientBuilder credential(TokenCredential tokenCredential)

Sets the TokenCredential used to authenticate HTTP requests.

TimeZoneClientBuilder endpoint(String endpoint)

Set endpoint of the service.

TimeZoneClientBuilder httpClient(HttpClient httpClient)

Sets The HTTP client used to send the request.

TimeZoneClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)

Sets The logging configuration for HTTP requests and responses.

TimeZoneClientBuilder pipeline(HttpPipeline pipeline)

Sets The HTTP pipeline to send requests through.

TimeZoneClientBuilder retryOptions(RetryOptions retryOptions)

Sets retry options

TimeZoneClientBuilder retryPolicy(RetryPolicy retryPolicy)

Sets The retry policy that will attempt to retry failed requests, if applicable.

TimeZoneClientBuilder serviceVersion(TimeZoneServiceVersion version)

Sets the TimeZoneServiceVersion that is used when making API requests.

TimeZoneClientBuilder timezoneClientId(String timezoneClientId)

Sets the Azure Maps client id for use with Azure AD Authentication.

Methods inherited from java.lang.Object

Constructor Details

TimeZoneClientBuilder

public TimeZoneClientBuilder()

Default constructor for the builder class; Create an instance of the TimeZoneClientBuilder.

Method Details

addPolicy

public TimeZoneClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

Adds a custom Http pipeline policy.

Parameters:

customPolicy - The custom Http pipeline policy to add.

Returns:

the TimeZoneClientBuilder.

buildAsyncClient

public TimeZoneAsyncClient buildAsyncClient()

Builds an instance of TimeZoneAsyncClient async client.

Returns:

an instance of TimeZoneAsyncClient.

buildClient

public TimeZoneClient buildClient()

Builds an instance of TimeZoneClient sync client.

Returns:

an instance of TimeZoneClient.

clientOptions

public TimeZoneClientBuilder clientOptions(ClientOptions clientOptions)

Sets The client options such as application ID and custom headers to set on a request.

Parameters:

clientOptions - the clientOptions value.

Returns:

the TimeZoneClientBuilder.

configuration

public TimeZoneClientBuilder configuration(Configuration configuration)

Sets The configuration store that is used during construction of the service client.

Parameters:

configuration - the configuration value.

Returns:

the TimeZoneClientBuilder.

credential

public TimeZoneClientBuilder credential(AzureKeyCredential keyCredential)

Sets the AzureKeyCredential used to authenticate HTTP requests.

Parameters:

keyCredential - The AzureKeyCredential used to authenticate HTTP requests.

Returns:

The updated TimeZoneClientBuilder object.

credential

public TimeZoneClientBuilder credential(AzureSasCredential sasCredential)

Sets the AzureSasCredential used to authenticate HTTP requests.

Parameters:

sasCredential - The AzureSasCredential used to authenticate HTTP requests.

Returns:

The updated TimeZoneClientBuilder object.

credential

public TimeZoneClientBuilder credential(TokenCredential tokenCredential)

Sets the TokenCredential used to authenticate HTTP requests.

Parameters:

tokenCredential - TokenCredential used to authenticate HTTP requests.

Returns:

The updated TimeZoneClientBuilder object.

endpoint

public TimeZoneClientBuilder endpoint(String endpoint)

Set endpoint of the service.

Parameters:

endpoint - url of the service

Returns:

TimeZoneClientBuilder

httpClient

public TimeZoneClientBuilder httpClient(HttpClient httpClient)

Sets The HTTP client used to send the request.

Parameters:

httpClient - the httpClient value.

Returns:

the TimeZoneClientBuilder.

httpLogOptions

public TimeZoneClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)

Sets The logging configuration for HTTP requests and responses.

Parameters:

httpLogOptions - the httpLogOptions value.

Returns:

the TimeZoneClientBuilder.

pipeline

public TimeZoneClientBuilder pipeline(HttpPipeline pipeline)

Sets The HTTP pipeline to send requests through.

Parameters:

pipeline - the pipeline value.

Returns:

the TimeZoneClientBuilder.

retryOptions

public TimeZoneClientBuilder retryOptions(RetryOptions retryOptions)

Sets retry options

Parameters:

retryOptions - the retry options for the client

Returns:

a reference to this TimeZoneClientBuilder

retryPolicy

public TimeZoneClientBuilder retryPolicy(RetryPolicy retryPolicy)

Sets The retry policy that will attempt to retry failed requests, if applicable.

Parameters:

retryPolicy - the retryPolicy value.

Returns:

the TimeZoneClientBuilder.

serviceVersion

public TimeZoneClientBuilder serviceVersion(TimeZoneServiceVersion version)

Sets the TimeZoneServiceVersion that is used when making API requests.

If a service version is not provided, the service version that will be used will be the latest known service version based on the version of the client library being used. If no service version is specified, updating to a newer version of the client library will have the result of potentially moving to a newer service version.

Targeting a specific service version may also mean that the service will return an error for newer APIs.

Parameters:

version - TimeZoneServiceVersion of the service to be used when making requests.

Returns:

the updated TimeZoneClientBuilder object

timezoneClientId

public TimeZoneClientBuilder timezoneClientId(String timezoneClientId)

Sets the Azure Maps client id for use with Azure AD Authentication. This client id is the account-based GUID that appears on the Azure Maps Authentication page.

More details: Azure Maps AD Authentication

Parameters:

timezoneClientId - the clientId value.

Returns:

the TimeZoneClientBuilder.

Applies to