Package io.github.brenoepics.at4j
Class AzureApiBuilder
- java.lang.Object
-
- io.github.brenoepics.at4j.AzureApiBuilder
-
-
Constructor Summary
Constructors Constructor Description AzureApiBuilder()
Default constructor initializes the base URL to the global endpoint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AzureApiBuilder
baseURL(BaseURL baseURL)
Sets the base URL for the Azure API.AzureApi
build()
Builds and returns an instance of AzureApi with the configured parameters.AzureApiBuilder
connectTimeout(Duration connectTimeout)
Sets the connect timeout for the Azure API.AzureApiBuilder
executorService(ExecutorService executorService)
Sets the executor service for the Azure API.AzureApiBuilder
proxy(ProxySelector proxySelector)
Sets the proxy selector for the Azure API.AzureApiBuilder
region(String subscriptionRegion)
Sets the subscription region for the Azure API.AzureApiBuilder
setKey(String subscriptionKey)
Sets the subscription key for accessing the Azure API.AzureApiBuilder
sslContext(SSLContext sslContext)
Sets the SSL context for the Azure API.AzureApiBuilder
sslParameters(SSLParameters sslParameters)
Sets the SSL parameters for the Azure API.
-
-
-
Method Detail
-
baseURL
public AzureApiBuilder baseURL(BaseURL baseURL)
Sets the base URL for the Azure API.- Parameters:
baseURL
- The base URL for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
BaseURL
-
setKey
public AzureApiBuilder setKey(String subscriptionKey)
Sets the subscription key for accessing the Azure API.- Parameters:
subscriptionKey
- The subscription key for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- Authentication keys and endpoint URL
-
region
public AzureApiBuilder region(String subscriptionRegion)
Sets the subscription region for the Azure API.- Parameters:
subscriptionRegion
- The subscription region for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- Azure Datacenter List
-
proxy
public AzureApiBuilder proxy(ProxySelector proxySelector)
Sets the proxy selector for the Azure API.- Parameters:
proxySelector
- The proxy selector for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- ProxySelector
-
connectTimeout
public AzureApiBuilder connectTimeout(Duration connectTimeout)
Sets the connect timeout for the Azure API.- Parameters:
connectTimeout
- The connect timeout for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- Connection Timeout
-
sslContext
public AzureApiBuilder sslContext(SSLContext sslContext)
Sets the SSL context for the Azure API.- Parameters:
sslContext
- The SSL context for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- SSLContext
-
sslParameters
public AzureApiBuilder sslParameters(SSLParameters sslParameters)
Sets the SSL parameters for the Azure API.- Parameters:
sslParameters
- The SSL parameters for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- SSLParameters
-
executorService
public AzureApiBuilder executorService(ExecutorService executorService)
Sets the executor service for the Azure API.- Parameters:
executorService
- The executor service for the Azure API.- Returns:
- The current instance of AzureApiBuilder for method chaining.
- See Also:
- ExecutorService
-
build
public AzureApi build()
Builds and returns an instance of AzureApi with the configured parameters.- Returns:
- An instance of AzureApi with the specified configuration.
- Throws:
NullPointerException
- If the subscription key is null.- See Also:
AzureApi
-
-