Package com.azure.monitor.query
Class MetricsBatchQueryClientBuilder
java.lang.Object
com.azure.monitor.query.MetricsBatchQueryClientBuilder
- All Implemented Interfaces:
com.azure.core.client.traits.ConfigurationTrait<MetricsBatchQueryClientBuilder>,com.azure.core.client.traits.EndpointTrait<MetricsBatchQueryClientBuilder>,com.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>,com.azure.core.client.traits.TokenCredentialTrait<MetricsBatchQueryClientBuilder>
public final class MetricsBatchQueryClientBuilder
extends Object
implements com.azure.core.client.traits.EndpointTrait<MetricsBatchQueryClientBuilder>, com.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>, com.azure.core.client.traits.ConfigurationTrait<MetricsBatchQueryClientBuilder>, com.azure.core.client.traits.TokenCredentialTrait<MetricsBatchQueryClientBuilder>
Fluent builder for creating instances of
MetricsBatchQueryClient and MetricsBatchQueryAsyncClient.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds a custom Http pipeline policy.Creates an asynchronous client with the configured options in this builder.Creates a synchronous client with the configured options in this builder.clientOptions(com.azure.core.util.ClientOptions clientOptions) Set theClientOptionsused for creating the client.configuration(com.azure.core.util.Configuration configuration) Sets The configuration store that is used during construction of the service client.credential(com.azure.core.credential.TokenCredential tokenCredential) Sets The TokenCredential used for authentication.Sets the metrics batch query endpoint.httpClient(com.azure.core.http.HttpClient httpClient) Sets The HTTP client used to send the request.httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets The logging configuration for HTTP requests and responses.pipeline(com.azure.core.http.HttpPipeline pipeline) Sets The HTTP pipeline to send requests through.retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptionsused for creating the client.retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy) Sets The retry policy that will attempt to retry failed requests, if applicable.serviceVersion(MetricsBatchQueryServiceVersion serviceVersion) The service version to use when creating the client.
-
Constructor Details
-
MetricsBatchQueryClientBuilder
public MetricsBatchQueryClientBuilder()
-
-
Method Details
-
endpoint
Sets the metrics batch query endpoint.- Specified by:
endpointin interfacecom.azure.core.client.traits.EndpointTrait<MetricsBatchQueryClientBuilder>- Parameters:
endpoint- the endpoint.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
pipeline
Sets The HTTP pipeline to send requests through.- Specified by:
pipelinein interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
pipeline- the pipeline value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
httpClient
Sets The HTTP client used to send the request.- Specified by:
httpClientin interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
httpClient- the httpClient value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
configuration
public MetricsBatchQueryClientBuilder configuration(com.azure.core.util.Configuration configuration) Sets The configuration store that is used during construction of the service client.- Specified by:
configurationin interfacecom.azure.core.client.traits.ConfigurationTrait<MetricsBatchQueryClientBuilder>- Parameters:
configuration- the configuration value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
httpLogOptions
public MetricsBatchQueryClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets The logging configuration for HTTP requests and responses.- Specified by:
httpLogOptionsin interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
httpLogOptions- the httpLogOptions value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
retryPolicy
public MetricsBatchQueryClientBuilder retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy) Sets The retry policy that will attempt to retry failed requests, if applicable.- Parameters:
retryPolicy- the retryPolicy value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
retryOptions
public MetricsBatchQueryClientBuilder retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptionsused for creating the client.- Specified by:
retryOptionsin interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
retryOptions- TheRetryOptions.- Returns:
- the updated
MetricsBatchQueryClientBuilder.
-
addPolicy
public MetricsBatchQueryClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds a custom Http pipeline policy.- Specified by:
addPolicyin interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
customPolicy- The custom Http pipeline policy to add.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
credential
public MetricsBatchQueryClientBuilder credential(com.azure.core.credential.TokenCredential tokenCredential) Sets The TokenCredential used for authentication.- Specified by:
credentialin interfacecom.azure.core.client.traits.TokenCredentialTrait<MetricsBatchQueryClientBuilder>- Parameters:
tokenCredential- the tokenCredential value.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
clientOptions
public MetricsBatchQueryClientBuilder clientOptions(com.azure.core.util.ClientOptions clientOptions) Set theClientOptionsused for creating the client.- Specified by:
clientOptionsin interfacecom.azure.core.client.traits.HttpTrait<MetricsBatchQueryClientBuilder>- Parameters:
clientOptions- TheClientOptions.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
serviceVersion
public MetricsBatchQueryClientBuilder serviceVersion(MetricsBatchQueryServiceVersion serviceVersion) The service version to use when creating the client.- Parameters:
serviceVersion- TheMetricsBatchQueryServiceVersion.- Returns:
- the
MetricsBatchQueryClientBuilder.
-
buildClient
Creates a synchronous client with the configured options in this builder.- Returns:
- A synchronous
MetricsBatchQueryClient.
-
buildAsyncClient
Creates an asynchronous client with the configured options in this builder.- Returns:
- An asynchronous
MetricsBatchQueryAsyncClient.
-