Class RoomsClientBuilder

java.lang.Object
com.azure.communication.rooms.RoomsClientBuilder

public final class RoomsClientBuilder extends Object
RoomsClientBuilder that creates RoomsAsyncClient and RoomsClient.
  • Constructor Details

    • RoomsClientBuilder

      public RoomsClientBuilder()
  • Method Details

    • endpoint

      public RoomsClientBuilder endpoint(String endpoint)
      Set endpoint of the service
      Parameters:
      endpoint - url of the service
      Returns:
      RoomsClientBuilder
    • pipeline

      public RoomsClientBuilder pipeline(com.azure.core.http.HttpPipeline pipeline)
      Set endpoint of the service
      Parameters:
      pipeline - HttpPipeline to use, if a pipeline is not supplied, the credential and httpClient fields must be set
      Returns:
      RoomsClientBuilder
    • credential

      public RoomsClientBuilder credential(com.azure.core.credential.TokenCredential tokenCredential)
      Sets the TokenCredential used to authenticate HTTP requests.
      Parameters:
      tokenCredential - TokenCredential used to authenticate HTTP requests.
      Returns:
      The updated RoomsClientBuilder object.
      Throws:
      NullPointerException - If tokenCredential is null.
    • credential

      public RoomsClientBuilder credential(com.azure.core.credential.AzureKeyCredential keyCredential)
      Sets the AzureKeyCredential used to authenticate HTTP requests.
      Parameters:
      keyCredential - The AzureKeyCredential used to authenticate HTTP requests.
      Returns:
      The updated RoomsClientBuilder object.
      Throws:
      NullPointerException - If keyCredential is null.
    • connectionString

      public RoomsClientBuilder connectionString(String connectionString)
      Set endpoint and credential to use
      Parameters:
      connectionString - connection string for setting endpoint and initalizing AzureKeyCredential
      Returns:
      RoomsClientBuilder
    • retryPolicy

      public RoomsClientBuilder retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy)
      Sets the retry policy to use (using the RetryPolicy type).
      Parameters:
      retryPolicy - object to be applied
      Returns:
      RoomsClientBuilder
    • configuration

      public RoomsClientBuilder configuration(com.azure.core.util.Configuration configuration)
      Sets the configuration object used to retrieve environment configuration values during building of the client.
      Parameters:
      configuration - Configuration store used to retrieve environment configurations.
      Returns:
      the updated RoomsClientBuilder object
    • httpLogOptions

      public RoomsClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
      Sets the HttpLogOptions for service requests.
      Parameters:
      logOptions - The logging configuration to use when sending and receiving HTTP requests/responses.
      Returns:
      the updated RoomsClientBuilder object
    • serviceVersion

      public RoomsClientBuilder serviceVersion(RoomsServiceVersion version)
      Sets the RoomsServiceVersion 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 - RoomsServiceVersion of the service to be used when making requests.
      Returns:
      the updated RoomsClientBuilder object
    • httpClient

      public RoomsClientBuilder httpClient(com.azure.core.http.HttpClient httpClient)
      Set httpClient to use
      Parameters:
      httpClient - httpClient to use, overridden by the pipeline field.
      Returns:
      RoomsClientBuilder
    • addPolicy

      public RoomsClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy)
      Apply additional HttpPipelinePolicy
      Parameters:
      customPolicy - HttpPipelinePolicy object to be applied after AzureKeyCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy
      Returns:
      RoomsClientBuilder
    • buildAsyncClient

      public RoomsAsyncClient buildAsyncClient()
      Create asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
      Returns:
      RoomsAsyncClient instance
    • buildClient

      public RoomsClient buildClient()
      Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
      Returns:
      RoomsClient instance
    • clientOptions

      public RoomsClientBuilder clientOptions(com.azure.core.util.ClientOptions clientOptions)
      Allows the user to set a variety of client-related options, such as user-agent string, headers, etc.
      Parameters:
      clientOptions - object to be applied
      Returns:
      RoomsClientBuilder