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.
/** * 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.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.batch.AccountKeyType; import com.microsoft.azure.management.batch.BatchAccountCreateHeaders; import com.microsoft.azure.management.batch.BatchAccountCreateParameters; import com.microsoft.azure.management.batch.BatchAccountDeleteHeaders; import com.microsoft.azure.management.batch.BatchAccountRegenerateKeyParameters; import com.microsoft.azure.management.batch.BatchAccountUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.ServiceResponseWithHeaders; import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in BatchAccounts.
/** * An instance of this class provides access to all the operations defined * in BatchAccounts. */
public class BatchAccountsInner implements InnerSupportsGet<BatchAccountInner>, InnerSupportsDelete<Void>, InnerSupportsListing<BatchAccountInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private BatchAccountsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private BatchManagementClientImpl client;
Initializes an instance of BatchAccountsInner.
Params:
  • retrofit – the Retrofit instance built from a Retrofit Builder.
  • client – the instance of the service client containing this operation class.
/** * Initializes an instance of BatchAccountsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public BatchAccountsInner(Retrofit retrofit, BatchManagementClientImpl client) { this.service = retrofit.create(BatchAccountsService.class); this.client = client; }
The interface defining all the services for BatchAccounts to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for BatchAccounts to be * used by Retrofit to perform actually REST calls. */
interface BatchAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body BatchAccountUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts synchronizeAutoStorageKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys") Observable<Response<ResponseBody>> synchronizeAutoStorageKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts regenerateKey" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys") Observable<Response<ResponseBody>> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BatchAccountRegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts getKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys") Observable<Response<ResponseBody>> getKeys(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.BatchAccounts listByResourceGroupNext" }) @GET Observable<Response<ResponseBody>> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the BatchAccountInner object if successful.
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountInner object if successful. */
public BatchAccountInner create(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountInner> createAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, final ServiceCallback<BatchAccountInner> serviceCallback) { return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the observable for the request
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<BatchAccountInner> createAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>, BatchAccountInner>() { @Override public BatchAccountInner call(ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders> response) { return response.body(); } }); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the observable for the request
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>> createWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); Observable<Response<ResponseBody>> observable = service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken<BatchAccountInner>() { }.getType(), BatchAccountCreateHeaders.class); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the BatchAccountInner object if successful.
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountInner object if successful. */
public BatchAccountInner beginCreate(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountInner> beginCreateAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, final ServiceCallback<BatchAccountInner> serviceCallback) { return ServiceFuture.fromHeaderResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<BatchAccountInner> beginCreateAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>, BatchAccountInner>() { @Override public BatchAccountInner call(ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders> response) { return response.body(); } }); }
Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters – Additional parameters for account creation.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.beginCreate(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>>>() { @Override public Observable<ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders>> call(Response<ResponseBody> response) { try { ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders> clientResponse = beginCreateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponseWithHeaders<BatchAccountInner, BatchAccountCreateHeaders> beginCreateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BatchAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BatchAccountInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .buildWithHeaders(response, BatchAccountCreateHeaders.class); }
Updates the properties of an existing Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • parameters – Additional parameters for account update.
Throws:
Returns:the BatchAccountInner object if successful.
/** * Updates the properties of an existing Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountInner object if successful. */
public BatchAccountInner update(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
Updates the properties of an existing Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • parameters – Additional parameters for account update.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates the properties of an existing Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param parameters Additional parameters for account update. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountInner> updateAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters, final ServiceCallback<BatchAccountInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); }
Updates the properties of an existing Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • parameters – Additional parameters for account update.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Updates the properties of an existing Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<BatchAccountInner> updateAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<BatchAccountInner>, BatchAccountInner>() { @Override public BatchAccountInner call(ServiceResponse<BatchAccountInner> response) { return response.body(); } }); }
Updates the properties of an existing Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • parameters – Additional parameters for account update.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Updates the properties of an existing Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<ServiceResponse<BatchAccountInner>> updateWithServiceResponseAsync(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.update(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BatchAccountInner>>>() { @Override public Observable<ServiceResponse<BatchAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<BatchAccountInner> clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<BatchAccountInner> updateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BatchAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BatchAccountInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete(String resourceGroupName, String accountName) { deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromHeaderResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable for the request
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String accountName) { return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders> response) { return response.body(); } }); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable for the request
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken<Void>() { }.getType(), BatchAccountDeleteHeaders.class); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete(String resourceGroupName, String accountName) { beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromHeaderResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the ServiceResponseWithHeaders object if successful.
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponseWithHeaders} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String accountName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders> response) { return response.body(); } }); }
Deletes the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the ServiceResponseWithHeaders object if successful.
/** * Deletes the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponseWithHeaders} object if successful. */
public Observable<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.beginDelete(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>>>() { @Override public Observable<ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders>> call(Response<ResponseBody> response) { try { ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders> clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponseWithHeaders<Void, BatchAccountDeleteHeaders> beginDeleteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .buildWithHeaders(response, BatchAccountDeleteHeaders.class); }
Gets information about the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the BatchAccountInner object if successful.
/** * Gets information about the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountInner object if successful. */
public BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Gets information about the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName, final ServiceCallback<BatchAccountInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Gets information about the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Gets information about the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<BatchAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<BatchAccountInner>, BatchAccountInner>() { @Override public BatchAccountInner call(ServiceResponse<BatchAccountInner> response) { return response.body(); } }); }
Gets information about the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable to the BatchAccountInner object
/** * Gets information about the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountInner object */
public Observable<ServiceResponse<BatchAccountInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.getByResourceGroup(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BatchAccountInner>>>() { @Override public Observable<ServiceResponse<BatchAccountInner>> call(Response<ResponseBody> response) { try { ServiceResponse<BatchAccountInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<BatchAccountInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BatchAccountInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BatchAccountInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets information about the Batch accounts associated with the subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
  • CloudException – thrown if the request is rejected by server
  • RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns:the PagedList<BatchAccountInner> object if successful.
/** * Gets information about the Batch accounts associated with the subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;BatchAccountInner&gt; object if successful. */
public PagedList<BatchAccountInner> list() { ServiceResponse<Page<BatchAccountInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<BatchAccountInner>(response.body()) { @Override public Page<BatchAccountInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets information about the Batch accounts associated with the subscription.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the Batch accounts associated with the subscription. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<BatchAccountInner>> listAsync(final ListOperationCallback<BatchAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets information about the Batch accounts associated with the subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<Page<BatchAccountInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<BatchAccountInner>>, Page<BatchAccountInner>>() { @Override public Page<BatchAccountInner> call(ServiceResponse<Page<BatchAccountInner>> response) { return response.body(); } }); }
Gets information about the Batch accounts associated with the subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<BatchAccountInner>>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(ServiceResponse<Page<BatchAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets information about the Batch accounts associated with the subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<BatchAccountInner> object wrapped in ServiceResponse if successful.
/** * Gets information about the Batch accounts associated with the subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;BatchAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<BatchAccountInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<BatchAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<BatchAccountInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<BatchAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<BatchAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
Throws:
Returns:the PagedList<BatchAccountInner> object if successful.
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;BatchAccountInner&gt; object if successful. */
public PagedList<BatchAccountInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<BatchAccountInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<BatchAccountInner>(response.body()) { @Override public Page<BatchAccountInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<BatchAccountInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<BatchAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<Page<BatchAccountInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<BatchAccountInner>>, Page<BatchAccountInner>>() { @Override public Page<BatchAccountInner> call(ServiceResponse<Page<BatchAccountInner>> response) { return response.body(); } }); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<BatchAccountInner>>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(ServiceResponse<Page<BatchAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets information about the Batch accounts associated with the specified resource group. ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account.
Throws:
Returns:the PagedList<BatchAccountInner> object wrapped in ServiceResponse if successful.
/** * Gets information about the Batch accounts associated with the specified resource group. * ServiceResponse<PageImpl<BatchAccountInner>> * @param resourceGroupName The name of the resource group that contains the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;BatchAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<BatchAccountInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<BatchAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<BatchAccountInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<BatchAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<BatchAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Synchronizes access keys for the auto-storage account configured for the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
/** * Synchronizes access keys for the auto-storage account configured for the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void synchronizeAutoStorageKeys(String resourceGroupName, String accountName) { synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Synchronizes access keys for the auto-storage account configured for the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Synchronizes access keys for the auto-storage account configured for the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Synchronizes access keys for the auto-storage account configured for the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the ServiceResponse object if successful.
/** * Synchronizes access keys for the auto-storage account configured for the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName) { return synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Synchronizes access keys for the auto-storage account configured for the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the ServiceResponse object if successful.
/** * Synchronizes access keys for the auto-storage account configured for the specified Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> synchronizeAutoStorageKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.synchronizeAutoStorageKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = synchronizeAutoStorageKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> synchronizeAutoStorageKeysDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Regenerates the specified account key for the Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • keyName – The type of account key to regenerate. Possible values include: 'Primary', 'Secondary'
Throws:
Returns:the BatchAccountKeysInner object if successful.
/** * Regenerates the specified account key for the Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountKeysInner object if successful. */
public BatchAccountKeysInner regenerateKey(String resourceGroupName, String accountName, AccountKeyType keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); }
Regenerates the specified account key for the Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • keyName – The type of account key to regenerate. Possible values include: 'Primary', 'Secondary'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Regenerates the specified account key for the Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountKeysInner> regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName, final ServiceCallback<BatchAccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName), serviceCallback); }
Regenerates the specified account key for the Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • keyName – The type of account key to regenerate. Possible values include: 'Primary', 'Secondary'
Throws:
Returns:the observable to the BatchAccountKeysInner object
/** * Regenerates the specified account key for the Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountKeysInner object */
public Observable<BatchAccountKeysInner> regenerateKeyAsync(String resourceGroupName, String accountName, AccountKeyType keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).map(new Func1<ServiceResponse<BatchAccountKeysInner>, BatchAccountKeysInner>() { @Override public BatchAccountKeysInner call(ServiceResponse<BatchAccountKeysInner> response) { return response.body(); } }); }
Regenerates the specified account key for the Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • keyName – The type of account key to regenerate. Possible values include: 'Primary', 'Secondary'
Throws:
Returns:the observable to the BatchAccountKeysInner object
/** * Regenerates the specified account key for the Batch account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param keyName The type of account key to regenerate. Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountKeysInner object */
public Observable<ServiceResponse<BatchAccountKeysInner>> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, AccountKeyType keyName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (keyName == null) { throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); } BatchAccountRegenerateKeyParameters parameters = new BatchAccountRegenerateKeyParameters(); parameters.withKeyName(keyName); return service.regenerateKey(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BatchAccountKeysInner>>>() { @Override public Observable<ServiceResponse<BatchAccountKeysInner>> call(Response<ResponseBody> response) { try { ServiceResponse<BatchAccountKeysInner> clientResponse = regenerateKeyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<BatchAccountKeysInner> regenerateKeyDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BatchAccountKeysInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BatchAccountKeysInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets the account keys for the specified Batch account. This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the BatchAccountKeysInner object if successful.
/** * Gets the account keys for the specified Batch account. * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the BatchAccountKeysInner object if successful. */
public BatchAccountKeysInner getKeys(String resourceGroupName, String accountName) { return getKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
Gets the account keys for the specified Batch account. This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets the account keys for the specified Batch account. * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<BatchAccountKeysInner> getKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<BatchAccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(getKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
Gets the account keys for the specified Batch account. This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable to the BatchAccountKeysInner object
/** * Gets the account keys for the specified Batch account. * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountKeysInner object */
public Observable<BatchAccountKeysInner> getKeysAsync(String resourceGroupName, String accountName) { return getKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<BatchAccountKeysInner>, BatchAccountKeysInner>() { @Override public BatchAccountKeysInner call(ServiceResponse<BatchAccountKeysInner> response) { return response.body(); } }); }
Gets the account keys for the specified Batch account. This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the observable to the BatchAccountKeysInner object
/** * Gets the account keys for the specified Batch account. * This operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchAccountKeysInner object */
public Observable<ServiceResponse<BatchAccountKeysInner>> getKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (accountName == null) { throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.getKeys(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BatchAccountKeysInner>>>() { @Override public Observable<ServiceResponse<BatchAccountKeysInner>> call(Response<ResponseBody> response) { try { ServiceResponse<BatchAccountKeysInner> clientResponse = getKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<BatchAccountKeysInner> getKeysDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<BatchAccountKeysInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<BatchAccountKeysInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets information about the Batch accounts associated with the subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<BatchAccountInner> object if successful.
/** * Gets information about the Batch accounts associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;BatchAccountInner&gt; object if successful. */
public PagedList<BatchAccountInner> listNext(final String nextPageLink) { ServiceResponse<Page<BatchAccountInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<BatchAccountInner>(response.body()) { @Override public Page<BatchAccountInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets information about the Batch accounts associated with the subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the Batch accounts associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<BatchAccountInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<BatchAccountInner>> serviceFuture, final ListOperationCallback<BatchAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets information about the Batch accounts associated with the subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<Page<BatchAccountInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<BatchAccountInner>>, Page<BatchAccountInner>>() { @Override public Page<BatchAccountInner> call(ServiceResponse<Page<BatchAccountInner>> response) { return response.body(); } }); }
Gets information about the Batch accounts associated with the subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<BatchAccountInner>>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(ServiceResponse<Page<BatchAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets information about the Batch accounts associated with the subscription. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<BatchAccountInner> object wrapped in ServiceResponse if successful.
/** * Gets information about the Batch accounts associated with the subscription. * ServiceResponse<PageImpl<BatchAccountInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;BatchAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<BatchAccountInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<BatchAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<BatchAccountInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<BatchAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<BatchAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<BatchAccountInner> object if successful.
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;BatchAccountInner&gt; object if successful. */
public PagedList<BatchAccountInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<BatchAccountInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<BatchAccountInner>(response.body()) { @Override public Page<BatchAccountInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<BatchAccountInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<BatchAccountInner>> serviceFuture, final ListOperationCallback<BatchAccountInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<Page<BatchAccountInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<BatchAccountInner>>, Page<BatchAccountInner>>() { @Override public Page<BatchAccountInner> call(ServiceResponse<Page<BatchAccountInner>> response) { return response.body(); } }); }
Gets information about the Batch accounts associated with the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<BatchAccountInner> object
/** * Gets information about the Batch accounts associated with the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;BatchAccountInner&gt; object */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<BatchAccountInner>>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(ServiceResponse<Page<BatchAccountInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets information about the Batch accounts associated with the specified resource group. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<BatchAccountInner> object wrapped in ServiceResponse if successful.
/** * Gets information about the Batch accounts associated with the specified resource group. * ServiceResponse<PageImpl<BatchAccountInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;BatchAccountInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<BatchAccountInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<BatchAccountInner>>>>() { @Override public Observable<ServiceResponse<Page<BatchAccountInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<BatchAccountInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<BatchAccountInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<BatchAccountInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<BatchAccountInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<BatchAccountInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }