Class ConfidentialLedgerClientBuilder

java.lang.Object
com.azure.security.confidentialledger.ConfidentialLedgerClientBuilder
All Implemented Interfaces:
ConfigurationTrait<ConfidentialLedgerClientBuilder>, HttpTrait<ConfidentialLedgerClientBuilder>, TokenCredentialTrait<ConfidentialLedgerClientBuilder>

A builder for creating a new instance of the ConfidentialLedgerClient type.
  • Constructor Details

    • ConfidentialLedgerClientBuilder

      public ConfidentialLedgerClientBuilder()
      Create an instance of the ConfidentialLedgerClientBuilder.
  • Method Details

    • pipeline

      public ConfidentialLedgerClientBuilder pipeline(HttpPipeline pipeline)
      Sets the HttpPipeline 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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      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

      public ConfidentialLedgerClientBuilder httpClient(HttpClient httpClient)
      Sets the HttpClient 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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      Parameters:
      httpClient - The HttpClient to 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(HttpLogOptions httpLogOptions)
      Sets the logging configuration to use when sending and receiving requests to and from the service. If a logLevel is not provided, default value of HttpLogDetailLevel.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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      Parameters:
      httpLogOptions - The logging 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

      public ConfidentialLedgerClientBuilder clientOptions(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 the HttpClientOptions class (a subclass of the ClientOptions 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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      Parameters:
      clientOptions - A configured instance of HttpClientOptions.
      Returns:
      Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
      See Also:
    • retryOptions

      public ConfidentialLedgerClientBuilder retryOptions(RetryOptions retryOptions)
      Sets the RetryOptions 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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      Parameters:
      retryOptions - The RetryOptions 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 ConfidentialLedgerClientBuilder addPolicy(HttpPipelinePolicy customPolicy)
      Adds a pipeline 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 no HttpPipeline 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 an HttpPipeline 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 interface HttpTrait<ConfidentialLedgerClientBuilder>
      Parameters:
      customPolicy - A pipeline policy.
      Returns:
      Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of operations.
    • configuration

      public ConfidentialLedgerClientBuilder configuration(Configuration configuration)
      Sets the client-specific configuration used to retrieve client or global configuration properties when building a client..
      Specified by:
      configuration in interface 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(TokenCredential tokenCredential)
      Sets the TokenCredential 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 the TokenCredential type..
      Specified by:
      credential in interface TokenCredentialTrait<ConfidentialLedgerClientBuilder>
      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.
    • ledgerEndpoint

      public ConfidentialLedgerClientBuilder ledgerEndpoint(String 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(RetryPolicy retryPolicy)
      Sets The retry policy that will attempt to retry failed requests, if applicable.
      Parameters:
      retryPolicy - the retryPolicy value.
      Returns:
      the ConfidentialLedgerClientBuilder.
    • buildAsyncClient

      public ConfidentialLedgerAsyncClient buildAsyncClient()
      Builds an instance of ConfidentialLedgerAsyncClient class.
      Returns:
      an instance of ConfidentialLedgerAsyncClient.
    • buildClient

      public ConfidentialLedgerClient buildClient()
      Builds an instance of ConfidentialLedgerClient class.
      Returns:
      an instance of ConfidentialLedgerClient.