CommunicationIdentityClientBuilder Class

  • java.lang.Object
    • com.azure.communication.administration.CommunicationIdentityClientBuilder

public final class CommunicationIdentityClientBuilder

CommunicationIdentityClientBuilder that creates CommunicationIdentityAsyncClient and CommunicationIdentityClient.

Constructor Summary

Constructor Description
CommunicationIdentityClientBuilder()

Method Summary

Modifier and Type Method and Description
CommunicationIdentityClientBuilder accessKey(String accessKey)

Set credential to use

CommunicationIdentityClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

Apply additional HttpPipelinePolicy

CommunicationIdentityAsyncClient buildAsyncClient()

Create asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy.

CommunicationIdentityClient buildClient()

Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy.

CommunicationIdentityClientBuilder configuration(Configuration configuration)

Sets the configuration object used to retrieve environment configuration values during building of the client.

CommunicationIdentityClientBuilder connectionString(String connectionString)

Set endpoint and credential to use

CommunicationIdentityClientBuilder endpoint(String endpoint)

Set endpoint of the service

CommunicationIdentityClientBuilder httpClient(HttpClient httpClient)

Set httpClient to use

CommunicationIdentityClientBuilder httpLogOptions(HttpLogOptions logOptions)

Sets the HttpLogOptions for service requests.

CommunicationIdentityClientBuilder pipeline(HttpPipeline pipeline)

Set endpoint of the service

CommunicationIdentityClientBuilder serviceVersion(CommunicationIdentityServiceVersion version)

Sets the CommunicationIdentityServiceVersion that is used when making API requests.

Methods inherited from java.lang.Object

Constructor Details

CommunicationIdentityClientBuilder

public CommunicationIdentityClientBuilder()

Method Details

accessKey

public CommunicationIdentityClientBuilder accessKey(String accessKey)

Set credential to use

Parameters:

accessKey - access key for initalizing CommunicationClientCredential

Returns:

CommunicationIdentityClientBuilder

addPolicy

public CommunicationIdentityClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

Apply additional HttpPipelinePolicy

Parameters:

customPolicy - HttpPipelinePolicy object to be applied after AzureKeyCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy

Returns:

CommunicationIdentityClientBuilder

buildAsyncClient

public CommunicationIdentityAsyncClient buildAsyncClient()

Create asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them

Returns:

CommunicationIdentityAsyncClient instance

buildClient

public CommunicationIdentityClient buildClient()

Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them

Returns:

CommunicationIdentityClient instance

configuration

public CommunicationIdentityClientBuilder configuration(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 CommunicationIdentityClientBuilder object

connectionString

public CommunicationIdentityClientBuilder connectionString(String connectionString)

Set endpoint and credential to use

Parameters:

connectionString - connection string for setting endpoint and initalizing CommunicationClientCredential

Returns:

CommunicationIdentityClientBuilder

endpoint

public CommunicationIdentityClientBuilder endpoint(String endpoint)

Set endpoint of the service

Parameters:

endpoint - url of the service

Returns:

CommunicationIdentityClientBuilder

httpClient

public CommunicationIdentityClientBuilder httpClient(HttpClient httpClient)

Set httpClient to use

Parameters:

httpClient - httpClient to use, overridden by the pipeline field.

Returns:

CommunicationIdentityClientBuilder

httpLogOptions

public CommunicationIdentityClientBuilder httpLogOptions(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 CommunicationIdentityClientBuilder object

pipeline

public CommunicationIdentityClientBuilder pipeline(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:

CommunicationIdentityClientBuilder

serviceVersion

public CommunicationIdentityClientBuilder serviceVersion(CommunicationIdentityServiceVersion version)

Sets the CommunicationIdentityServiceVersion 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 - CommunicationIdentityServiceVersion of the service to be used when making requests.

Returns:

the updated CommunicationIdentityClientBuilder object

Applies to