Package com.azure.communication.rooms
Class RoomsClientBuilder
java.lang.Object
com.azure.communication.rooms.RoomsClientBuilder
RoomsClientBuilder that creates RoomsAsyncClient and RoomsClient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPolicy
(com.azure.core.http.policy.HttpPipelinePolicy customPolicy) Apply additional HttpPipelinePolicyCreate asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy.Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy.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.configuration
(com.azure.core.util.Configuration configuration) Sets the configuration object used to retrieve environment configuration values during building of the client.connectionString
(String connectionString) Set endpoint and credential to usecredential
(com.azure.core.credential.AzureKeyCredential keyCredential) Sets theAzureKeyCredential
used to authenticate HTTP requests.credential
(com.azure.core.credential.TokenCredential tokenCredential) Sets theTokenCredential
used to authenticate HTTP requests.Set endpoint of the servicehttpClient
(com.azure.core.http.HttpClient httpClient) Set httpClient to usehttpLogOptions
(com.azure.core.http.policy.HttpLogOptions logOptions) Sets theHttpLogOptions
for service requests.pipeline
(com.azure.core.http.HttpPipeline pipeline) Set endpoint of the serviceretryPolicy
(com.azure.core.http.policy.RetryPolicy retryPolicy) Sets the retry policy to use (using the RetryPolicy type).serviceVersion
(RoomsServiceVersion version) Sets theRoomsServiceVersion
that is used when making API requests.
-
Constructor Details
-
RoomsClientBuilder
public RoomsClientBuilder()
-
-
Method Details
-
endpoint
Set endpoint of the service- Parameters:
endpoint
- url of the service- Returns:
- RoomsClientBuilder
-
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
Sets theTokenCredential
used to authenticate HTTP requests.- Parameters:
tokenCredential
-TokenCredential
used to authenticate HTTP requests.- Returns:
- The updated
RoomsClientBuilder
object. - Throws:
NullPointerException
- IftokenCredential
is null.
-
credential
Sets theAzureKeyCredential
used to authenticate HTTP requests.- Parameters:
keyCredential
- TheAzureKeyCredential
used to authenticate HTTP requests.- Returns:
- The updated
RoomsClientBuilder
object. - Throws:
NullPointerException
- IfkeyCredential
is null.
-
connectionString
Set endpoint and credential to use- Parameters:
connectionString
- connection string for setting endpoint and initalizing AzureKeyCredential- Returns:
- RoomsClientBuilder
-
retryPolicy
Sets the retry policy to use (using the RetryPolicy type).- Parameters:
retryPolicy
- object to be applied- Returns:
- RoomsClientBuilder
-
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
Sets theHttpLogOptions
for service requests.- Parameters:
logOptions
- The logging configuration to use when sending and receiving HTTP requests/responses.- Returns:
- the updated RoomsClientBuilder object
-
serviceVersion
Sets theRoomsServiceVersion
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
Set httpClient to use- Parameters:
httpClient
- httpClient to use, overridden by the pipeline field.- Returns:
- RoomsClientBuilder
-
addPolicy
Apply additional HttpPipelinePolicy- Parameters:
customPolicy
- HttpPipelinePolicy object to be applied after AzureKeyCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy- Returns:
- RoomsClientBuilder
-
buildAsyncClient
Create asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them- Returns:
- RoomsAsyncClient instance
-
buildClient
Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them- Returns:
- RoomsClient instance
-
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
-