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 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.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.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.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 Applications.
/** * An instance of this class provides access to all the operations defined * in Applications. */
public class ApplicationsInner {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private ApplicationsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private BatchManagementClientImpl client;
Initializes an instance of ApplicationsInner.
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 ApplicationsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public ApplicationsInner(Retrofit retrofit, BatchManagementClientImpl client) { this.service = retrofit.create(ApplicationsService.class); this.client = client; }
The interface defining all the services for Applications to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for Applications to be * used by Retrofit to perform actually REST calls. */
interface ApplicationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batch.Applications create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationName") String applicationName, @Path("subscriptionId") String subscriptionId, @Body ApplicationInner 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.Applications delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationName") String applicationName, @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.Applications get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationName") String applicationName, @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.Applications update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("applicationName") String applicationName, @Path("subscriptionId") String subscriptionId, @Body ApplicationInner 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.Applications list" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications") Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("maxresults") Integer maxresults, @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.Applications listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the ApplicationInner object if successful.
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the 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 ApplicationInner object if successful. */
public ApplicationInner create(String resourceGroupName, String accountName, String applicationName) { return createWithServiceResponseAsync(resourceGroupName, accountName, applicationName).toBlocking().single().body(); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the 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<ApplicationInner> createAsync(String resourceGroupName, String accountName, String applicationName, final ServiceCallback<ApplicationInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationName), serviceCallback); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the observable to the ApplicationInner object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ApplicationInner> createAsync(String resourceGroupName, String accountName, String applicationName) { return createWithServiceResponseAsync(resourceGroupName, accountName, applicationName).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInner>() { @Override public ApplicationInner call(ServiceResponse<ApplicationInner> response) { return response.body(); } }); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the observable to the ApplicationInner object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ServiceResponse<ApplicationInner>> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationName) { 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 (applicationName == null) { throw new IllegalArgumentException("Parameter applicationName 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."); } final ApplicationInner parameters = null; return service.create(resourceGroupName, accountName, applicationName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInner>>>() { @Override public Observable<ServiceResponse<ApplicationInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ApplicationInner> clientResponse = createDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the ApplicationInner object if successful.
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @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 ApplicationInner object if successful. */
public ApplicationInner create(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters).toBlocking().single().body(); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @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<ApplicationInner> createAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters, final ServiceCallback<ApplicationInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters), serviceCallback); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the observable to the ApplicationInner object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ApplicationInner> createAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInner>() { @Override public ApplicationInner call(ServiceResponse<ApplicationInner> response) { return response.body(); } }); }
Adds an application to the specified Batch account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the observable to the ApplicationInner object
/** * Adds an application to 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 applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ServiceResponse<ApplicationInner>> createWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner 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 (applicationName == null) { throw new IllegalArgumentException("Parameter applicationName 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."); } Validator.validate(parameters); return service.create(resourceGroupName, accountName, applicationName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInner>>>() { @Override public Observable<ServiceResponse<ApplicationInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ApplicationInner> clientResponse = createDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ApplicationInner> createDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ApplicationInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ApplicationInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes an application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
/** * Deletes an application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the 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, String applicationName) { deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationName).toBlocking().single().body(); }
Deletes an application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes an application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the 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, String applicationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationName), serviceCallback); }
Deletes an application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> deleteAsync(String resourceGroupName, String accountName, String applicationName) { return deleteWithServiceResponseAsync(resourceGroupName, accountName, applicationName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes an application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationName) { 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 (applicationName == null) { throw new IllegalArgumentException("Parameter applicationName 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.delete(resourceGroupName, accountName, applicationName, 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 = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> deleteDelegate(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(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets information about the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the ApplicationInner object if successful.
/** * Gets information about the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the 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 ApplicationInner object if successful. */
public ApplicationInner get(String resourceGroupName, String accountName, String applicationName) { return getWithServiceResponseAsync(resourceGroupName, accountName, applicationName).toBlocking().single().body(); }
Gets information about the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the 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<ApplicationInner> getAsync(String resourceGroupName, String accountName, String applicationName, final ServiceCallback<ApplicationInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, applicationName), serviceCallback); }
Gets information about the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the observable to the ApplicationInner object
/** * Gets information about the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ApplicationInner> getAsync(String resourceGroupName, String accountName, String applicationName) { return getWithServiceResponseAsync(resourceGroupName, accountName, applicationName).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInner>() { @Override public ApplicationInner call(ServiceResponse<ApplicationInner> response) { return response.body(); } }); }
Gets information about the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
Throws:
Returns:the observable to the ApplicationInner object
/** * Gets information about the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ServiceResponse<ApplicationInner>> getWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationName) { 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 (applicationName == null) { throw new IllegalArgumentException("Parameter applicationName 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.get(resourceGroupName, accountName, applicationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInner>>>() { @Override public Observable<ServiceResponse<ApplicationInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ApplicationInner> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ApplicationInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ApplicationInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ApplicationInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Updates settings for the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the ApplicationInner object if successful.
/** * Updates settings for the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @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 ApplicationInner object if successful. */
public ApplicationInner update(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters).toBlocking().single().body(); }
Updates settings for the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates settings for the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @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<ApplicationInner> updateAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters, final ServiceCallback<ApplicationInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters), serviceCallback); }
Updates settings for the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the observable to the ApplicationInner object
/** * Updates settings for the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ApplicationInner> updateAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInner>() { @Override public ApplicationInner call(ServiceResponse<ApplicationInner> response) { return response.body(); } }); }
Updates settings for the specified application.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • applicationName – The name of the application. This must be unique within the account.
  • parameters – The parameters for the request.
Throws:
Returns:the observable to the ApplicationInner object
/** * Updates settings for the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ApplicationInner object */
public Observable<ServiceResponse<ApplicationInner>> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String applicationName, ApplicationInner 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 (applicationName == null) { throw new IllegalArgumentException("Parameter applicationName 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, applicationName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInner>>>() { @Override public Observable<ServiceResponse<ApplicationInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ApplicationInner> clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ApplicationInner> updateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ApplicationInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ApplicationInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the PagedList<ApplicationInner> object if successful.
/** * Lists all of the applications in the specified 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 PagedList&lt;ApplicationInner&gt; object if successful. */
public PagedList<ApplicationInner> list(final String resourceGroupName, final String accountName) { ServiceResponse<Page<ApplicationInner>> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); return new PagedList<ApplicationInner>(response.body()) { @Override public Page<ApplicationInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the applications in the specified 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
/** * Lists all of the applications in the specified 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<List<ApplicationInner>> listAsync(final String resourceGroupName, final String accountName, final ListOperationCallback<ApplicationInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(resourceGroupName, accountName), new Func1<String, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the applications in the specified 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 PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified 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 PagedList&lt;ApplicationInner&gt; object */
public Observable<Page<ApplicationInner>> listAsync(final String resourceGroupName, final String accountName) { return listWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<ApplicationInner>>, Page<ApplicationInner>>() { @Override public Page<ApplicationInner> call(ServiceResponse<Page<ApplicationInner>> response) { return response.body(); } }); }
Lists all of the applications in the specified 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 PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified 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 PagedList&lt;ApplicationInner&gt; object */
public Observable<ServiceResponse<Page<ApplicationInner>>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) { return listSinglePageAsync(resourceGroupName, accountName) .concatMap(new Func1<ServiceResponse<Page<ApplicationInner>>, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(ServiceResponse<Page<ApplicationInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
Throws:
Returns:the PagedList<ApplicationInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the applications in the specified 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 PagedList&lt;ApplicationInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ApplicationInner>>> listSinglePageAsync(final String resourceGroupName, final 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."); } final Integer maxresults = null; return service.list(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ApplicationInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<ApplicationInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • maxresults – The maximum number of items to return in the response.
Throws:
Returns:the PagedList<ApplicationInner> object if successful.
/** * Lists all of the applications in the specified account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param maxresults The maximum number of items to return in the response. * @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;ApplicationInner&gt; object if successful. */
public PagedList<ApplicationInner> list(final String resourceGroupName, final String accountName, final Integer maxresults) { ServiceResponse<Page<ApplicationInner>> response = listSinglePageAsync(resourceGroupName, accountName, maxresults).toBlocking().single(); return new PagedList<ApplicationInner>(response.body()) { @Override public Page<ApplicationInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • maxresults – The maximum number of items to return in the response.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all of the applications in the specified account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param maxresults The maximum number of items to return in the response. * @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<ApplicationInner>> listAsync(final String resourceGroupName, final String accountName, final Integer maxresults, final ListOperationCallback<ApplicationInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(resourceGroupName, accountName, maxresults), new Func1<String, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • maxresults – The maximum number of items to return in the response.
Throws:
Returns:the observable to the PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ApplicationInner&gt; object */
public Observable<Page<ApplicationInner>> listAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { return listWithServiceResponseAsync(resourceGroupName, accountName, maxresults) .map(new Func1<ServiceResponse<Page<ApplicationInner>>, Page<ApplicationInner>>() { @Override public Page<ApplicationInner> call(ServiceResponse<Page<ApplicationInner>> response) { return response.body(); } }); }
Lists all of the applications in the specified account.
Params:
  • resourceGroupName – The name of the resource group that contains the Batch account.
  • accountName – The name of the Batch account.
  • maxresults – The maximum number of items to return in the response.
Throws:
Returns:the observable to the PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified account. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ApplicationInner&gt; object */
public Observable<ServiceResponse<Page<ApplicationInner>>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { return listSinglePageAsync(resourceGroupName, accountName, maxresults) .concatMap(new Func1<ServiceResponse<Page<ApplicationInner>>, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(ServiceResponse<Page<ApplicationInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the applications in the specified account. ServiceResponse> * @param resourceGroupName The name of the resource group that contains the Batch account. ServiceResponse> * @param accountName The name of the Batch account. ServiceResponse> * @param maxresults The maximum number of items to return in the response.
Throws:
Returns:the PagedList<ApplicationInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the applications in the specified account. * ServiceResponse<PageImpl<ApplicationInner>> * @param resourceGroupName The name of the resource group that contains the Batch account. ServiceResponse<PageImpl<ApplicationInner>> * @param accountName The name of the Batch account. ServiceResponse<PageImpl<ApplicationInner>> * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ApplicationInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ApplicationInner>>> listSinglePageAsync(final String resourceGroupName, final String accountName, final Integer maxresults) { 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.list(resourceGroupName, accountName, this.client.subscriptionId(), maxresults, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ApplicationInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<ApplicationInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ApplicationInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ApplicationInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ApplicationInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all of the applications in the specified account.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ApplicationInner> object if successful.
/** * Lists all of the applications in the specified account. * * @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;ApplicationInner&gt; object if successful. */
public PagedList<ApplicationInner> listNext(final String nextPageLink) { ServiceResponse<Page<ApplicationInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<ApplicationInner>(response.body()) { @Override public Page<ApplicationInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the applications in the specified account.
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
/** * Lists all of the applications in the specified account. * * @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<ApplicationInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<ApplicationInner>> serviceFuture, final ListOperationCallback<ApplicationInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the applications in the specified account.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified account. * * @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;ApplicationInner&gt; object */
public Observable<Page<ApplicationInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ApplicationInner>>, Page<ApplicationInner>>() { @Override public Page<ApplicationInner> call(ServiceResponse<Page<ApplicationInner>> response) { return response.body(); } }); }
Lists all of the applications in the specified account.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ApplicationInner> object
/** * Lists all of the applications in the specified account. * * @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;ApplicationInner&gt; object */
public Observable<ServiceResponse<Page<ApplicationInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<ApplicationInner>>, Observable<ServiceResponse<Page<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(ServiceResponse<Page<ApplicationInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the applications in the specified account. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ApplicationInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the applications in the specified account. * ServiceResponse<PageImpl<ApplicationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ApplicationInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ApplicationInner>>> 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<ApplicationInner>>>>() { @Override public Observable<ServiceResponse<Page<ApplicationInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ApplicationInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<ApplicationInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ApplicationInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ApplicationInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ApplicationInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }