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.batchai.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.batchai.WorkspaceCreateParameters; import com.microsoft.azure.management.batchai.WorkspacesListByResourceGroupOptions; import com.microsoft.azure.management.batchai.WorkspacesListOptions; import com.microsoft.azure.management.batchai.WorkspaceUpdateParameters; 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 java.util.Map; 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 Workspaces.
/** * An instance of this class provides access to all the operations defined * in Workspaces. */
public class WorkspacesInner implements InnerSupportsGet<WorkspaceInner>, InnerSupportsDelete<Void>, InnerSupportsListing<WorkspaceInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private WorkspacesService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private BatchAIManagementClientImpl client;
Initializes an instance of WorkspacesInner.
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 WorkspacesInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public WorkspacesInner(Retrofit retrofit, BatchAIManagementClientImpl client) { this.service = retrofit.create(WorkspacesService.class); this.client = client; }
The interface defining all the services for Workspaces to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for Workspaces to be * used by Retrofit to perform actually REST calls. */
interface WorkspacesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Workspaces list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/workspaces") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Query("maxresults") Integer maxResults, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Workspaces listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces") Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Query("maxresults") Integer maxResults, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Workspaces create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}") Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Body WorkspaceCreateParameters 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.batchai.Workspaces beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}") Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Body WorkspaceCreateParameters 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.batchai.Workspaces update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body WorkspaceUpdateParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Workspaces delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @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.batchai.Workspaces beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @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.batchai.Workspaces getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @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.batchai.Workspaces 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.batchai.Workspaces listByResourceGroupNext" }) @GET Observable<Response<ResponseBody>> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets a list of Workspaces associated with the given 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<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces associated with the given 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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> list() { ServiceResponse<Page<WorkspaceInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces associated with the given subscription.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of Workspaces associated with the given 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<WorkspaceInner>> listAsync(final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces associated with the given subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces associated with the given subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces associated with the given subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces associated with the given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> 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."); } final WorkspacesListOptions workspacesListOptions = null; Integer maxResults = null; return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • workspacesListOptions – Additional parameters for the operation
Throws:
Returns:the PagedList<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces associated with the given subscription. * * @param workspacesListOptions Additional parameters for the 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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> list(final WorkspacesListOptions workspacesListOptions) { ServiceResponse<Page<WorkspaceInner>> response = listSinglePageAsync(workspacesListOptions).toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces associated with the given subscription.
Params:
  • workspacesListOptions – Additional parameters for the operation
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of Workspaces associated with the given subscription. * * @param workspacesListOptions Additional parameters for the operation * @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<WorkspaceInner>> listAsync(final WorkspacesListOptions workspacesListOptions, final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(workspacesListOptions), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • workspacesListOptions – Additional parameters for the operation
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given subscription. * * @param workspacesListOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listAsync(final WorkspacesListOptions workspacesListOptions) { return listWithServiceResponseAsync(workspacesListOptions) .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • workspacesListOptions – Additional parameters for the operation
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given subscription. * * @param workspacesListOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listWithServiceResponseAsync(final WorkspacesListOptions workspacesListOptions) { return listSinglePageAsync(workspacesListOptions) .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces associated with the given subscription. ServiceResponse> * @param workspacesListOptions Additional parameters for the operation
Throws:
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces associated with the given subscription. * ServiceResponse<PageImpl<WorkspaceInner>> * @param workspacesListOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listSinglePageAsync(final WorkspacesListOptions workspacesListOptions) { 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(workspacesListOptions); Integer maxResults = null; if (workspacesListOptions != null) { maxResults = workspacesListOptions.maxResults(); } return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<WorkspaceInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<WorkspaceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<WorkspaceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
Throws:
Returns:the PagedList<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<WorkspaceInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @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<WorkspaceInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
Throws:
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> 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."); } final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions = null; Integer maxResults = null; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspacesListByResourceGroupOptions – Additional parameters for the operation
Throws:
Returns:the PagedList<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspacesListByResourceGroupOptions Additional parameters for the 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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> listByResourceGroup(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions) { ServiceResponse<Page<WorkspaceInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName, workspacesListByResourceGroupOptions).toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspacesListByResourceGroupOptions – Additional parameters for the operation
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspacesListByResourceGroupOptions Additional parameters for the operation * @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<WorkspaceInner>> listByResourceGroupAsync(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions, final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName, workspacesListByResourceGroupOptions), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspacesListByResourceGroupOptions – Additional parameters for the operation
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspacesListByResourceGroupOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listByResourceGroupAsync(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName, workspacesListByResourceGroupOptions) .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces within the specified resource group.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspacesListByResourceGroupOptions – Additional parameters for the operation
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within the specified resource group. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspacesListByResourceGroupOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions) { return listByResourceGroupSinglePageAsync(resourceGroupName, workspacesListByResourceGroupOptions) .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces within the specified resource group. ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. ServiceResponse> * @param workspacesListByResourceGroupOptions Additional parameters for the operation
Throws:
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces within the specified resource group. * ServiceResponse<PageImpl<WorkspaceInner>> * @param resourceGroupName Name of the resource group to which the resource belongs. ServiceResponse<PageImpl<WorkspaceInner>> * @param workspacesListByResourceGroupOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions) { 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."); } Validator.validate(workspacesListByResourceGroupOptions); Integer maxResults = null; if (workspacesListByResourceGroupOptions != null) { maxResults = workspacesListByResourceGroupOptions.maxResults(); } return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<WorkspaceInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<WorkspaceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<WorkspaceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the WorkspaceInner object if successful.
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @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 WorkspaceInner object if successful. */
public WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).toBlocking().last().body(); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @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<WorkspaceInner> createAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the observable for the request
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<WorkspaceInner> createAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInner call(ServiceResponse<WorkspaceInner> response) { return response.body(); } }); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the observable for the request
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<WorkspaceInner>> createWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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, workspaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<WorkspaceInner>() { }.getType()); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the WorkspaceInner object if successful.
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @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 WorkspaceInner object if successful. */
public WorkspaceInner beginCreate(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).toBlocking().single().body(); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @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<WorkspaceInner> beginCreateAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters), serviceCallback); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<WorkspaceInner> beginCreateAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, parameters).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInner call(ServiceResponse<WorkspaceInner> response) { return response.body(); } }); }
Creates a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • parameters – Workspace creation parameters.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Creates a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param parameters Workspace creation parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<ServiceResponse<WorkspaceInner>> beginCreateWithServiceResponseAsync(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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, workspaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkspaceInner>>>() { @Override public Observable<ServiceResponse<WorkspaceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<WorkspaceInner> clientResponse = beginCreateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<WorkspaceInner> beginCreateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<WorkspaceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<WorkspaceInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the WorkspaceInner object if successful.
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 WorkspaceInner object if successful. */
public WorkspaceInner update(String resourceGroupName, String workspaceName) { return updateWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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<WorkspaceInner> updateAsync(String resourceGroupName, String workspaceName, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<WorkspaceInner> updateAsync(String resourceGroupName, String workspaceName) { return updateWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInner call(ServiceResponse<WorkspaceInner> response) { return response.body(); } }); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<ServiceResponse<WorkspaceInner>> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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 Map<String, String> tags = null; WorkspaceUpdateParameters parameters = new WorkspaceUpdateParameters(); parameters.withTags(null); return service.update(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkspaceInner>>>() { @Override public Observable<ServiceResponse<WorkspaceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<WorkspaceInner> clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • tags – Tags. The user specified tags associated with the Workspace.
Throws:
Returns:the WorkspaceInner object if successful.
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param tags Tags. The user specified tags associated with the Workspace. * @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 WorkspaceInner object if successful. */
public WorkspaceInner update(String resourceGroupName, String workspaceName, Map<String, String> tags) { return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tags).toBlocking().single().body(); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • tags – Tags. The user specified tags associated with the Workspace.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param tags Tags. The user specified tags associated with the Workspace. * @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<WorkspaceInner> updateAsync(String resourceGroupName, String workspaceName, Map<String, String> tags, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, tags), serviceCallback); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • tags – Tags. The user specified tags associated with the Workspace.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param tags Tags. The user specified tags associated with the Workspace. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<WorkspaceInner> updateAsync(String resourceGroupName, String workspaceName, Map<String, String> tags) { return updateWithServiceResponseAsync(resourceGroupName, workspaceName, tags).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInner call(ServiceResponse<WorkspaceInner> response) { return response.body(); } }); }
Updates properties of a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • tags – Tags. The user specified tags associated with the Workspace.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Updates properties of a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @param tags Tags. The user specified tags associated with the Workspace. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<ServiceResponse<WorkspaceInner>> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, Map<String, String> tags) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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(tags); WorkspaceUpdateParameters parameters = new WorkspaceUpdateParameters(); parameters.withTags(tags); return service.update(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkspaceInner>>>() { @Override public Observable<ServiceResponse<WorkspaceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<WorkspaceInner> clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<WorkspaceInner> updateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<WorkspaceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<WorkspaceInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 workspaceName) { deleteWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().last().body(); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 workspaceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable for the request
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String workspaceName) { return deleteWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable for the request
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 workspaceName) { beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 workspaceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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, workspaceName, 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 = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> 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) .build(response); }
Gets information about a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the WorkspaceInner object if successful.
/** * Gets information about a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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 WorkspaceInner object if successful. */
public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName).toBlocking().single().body(); }
Gets information about a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets information about a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @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<WorkspaceInner> getByResourceGroupAsync(String resourceGroupName, String workspaceName, final ServiceCallback<WorkspaceInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName), serviceCallback); }
Gets information about a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Gets information about a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<WorkspaceInner> getByResourceGroupAsync(String resourceGroupName, String workspaceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workspaceName).map(new Func1<ServiceResponse<WorkspaceInner>, WorkspaceInner>() { @Override public WorkspaceInner call(ServiceResponse<WorkspaceInner> response) { return response.body(); } }); }
Gets information about a Workspace.
Params:
  • resourceGroupName – Name of the resource group to which the resource belongs.
  • workspaceName – The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
Throws:
Returns:the observable to the WorkspaceInner object
/** * Gets information about a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the WorkspaceInner object */
public Observable<ServiceResponse<WorkspaceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workspaceName == null) { throw new IllegalArgumentException("Parameter workspaceName 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, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkspaceInner>>>() { @Override public Observable<ServiceResponse<WorkspaceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<WorkspaceInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<WorkspaceInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<WorkspaceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<WorkspaceInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces associated with the given 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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> listNext(final String nextPageLink) { ServiceResponse<Page<WorkspaceInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces associated with the given 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 a list of Workspaces associated with the given 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<WorkspaceInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<WorkspaceInner>> serviceFuture, final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given 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;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces associated with the given subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces associated with the given 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;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces associated with the given subscription. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces associated with the given subscription. * ServiceResponse<PageImpl<WorkspaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> 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<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<WorkspaceInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<WorkspaceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<WorkspaceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of Workspaces within the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<WorkspaceInner> object if successful.
/** * Gets a list of Workspaces within 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;WorkspaceInner&gt; object if successful. */
public PagedList<WorkspaceInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<WorkspaceInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<WorkspaceInner>(response.body()) { @Override public Page<WorkspaceInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of Workspaces within 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 a list of Workspaces within 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<WorkspaceInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<WorkspaceInner>> serviceFuture, final ListOperationCallback<WorkspaceInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of Workspaces within the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within 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;WorkspaceInner&gt; object */
public Observable<Page<WorkspaceInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<WorkspaceInner>>, Page<WorkspaceInner>>() { @Override public Page<WorkspaceInner> call(ServiceResponse<Page<WorkspaceInner>> response) { return response.body(); } }); }
Gets a list of Workspaces within the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<WorkspaceInner> object
/** * Gets a list of Workspaces within 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;WorkspaceInner&gt; object */
public Observable<ServiceResponse<Page<WorkspaceInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<WorkspaceInner>>, Observable<ServiceResponse<Page<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(ServiceResponse<Page<WorkspaceInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of Workspaces within the specified resource group. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<WorkspaceInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of Workspaces within the specified resource group. * ServiceResponse<PageImpl<WorkspaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;WorkspaceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<WorkspaceInner>>> 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<WorkspaceInner>>>>() { @Override public Observable<ServiceResponse<Page<WorkspaceInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<WorkspaceInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<WorkspaceInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<WorkspaceInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<WorkspaceInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<WorkspaceInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }