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.network.implementation;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing;
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
import com.microsoft.azure.management.network.TagsObject;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.HTTP;
import retrofit2.http.PATCH;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
import com.microsoft.azure.LongRunningFinalState;
import com.microsoft.azure.LongRunningOperationOptions;
An instance of this class provides access to all the operations defined
in NetworkInterfaces.
/**
* An instance of this class provides access to all the operations defined
* in NetworkInterfaces.
*/
public class NetworkInterfacesInner implements InnerSupportsGet<NetworkInterfaceInner>, InnerSupportsDelete<Void>, InnerSupportsListing<NetworkInterfaceInner> {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private NetworkInterfacesService service;
The service client containing this operation class. /** The service client containing this operation class. */
private NetworkManagementClientImpl client;
Initializes an instance of NetworkInterfacesInner.
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 NetworkInterfacesInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public NetworkInterfacesInner(Retrofit retrofit, NetworkManagementClientImpl client) {
this.service = retrofit.create(NetworkInterfacesService.class);
this.client = client;
}
The interface defining all the services for NetworkInterfaces to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for NetworkInterfaces to be
* used by Retrofit to perform actually REST calls.
*/
interface NetworkInterfacesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.network.NetworkInterfaces beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.network.NetworkInterfaces updateTags" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}")
Observable<Response<ResponseBody>> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces")
Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces getEffectiveRouteTable" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable")
Observable<Response<ResponseBody>> getEffectiveRouteTable(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces beginGetEffectiveRouteTable" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable")
Observable<Response<ResponseBody>> beginGetEffectiveRouteTable(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces listEffectiveNetworkSecurityGroups" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups")
Observable<Response<ResponseBody>> listEffectiveNetworkSecurityGroups(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces beginListEffectiveNetworkSecurityGroups" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups")
Observable<Response<ResponseBody>> beginListEffectiveNetworkSecurityGroups(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @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.network.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfaces" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces")
Observable<Response<ResponseBody>> listVirtualMachineScaleSetVMNetworkInterfaces(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @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.network.NetworkInterfaces listVirtualMachineScaleSetNetworkInterfaces" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces")
Observable<Response<ResponseBody>> listVirtualMachineScaleSetNetworkInterfaces(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @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.network.NetworkInterfaces getVirtualMachineScaleSetNetworkInterface" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}")
Observable<Response<ResponseBody>> getVirtualMachineScaleSetNetworkInterface(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces listVirtualMachineScaleSetIpConfigurations" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations")
Observable<Response<ResponseBody>> listVirtualMachineScaleSetIpConfigurations(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces getVirtualMachineScaleSetIpConfiguration" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}")
Observable<Response<ResponseBody>> getVirtualMachineScaleSetIpConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.network.NetworkInterfaces listNext" })
@GET
Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces listByResourceGroupNext" })
@GET
Observable<Response<ResponseBody>> listByResourceGroupNext(@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.network.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfacesNext" })
@GET
Observable<Response<ResponseBody>> listVirtualMachineScaleSetVMNetworkInterfacesNext(@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.network.NetworkInterfaces listVirtualMachineScaleSetNetworkInterfacesNext" })
@GET
Observable<Response<ResponseBody>> listVirtualMachineScaleSetNetworkInterfacesNext(@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.network.NetworkInterfaces listVirtualMachineScaleSetIpConfigurationsNext" })
@GET
Observable<Response<ResponseBody>> listVirtualMachineScaleSetIpConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 networkInterfaceName) {
deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body();
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 networkInterfaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<Void> deleteAsync(String resourceGroupName, String networkInterfaceName) {
return deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 networkInterfaceName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 networkInterfaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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 the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 NetworkInterfaceInner object if successful.
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner getByResourceGroup(String resourceGroupName, String networkInterfaceName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- 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 the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
final String expand = null;
return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = getByResourceGroupDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
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 NetworkInterfaceInner object if successful.
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner getByResourceGroup(String resourceGroupName, String networkInterfaceName, String expand) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand).toBlocking().single().body();
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
- 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 the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, String expand, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand), serviceCallback);
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, String expand) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Gets information about the specified network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = getByResourceGroupDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkInterfaceInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkInterfaceInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkInterfaceInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful.
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner createOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).toBlocking().last().body();
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface 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<NetworkInterfaceInner> createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters), serviceCallback);
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<NetworkInterfaceInner> createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName 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.");
}
Validator.validate(parameters);
final String apiVersion = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<NetworkInterfaceInner>() { }.getType());
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful.
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface 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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).toBlocking().single().body();
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface 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<NetworkInterfaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters), serviceCallback);
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Creates or updates a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- parameters – Parameters supplied to the create or update network interface operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName 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.");
}
Validator.validate(parameters);
final String apiVersion = "2019-11-01";
return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkInterfaceInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkInterfaceInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkInterfaceInner>() { }.getType())
.register(201, new TypeToken<NetworkInterfaceInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 NetworkInterfaceInner object if successful.
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
final Map<String, String> tags = null;
TagsObject parameters = new TagsObject();
parameters.withTags(null);
return service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = updateTagsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- tags – Resource tags.
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 NetworkInterfaceInner object if successful.
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param tags Resource tags.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().single().body();
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- tags – Resource tags.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param tags Resource tags.
* @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<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback);
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Updates a network interface tags.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Updates a network interface tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Validator.validate(tags);
final String apiVersion = "2019-11-01";
TagsObject parameters = new TagsObject();
parameters.withTags(tags);
return service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = updateTagsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkInterfaceInner> updateTagsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkInterfaceInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkInterfaceInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- CloudException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PagedList<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> list() {
ServiceResponse<Page<NetworkInterfaceInner>> response = listSinglePageAsync().toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a subscription.
Params: - serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network interfaces in a subscription.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<NetworkInterfaceInner>> listAsync(final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listSinglePageAsync(),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listAsync() {
return listWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listWithServiceResponseAsync() {
return listSinglePageAsync()
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listSinglePageAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a resource group.
Params: - resourceGroupName – The name of the resource group.
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<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @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<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listByResourceGroup(final String resourceGroupName) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a resource group.
Params: - resourceGroupName – The name of the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network interfaces in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @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<NetworkInterfaceInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupSinglePageAsync(resourceGroupName),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a resource group.
Params: - resourceGroupName – The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listByResourceGroupAsync(final String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a resource group.
Params: - resourceGroupName – The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
return listByResourceGroupSinglePageAsync(resourceGroupName)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a resource group.
ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a resource group.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listByResourceGroupDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 EffectiveRouteListResultInner object if successful.
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 EffectiveRouteListResultInner object if successful.
*/
public EffectiveRouteListResultInner getEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) {
return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body();
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<EffectiveRouteListResultInner> getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<EffectiveRouteListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<EffectiveRouteListResultInner> getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) {
return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<EffectiveRouteListResultInner>, EffectiveRouteListResultInner>() {
@Override
public EffectiveRouteListResultInner call(ServiceResponse<EffectiveRouteListResultInner> response) {
return response.body();
}
});
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<EffectiveRouteListResultInner>> getEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<EffectiveRouteListResultInner>() { }.getType());
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 EffectiveRouteListResultInner object if successful.
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 EffectiveRouteListResultInner object if successful.
*/
public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) {
return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<EffectiveRouteListResultInner> beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<EffectiveRouteListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EffectiveRouteListResultInner object
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EffectiveRouteListResultInner object
*/
public Observable<EffectiveRouteListResultInner> beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) {
return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<EffectiveRouteListResultInner>, EffectiveRouteListResultInner>() {
@Override
public EffectiveRouteListResultInner call(ServiceResponse<EffectiveRouteListResultInner> response) {
return response.body();
}
});
}
Gets all route tables applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EffectiveRouteListResultInner object
/**
* Gets all route tables applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EffectiveRouteListResultInner object
*/
public Observable<ServiceResponse<EffectiveRouteListResultInner>> beginGetEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EffectiveRouteListResultInner>>>() {
@Override
public Observable<ServiceResponse<EffectiveRouteListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EffectiveRouteListResultInner> clientResponse = beginGetEffectiveRouteTableDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<EffectiveRouteListResultInner> beginGetEffectiveRouteTableDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<EffectiveRouteListResultInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<EffectiveRouteListResultInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 EffectiveNetworkSecurityGroupListResultInner object if successful.
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 EffectiveNetworkSecurityGroupListResultInner object if successful.
*/
public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) {
return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body();
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<EffectiveNetworkSecurityGroupListResultInner> listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<EffectiveNetworkSecurityGroupListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<EffectiveNetworkSecurityGroupListResultInner> listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) {
return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>, EffectiveNetworkSecurityGroupListResultInner>() {
@Override
public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse<EffectiveNetworkSecurityGroupListResultInner> response) {
return response.body();
}
});
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<EffectiveNetworkSecurityGroupListResultInner>() { }.getType());
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
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 EffectiveNetworkSecurityGroupListResultInner object if successful.
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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 EffectiveNetworkSecurityGroupListResultInner object if successful.
*/
public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) {
return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @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<EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback<EffectiveNetworkSecurityGroupListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback);
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EffectiveNetworkSecurityGroupListResultInner object
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EffectiveNetworkSecurityGroupListResultInner object
*/
public Observable<EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) {
return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>, EffectiveNetworkSecurityGroupListResultInner>() {
@Override
public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse<EffectiveNetworkSecurityGroupListResultInner> response) {
return response.body();
}
});
}
Gets all network security groups applied to a network interface.
Params: - resourceGroupName – The name of the resource group.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EffectiveNetworkSecurityGroupListResultInner object
/**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EffectiveNetworkSecurityGroupListResultInner object
*/
public Observable<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2019-11-01";
return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>>>() {
@Override
public Observable<ServiceResponse<EffectiveNetworkSecurityGroupListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EffectiveNetworkSecurityGroupListResultInner> clientResponse = beginListEffectiveNetworkSecurityGroupsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroupsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<EffectiveNetworkSecurityGroupListResultInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<EffectiveNetworkSecurityGroupListResultInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
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<NetworkInterfaceInner> object if successful.
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @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<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listVirtualMachineScaleSetVMNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- 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 all network interfaces in a virtual machine in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @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<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) {
return listVirtualMachineScaleSetVMNetworkInterfacesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetVMNetworkInterfacesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) {
return listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
ServiceResponse> * @param resourceGroupName The name of the resource group.
ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
ServiceResponse> * @param virtualmachineIndex The virtual machine index.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param resourceGroupName The name of the resource group.
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param virtualmachineIndex The virtual machine index.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
return service.listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listVirtualMachineScaleSetVMNetworkInterfacesDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
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<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @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<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listVirtualMachineScaleSetNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @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<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) {
return listVirtualMachineScaleSetNetworkInterfacesWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetNetworkInterfacesWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName) {
return listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a virtual machine scale set.
ServiceResponse> * @param resourceGroupName The name of the resource group.
ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param resourceGroupName The name of the resource group.
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
return service.listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listVirtualMachineScaleSetNetworkInterfacesDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
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 NetworkInterfaceInner object if successful.
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) {
return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single().body();
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @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<NetworkInterfaceInner> getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), serviceCallback);
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) {
return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
final String expand = null;
return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = getVirtualMachineScaleSetNetworkInterfaceDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
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 NetworkInterfaceInner object if successful.
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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 NetworkInterfaceInner object if successful.
*/
public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) {
return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single().body();
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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<NetworkInterfaceInner> getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), serviceCallback);
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<NetworkInterfaceInner> getVirtualMachineScaleSetNetworkInterfaceAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) {
return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
@Override
public NetworkInterfaceInner call(ServiceResponse<NetworkInterfaceInner> response) {
return response.body();
}
});
}
Get the specified network interface in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceInner object
/**
* Get the specified network interface in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceInner object
*/
public Observable<ServiceResponse<NetworkInterfaceInner>> getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceInner> clientResponse = getVirtualMachineScaleSetNetworkInterfaceDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkInterfaceInner> getVirtualMachineScaleSetNetworkInterfaceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkInterfaceInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkInterfaceInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
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<NetworkInterfaceIPConfigurationInner> object if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @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<NetworkInterfaceIPConfigurationInner> object if successful.
*/
public PagedList<NetworkInterfaceIPConfigurationInner> listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) {
ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single();
return new PagedList<NetworkInterfaceIPConfigurationInner>(response.body()) {
@Override
public Page<NetworkInterfaceIPConfigurationInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @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<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final ListOperationCallback<NetworkInterfaceIPConfigurationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<Page<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) {
return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<NetworkInterfaceIPConfigurationInner>>() {
@Override
public Page<NetworkInterfaceIPConfigurationInner> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response) {
return response.body();
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) {
return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink));
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in ServiceResponse
if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
final String expand = null;
return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
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<NetworkInterfaceIPConfigurationInner> object if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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<NetworkInterfaceIPConfigurationInner> object if successful.
*/
public PagedList<NetworkInterfaceIPConfigurationInner> listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) {
ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single();
return new PagedList<NetworkInterfaceIPConfigurationInner>(response.body()) {
@Override
public Page<NetworkInterfaceIPConfigurationInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @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<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand, final ListOperationCallback<NetworkInterfaceIPConfigurationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<Page<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) {
return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<NetworkInterfaceIPConfigurationInner>>() {
@Override
public Page<NetworkInterfaceIPConfigurationInner> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response) {
return response.body();
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) {
return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink));
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
ServiceResponse> * @param resourceGroupName The name of the resource group.
ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
ServiceResponse> * @param virtualmachineIndex The virtual machine index.
ServiceResponse> * @param networkInterfaceName The name of the network interface.
ServiceResponse> * @param expand Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in ServiceResponse
if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param resourceGroupName The name of the resource group.
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param virtualMachineScaleSetName The name of the virtual machine scale set.
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param virtualmachineIndex The virtual machine index.
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param networkInterfaceName The name of the network interface.
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceIPConfigurationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceIPConfigurationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
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 NetworkInterfaceIPConfigurationInner object if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @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 NetworkInterfaceIPConfigurationInner object if successful.
*/
public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) {
return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single().body();
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @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<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, final ServiceCallback<NetworkInterfaceIPConfigurationInner> serviceCallback) {
return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName), serviceCallback);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceIPConfigurationInner object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceIPConfigurationInner object
*/
public Observable<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) {
return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).map(new Func1<ServiceResponse<NetworkInterfaceIPConfigurationInner>, NetworkInterfaceIPConfigurationInner>() {
@Override
public NetworkInterfaceIPConfigurationInner call(ServiceResponse<NetworkInterfaceIPConfigurationInner> response) {
return response.body();
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceIPConfigurationInner object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceIPConfigurationInner object
*/
public Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (ipConfigurationName == null) {
throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
final String expand = null;
return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceIPConfigurationInner> clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
- expand – Expands referenced resources.
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 NetworkInterfaceIPConfigurationInner object if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @param expand Expands referenced resources.
* @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 NetworkInterfaceIPConfigurationInner object if successful.
*/
public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) {
return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).toBlocking().single().body();
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
- expand – Expands referenced resources.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @param expand Expands referenced resources.
* @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<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand, final ServiceCallback<NetworkInterfaceIPConfigurationInner> serviceCallback) {
return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand), serviceCallback);
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceIPConfigurationInner object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceIPConfigurationInner object
*/
public Observable<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) {
return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).map(new Func1<ServiceResponse<NetworkInterfaceIPConfigurationInner>, NetworkInterfaceIPConfigurationInner>() {
@Override
public NetworkInterfaceIPConfigurationInner call(ServiceResponse<NetworkInterfaceIPConfigurationInner> response) {
return response.body();
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
Params: - resourceGroupName – The name of the resource group.
- virtualMachineScaleSetName – The name of the virtual machine scale set.
- virtualmachineIndex – The virtual machine index.
- networkInterfaceName – The name of the network interface.
- ipConfigurationName – The name of the ip configuration.
- expand – Expands referenced resources.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkInterfaceIPConfigurationInner object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @param virtualmachineIndex The virtual machine index.
* @param networkInterfaceName The name of the network interface.
* @param ipConfigurationName The name of the ip configuration.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkInterfaceIPConfigurationInner object
*/
public Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualMachineScaleSetName == null) {
throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null.");
}
if (virtualmachineIndex == null) {
throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null.");
}
if (networkInterfaceName == null) {
throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.");
}
if (ipConfigurationName == null) {
throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-10-01";
return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>>>() {
@Override
public Observable<ServiceResponse<NetworkInterfaceIPConfigurationInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkInterfaceIPConfigurationInner> clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkInterfaceIPConfigurationInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkInterfaceIPConfigurationInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a subscription.
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<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a subscription.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PagedList<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listNext(final String nextPageLink) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a subscription.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network interfaces in a subscription.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<NetworkInterfaceInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<NetworkInterfaceInner>> serviceFuture, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a subscription.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a subscription.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a subscription.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a subscription.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listNextWithServiceResponseAsync(final String nextPageLink) {
return listNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a subscription.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a subscription.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listNextDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a resource group.
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<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PagedList<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listByResourceGroupNext(final String nextPageLink) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets all network interfaces in a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<NetworkInterfaceInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<NetworkInterfaceInner>> serviceFuture, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a resource group.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listByResourceGroupNextAsync(final String nextPageLink) {
return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a resource group.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a resource group.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a resource group.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listByResourceGroupNextDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
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<NetworkInterfaceInner> object if successful.
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listVirtualMachineScaleSetVMNetworkInterfacesNext(final String nextPageLink) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
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 all network interfaces in a virtual machine in a virtual machine scale set.
*
* @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<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesNextAsync(final String nextPageLink, final ServiceFuture<List<NetworkInterfaceInner>> serviceFuture, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
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<NetworkInterfaceInner> object
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesNextAsync(final String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
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<NetworkInterfaceInner> object
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(final String nextPageLink) {
return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetVMNetworkInterfacesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(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.listVirtualMachineScaleSetVMNetworkInterfacesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listVirtualMachineScaleSetVMNetworkInterfacesNextDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listVirtualMachineScaleSetVMNetworkInterfacesNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets all network interfaces in a virtual machine scale set.
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<NetworkInterfaceInner> object if successful.
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object if successful.
*/
public PagedList<NetworkInterfaceInner> listVirtualMachineScaleSetNetworkInterfacesNext(final String nextPageLink) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<NetworkInterfaceInner>(response.body()) {
@Override
public Page<NetworkInterfaceInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets all network interfaces in a virtual machine scale set.
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 all network interfaces in a virtual machine scale set.
*
* @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<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesNextAsync(final String nextPageLink, final ServiceFuture<List<NetworkInterfaceInner>> serviceFuture, final ListOperationCallback<NetworkInterfaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets all network interfaces in a virtual machine scale set.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object
*/
public Observable<Page<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesNextAsync(final String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Page<NetworkInterfaceInner>>() {
@Override
public Page<NetworkInterfaceInner> call(ServiceResponse<Page<NetworkInterfaceInner>> response) {
return response.body();
}
});
}
Gets all network interfaces in a virtual machine scale set.
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<NetworkInterfaceInner> object
/**
* Gets all network interfaces in a virtual machine scale set.
*
* @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<NetworkInterfaceInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(final String nextPageLink) {
return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceInner>>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(ServiceResponse<Page<NetworkInterfaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetNetworkInterfacesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets all network interfaces in a virtual machine scale set.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceInner> object wrapped in ServiceResponse
if successful.
/**
* Gets all network interfaces in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(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.listVirtualMachineScaleSetNetworkInterfacesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceInner>> result = listVirtualMachineScaleSetNetworkInterfacesNextDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceInner>> listVirtualMachineScaleSetNetworkInterfacesNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Get the specified network interface ip configuration in a virtual machine scale set.
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<NetworkInterfaceIPConfigurationInner> object if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @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<NetworkInterfaceIPConfigurationInner> object if successful.
*/
public PagedList<NetworkInterfaceIPConfigurationInner> listVirtualMachineScaleSetIpConfigurationsNext(final String nextPageLink) {
ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response = listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<NetworkInterfaceIPConfigurationInner>(response.body()) {
@Override
public Page<NetworkInterfaceIPConfigurationInner> nextPage(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Get the specified network interface ip configuration in a virtual machine scale set.
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 specified network interface ip configuration in a virtual machine scale set.
*
* @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<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink, final ServiceFuture<List<NetworkInterfaceIPConfigurationInner>> serviceFuture, final ListOperationCallback<NetworkInterfaceIPConfigurationInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Get the specified network interface ip configuration in a virtual machine scale set.
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<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @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<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<Page<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<NetworkInterfaceIPConfigurationInner>>() {
@Override
public Page<NetworkInterfaceIPConfigurationInner> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> response) {
return response.body();
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
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<NetworkInterfaceIPConfigurationInner> object
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
* @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<NetworkInterfaceIPConfigurationInner> object
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(final String nextPageLink) {
return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink));
}
});
}
Get the specified network interface ip configuration in a virtual machine scale set.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in ServiceResponse
if successful.
/**
* Get the specified network interface ip configuration in a virtual machine scale set.
*
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(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.listVirtualMachineScaleSetIpConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>>>() {
@Override
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> result = listVirtualMachineScaleSetIpConfigurationsNextDelegate(response);
return Observable.just(new ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> listVirtualMachineScaleSetIpConfigurationsNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<NetworkInterfaceIPConfigurationInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<NetworkInterfaceIPConfigurationInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
}