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 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.ClusterCreateParameters;
import com.microsoft.azure.management.batchai.ClustersListByWorkspaceOptions;
import com.microsoft.azure.management.batchai.ClusterUpdateParameters;
import com.microsoft.azure.management.batchai.ScaleSettings;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.PATCH;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
An instance of this class provides access to all the operations defined
in Clusters.
/**
* An instance of this class provides access to all the operations defined
* in Clusters.
*/
public class ClustersInner {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private ClustersService service;
The service client containing this operation class. /** The service client containing this operation class. */
private BatchAIManagementClientImpl client;
Initializes an instance of ClustersInner.
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 ClustersInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public ClustersInner(Retrofit retrofit, BatchAIManagementClientImpl client) {
this.service = retrofit.create(ClustersService.class);
this.client = client;
}
The interface defining all the services for Clusters to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for Clusters to be
* used by Retrofit to perform actually REST calls.
*/
interface ClustersService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Clusters create" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}")
Observable<Response<ResponseBody>> create(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterCreateParameters 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.Clusters beginCreate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}")
Observable<Response<ResponseBody>> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterCreateParameters 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.Clusters update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ClusterUpdateParameters parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.batchai.Clusters delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @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.Clusters beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @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.Clusters get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @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.Clusters listRemoteLoginInformation" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}/listRemoteLoginInformation")
Observable<Response<ResponseBody>> listRemoteLoginInformation(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("clusterName") String clusterName, @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.Clusters listByWorkspace" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters")
Observable<Response<ResponseBody>> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @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.Clusters listRemoteLoginInformationNext" })
@GET
Observable<Response<ResponseBody>> listRemoteLoginInformationNext(@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.Clusters listByWorkspaceNext" })
@GET
Observable<Response<ResponseBody>> listByWorkspaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
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 ClusterInner object if successful.
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ClusterInner object if successful.
*/
public ClusterInner create(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters) {
return createWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters).toBlocking().last().body();
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<ClusterInner> createAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters, final ServiceCallback<ClusterInner> serviceCallback) {
return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters), serviceCallback);
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ClusterInner> createAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters) {
return createWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
@Override
public ClusterInner call(ServiceResponse<ClusterInner> response) {
return response.body();
}
});
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ClusterInner>> createWithServiceResponseAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters 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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ClusterInner>() { }.getType());
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
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 ClusterInner object if successful.
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ClusterInner object if successful.
*/
public ClusterInner beginCreate(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters).toBlocking().single().body();
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<ClusterInner> beginCreateAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters, final ServiceCallback<ClusterInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters), serviceCallback);
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ClusterInner object
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ClusterInner object
*/
public Observable<ClusterInner> beginCreateAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, parameters).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
@Override
public ClusterInner call(ServiceResponse<ClusterInner> response) {
return response.body();
}
});
}
Creates a Cluster in the given 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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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 – The parameters to provide for the Cluster creation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ClusterInner object
/**
* Creates a Cluster in the given 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 clusterName The name of the cluster within the specified resource group. Cluster 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 The parameters to provide for the Cluster creation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ClusterInner object
*/
public Observable<ServiceResponse<ClusterInner>> beginCreateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters 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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ClusterInner>>>() {
@Override
public Observable<ServiceResponse<ClusterInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ClusterInner> clientResponse = beginCreateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ClusterInner> beginCreateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ClusterInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ClusterInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ClusterInner object if successful.
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object if successful.
*/
public ClusterInner update(String resourceGroupName, String workspaceName, String clusterName) {
return updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).toBlocking().single().body();
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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<ClusterInner> updateAsync(String resourceGroupName, String workspaceName, String clusterName, final ServiceCallback<ClusterInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName), serviceCallback);
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the ClusterInner object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object
*/
public Observable<ClusterInner> updateAsync(String resourceGroupName, String workspaceName, String clusterName) {
return updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
@Override
public ClusterInner call(ServiceResponse<ClusterInner> response) {
return response.body();
}
});
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the ClusterInner object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object
*/
public Observable<ServiceResponse<ClusterInner>> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String clusterName) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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 ScaleSettings scaleSettings = null;
ClusterUpdateParameters parameters = new ClusterUpdateParameters();
parameters.withScaleSettings(null);
return service.update(resourceGroupName, workspaceName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ClusterInner>>>() {
@Override
public Observable<ServiceResponse<ClusterInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ClusterInner> clientResponse = updateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
- scaleSettings – Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
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 ClusterInner object if successful.
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 scaleSettings Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
* @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 ClusterInner object if successful.
*/
public ClusterInner update(String resourceGroupName, String workspaceName, String clusterName, ScaleSettings scaleSettings) {
return updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, scaleSettings).toBlocking().single().body();
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
- scaleSettings – Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 scaleSettings Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
* @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<ClusterInner> updateAsync(String resourceGroupName, String workspaceName, String clusterName, ScaleSettings scaleSettings, final ServiceCallback<ClusterInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, scaleSettings), serviceCallback);
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
- scaleSettings – Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ClusterInner object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 scaleSettings Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ClusterInner object
*/
public Observable<ClusterInner> updateAsync(String resourceGroupName, String workspaceName, String clusterName, ScaleSettings scaleSettings) {
return updateWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName, scaleSettings).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
@Override
public ClusterInner call(ServiceResponse<ClusterInner> response) {
return response.body();
}
});
}
Updates properties of a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
- scaleSettings – Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ClusterInner object
/**
* Updates properties of a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 scaleSettings Scale settings. Desired scale settings for the cluster. Batch AI service supports manual and auto scale clusters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ClusterInner object
*/
public Observable<ServiceResponse<ClusterInner>> updateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String clusterName, ScaleSettings scaleSettings) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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(scaleSettings);
ClusterUpdateParameters parameters = new ClusterUpdateParameters();
parameters.withScaleSettings(scaleSettings);
return service.update(resourceGroupName, workspaceName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ClusterInner>>>() {
@Override
public Observable<ServiceResponse<ClusterInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ClusterInner> clientResponse = updateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ClusterInner> updateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ClusterInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ClusterInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
deleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).toBlocking().last().body();
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName), serviceCallback);
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable for the request
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable for the request
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).toBlocking().single().body();
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName), serviceCallback);
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the ServiceResponse
object if successful.
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the ServiceResponse
object if successful.
/**
* Deletes a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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, String clusterName) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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, clusterName, 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 Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the ClusterInner object if successful.
/**
* Gets information about a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object if successful.
*/
public ClusterInner get(String resourceGroupName, String workspaceName, String clusterName) {
return getWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).toBlocking().single().body();
}
Gets information about a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets information about a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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<ClusterInner> getAsync(String resourceGroupName, String workspaceName, String clusterName, final ServiceCallback<ClusterInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName), serviceCallback);
}
Gets information about a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the ClusterInner object
/**
* Gets information about a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object
*/
public Observable<ClusterInner> getAsync(String resourceGroupName, String workspaceName, String clusterName) {
return getWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
@Override
public ClusterInner call(ServiceResponse<ClusterInner> response) {
return response.body();
}
});
}
Gets information about a Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the ClusterInner object
/**
* Gets information about a Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 ClusterInner object
*/
public Observable<ServiceResponse<ClusterInner>> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String clusterName) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.get(resourceGroupName, workspaceName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ClusterInner>>>() {
@Override
public Observable<ServiceResponse<ClusterInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ClusterInner> clientResponse = getDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ClusterInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ClusterInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ClusterInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the IP address, port of all the compute nodes in the Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
- 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<RemoteLoginInformationInner> object if successful.
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 PagedList<RemoteLoginInformationInner> object if successful.
*/
public PagedList<RemoteLoginInformationInner> listRemoteLoginInformation(final String resourceGroupName, final String workspaceName, final String clusterName) {
ServiceResponse<Page<RemoteLoginInformationInner>> response = listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, clusterName).toBlocking().single();
return new PagedList<RemoteLoginInformationInner>(response.body()) {
@Override
public Page<RemoteLoginInformationInner> nextPage(String nextPageLink) {
return listRemoteLoginInformationNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Get the IP address, port of all the compute nodes in the Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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<List<RemoteLoginInformationInner>> listRemoteLoginInformationAsync(final String resourceGroupName, final String workspaceName, final String clusterName, final ListOperationCallback<RemoteLoginInformationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, clusterName),
new Func1<String, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(String nextPageLink) {
return listRemoteLoginInformationNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Get the IP address, port of all the compute nodes in the Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the PagedList<RemoteLoginInformationInner> object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 PagedList<RemoteLoginInformationInner> object
*/
public Observable<Page<RemoteLoginInformationInner>> listRemoteLoginInformationAsync(final String resourceGroupName, final String workspaceName, final String clusterName) {
return listRemoteLoginInformationWithServiceResponseAsync(resourceGroupName, workspaceName, clusterName)
.map(new Func1<ServiceResponse<Page<RemoteLoginInformationInner>>, Page<RemoteLoginInformationInner>>() {
@Override
public Page<RemoteLoginInformationInner> call(ServiceResponse<Page<RemoteLoginInformationInner>> response) {
return response.body();
}
});
}
Get the IP address, port of all the compute nodes in the Cluster.
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.
- clusterName – The name of the cluster within the specified resource group. Cluster 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
Returns: the observable to the PagedList<RemoteLoginInformationInner> object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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 clusterName The name of the cluster within the specified resource group. Cluster 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 PagedList<RemoteLoginInformationInner> object
*/
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> listRemoteLoginInformationWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String clusterName) {
return listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, clusterName)
.concatMap(new Func1<ServiceResponse<Page<RemoteLoginInformationInner>>, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(ServiceResponse<Page<RemoteLoginInformationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listRemoteLoginInformationNextWithServiceResponseAsync(nextPageLink));
}
});
}
Get the IP address, port of all the compute nodes in the Cluster.
ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs.
ServiceResponse> * @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.
ServiceResponse> * @param clusterName The name of the cluster within the specified resource group. Cluster 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
Returns: the PagedList<RemoteLoginInformationInner> object wrapped in ServiceResponse
if successful.
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
ServiceResponse<PageImpl<RemoteLoginInformationInner>> * @param resourceGroupName Name of the resource group to which the resource belongs.
ServiceResponse<PageImpl<RemoteLoginInformationInner>> * @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.
ServiceResponse<PageImpl<RemoteLoginInformationInner>> * @param clusterName The name of the cluster within the specified resource group. Cluster 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 PagedList<RemoteLoginInformationInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> listRemoteLoginInformationSinglePageAsync(final String resourceGroupName, final String workspaceName, final String clusterName) {
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 (clusterName == null) {
throw new IllegalArgumentException("Parameter clusterName 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.listRemoteLoginInformation(resourceGroupName, workspaceName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<RemoteLoginInformationInner>> result = listRemoteLoginInformationDelegate(response);
return Observable.just(new ServiceResponse<Page<RemoteLoginInformationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<RemoteLoginInformationInner>> listRemoteLoginInformationDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<RemoteLoginInformationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<RemoteLoginInformationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets information about Clusters associated with the given 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: - 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<ClusterInner> object if successful.
/**
* Gets information about Clusters associated with the given 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 PagedList<ClusterInner> object if successful.
*/
public PagedList<ClusterInner> listByWorkspace(final String resourceGroupName, final String workspaceName) {
ServiceResponse<Page<ClusterInner>> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName).toBlocking().single();
return new PagedList<ClusterInner>(response.body()) {
@Override
public Page<ClusterInner> nextPage(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets information about Clusters associated with the given 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets information about Clusters associated with the given 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<List<ClusterInner>> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final ListOperationCallback<ClusterInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName),
new Func1<String, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets information about Clusters associated with the given 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given 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 PagedList<ClusterInner> object
*/
public Observable<Page<ClusterInner>> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName) {
return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName)
.map(new Func1<ServiceResponse<Page<ClusterInner>>, Page<ClusterInner>>() {
@Override
public Page<ClusterInner> call(ServiceResponse<Page<ClusterInner>> response) {
return response.body();
}
});
}
Gets information about Clusters associated with the given 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given 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 PagedList<ClusterInner> object
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName) {
return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName)
.concatMap(new Func1<ServiceResponse<Page<ClusterInner>>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(ServiceResponse<Page<ClusterInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets information about Clusters associated with the given 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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ClusterInner> object wrapped in ServiceResponse
if successful.
/**
* Gets information about Clusters associated with the given 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 PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final 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 ClustersListByWorkspaceOptions clustersListByWorkspaceOptions = null;
Integer maxResults = null;
return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ClusterInner>> result = listByWorkspaceDelegate(response);
return Observable.just(new ServiceResponse<Page<ClusterInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Gets information about Clusters associated with the given 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.
- clustersListByWorkspaceOptions – Additional parameters for the operation
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<ClusterInner> object if successful.
/**
* Gets information about Clusters associated with the given 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 clustersListByWorkspaceOptions 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<ClusterInner> object if successful.
*/
public PagedList<ClusterInner> listByWorkspace(final String resourceGroupName, final String workspaceName, final ClustersListByWorkspaceOptions clustersListByWorkspaceOptions) {
ServiceResponse<Page<ClusterInner>> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, clustersListByWorkspaceOptions).toBlocking().single();
return new PagedList<ClusterInner>(response.body()) {
@Override
public Page<ClusterInner> nextPage(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets information about Clusters associated with the given 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.
- clustersListByWorkspaceOptions – Additional parameters for the operation
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets information about Clusters associated with the given 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 clustersListByWorkspaceOptions 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<ClusterInner>> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final ClustersListByWorkspaceOptions clustersListByWorkspaceOptions, final ListOperationCallback<ClusterInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, clustersListByWorkspaceOptions),
new Func1<String, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets information about Clusters associated with the given 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.
- clustersListByWorkspaceOptions – Additional parameters for the operation
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given 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 clustersListByWorkspaceOptions Additional parameters for the operation
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ClusterInner> object
*/
public Observable<Page<ClusterInner>> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final ClustersListByWorkspaceOptions clustersListByWorkspaceOptions) {
return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName, clustersListByWorkspaceOptions)
.map(new Func1<ServiceResponse<Page<ClusterInner>>, Page<ClusterInner>>() {
@Override
public Page<ClusterInner> call(ServiceResponse<Page<ClusterInner>> response) {
return response.body();
}
});
}
Gets information about Clusters associated with the given 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.
- clustersListByWorkspaceOptions – Additional parameters for the operation
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given 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 clustersListByWorkspaceOptions Additional parameters for the operation
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<ClusterInner> object
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final ClustersListByWorkspaceOptions clustersListByWorkspaceOptions) {
return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, clustersListByWorkspaceOptions)
.concatMap(new Func1<ServiceResponse<Page<ClusterInner>>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(ServiceResponse<Page<ClusterInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets information about Clusters associated with the given Workspace.
ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs.
ServiceResponse> * @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.
ServiceResponse> * @param clustersListByWorkspaceOptions Additional parameters for the operation
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ClusterInner> object wrapped in ServiceResponse
if successful.
/**
* Gets information about Clusters associated with the given Workspace.
*
ServiceResponse<PageImpl<ClusterInner>> * @param resourceGroupName Name of the resource group to which the resource belongs.
ServiceResponse<PageImpl<ClusterInner>> * @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.
ServiceResponse<PageImpl<ClusterInner>> * @param clustersListByWorkspaceOptions Additional parameters for the operation
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final ClustersListByWorkspaceOptions clustersListByWorkspaceOptions) {
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(clustersListByWorkspaceOptions);
Integer maxResults = null;
if (clustersListByWorkspaceOptions != null) {
maxResults = clustersListByWorkspaceOptions.maxResults();
}
return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), maxResults, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ClusterInner>> result = listByWorkspaceDelegate(response);
return Observable.just(new ServiceResponse<Page<ClusterInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ClusterInner>> listByWorkspaceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ClusterInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ClusterInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the IP address, port of all the compute nodes in the Cluster.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
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<RemoteLoginInformationInner> object if successful.
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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<RemoteLoginInformationInner> object if successful.
*/
public PagedList<RemoteLoginInformationInner> listRemoteLoginInformationNext(final String nextPageLink) {
ServiceResponse<Page<RemoteLoginInformationInner>> response = listRemoteLoginInformationNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<RemoteLoginInformationInner>(response.body()) {
@Override
public Page<RemoteLoginInformationInner> nextPage(String nextPageLink) {
return listRemoteLoginInformationNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Get the IP address, port of all the compute nodes in the Cluster.
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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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<RemoteLoginInformationInner>> listRemoteLoginInformationNextAsync(final String nextPageLink, final ServiceFuture<List<RemoteLoginInformationInner>> serviceFuture, final ListOperationCallback<RemoteLoginInformationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listRemoteLoginInformationNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(String nextPageLink) {
return listRemoteLoginInformationNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Get the IP address, port of all the compute nodes in the Cluster.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<RemoteLoginInformationInner> object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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<RemoteLoginInformationInner> object
*/
public Observable<Page<RemoteLoginInformationInner>> listRemoteLoginInformationNextAsync(final String nextPageLink) {
return listRemoteLoginInformationNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<RemoteLoginInformationInner>>, Page<RemoteLoginInformationInner>>() {
@Override
public Page<RemoteLoginInformationInner> call(ServiceResponse<Page<RemoteLoginInformationInner>> response) {
return response.body();
}
});
}
Get the IP address, port of all the compute nodes in the Cluster.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<RemoteLoginInformationInner> object
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
* @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<RemoteLoginInformationInner> object
*/
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> listRemoteLoginInformationNextWithServiceResponseAsync(final String nextPageLink) {
return listRemoteLoginInformationNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<RemoteLoginInformationInner>>, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(ServiceResponse<Page<RemoteLoginInformationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listRemoteLoginInformationNextWithServiceResponseAsync(nextPageLink));
}
});
}
Get the IP address, port of all the compute nodes in the Cluster.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<RemoteLoginInformationInner> object wrapped in ServiceResponse
if successful.
/**
* Get the IP address, port of all the compute nodes in the Cluster.
*
ServiceResponse<PageImpl<RemoteLoginInformationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<RemoteLoginInformationInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> listRemoteLoginInformationNextSinglePageAsync(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.listRemoteLoginInformationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<RemoteLoginInformationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<RemoteLoginInformationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<RemoteLoginInformationInner>> result = listRemoteLoginInformationNextDelegate(response);
return Observable.just(new ServiceResponse<Page<RemoteLoginInformationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<RemoteLoginInformationInner>> listRemoteLoginInformationNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<RemoteLoginInformationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<RemoteLoginInformationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets information about Clusters associated with the given Workspace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
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<ClusterInner> object if successful.
/**
* Gets information about Clusters associated with the given Workspace.
*
* @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<ClusterInner> object if successful.
*/
public PagedList<ClusterInner> listByWorkspaceNext(final String nextPageLink) {
ServiceResponse<Page<ClusterInner>> response = listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<ClusterInner>(response.body()) {
@Override
public Page<ClusterInner> nextPage(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets information about Clusters associated with the given Workspace.
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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets information about Clusters associated with the given Workspace.
*
* @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<ClusterInner>> listByWorkspaceNextAsync(final String nextPageLink, final ServiceFuture<List<ClusterInner>> serviceFuture, final ListOperationCallback<ClusterInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByWorkspaceNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets information about Clusters associated with the given Workspace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given Workspace.
*
* @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<ClusterInner> object
*/
public Observable<Page<ClusterInner>> listByWorkspaceNextAsync(final String nextPageLink) {
return listByWorkspaceNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ClusterInner>>, Page<ClusterInner>>() {
@Override
public Page<ClusterInner> call(ServiceResponse<Page<ClusterInner>> response) {
return response.body();
}
});
}
Gets information about Clusters associated with the given Workspace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<ClusterInner> object
/**
* Gets information about Clusters associated with the given Workspace.
*
* @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<ClusterInner> object
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceNextWithServiceResponseAsync(final String nextPageLink) {
return listByWorkspaceNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<ClusterInner>>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(ServiceResponse<Page<ClusterInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets information about Clusters associated with the given Workspace.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<ClusterInner> object wrapped in ServiceResponse
if successful.
/**
* Gets information about Clusters associated with the given Workspace.
*
ServiceResponse<PageImpl<ClusterInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<ClusterInner>>> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ClusterInner>>>>() {
@Override
public Observable<ServiceResponse<Page<ClusterInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ClusterInner>> result = listByWorkspaceNextDelegate(response);
return Observable.just(new ServiceResponse<Page<ClusterInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<ClusterInner>> listByWorkspaceNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<ClusterInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<ClusterInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
}