Class PrescriptionMapsClientBuilder
- All Implemented Interfaces:
com.azure.core.client.traits.ConfigurationTrait<PrescriptionMapsClientBuilder>
,com.azure.core.client.traits.EndpointTrait<PrescriptionMapsClientBuilder>
,com.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
,com.azure.core.client.traits.TokenCredentialTrait<PrescriptionMapsClientBuilder>
-
Constructor Summary
ConstructorDescriptionCreate an instance of the PrescriptionMapsClientBuilder. -
Method Summary
Modifier and TypeMethodDescriptionaddPolicy
(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds apipeline policy
to apply on each request sent.Builds an instance of PrescriptionMapsAsyncClient class.Builds an instance of PrescriptionMapsClient class.clientOptions
(com.azure.core.util.ClientOptions clientOptions) Allows for setting common properties such as application ID, headers, proxy configuration, etc.configuration
(com.azure.core.util.Configuration configuration) Sets the client-specific configuration used to retrieve client or global configuration properties when building a client.credential
(com.azure.core.credential.TokenCredential tokenCredential) Sets theTokenCredential
used to authorize requests sent to the service.Sets the service endpoint that will be connected to by clients.httpClient
(com.azure.core.http.HttpClient httpClient) Sets theHttpClient
to use for sending and receiving requests to and from the service.httpLogOptions
(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets thelogging configuration
to use when sending and receiving requests to and from the service.pipeline
(com.azure.core.http.HttpPipeline pipeline) Sets theHttpPipeline
to use for the service client.retryOptions
(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptions
for all the requests made through the client.retryPolicy
(com.azure.core.http.policy.RetryPolicy retryPolicy) Sets The retry policy that will attempt to retry failed requests, if applicable.serviceVersion
(FarmBeatsServiceVersion serviceVersion) Sets Service version.
-
Constructor Details
-
PrescriptionMapsClientBuilder
public PrescriptionMapsClientBuilder()Create an instance of the PrescriptionMapsClientBuilder.
-
-
Method Details
-
pipeline
Sets theHttpPipeline
to use for the service client.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
pipeline
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
pipeline
-HttpPipeline
to use for sending service requests and receiving responses.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
httpClient
Sets theHttpClient
to use for sending and receiving requests to and from the service.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
httpClient
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
httpClient
- TheHttpClient
to use for requests.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
httpLogOptions
public PrescriptionMapsClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets thelogging configuration
to use when sending and receiving requests to and from the service. If alogLevel
is not provided, default value ofHttpLogDetailLevel.NONE
is set.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
httpLogOptions
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
httpLogOptions
- Thelogging configuration
to use when sending and receiving requests to and from the service.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
clientOptions
Allows for setting common properties such as application ID, headers, proxy configuration, etc. Note that it is recommended that this method be called with an instance of theHttpClientOptions
class (a subclass of theClientOptions
base class). The HttpClientOptions subclass provides more configuration options suitable for HTTP clients, which is applicable for any class that implements this HttpTrait interface.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
clientOptions
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
clientOptions
- A configured instance ofHttpClientOptions
.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
- See Also:
-
HttpClientOptions
-
retryOptions
public PrescriptionMapsClientBuilder retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptions
for all the requests made through the client.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
retryOptions
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
retryOptions
- TheRetryOptions
to use for all the requests made through the client.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
addPolicy
public PrescriptionMapsClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds apipeline policy
to apply on each request sent.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipeline
is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipeline
is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if anHttpPipeline
is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.- Specified by:
addPolicy
in interfacecom.azure.core.client.traits.HttpTrait<PrescriptionMapsClientBuilder>
- Parameters:
customPolicy
- Apipeline policy
.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
configuration
Sets the client-specific configuration used to retrieve client or global configuration properties when building a client..- Specified by:
configuration
in interfacecom.azure.core.client.traits.ConfigurationTrait<PrescriptionMapsClientBuilder>
- Parameters:
configuration
- Configuration store used to retrieve client configurations.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
credential
public PrescriptionMapsClientBuilder credential(com.azure.core.credential.TokenCredential tokenCredential) Sets theTokenCredential
used to authorize requests sent to the service. Refer to the Azure SDK for Java identity and authentication documentation for more details on proper usage of theTokenCredential
type..- Specified by:
credential
in interfacecom.azure.core.client.traits.TokenCredentialTrait<PrescriptionMapsClientBuilder>
- Parameters:
tokenCredential
-TokenCredential
used to authorize requests sent to the service.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
endpoint
Sets the service endpoint that will be connected to by clients..- Specified by:
endpoint
in interfacecom.azure.core.client.traits.EndpointTrait<PrescriptionMapsClientBuilder>
- Parameters:
endpoint
- The URL of the service endpoint.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
serviceVersion
Sets Service version.- Parameters:
serviceVersion
- the serviceVersion value.- Returns:
- the PrescriptionMapsClientBuilder.
-
retryPolicy
public PrescriptionMapsClientBuilder 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 PrescriptionMapsClientBuilder.
-
buildAsyncClient
Builds an instance of PrescriptionMapsAsyncClient class.- Returns:
- an instance of PrescriptionMapsAsyncClient.
-
buildClient
Builds an instance of PrescriptionMapsClient class.- Returns:
- an instance of PrescriptionMapsClient.
-