ModelsRepositoryClientBuilder Class
- java.
lang. Object - com.
azure. iot. modelsrepository. ModelsRepositoryClientBuilder
- com.
public final class ModelsRepositoryClientBuilder
This class provides a fluent builder API to help aid the configuration and instantiation of ModelsRepositoryClient and ModelsRepositoryAsyncClient, call buildClient() and buildAsyncClient() respectively to construct an instance of the desired client.
Constructor Summary
| Constructor | Description |
|---|---|
| ModelsRepositoryClientBuilder() |
The public constructor for Models |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
ModelsRepositoryClientBuilder
public ModelsRepositoryClientBuilder()
The public constructor for ModelsRepositoryClientBuilder
Method Details
addPolicy
public ModelsRepositoryClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy)
Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If the method is called multiple times, all policies will be added and their order preserved.
Parameters:
Returns:
buildAsyncClient
public ModelsRepositoryAsyncClient buildAsyncClient()
Create a ModelsRepositoryAsyncClient based on the builder settings.
Returns:
buildClient
public ModelsRepositoryClient buildClient()
Create a ModelsRepositoryClient based on the builder settings.
Returns:
clientOptions
public ModelsRepositoryClientBuilder clientOptions(ClientOptions clientOptions)
Sets the ClientOptions which enables various options to be set on the client. For example setting an applicationId using ClientOptions#setApplicationId(String) to configure the UserAgentPolicy for telemetry/monitoring purposes.
More About Azure Core: Telemetry policy
Parameters:
Returns:
configuration
public ModelsRepositoryClientBuilder configuration(Configuration configuration)
Sets the configuration store that is used during construction of the service client.
The default configuration store is a clone of the global configuration store, use NONE to bypass using configuration settings during construction.
Parameters:
Returns:
httpClient
public ModelsRepositoryClientBuilder httpClient(HttpClient httpClient)
Sets the HttpClient to use for sending a receiving requests to and from the service.
Parameters:
Returns:
httpLogOptions
public ModelsRepositoryClientBuilder httpLogOptions(HttpLogOptions logOptions)
Sets the HttpLogOptions for service requests.
Parameters:
Returns:
modelDependencyResolution
public ModelsRepositoryClientBuilder modelDependencyResolution(ModelDependencyResolution modelDependencyResolution)
Set the default dependency resolution option that the built client will use. This field will have a default value.
Parameters:
Returns:
pipeline
public ModelsRepositoryClientBuilder pipeline(HttpPipeline httpPipeline)
Sets the HttpPipeline to use for the service client.
If pipeline is set, all other settings are ignored, aside from repositoryEndpoint(String repositoryEndpoint).
Parameters:
Returns:
repositoryEndpoint
public ModelsRepositoryClientBuilder repositoryEndpoint(String repositoryEndpoint)
Set the service endpoint that the built client will communicate with. This field is mandatory to set.
Parameters:
Returns:
retryPolicy
public ModelsRepositoryClientBuilder retryPolicy(RetryPolicy retryPolicy)
Sets the HttpPipelinePolicy that is used as the retry policy for each request that is sent.
The default retry policy will be used if not provided. The default retry policy is RetryPolicy#RetryPolicy(). For implementing custom retry logic, see RetryPolicy as an example.
Parameters:
Returns:
serviceVersion
public ModelsRepositoryClientBuilder serviceVersion(ModelsRepositoryServiceVersion serviceVersion)
Sets the ModelsRepositoryServiceVersion 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:
Returns: