From 66dad38d02a472f83e32739a5cb3309beea6761c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Mar 2018 00:20:56 +0000 Subject: [PATCH 1/2] Generated from a299629a9a05783f7a6c7a728a2557d39324a833 Merge branch 'Network-2018-02-01' of https://github.com/Azure/azure-rest-api-specs into crossConnectionChanges --- .../network/ExpressRoutePeeringState.java | 41 + .../network/ExpressRoutePeeringType.java | 44 + .../DdosProtectionPlanInner.java | 86 ++ .../DdosProtectionPlansInner.java | 962 ++++++++++++++++++ .../ExpressRouteCircuitPeeringInner.java | 24 +- .../ExpressRouteCrossConnectionInner.java | 50 +- ...pressRouteCrossConnectionPeeringInner.java | 425 ++++++++ ...ressRouteCrossConnectionPeeringsInner.java | 188 ++-- .../ExpressRouteCrossConnectionsInner.java | 16 +- .../NetworkManagementClientImpl.java | 14 + .../implementation/VirtualNetworkInner.java | 34 +- 11 files changed, 1737 insertions(+), 147 deletions(-) create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java new file mode 100644 index 00000000000..756bdadac6e --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java @@ -0,0 +1,41 @@ +/** + * 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; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringState. + */ +public final class ExpressRoutePeeringState extends ExpandableStringEnum { + /** Static value Disabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState DISABLED = fromString("Disabled"); + + /** Static value Enabled for ExpressRoutePeeringState. */ + public static final ExpressRoutePeeringState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a ExpressRoutePeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringState + */ + @JsonCreator + public static ExpressRoutePeeringState fromString(String name) { + return fromString(name, ExpressRoutePeeringState.class); + } + + /** + * @return known ExpressRoutePeeringState values + */ + public static Collection values() { + return values(ExpressRoutePeeringState.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java new file mode 100644 index 00000000000..5fad5585fa3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java @@ -0,0 +1,44 @@ +/** + * 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; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRoutePeeringType. + */ +public final class ExpressRoutePeeringType extends ExpandableStringEnum { + /** Static value AzurePublicPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); + + /** Static value AzurePrivatePeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); + + /** Static value MicrosoftPeering for ExpressRoutePeeringType. */ + public static final ExpressRoutePeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); + + /** + * Creates or finds a ExpressRoutePeeringType from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRoutePeeringType + */ + @JsonCreator + public static ExpressRoutePeeringType fromString(String name) { + return fromString(name, ExpressRoutePeeringType.class); + } + + /** + * @return known ExpressRoutePeeringType values + */ + public static Collection values() { + return values(ExpressRoutePeeringType.class); + } +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java new file mode 100644 index 00000000000..4d97beee1ef --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java @@ -0,0 +1,86 @@ +/** + * 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 java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A DDoS protection plan in a resource group. + */ +@JsonFlatten +public class DdosProtectionPlanInner extends Resource { + /** + * The resource GUID property of the DDoS protection plan resource. It + * uniquely identifies the resource, even if the user changes its name or + * migrate the resource across subscriptions or resource groups. + */ + @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /** + * The provisioning state of the DDoS protection plan resource. Possible + * values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The list of virtual networks associated with the DDoS protection plan + * resource. This list is read-only. + */ + @JsonProperty(value = "properties.virtualNetworks", access = JsonProperty.Access.WRITE_ONLY) + private List virtualNetworks; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the resourceGuid value. + * + * @return the resourceGuid value + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the virtualNetworks value. + * + * @return the virtualNetworks value + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Get the etag value. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java new file mode 100644 index 00000000000..7f6c7d9ea17 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java @@ -0,0 +1,962 @@ +/** + * 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.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.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 DdosProtectionPlans. + */ +public class DdosProtectionPlansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private DdosProtectionPlansService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of DdosProtectionPlansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DdosProtectionPlansInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(DdosProtectionPlansService.class); + this.client = client; + } + + /** + * The interface defining all the services for DdosProtectionPlans to be + * used by Retrofit to perform actually REST calls. + */ + interface DdosProtectionPlansService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.DdosProtectionPlans delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.DdosProtectionPlans beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.DdosProtectionPlans list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> 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.DdosProtectionPlans listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans") + Observable> 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.DdosProtectionPlans listNext" }) + @GET + Observable> 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.DdosProtectionPlans listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 ddosProtectionPlanName) { + deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().last().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 deleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 ddosProtectionPlanName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @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 getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 DdosProtectionPlanInner object if successful. + */ + public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update 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 beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { + @Override + public DdosProtectionPlanInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DdosProtectionPlanInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (ddosProtectionPlanName == null) { + throw new IllegalArgumentException("Parameter ddosProtectionPlanName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all DDoS protection plans 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<DdosProtectionPlanInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all DDoS protection plans 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> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DdosProtectionPlanInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the DDoS protection plans 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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all DDoS protection plans 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<DdosProtectionPlanInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all DDoS protection plans 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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> 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, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all the DDoS protection plans 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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all the DDoS protection plans 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<DdosProtectionPlanInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the DDoS protection plans 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 + * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> 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, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java index 515916c8a93..d7d61f33669 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java @@ -8,8 +8,8 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringType; -import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringState; +import com.microsoft.azure.management.network.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.ExpressRoutePeeringState; import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringConfig; import com.microsoft.azure.management.network.Ipv6ExpressRouteCircuitPeeringConfig; import java.util.List; @@ -23,19 +23,17 @@ @JsonFlatten public class ExpressRouteCircuitPeeringInner extends SubResource { /** - * The PeeringType. Possible values are: 'AzurePublicPeering', - * 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: - * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. */ @JsonProperty(value = "properties.peeringType") - private ExpressRouteCircuitPeeringType peeringType; + private ExpressRoutePeeringType peeringType; /** - * The state of peering. Possible values are: 'Disabled' and 'Enabled'. - * Possible values include: 'Disabled', 'Enabled'. + * The peering state. Possible values include: 'Disabled', 'Enabled'. */ @JsonProperty(value = "properties.state") - private ExpressRouteCircuitPeeringState state; + private ExpressRoutePeeringState state; /** * The Azure ASN. @@ -153,7 +151,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * * @return the peeringType value */ - public ExpressRouteCircuitPeeringType peeringType() { + public ExpressRoutePeeringType peeringType() { return this.peeringType; } @@ -163,7 +161,7 @@ public ExpressRouteCircuitPeeringType peeringType() { * @param peeringType the peeringType value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeeringType peeringType) { + public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { this.peeringType = peeringType; return this; } @@ -173,7 +171,7 @@ public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeerin * * @return the state value */ - public ExpressRouteCircuitPeeringState state() { + public ExpressRoutePeeringState state() { return this.state; } @@ -183,7 +181,7 @@ public ExpressRouteCircuitPeeringState state() { * @param state the state value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withState(ExpressRouteCircuitPeeringState state) { + public ExpressRouteCircuitPeeringInner withState(ExpressRoutePeeringState state) { this.state = state; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java index 2edea2e1fb5..b6498ec9527 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.management.network.ExpressRouteCrossConnectionServiceProviderProperties; import com.microsoft.azure.management.network.ExpressRouteCircuitReference; import com.microsoft.azure.management.network.ServiceProviderProvisioningState; import java.util.List; @@ -40,15 +39,21 @@ public class ExpressRouteCrossConnectionInner extends Resource { private Integer sTag; /** - * The ServiceProviderProperties. + * The peering location of the ExpressRoute circuit. */ - @JsonProperty(value = "properties.serviceProviderProperties") - private ExpressRouteCrossConnectionServiceProviderProperties serviceProviderProperties; + @JsonProperty(value = "properties.peeringLocation", access = JsonProperty.Access.WRITE_ONLY) + private String peeringLocation; + + /** + * The circuit bandwidth In Mbps. + */ + @JsonProperty(value = "properties.bandwidthInMbps", access = JsonProperty.Access.WRITE_ONLY) + private Integer bandwidthInMbps; /** * The ExpressRouteCircuit. */ - @JsonProperty(value = "properties.expressRouteCircuit") + @JsonProperty(value = "properties.expressRouteCircuit", access = JsonProperty.Access.WRITE_ONLY) private ExpressRouteCircuitReference expressRouteCircuit; /** @@ -77,7 +82,7 @@ public class ExpressRouteCrossConnectionInner extends Resource { * The list of peerings. */ @JsonProperty(value = "properties.peerings") - private List peerings; + private List peerings; /** * Gets a unique read-only string that changes whenever the resource is @@ -114,23 +119,21 @@ public Integer sTag() { } /** - * Get the serviceProviderProperties value. + * Get the peeringLocation value. * - * @return the serviceProviderProperties value + * @return the peeringLocation value */ - public ExpressRouteCrossConnectionServiceProviderProperties serviceProviderProperties() { - return this.serviceProviderProperties; + public String peeringLocation() { + return this.peeringLocation; } /** - * Set the serviceProviderProperties value. + * Get the bandwidthInMbps value. * - * @param serviceProviderProperties the serviceProviderProperties value to set - * @return the ExpressRouteCrossConnectionInner object itself. + * @return the bandwidthInMbps value */ - public ExpressRouteCrossConnectionInner withServiceProviderProperties(ExpressRouteCrossConnectionServiceProviderProperties serviceProviderProperties) { - this.serviceProviderProperties = serviceProviderProperties; - return this; + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; } /** @@ -142,17 +145,6 @@ public ExpressRouteCircuitReference expressRouteCircuit() { return this.expressRouteCircuit; } - /** - * Set the expressRouteCircuit value. - * - * @param expressRouteCircuit the expressRouteCircuit value to set - * @return the ExpressRouteCrossConnectionInner object itself. - */ - public ExpressRouteCrossConnectionInner withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit) { - this.expressRouteCircuit = expressRouteCircuit; - return this; - } - /** * Get the serviceProviderProvisioningState value. * @@ -207,7 +199,7 @@ public String provisioningState() { * * @return the peerings value */ - public List peerings() { + public List peerings() { return this.peerings; } @@ -217,7 +209,7 @@ public List peerings() { * @param peerings the peerings value to set * @return the ExpressRouteCrossConnectionInner object itself. */ - public ExpressRouteCrossConnectionInner withPeerings(List peerings) { + public ExpressRouteCrossConnectionInner withPeerings(List peerings) { this.peerings = peerings; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java new file mode 100644 index 00000000000..1f58ab40eb3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java @@ -0,0 +1,425 @@ +/** + * 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.network.ExpressRoutePeeringType; +import com.microsoft.azure.management.network.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringConfig; +import com.microsoft.azure.management.network.Ipv6ExpressRouteCircuitPeeringConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * Peering in an ExpressRoute Cross Connection resource. + */ +@JsonFlatten +public class ExpressRouteCrossConnectionPeeringInner extends SubResource { + /** + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. + */ + @JsonProperty(value = "properties.peeringType") + private ExpressRoutePeeringType peeringType; + + /** + * The peering state. Possible values include: 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.state") + private ExpressRoutePeeringState state; + + /** + * The Azure ASN. + */ + @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) + private Integer azureASN; + + /** + * The peer ASN. + */ + @JsonProperty(value = "properties.peerASN") + private Long peerASN; + + /** + * The primary address prefix. + */ + @JsonProperty(value = "properties.primaryPeerAddressPrefix") + private String primaryPeerAddressPrefix; + + /** + * The secondary address prefix. + */ + @JsonProperty(value = "properties.secondaryPeerAddressPrefix") + private String secondaryPeerAddressPrefix; + + /** + * The primary port. + */ + @JsonProperty(value = "properties.primaryAzurePort") + private String primaryAzurePort; + + /** + * The secondary port. + */ + @JsonProperty(value = "properties.secondaryAzurePort") + private String secondaryAzurePort; + + /** + * The shared key. + */ + @JsonProperty(value = "properties.sharedKey") + private String sharedKey; + + /** + * The VLAN ID. + */ + @JsonProperty(value = "properties.vlanId") + private Integer vlanId; + + /** + * The Microsoft peering configuration. + */ + @JsonProperty(value = "properties.microsoftPeeringConfig") + private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; + + /** + * Gets the provisioning state of the public IP resource. Possible values + * are: 'Updating', 'Deleting', and 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The GatewayManager Etag. + */ + @JsonProperty(value = "properties.gatewayManagerEtag", access = JsonProperty.Access.WRITE_ONLY) + private String gatewayManagerEtag; + + /** + * Gets whether the provider or the customer last modified the peering. + */ + @JsonProperty(value = "properties.lastModifiedBy") + private String lastModifiedBy; + + /** + * The IPv6 peering configuration. + */ + @JsonProperty(value = "properties.ipv6PeeringConfig") + private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; + + /** + * Gets name of the resource that is unique within a resource group. This + * name can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the peeringType value. + * + * @return the peeringType value + */ + public ExpressRoutePeeringType peeringType() { + return this.peeringType; + } + + /** + * Set the peeringType value. + * + * @param peeringType the peeringType value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { + this.peeringType = peeringType; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public ExpressRoutePeeringState state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withState(ExpressRoutePeeringState state) { + this.state = state; + return this; + } + + /** + * Get the azureASN value. + * + * @return the azureASN value + */ + public Integer azureASN() { + return this.azureASN; + } + + /** + * Get the peerASN value. + * + * @return the peerASN value + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN value. + * + * @param peerASN the peerASN value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the primaryPeerAddressPrefix value. + * + * @return the primaryPeerAddressPrefix value + */ + public String primaryPeerAddressPrefix() { + return this.primaryPeerAddressPrefix; + } + + /** + * Set the primaryPeerAddressPrefix value. + * + * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { + this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; + return this; + } + + /** + * Get the secondaryPeerAddressPrefix value. + * + * @return the secondaryPeerAddressPrefix value + */ + public String secondaryPeerAddressPrefix() { + return this.secondaryPeerAddressPrefix; + } + + /** + * Set the secondaryPeerAddressPrefix value. + * + * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { + this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; + return this; + } + + /** + * Get the primaryAzurePort value. + * + * @return the primaryAzurePort value + */ + public String primaryAzurePort() { + return this.primaryAzurePort; + } + + /** + * Set the primaryAzurePort value. + * + * @param primaryAzurePort the primaryAzurePort value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withPrimaryAzurePort(String primaryAzurePort) { + this.primaryAzurePort = primaryAzurePort; + return this; + } + + /** + * Get the secondaryAzurePort value. + * + * @return the secondaryAzurePort value + */ + public String secondaryAzurePort() { + return this.secondaryAzurePort; + } + + /** + * Set the secondaryAzurePort value. + * + * @param secondaryAzurePort the secondaryAzurePort value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSecondaryAzurePort(String secondaryAzurePort) { + this.secondaryAzurePort = secondaryAzurePort; + return this; + } + + /** + * Get the sharedKey value. + * + * @return the sharedKey value + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the sharedKey value. + * + * @param sharedKey the sharedKey value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Get the vlanId value. + * + * @return the vlanId value + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId value. + * + * @param vlanId the vlanId value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the microsoftPeeringConfig value. + * + * @return the microsoftPeeringConfig value + */ + public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { + return this.microsoftPeeringConfig; + } + + /** + * Set the microsoftPeeringConfig value. + * + * @param microsoftPeeringConfig the microsoftPeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { + this.microsoftPeeringConfig = microsoftPeeringConfig; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the gatewayManagerEtag value. + * + * @return the gatewayManagerEtag value + */ + public String gatewayManagerEtag() { + return this.gatewayManagerEtag; + } + + /** + * Get the lastModifiedBy value. + * + * @return the lastModifiedBy value + */ + public String lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Set the lastModifiedBy value. + * + * @param lastModifiedBy the lastModifiedBy value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * Get the ipv6PeeringConfig value. + * + * @return the ipv6PeeringConfig value + */ + public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { + return this.ipv6PeeringConfig; + } + + /** + * Set the ipv6PeeringConfig value. + * + * @param ipv6PeeringConfig the ipv6PeeringConfig value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { + this.ipv6PeeringConfig = ipv6PeeringConfig; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the etag value. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java index f13b006e441..26d4fd35078 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java @@ -79,11 +79,11 @@ interface ExpressRouteCrossConnectionPeeringsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnectionPeerings createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitPeeringInner peeringParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.ExpressRouteCrossConnectionPeerings beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitPeeringInner peeringParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.ExpressRouteCrossConnectionPeerings listNext" }) @GET @@ -99,13 +99,13 @@ interface ExpressRouteCrossConnectionPeeringsService { * @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<ExpressRouteCircuitPeeringInner> object if successful. + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String crossConnectionName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, crossConnectionName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList list(final String resourceGroupName, final String crossConnectionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, crossConnectionName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -120,12 +120,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final String resourceGroupName, final String crossConnectionName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final String resourceGroupName, final String crossConnectionName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(resourceGroupName, crossConnectionName), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, @@ -138,13 +138,13 @@ public Observable>> call(S * @param resourceGroupName The name of the resource group. * @param crossConnectionName The name of the ExpressRouteCrossConnection. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCircuitPeeringInner> object + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object */ - public Observable> listAsync(final String resourceGroupName, final String crossConnectionName) { + public Observable> listAsync(final String resourceGroupName, final String crossConnectionName) { return listWithServiceResponseAsync(resourceGroupName, crossConnectionName) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -156,13 +156,13 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String resourceGroupName, final String crossConnectionName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String crossConnectionName) { return listSinglePageAsync(resourceGroupName, crossConnectionName) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -175,12 +175,12 @@ public Observable>> call(S /** * Gets all peerings in a specified ExpressRouteCrossConnection. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param crossConnectionName The name of the ExpressRouteCrossConnection. + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param crossConnectionName The name of the ExpressRouteCrossConnection. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCircuitPeeringInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String crossConnectionName) { + public Observable>> listSinglePageAsync(final String resourceGroupName, final String crossConnectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -194,12 +194,12 @@ public Observable>> listSi throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -207,9 +207,9 @@ public Observable>> call(R }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -392,9 +392,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @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 ExpressRouteCircuitPeeringInner object if successful. + * @return the ExpressRouteCrossConnectionPeeringInner object if successful. */ - public ExpressRouteCircuitPeeringInner get(String resourceGroupName, String crossConnectionName, String peeringName) { + public ExpressRouteCrossConnectionPeeringInner get(String resourceGroupName, String crossConnectionName, String peeringName) { return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); } @@ -408,7 +408,7 @@ public ExpressRouteCircuitPeeringInner get(String resourceGroupName, String cros * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { + public ServiceFuture getAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); } @@ -419,12 +419,12 @@ public ServiceFuture getAsync(String resourceGr * @param crossConnectionName The name of the ExpressRouteCrossConnection. * @param peeringName The name of the peering. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitPeeringInner object + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object */ - public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, ExpressRouteCircuitPeeringInner>() { + public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { @Override - public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { return response.body(); } }); @@ -437,9 +437,9 @@ public ExpressRouteCircuitPeeringInner call(ServiceResponse> getWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -456,11 +456,11 @@ public Observable> getWithServi throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -469,9 +469,9 @@ public Observable> call(Respons }); } - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -486,9 +486,9 @@ private ServiceResponse getDelegate(Response createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); } @@ -517,10 +517,10 @@ public ServiceFuture createOrUpdateAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCircuitPeeringInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { @Override - public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { return response.body(); } }); @@ -536,7 +536,7 @@ public ExpressRouteCircuitPeeringInner call(ServiceResponse> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -557,7 +557,7 @@ public Observable> createOrUpda } Validator.validate(peeringParameters); Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -570,9 +570,9 @@ public Observable> createOrUpda * @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 ExpressRouteCircuitPeeringInner object if successful. + * @return the ExpressRouteCrossConnectionPeeringInner object if successful. */ - public ExpressRouteCircuitPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().single().body(); } @@ -587,7 +587,7 @@ public ExpressRouteCircuitPeeringInner beginCreateOrUpdate(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); } @@ -599,12 +599,12 @@ public ServiceFuture beginCreateOrUpdateAsync(S * @param peeringName The name of the peering. * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitPeeringInner object + * @return the observable to the ExpressRouteCrossConnectionPeeringInner object */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCircuitPeeringInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { @Override - public ExpressRouteCircuitPeeringInner call(ServiceResponse response) { + public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { return response.body(); } }); @@ -618,9 +618,9 @@ public ExpressRouteCircuitPeeringInner call(ServiceResponse> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -641,11 +641,11 @@ public Observable> beginCreateO } Validator.validate(peeringParameters); return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -654,10 +654,10 @@ public Observable> call(Respons }); } - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -669,13 +669,13 @@ private ServiceResponse beginCreateOrUpdateDele * @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<ExpressRouteCircuitPeeringInner> object if successful. + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -690,12 +690,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, @@ -707,13 +707,13 @@ public Observable>> call(S * * @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<ExpressRouteCircuitPeeringInner> object + * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object */ - public Observable> listNextAsync(final String nextPageLink) { + public Observable> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -724,13 +724,13 @@ public Page call(ServiceResponse>> listNextWithServiceResponseAsync(final String nextPageLink) { + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -743,22 +743,22 @@ public Observable>> call(S /** * Gets all peerings in a specified ExpressRouteCrossConnection. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCircuitPeeringInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> 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, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -766,9 +766,9 @@ public Observable>> call(R }); } - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java index 56fc36bc508..0db4c861af8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java @@ -317,8 +317,8 @@ private ServiceResponse> listByResour /** * Gets details about the specified ExpressRouteCrossConnection. * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). * @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 @@ -331,8 +331,8 @@ public ExpressRouteCrossConnectionInner getByResourceGroup(String resourceGroupN /** * Gets details about the specified ExpressRouteCrossConnection. * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -344,8 +344,8 @@ public ServiceFuture getByResourceGroupAsync(S /** * Gets details about the specified ExpressRouteCrossConnection. * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. + * @param resourceGroupName The name of the resource group (peering location of the circuit). + * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ExpressRouteCrossConnectionInner object */ @@ -361,8 +361,8 @@ public ExpressRouteCrossConnectionInner call(ServiceResponse Date: Sat, 17 Mar 2018 00:10:17 +0000 Subject: [PATCH 2/2] Generated from 049b7f24a5e9e9e7071294304cb5939817d86dce Fix review comments --- ...pressRouteCrossConnectionPeeringInner.java | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java index 1f58ab40eb3..af150dbc97c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java @@ -61,13 +61,13 @@ public class ExpressRouteCrossConnectionPeeringInner extends SubResource { /** * The primary port. */ - @JsonProperty(value = "properties.primaryAzurePort") + @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) private String primaryAzurePort; /** * The secondary port. */ - @JsonProperty(value = "properties.secondaryAzurePort") + @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) private String secondaryAzurePort; /** @@ -244,17 +244,6 @@ public String primaryAzurePort() { return this.primaryAzurePort; } - /** - * Set the primaryAzurePort value. - * - * @param primaryAzurePort the primaryAzurePort value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withPrimaryAzurePort(String primaryAzurePort) { - this.primaryAzurePort = primaryAzurePort; - return this; - } - /** * Get the secondaryAzurePort value. * @@ -264,17 +253,6 @@ public String secondaryAzurePort() { return this.secondaryAzurePort; } - /** - * Set the secondaryAzurePort value. - * - * @param secondaryAzurePort the secondaryAzurePort value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withSecondaryAzurePort(String secondaryAzurePort) { - this.secondaryAzurePort = secondaryAzurePort; - return this; - } - /** * Get the sharedKey value. *