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.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in ExpressRoutePorts.
/** * An instance of this class provides access to all the operations defined * in ExpressRoutePorts. */
public class ExpressRoutePortsInner implements InnerSupportsGet<ExpressRoutePortInner>, InnerSupportsDelete<Void>, InnerSupportsListing<ExpressRoutePortInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private ExpressRoutePortsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private NetworkManagementClientImpl client;
Initializes an instance of ExpressRoutePortsInner.
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 ExpressRoutePortsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public ExpressRoutePortsInner(Retrofit retrofit, NetworkManagementClientImpl client) { this.service = retrofit.create(ExpressRoutePortsService.class); this.client = client; }
The interface defining all the services for ExpressRoutePorts to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for ExpressRoutePorts to be * used by Retrofit to perform actually REST calls. */
interface ExpressRoutePortsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRoutePorts delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.ExpressRoutePorts beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.ExpressRoutePorts getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.ExpressRoutePorts createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Query("api-version") String apiVersion, @Body ExpressRoutePortInner parameters, @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.ExpressRoutePorts beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @Query("api-version") String apiVersion, @Body ExpressRoutePortInner parameters, @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.ExpressRoutePorts updateTags" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") Observable<Response<ResponseBody>> updateTags(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("expressRoutePortName") String expressRoutePortName, @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.ExpressRoutePorts listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts") Observable<Response<ResponseBody>> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.ExpressRoutePorts list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts") 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.ExpressRoutePorts 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.ExpressRoutePorts listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 expressRoutePortName) { deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().last().body(); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 expressRoutePortName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the observable for the request
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String expressRoutePortName) { return deleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the observable for the request
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); } final String apiVersion = "2019-11-01"; Observable<Response<ResponseBody>> observable = service.delete(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 expressRoutePortName) { beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 expressRoutePortName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String expressRoutePortName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); } final String apiVersion = "2019-11-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, 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); }
Retrieves the requested ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of ExpressRoutePort.
Throws:
Returns:the ExpressRoutePortInner object if successful.
/** * Retrieves the requested ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of ExpressRoutePort. * @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 ExpressRoutePortInner object if successful. */
public ExpressRoutePortInner getByResourceGroup(String resourceGroupName, String expressRoutePortName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); }
Retrieves the requested ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of ExpressRoutePort.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Retrieves the requested ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of ExpressRoutePort. * @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<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); }
Retrieves the requested ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of ExpressRoutePort.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Retrieves the requested ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of ExpressRoutePort. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override public ExpressRoutePortInner call(ServiceResponse<ExpressRoutePortInner> response) { return response.body(); } }); }
Retrieves the requested ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of ExpressRoutePort.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Retrieves the requested ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of ExpressRoutePort. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ServiceResponse<ExpressRoutePortInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."); } final String apiVersion = "2019-11-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ExpressRoutePortInner>>>() { @Override public Observable<ServiceResponse<ExpressRoutePortInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ExpressRoutePortInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ExpressRoutePortInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ExpressRoutePortInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ExpressRoutePortInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the ExpressRoutePortInner object if successful.
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort 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 ExpressRoutePortInner object if successful. */
public ExpressRoutePortInner createOrUpdate(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).toBlocking().last().body(); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort 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<ExpressRoutePortInner> createOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters), serviceCallback); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the observable for the request
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ExpressRoutePortInner> createOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override public ExpressRoutePortInner call(ServiceResponse<ExpressRoutePortInner> response) { return response.body(); } }); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the observable for the request
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<ExpressRoutePortInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName 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(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ExpressRoutePortInner>() { }.getType()); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the ExpressRoutePortInner object if successful.
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort 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 ExpressRoutePortInner object if successful. */
public ExpressRoutePortInner beginCreateOrUpdate(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).toBlocking().single().body(); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort 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<ExpressRoutePortInner> beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters), serviceCallback); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ExpressRoutePortInner> beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, expressRoutePortName, parameters).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override public ExpressRoutePortInner call(ServiceResponse<ExpressRoutePortInner> response) { return response.body(); } }); }
Creates or updates the specified ExpressRoutePort resource.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • parameters – Parameters supplied to the create ExpressRoutePort operation.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Creates or updates the specified ExpressRoutePort resource. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param parameters Parameters supplied to the create ExpressRoutePort operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ServiceResponse<ExpressRoutePortInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName 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(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ExpressRoutePortInner>>>() { @Override public Observable<ServiceResponse<ExpressRoutePortInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ExpressRoutePortInner> clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ExpressRoutePortInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ExpressRoutePortInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ExpressRoutePortInner>() { }.getType()) .register(201, new TypeToken<ExpressRoutePortInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the ExpressRoutePortInner object if successful.
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 ExpressRoutePortInner object if successful. */
public ExpressRoutePortInner updateTags(String resourceGroupName, String expressRoutePortName) { return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName).toBlocking().single().body(); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName), serviceCallback); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName) { return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override public ExpressRoutePortInner call(ServiceResponse<ExpressRoutePortInner> response) { return response.body(); } }); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ServiceResponse<ExpressRoutePortInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName 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(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ExpressRoutePortInner>>>() { @Override public Observable<ServiceResponse<ExpressRoutePortInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ExpressRoutePortInner> clientResponse = updateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • tags – Resource tags.
Throws:
Returns:the ExpressRoutePortInner object if successful.
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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 ExpressRoutePortInner object if successful. */
public ExpressRoutePortInner updateTags(String resourceGroupName, String expressRoutePortName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags).toBlocking().single().body(); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • tags – Resource tags.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @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<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName, Map<String, String> tags, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags), serviceCallback); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • tags – Resource tags.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName, tags).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override public ExpressRoutePortInner call(ServiceResponse<ExpressRoutePortInner> response) { return response.body(); } }); }
Update ExpressRoutePort tags.
Params:
  • resourceGroupName – The name of the resource group.
  • expressRoutePortName – The name of the ExpressRoutePort resource.
  • tags – Resource tags.
Throws:
Returns:the observable to the ExpressRoutePortInner object
/** * Update ExpressRoutePort tags. * * @param resourceGroupName The name of the resource group. * @param expressRoutePortName The name of the ExpressRoutePort resource. * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRoutePortInner object */
public Observable<ServiceResponse<ExpressRoutePortInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName, Map<String, String> tags) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (expressRoutePortName == null) { throw new IllegalArgumentException("Parameter expressRoutePortName 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(this.client.subscriptionId(), resourceGroupName, expressRoutePortName, apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ExpressRoutePortInner>>>() { @Override public Observable<ServiceResponse<ExpressRoutePortInner>> call(Response<ResponseBody> response) { try { ServiceResponse<ExpressRoutePortInner> clientResponse = updateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<ExpressRoutePortInner> updateTagsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<ExpressRoutePortInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<ExpressRoutePortInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object if successful.
/** * List all the ExpressRoutePort resources in the specified 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&lt;ExpressRoutePortInner&gt; object if successful. */
public PagedList<ExpressRoutePortInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<ExpressRoutePortInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<ExpressRoutePortInner>(response.body()) { @Override public Page<ExpressRoutePortInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • resourceGroupName – The name of the resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List all the ExpressRoutePort resources in the specified 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<ExpressRoutePortInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<ExpressRoutePortInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<Page<ExpressRoutePortInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Page<ExpressRoutePortInner>>() { @Override public Page<ExpressRoutePortInner> call(ServiceResponse<Page<ExpressRoutePortInner>> response) { return response.body(); } }); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(ServiceResponse<Page<ExpressRoutePortInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
List all the ExpressRoutePort resources in the specified resource group. ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object wrapped in ServiceResponse if successful.
/** * List all the ExpressRoutePort resources in the specified resource group. * ServiceResponse<PageImpl<ExpressRoutePortInner>> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ExpressRoutePortInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } final String apiVersion = "2019-11-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ExpressRoutePortInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<ExpressRoutePortInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ExpressRoutePortInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ExpressRoutePortInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ExpressRoutePortInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
List all the ExpressRoutePort resources in the specified 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<ExpressRoutePortInner> object if successful.
/** * List all the ExpressRoutePort resources in the specified subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ExpressRoutePortInner&gt; object if successful. */
public PagedList<ExpressRoutePortInner> list() { ServiceResponse<Page<ExpressRoutePortInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<ExpressRoutePortInner>(response.body()) { @Override public Page<ExpressRoutePortInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List all the ExpressRoutePort resources in the specified subscription.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List all the ExpressRoutePort resources in the specified 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<ExpressRoutePortInner>> listAsync(final ListOperationCallback<ExpressRoutePortInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List all the ExpressRoutePort resources in the specified subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<Page<ExpressRoutePortInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Page<ExpressRoutePortInner>>() { @Override public Page<ExpressRoutePortInner> call(ServiceResponse<Page<ExpressRoutePortInner>> response) { return response.body(); } }); }
List all the ExpressRoutePort resources in the specified subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(ServiceResponse<Page<ExpressRoutePortInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
List all the ExpressRoutePort resources in the specified subscription.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<ExpressRoutePortInner> object wrapped in ServiceResponse if successful.
/** * List all the ExpressRoutePort resources in the specified subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ExpressRoutePortInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> 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<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ExpressRoutePortInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<ExpressRoutePortInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ExpressRoutePortInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ExpressRoutePortInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ExpressRoutePortInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object if successful.
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ExpressRoutePortInner&gt; object if successful. */
public PagedList<ExpressRoutePortInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<ExpressRoutePortInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<ExpressRoutePortInner>(response.body()) { @Override public Page<ExpressRoutePortInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<ExpressRoutePortInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<ExpressRoutePortInner>> serviceFuture, final ListOperationCallback<ExpressRoutePortInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<Page<ExpressRoutePortInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Page<ExpressRoutePortInner>>() { @Override public Page<ExpressRoutePortInner> call(ServiceResponse<Page<ExpressRoutePortInner>> response) { return response.body(); } }); }
List all the ExpressRoutePort resources in the specified resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(ServiceResponse<Page<ExpressRoutePortInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
List all the ExpressRoutePort resources in the specified resource group. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object wrapped in ServiceResponse if successful.
/** * List all the ExpressRoutePort resources in the specified resource group. * ServiceResponse<PageImpl<ExpressRoutePortInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ExpressRoutePortInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> 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<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ExpressRoutePortInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<ExpressRoutePortInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ExpressRoutePortInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ExpressRoutePortInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ExpressRoutePortInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
List all the ExpressRoutePort resources in the specified subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object if successful.
/** * List all the ExpressRoutePort resources in the specified subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;ExpressRoutePortInner&gt; object if successful. */
public PagedList<ExpressRoutePortInner> listNext(final String nextPageLink) { ServiceResponse<Page<ExpressRoutePortInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<ExpressRoutePortInner>(response.body()) { @Override public Page<ExpressRoutePortInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List all the ExpressRoutePort resources in the specified subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List all the ExpressRoutePort resources in the specified 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<ExpressRoutePortInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<ExpressRoutePortInner>> serviceFuture, final ListOperationCallback<ExpressRoutePortInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List all the ExpressRoutePort resources in the specified subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<Page<ExpressRoutePortInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Page<ExpressRoutePortInner>>() { @Override public Page<ExpressRoutePortInner> call(ServiceResponse<Page<ExpressRoutePortInner>> response) { return response.body(); } }); }
List all the ExpressRoutePort resources in the specified subscription.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<ExpressRoutePortInner> object
/** * List all the ExpressRoutePort resources in the specified subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;ExpressRoutePortInner&gt; object */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<ExpressRoutePortInner>>, Observable<ServiceResponse<Page<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(ServiceResponse<Page<ExpressRoutePortInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
List all the ExpressRoutePort resources in the specified subscription. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<ExpressRoutePortInner> object wrapped in ServiceResponse if successful.
/** * List all the ExpressRoutePort resources in the specified subscription. * ServiceResponse<PageImpl<ExpressRoutePortInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;ExpressRoutePortInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> 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<ExpressRoutePortInner>>>>() { @Override public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ExpressRoutePortInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<ExpressRoutePortInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<ExpressRoutePortInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<ExpressRoutePortInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<ExpressRoutePortInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }