com.microsoft.azure.management.batch.implementation.BatchManagementClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-mgmt-batch Show documentation
Show all versions of azure-mgmt-batch Show documentation
This package contains Microsoft Azure Batch Account Management SDK. This package has been deprecated. A replacement package com.azure.resourcemanager:azure-resourcemanager-batch is available as of 31-March-2022. We strongly encourage you to upgrade to continue receiving updates. See Migration Guide https://aka.ms/java-track2-migration-guide for guidance on upgrading. Refer to our deprecation policy https://azure.github.io/azure-sdk/policies_support.html for more details.
/**
* 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.batch.implementation;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.RestClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
/**
* Initializes a new instance of the BatchManagementClientImpl class.
*/
public final class BatchManagementClientImpl 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;
}
/** A unique identifier of a Microsoft Azure subscription. The subscription id forms part of the URI for every service call. */
private String subscriptionId;
/**
* Gets A unique identifier of a Microsoft Azure subscription. The subscription id forms part of the URI for every service call.
*
* @return the subscriptionId value.
*/
public String subscriptionId() {
return this.subscriptionId;
}
/**
* Sets A unique identifier of a Microsoft Azure subscription. The subscription id forms part of the URI for every service call.
*
* @param subscriptionId the subscriptionId value.
* @return the service client itself
*/
public BatchManagementClientImpl withSubscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
/** Client API Version. */
private String apiVersion;
/**
* Gets Client API Version.
*
* @return the apiVersion value.
*/
public String apiVersion() {
return this.apiVersion;
}
/** 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 BatchManagementClientImpl 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 BatchManagementClientImpl 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 BatchManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
this.generateClientRequestId = generateClientRequestId;
return this;
}
/**
* The BatchAccountsInner object to access its operations.
*/
private BatchAccountsInner batchAccounts;
/**
* Gets the BatchAccountsInner object to access its operations.
* @return the BatchAccountsInner object.
*/
public BatchAccountsInner batchAccounts() {
return this.batchAccounts;
}
/**
* The ApplicationPackagesInner object to access its operations.
*/
private ApplicationPackagesInner applicationPackages;
/**
* Gets the ApplicationPackagesInner object to access its operations.
* @return the ApplicationPackagesInner object.
*/
public ApplicationPackagesInner applicationPackages() {
return this.applicationPackages;
}
/**
* The ApplicationsInner object to access its operations.
*/
private ApplicationsInner applications;
/**
* Gets the ApplicationsInner object to access its operations.
* @return the ApplicationsInner object.
*/
public ApplicationsInner applications() {
return this.applications;
}
/**
* The LocationsInner object to access its operations.
*/
private LocationsInner locations;
/**
* Gets the LocationsInner object to access its operations.
* @return the LocationsInner object.
*/
public LocationsInner locations() {
return this.locations;
}
/**
* Initializes an instance of BatchManagementClient client.
*
* @param credentials the management credentials for Azure
*/
public BatchManagementClientImpl(ServiceClientCredentials credentials) {
this("https://management.azure.com", credentials);
}
/**
* Initializes an instance of BatchManagementClient client.
*
* @param baseUrl the base URL of the host
* @param credentials the management credentials for Azure
*/
public BatchManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
this(new RestClient.Builder()
.withBaseUrl(baseUrl)
.withCredentials(credentials)
.build());
}
/**
* Initializes an instance of BatchManagementClient client.
*
* @param restClient the REST client to connect to Azure.
*/
public BatchManagementClientImpl(RestClient restClient) {
super(restClient);
initialize();
}
protected void initialize() {
this.apiVersion = "2015-12-01";
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.batchAccounts = new BatchAccountsInner(restClient().retrofit(), this);
this.applicationPackages = new ApplicationPackagesInner(restClient().retrofit(), this);
this.applications = new ApplicationsInner(restClient().retrofit(), this);
this.locations = new LocationsInner(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("Azure-SDK-For-Java/%s (%s)",
getClass().getPackage().getImplementationVersion(),
"BatchManagementClient, 2015-12-01");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy