PhoneNumberClientBuilder Class
- java.
lang. Object - com.
azure. communication. administration. PhoneNumberClientBuilder
- com.
public final class PhoneNumberClientBuilder
Builder for creating clients of Communication Service phone number configuration
Constructor Summary
| Constructor | Description | |
|---|---|---|
| PhoneNumberClientBuilder() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Phone |
accessKey(String accessKey)
Set Communication |
|
Phone |
addPolicy(HttpPipelinePolicy policy)
Adds a policy to the set of existing policies that are executed after required policies. |
|
Phone |
buildAsyncClient()
Create asynchronous client applying Communication |
|
Phone |
buildClient()
Create synchronous client applying Communication |
|
Phone |
configuration(Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client. |
|
Phone |
connectionString(String connectionString)
Set the endpoint and Communication |
|
Phone |
endpoint(String endpoint)
Set endpoint of the service |
|
Phone |
httpClient(HttpClient httpClient)
Set Http |
|
Phone |
httpLogOptions(HttpLogOptions httpLogOptions)
Sets the logging configuration for HTTP requests and responses. |
|
Phone |
pipeline(HttpPipeline pipeline)
Sets the HTTP pipeline to use for the service client |
|
Phone |
serviceVersion(PhoneNumberServiceVersion version)
Sets the PhoneNumberServiceVersion that is used when making API requests. |
Methods inherited from java.lang.Object
Constructor Details
PhoneNumberClientBuilder
public PhoneNumberClientBuilder()
Method Details
accessKey
public PhoneNumberClientBuilder accessKey(String accessKey)
Set CommunicationClientCredential for authorization
Parameters:
Returns:
addPolicy
public PhoneNumberClientBuilder addPolicy(HttpPipelinePolicy policy)
Adds a policy to the set of existing policies that are executed after required policies.
Parameters:
Returns:
buildAsyncClient
public PhoneNumberAsyncClient buildAsyncClient()
Create asynchronous client applying CommunicationClientCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
Returns:
buildClient
public PhoneNumberClient buildClient()
Create synchronous client applying CommunicationClientCredentialPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
Returns:
configuration
public PhoneNumberClientBuilder configuration(Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client.
Parameters:
Returns:
connectionString
public PhoneNumberClientBuilder connectionString(String connectionString)
Set the endpoint and CommunicationClientCredential for authorization
Parameters:
Returns:
endpoint
public PhoneNumberClientBuilder endpoint(String endpoint)
Set endpoint of the service
Parameters:
Returns:
httpClient
public PhoneNumberClientBuilder httpClient(HttpClient httpClient)
Set HttpClient to use
Parameters:
Returns:
httpLogOptions
public PhoneNumberClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)
Sets the logging configuration for HTTP requests and responses.
If logLevel is not provided, default value of HttpLogDetailLevel#NONE is set.
Parameters:
Returns:
pipeline
public PhoneNumberClientBuilder pipeline(HttpPipeline pipeline)
Sets the HTTP pipeline to use for the service client
If pipeline is set, all other settings aside from endpoint(String endpoint) are ignored.
Parameters:
Returns:
serviceVersion
public PhoneNumberClientBuilder serviceVersion(PhoneNumberServiceVersion version)
Sets the PhoneNumberServiceVersion 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 the client library will have the result of potentially moving to a newer service version.
Parameters:
Returns: