com.microsoft.azure.management.cognitiveservices.implementation.CognitiveServicesManagementClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-mgmt-cognitiveservices Show documentation
Show all versions of azure-mgmt-cognitiveservices Show documentation
This package contains Microsoft CognitiveServices Management SDK.
The newest version!
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.cognitiveservices.implementation;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
/**
* Initializes a new instance of the CognitiveServicesManagementClientImpl class.
*/
public class CognitiveServicesManagementClientImpl extends AzureServiceClient {
/** the {@link AzureClient} used for long running operations. */
private AzureClient azureClient;
/**
* Gets the {@link AzureClient} used for long running operations.
* @return the azure client;
*/
public AzureClient getAzureClient() {
return this.azureClient;
}
/** Azure Subscription ID. */
private String subscriptionId;
/**
* Gets Azure Subscription ID.
*
* @return the subscriptionId value.
*/
public String subscriptionId() {
return this.subscriptionId;
}
/**
* Sets Azure Subscription ID.
*
* @param subscriptionId the subscriptionId value.
* @return the service client itself
*/
public CognitiveServicesManagementClientImpl withSubscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
/** Version of the API to be used with the client request. Current version is 2017-04-18. */
private String apiVersion;
/**
* Gets Version of the API to be used with the client request. Current version is 2017-04-18.
*
* @return the apiVersion value.
*/
public String apiVersion() {
return this.apiVersion;
}
/** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */
private String filter;
/**
* Gets An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).
*
* @return the filter value.
*/
public String filter() {
return this.filter;
}
/**
* Sets An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).
*
* @param filter the filter value.
* @return the service client itself
*/
public CognitiveServicesManagementClientImpl withFilter(String filter) {
this.filter = filter;
return this;
}
/** Gets or sets the preferred language for the response. */
private String acceptLanguage;
/**
* Gets Gets or sets the preferred language for the response.
*
* @return the acceptLanguage value.
*/
public String acceptLanguage() {
return this.acceptLanguage;
}
/**
* Sets Gets or sets the preferred language for the response.
*
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
*/
public CognitiveServicesManagementClientImpl withAcceptLanguage(String acceptLanguage) {
this.acceptLanguage = acceptLanguage;
return this;
}
/** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
private int longRunningOperationRetryTimeout;
/**
* Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @return the longRunningOperationRetryTimeout value.
*/
public int longRunningOperationRetryTimeout() {
return this.longRunningOperationRetryTimeout;
}
/**
* Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
*/
public CognitiveServicesManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
return this;
}
/** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
private boolean generateClientRequestId;
/**
* Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @return the generateClientRequestId value.
*/
public boolean generateClientRequestId() {
return this.generateClientRequestId;
}
/**
* Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
*/
public CognitiveServicesManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
this.generateClientRequestId = generateClientRequestId;
return this;
}
/**
* The AccountsInner object to access its operations.
*/
private AccountsInner accounts;
/**
* Gets the AccountsInner object to access its operations.
* @return the AccountsInner object.
*/
public AccountsInner accounts() {
return this.accounts;
}
/**
* The OperationsInner object to access its operations.
*/
private OperationsInner operations;
/**
* Gets the OperationsInner object to access its operations.
* @return the OperationsInner object.
*/
public OperationsInner operations() {
return this.operations;
}
/**
* The CheckSkuAvailabilitysInner object to access its operations.
*/
private CheckSkuAvailabilitysInner checkSkuAvailabilitys;
/**
* Gets the CheckSkuAvailabilitysInner object to access its operations.
* @return the CheckSkuAvailabilitysInner object.
*/
public CheckSkuAvailabilitysInner checkSkuAvailabilitys() {
return this.checkSkuAvailabilitys;
}
/**
* Initializes an instance of CognitiveServicesManagementClient client.
*
* @param credentials the management credentials for Azure
*/
public CognitiveServicesManagementClientImpl(ServiceClientCredentials credentials) {
this("https://management.azure.com", credentials);
}
/**
* Initializes an instance of CognitiveServicesManagementClient client.
*
* @param baseUrl the base URL of the host
* @param credentials the management credentials for Azure
*/
public CognitiveServicesManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
super(baseUrl, credentials);
initialize();
}
/**
* Initializes an instance of CognitiveServicesManagementClient client.
*
* @param restClient the REST client to connect to Azure.
*/
public CognitiveServicesManagementClientImpl(RestClient restClient) {
super(restClient);
initialize();
}
protected void initialize() {
this.apiVersion = "2017-04-18";
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.accounts = new AccountsInner(restClient().retrofit(), this);
this.operations = new OperationsInner(restClient().retrofit(), this);
this.checkSkuAvailabilitys = new CheckSkuAvailabilitysInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
/**
* Gets the User-Agent header for the client.
*
* @return the user agent string.
*/
@Override
public String userAgent() {
return String.format("%s (%s, %s)", super.userAgent(), "CognitiveServicesManagementClient", "2017-04-18");
}
}