Class ConfidentialLedgerClientBuilder
- All Implemented Interfaces:
com.azure.core.client.traits.ConfigurationTrait<ConfidentialLedgerClientBuilder>,com.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>,com.azure.core.client.traits.TokenCredentialTrait<ConfidentialLedgerClientBuilder>
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance of the ConfidentialLedgerClientBuilder. -
Method Summary
Modifier and TypeMethodDescriptionaddPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds apipeline policyto apply on each request sent.Builds an instance of ConfidentialLedgerAsyncClient class.Builds an instance of ConfidentialLedgerClient 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 theTokenCredentialused to authorize requests sent to the service.httpClient(com.azure.core.http.HttpClient httpClient) Sets theHttpClientto use for sending and receiving requests to and from the service.httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets thelogging configurationto use when sending and receiving requests to and from the service.ledgerEndpoint(String ledgerEndpoint) Sets The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com.pipeline(com.azure.core.http.HttpPipeline pipeline) Sets theHttpPipelineto use for the service client.retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptionsfor 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(ConfidentialLedgerServiceVersion serviceVersion) Sets Service version.
-
Constructor Details
-
ConfidentialLedgerClientBuilder
public ConfidentialLedgerClientBuilder()Create an instance of the ConfidentialLedgerClientBuilder.
-
-
Method Details
-
pipeline
Sets theHttpPipelineto use for the service client.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
pipelinein interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- Parameters:
pipeline-HttpPipelineto 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 theHttpClientto 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
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
httpClientin interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- Parameters:
httpClient- TheHttpClientto use for requests.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
httpLogOptions
public ConfidentialLedgerClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions) Sets thelogging configurationto use when sending and receiving requests to and from the service. If alogLevelis not provided, default value ofHttpLogDetailLevel.NONEis set.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
httpLogOptionsin interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- Parameters:
httpLogOptions- Thelogging configurationto 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
public ConfidentialLedgerClientBuilder clientOptions(com.azure.core.util.ClientOptions 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 theHttpClientOptionsclass (a subclass of theClientOptionsbase 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
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
clientOptionsin interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- 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 ConfidentialLedgerClientBuilder retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) Sets theRetryOptionsfor all the requests made through the client.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
retryOptionsin interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- Parameters:
retryOptions- TheRetryOptionsto 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 ConfidentialLedgerClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Adds apipeline policyto apply on each request sent.Note: It is important to understand the precedence order of the HttpTrait APIs. In particular, if a
.HttpPipelineis specified, this takes precedence over all other APIs in the trait, and they will be ignored. If noHttpPipelineis 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 anHttpPipelineis 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:
addPolicyin interfacecom.azure.core.client.traits.HttpTrait<ConfidentialLedgerClientBuilder>- Parameters:
customPolicy- Apipeline policy.- Returns:
- Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
-
configuration
public ConfidentialLedgerClientBuilder configuration(com.azure.core.util.Configuration configuration) Sets the client-specific configuration used to retrieve client or global configuration properties when building a client..- Specified by:
configurationin interfacecom.azure.core.client.traits.ConfigurationTrait<ConfidentialLedgerClientBuilder>- 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 ConfidentialLedgerClientBuilder credential(com.azure.core.credential.TokenCredential tokenCredential) Sets theTokenCredentialused 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 theTokenCredentialtype..- Specified by:
credentialin interfacecom.azure.core.client.traits.TokenCredentialTrait<ConfidentialLedgerClientBuilder>- Parameters:
tokenCredential-TokenCredentialused 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.
-
ledgerEndpoint
Sets The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com.- Parameters:
ledgerEndpoint- the ledgerEndpoint value.- Returns:
- the ConfidentialLedgerClientBuilder.
-
serviceVersion
public ConfidentialLedgerClientBuilder serviceVersion(ConfidentialLedgerServiceVersion serviceVersion) Sets Service version.- Parameters:
serviceVersion- the serviceVersion value.- Returns:
- the ConfidentialLedgerClientBuilder.
-
retryPolicy
public ConfidentialLedgerClientBuilder 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 ConfidentialLedgerClientBuilder.
-
buildAsyncClient
Builds an instance of ConfidentialLedgerAsyncClient class.- Returns:
- an instance of ConfidentialLedgerAsyncClient.
-
buildClient
Builds an instance of ConfidentialLedgerClient class.- Returns:
- an instance of ConfidentialLedgerClient.
-