Package com.affinda.api.client
Class AffindaAPIBuilder
- java.lang.Object
-
- com.affinda.api.client.AffindaAPIBuilder
-
- All Implemented Interfaces:
com.azure.core.client.traits.ConfigurationTrait<AffindaAPIBuilder>,com.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>,com.azure.core.client.traits.TokenCredentialTrait<AffindaAPIBuilder>
public final class AffindaAPIBuilder extends Object implements com.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>, com.azure.core.client.traits.ConfigurationTrait<AffindaAPIBuilder>, com.azure.core.client.traits.TokenCredentialTrait<AffindaAPIBuilder>
A builder for creating a new instance of the AffindaAPI type.
-
-
Constructor Summary
Constructors Constructor Description AffindaAPIBuilder()Create an instance of the AffindaAPIBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AffindaAPIBuilderaddPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy).AffindaAPIbuildClient()Builds an instance of AffindaAPI with the provided parameters.AffindaAPIBuilderclientOptions(com.azure.core.util.ClientOptions clientOptions).AffindaAPIBuilderconfiguration(com.azure.core.util.Configuration configuration).AffindaAPIBuildercredential(com.azure.core.credential.TokenCredential tokenCredential).AffindaAPIBuilderhttpClient(com.azure.core.http.HttpClient httpClient).AffindaAPIBuilderhttpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions).AffindaAPIBuilderpipeline(com.azure.core.http.HttpPipeline pipeline).AffindaAPIBuilderregion(Region region)Sets region - server parameter.AffindaAPIBuilderretryOptions(com.azure.core.http.policy.RetryOptions retryOptions).AffindaAPIBuilderretryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy)Sets The retry policy that will attempt to retry failed requests, if applicable.AffindaAPIBuilderserializerAdapter(com.azure.core.util.serializer.SerializerAdapter serializerAdapter)Sets The serializer to serialize an object into a string.
-
-
-
Method Detail
-
pipeline
public AffindaAPIBuilder pipeline(com.azure.core.http.HttpPipeline pipeline)
.- Specified by:
pipelinein interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
httpClient
public AffindaAPIBuilder httpClient(com.azure.core.http.HttpClient httpClient)
.- Specified by:
httpClientin interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
httpLogOptions
public AffindaAPIBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions httpLogOptions)
.- Specified by:
httpLogOptionsin interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
clientOptions
public AffindaAPIBuilder clientOptions(com.azure.core.util.ClientOptions clientOptions)
.- Specified by:
clientOptionsin interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
retryOptions
public AffindaAPIBuilder retryOptions(com.azure.core.http.policy.RetryOptions retryOptions)
.- Specified by:
retryOptionsin interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
addPolicy
public AffindaAPIBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy customPolicy)
.- Specified by:
addPolicyin interfacecom.azure.core.client.traits.HttpTrait<AffindaAPIBuilder>
-
configuration
public AffindaAPIBuilder configuration(com.azure.core.util.Configuration configuration)
.- Specified by:
configurationin interfacecom.azure.core.client.traits.ConfigurationTrait<AffindaAPIBuilder>
-
credential
public AffindaAPIBuilder credential(com.azure.core.credential.TokenCredential tokenCredential)
.- Specified by:
credentialin interfacecom.azure.core.client.traits.TokenCredentialTrait<AffindaAPIBuilder>
-
region
public AffindaAPIBuilder region(Region region)
Sets region - server parameter.- Parameters:
region- the region value.- Returns:
- the AffindaAPIBuilder.
-
serializerAdapter
public AffindaAPIBuilder serializerAdapter(com.azure.core.util.serializer.SerializerAdapter serializerAdapter)
Sets The serializer to serialize an object into a string.- Parameters:
serializerAdapter- the serializerAdapter value.- Returns:
- the AffindaAPIBuilder.
-
retryPolicy
public AffindaAPIBuilder retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy)
Sets The retry policy that will attempt to retry failed requests, if applicable.- Parameters:
retryPolicy- the retryPolicy value.- Returns:
- the AffindaAPIBuilder.
-
buildClient
public AffindaAPI buildClient()
Builds an instance of AffindaAPI with the provided parameters.- Returns:
- an instance of AffindaAPI.
-
-