From f67970f243dbc989d3a3ede86f2e7e976ae3ee05 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 10 Nov 2020 02:47:46 +0000 Subject: [PATCH] Generated from 30060f5b479356df87a4fe9682e1143c310e288a --- sdk/avs/mgmt-v2020_07_17_preview/pom.xml | 115 + .../avs/v20200717preview/Authorizations.java | 344 ++ .../avs/v20200717preview/AvsClient.java | 153 + .../avs/v20200717preview/Clusters.java | 455 ++ .../GlobalReachConnections.java | 352 ++ .../v20200717preview/HcxEnterpriseSites.java | 251 + .../avs/v20200717preview/Locations.java | 103 + .../avs/v20200717preview/Operations.java | 102 + .../avs/v20200717preview/PrivateClouds.java | 542 ++ .../v20200717preview/WorkloadNetworks.java | 1997 ++++++++ .../implementation/AuthorizationsImpl.java | 762 +++ .../implementation/AvsClientImpl.java | 303 ++ .../implementation/ClustersImpl.java | 975 ++++ .../GlobalReachConnectionsImpl.java | 779 +++ .../HcxEnterpriseSitesImpl.java | 602 +++ .../implementation/LocationsImpl.java | 225 + .../implementation/OperationsImpl.java | 286 ++ .../implementation/PrivateCloudsImpl.java | 1236 +++++ .../implementation/WorkloadNetworksImpl.java | 4369 +++++++++++++++++ .../implementation/package-info.java | 11 + .../models/AdminCredentials.java | 77 + .../avs/v20200717preview/models/Circuit.java | 77 + .../avs/v20200717preview/models/Cluster.java | 119 + .../models/ClusterProvisioningState.java | 50 + .../models/ClusterUpdate.java | 45 + .../models/CommonClusterProperties.java | 90 + .../v20200717preview/models/Endpoints.java | 62 + .../models/ErrorAdditionalInfo.java | 47 + .../models/ErrorResponse.java | 96 + .../models/ExpressRouteAuthorization.java | 66 + ...ssRouteAuthorizationProvisioningState.java | 44 + .../models/GlobalReachConnection.java | 122 + ...lobalReachConnectionProvisioningState.java | 44 + .../models/GlobalReachConnectionStatus.java | 44 + .../models/HcxEnterpriseSite.java | 51 + .../models/HcxEnterpriseSiteStatus.java | 47 + .../models/IdentitySource.java | 280 ++ .../v20200717preview/models/InternetEnum.java | 41 + .../models/LogSpecification.java | 95 + .../models/ManagementCluster.java | 16 + .../models/MetricDimension.java | 69 + .../models/MetricSpecification.java | 359 ++ .../models/NsxtAdminRotateEnum.java | 38 + .../v20200717preview/models/Operation.java | 126 + .../models/OperationDisplay.java | 77 + .../models/OperationProperties.java | 43 + .../avs/v20200717preview/models/PageImpl.java | 75 + .../models/PortMirroringDirectionEnum.java | 38 + .../models/PortMirroringStatusEnum.java | 38 + .../v20200717preview/models/PrivateCloud.java | 344 ++ .../models/PrivateCloudProvisioningState.java | 56 + .../models/PrivateCloudUpdate.java | 180 + .../avs/v20200717preview/models/Quota.java | 49 + .../v20200717preview/models/QuotaEnabled.java | 41 + .../models/SegmentStatusEnum.java | 38 + .../models/ServiceSpecification.java | 70 + .../avs/v20200717preview/models/Sku.java | 43 + .../avs/v20200717preview/models/SslEnum.java | 41 + .../avs/v20200717preview/models/Trial.java | 48 + .../v20200717preview/models/TrialStatus.java | 44 + .../models/VMGroupStatusEnum.java | 38 + .../v20200717preview/models/VMTypeEnum.java | 38 + .../models/VcsaAdminRotateEnum.java | 38 + .../models/WorkloadNetworkDhcp.java | 104 + .../models/WorkloadNetworkDhcpEntity.java | 111 + .../WorkloadNetworkDhcpProvisioningState.java | 50 + .../models/WorkloadNetworkDhcpRelay.java | 48 + .../models/WorkloadNetworkDhcpServer.java | 73 + .../models/WorkloadNetworkGateway.java | 61 + .../models/WorkloadNetworkPortMirroring.java | 182 + ...NetworkPortMirroringProvisioningState.java | 50 + .../models/WorkloadNetworkSegment.java | 171 + .../models/WorkloadNetworkSegmentPortVif.java | 43 + ...rkloadNetworkSegmentProvisioningState.java | 50 + .../models/WorkloadNetworkSegmentSubnet.java | 70 + .../models/WorkloadNetworkVMGroup.java | 130 + ...rkloadNetworkVMGroupProvisioningState.java | 50 + .../models/WorkloadNetworkVirtualMachine.java | 61 + .../v20200717preview/models/package-info.java | 11 + .../avs/v20200717preview/package-info.java | 11 + 80 files changed, 18682 insertions(+) create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/pom.xml create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Authorizations.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/AvsClient.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Clusters.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/GlobalReachConnections.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/HcxEnterpriseSites.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Locations.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Operations.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/PrivateClouds.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/WorkloadNetworks.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AuthorizationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AvsClientImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/ClustersImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/GlobalReachConnectionsImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/HcxEnterpriseSitesImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/LocationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/OperationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/PrivateCloudsImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/WorkloadNetworksImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/package-info.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/AdminCredentials.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Circuit.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Cluster.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterUpdate.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/CommonClusterProperties.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Endpoints.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorAdditionalInfo.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorResponse.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorization.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorizationProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnection.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionStatus.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSite.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSiteStatus.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/IdentitySource.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/InternetEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/LogSpecification.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ManagementCluster.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricDimension.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricSpecification.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/NsxtAdminRotateEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Operation.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationDisplay.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationProperties.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PageImpl.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringDirectionEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringStatusEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloud.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudUpdate.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Quota.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/QuotaEnabled.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SegmentStatusEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ServiceSpecification.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Sku.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SslEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Trial.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/TrialStatus.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMGroupStatusEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMTypeEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VcsaAdminRotateEnum.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcp.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpEntity.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpRelay.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpServer.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkGateway.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroring.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroringProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegment.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentPortVif.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentSubnet.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroup.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroupProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVirtualMachine.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/package-info.java create mode 100644 sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/package-info.java diff --git a/sdk/avs/mgmt-v2020_07_17_preview/pom.xml b/sdk/avs/mgmt-v2020_07_17_preview/pom.xml new file mode 100644 index 0000000000000..7419f6a2b47ec --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.microsoft.azure + azure-avs + 1.7.1-SNAPSHOT + jar + Microsoft Azure SDK for AVS + This package contains Microsoft AVS SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + 1.5.3 + + + junit + junit + 4.12 + test + + + com.microsoft.azure + azure-client-authentication + 1.5.3 + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Authorizations.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Authorizations.java new file mode 100644 index 0000000000000..1d19a0078455c --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Authorizations.java @@ -0,0 +1,344 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.ExpressRouteAuthorization; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Authorizations. + */ +public interface Authorizations { + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<ExpressRouteAuthorization> object if successful. + */ + PagedList list(final String resourceGroupName, final String privateCloudName); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteAuthorization> object + */ + Observable> listAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteAuthorization> object + */ + Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback); + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable getAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + ExpressRouteAuthorization createOrUpdate(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + ExpressRouteAuthorization beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 + */ + void delete(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 + */ + void beginDelete(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/AvsClient.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/AvsClient.java new file mode 100644 index 0000000000000..a4bd4c7622d22 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/AvsClient.java @@ -0,0 +1,153 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.AzureClient; +import com.microsoft.rest.RestClient; + +/** + * The interface for AvsClient class. + */ +public interface AvsClient { + /** + * Gets the REST client. + * + * @return the {@link RestClient} object. + */ + RestClient restClient(); + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + AzureClient getAzureClient(); + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + String userAgent(); + + /** + * Gets The API version to use for this operation.. + * + * @return the apiVersion value. + */ + String apiVersion(); + + /** + * Gets The ID of the target subscription.. + * + * @return the subscriptionId value. + */ + String subscriptionId(); + + /** + * Sets The ID of the target subscription.. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + AvsClient withSubscriptionId(String subscriptionId); + + /** + * Gets The preferred language for the response.. + * + * @return the acceptLanguage value. + */ + String acceptLanguage(); + + /** + * Sets The preferred language for the response.. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + AvsClient withAcceptLanguage(String acceptLanguage); + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @return the longRunningOperationRetryTimeout value. + */ + int longRunningOperationRetryTimeout(); + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + AvsClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @return the generateClientRequestId value. + */ + boolean generateClientRequestId(); + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + AvsClient withGenerateClientRequestId(boolean generateClientRequestId); + + /** + * Gets the Operations object to access its operations. + * @return the Operations object. + */ + Operations operations(); + + /** + * Gets the Locations object to access its operations. + * @return the Locations object. + */ + Locations locations(); + + /** + * Gets the PrivateClouds object to access its operations. + * @return the PrivateClouds object. + */ + PrivateClouds privateClouds(); + + /** + * Gets the Clusters object to access its operations. + * @return the Clusters object. + */ + Clusters clusters(); + + /** + * Gets the HcxEnterpriseSites object to access its operations. + * @return the HcxEnterpriseSites object. + */ + HcxEnterpriseSites hcxEnterpriseSites(); + + /** + * Gets the Authorizations object to access its operations. + * @return the Authorizations object. + */ + Authorizations authorizations(); + + /** + * Gets the GlobalReachConnections object to access its operations. + * @return the GlobalReachConnections object. + */ + GlobalReachConnections globalReachConnections(); + + /** + * Gets the WorkloadNetworks object to access its operations. + * @return the WorkloadNetworks object. + */ + WorkloadNetworks workloadNetworks(); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Clusters.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Clusters.java new file mode 100644 index 0000000000000..0953ea564eaec --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Clusters.java @@ -0,0 +1,455 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.Cluster; +import com.microsoft.azure.management.avs.v20200717preview.models.ClusterUpdate; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Clusters. + */ +public interface Clusters { + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<Cluster> object if successful. + */ + PagedList list(final String resourceGroupName, final String privateCloudName); + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Cluster> object + */ + Observable> listAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Cluster> object + */ + Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 Cluster object if successful. + */ + Cluster get(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String privateCloudName, String clusterName, final ServiceCallback serviceCallback); + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable getAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 Cluster object if successful. + */ + Cluster createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 Cluster object if successful. + */ + Cluster beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 Cluster object if successful. + */ + Cluster update(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, final ServiceCallback serviceCallback); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable updateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 Cluster object if successful. + */ + Cluster beginUpdate(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, final ServiceCallback serviceCallback); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 + */ + void delete(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, final ServiceCallback serviceCallback); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 + */ + void beginDelete(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteAsync(String resourceGroupName, String privateCloudName, String clusterName, final ServiceCallback serviceCallback); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * List clusters in a private cloud. + * + * @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<Cluster> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * List clusters in a private cloud. + * + * @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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List clusters in a private cloud. + * + * @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<Cluster> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * List clusters in a private cloud. + * + * @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<Cluster> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/GlobalReachConnections.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/GlobalReachConnections.java new file mode 100644 index 0000000000000..970d6c8dbc64b --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/GlobalReachConnections.java @@ -0,0 +1,352 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.GlobalReachConnection; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in GlobalReachConnections. + */ +public interface GlobalReachConnections { + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<GlobalReachConnection> object if successful. + */ + PagedList list(final String resourceGroupName, final String privateCloudName); + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GlobalReachConnection> object + */ + Observable> listAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GlobalReachConnection> object + */ + Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback); + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable getAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + GlobalReachConnection createOrUpdate(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection, final ServiceCallback serviceCallback); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + GlobalReachConnection beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection, final ServiceCallback serviceCallback); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 + */ + void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 + */ + void beginDelete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName); + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * List global reach connections in a private cloud. + * + * @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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/HcxEnterpriseSites.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/HcxEnterpriseSites.java new file mode 100644 index 0000000000000..d595fdd4fb7e9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/HcxEnterpriseSites.java @@ -0,0 +1,251 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.HcxEnterpriseSite; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in HcxEnterpriseSites. + */ +public interface HcxEnterpriseSites { + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<HcxEnterpriseSite> object if successful. + */ + PagedList list(final String resourceGroupName, final String privateCloudName); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HcxEnterpriseSite> object + */ + Observable> listAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HcxEnterpriseSite> object + */ + Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 HcxEnterpriseSite object if successful. + */ + HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback); + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable getAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 HcxEnterpriseSite object if successful. + */ + HcxEnterpriseSite createOrUpdate(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback); + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 + */ + void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback); + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Locations.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Locations.java new file mode 100644 index 0000000000000..8d74c3923ab16 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Locations.java @@ -0,0 +1,103 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.avs.v20200717preview.models.Quota; +import com.microsoft.azure.management.avs.v20200717preview.models.Trial; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Locations. + */ +public interface Locations { + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @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 Trial object if successful. + */ + Trial checkTrialAvailability(String location); + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture checkTrialAvailabilityAsync(String location, final ServiceCallback serviceCallback); + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Trial object + */ + Observable checkTrialAvailabilityAsync(String location); + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Trial object + */ + Observable> checkTrialAvailabilityWithServiceResponseAsync(String location); + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @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 Quota object if successful. + */ + Quota checkQuotaAvailability(String location); + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture checkQuotaAvailabilityAsync(String location, final ServiceCallback serviceCallback); + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Quota object + */ + Observable checkQuotaAvailabilityAsync(String location); + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Quota object + */ + Observable> checkQuotaAvailabilityWithServiceResponseAsync(String location); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Operations.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Operations.java new file mode 100644 index 0000000000000..71adcc15b8e0d --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/Operations.java @@ -0,0 +1,102 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.Operation; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public interface Operations { + /** + * Lists all of the available operations. + * + * @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<Operation> object if successful. + */ + PagedList list(); + + /** + * Lists all of the available operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final ListOperationCallback serviceCallback); + + /** + * Lists all of the available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Operation> object + */ + Observable> listAsync(); + + /** + * Lists all of the available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Operation> object + */ + Observable>> listWithServiceResponseAsync(); + + /** + * Lists all of the available operations. + * + * @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<Operation> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * Lists all of the available operations. + * + * @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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * Lists all of the available operations. + * + * @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<Operation> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * Lists all of the available operations. + * + * @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<Operation> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/PrivateClouds.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/PrivateClouds.java new file mode 100644 index 0000000000000..c01595c0457e0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/PrivateClouds.java @@ -0,0 +1,542 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20200717preview.models.PrivateCloud; +import com.microsoft.azure.management.avs.v20200717preview.models.PrivateCloudUpdate; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateClouds. + */ +public interface PrivateClouds { + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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<PrivateCloud> object if successful. + */ + PagedList list(final String resourceGroupName); + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback); + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + Observable> listAsync(final String resourceGroupName); + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + Observable>> listWithServiceResponseAsync(final String resourceGroupName); + + /** + * List private clouds 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<PrivateCloud> object if successful. + */ + PagedList listInSubscription(); + + /** + * List private clouds 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 + */ + ServiceFuture> listInSubscriptionAsync(final ListOperationCallback serviceCallback); + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + Observable> listInSubscriptionAsync(); + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + Observable>> listInSubscriptionWithServiceResponseAsync(); + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 PrivateCloud object if successful. + */ + PrivateCloud get(String resourceGroupName, String privateCloudName); + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable getAsync(String resourceGroupName, String privateCloudName); + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 PrivateCloud object if successful. + */ + PrivateCloud createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 PrivateCloud object if successful. + */ + PrivateCloud beginCreateOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 PrivateCloud object if successful. + */ + PrivateCloud update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, final ServiceCallback serviceCallback); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 PrivateCloud object if successful. + */ + PrivateCloud beginUpdate(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, final ServiceCallback serviceCallback); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 + */ + void delete(String resourceGroupName, String privateCloudName); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String privateCloudName); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 + */ + void beginDelete(String resourceGroupName, String privateCloudName); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteAsync(String resourceGroupName, String privateCloudName); + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName); + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 AdminCredentials object if successful. + */ + AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture listAdminCredentialsAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AdminCredentials object + */ + Observable listAdminCredentialsAsync(String resourceGroupName, String privateCloudName); + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AdminCredentials object + */ + Observable> listAdminCredentialsWithServiceResponseAsync(String resourceGroupName, String privateCloudName); + + /** + * List private clouds 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<PrivateCloud> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * List private clouds 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 + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List private clouds 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<PrivateCloud> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * List private clouds 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<PrivateCloud> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List private clouds 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<PrivateCloud> object if successful. + */ + PagedList listInSubscriptionNext(final String nextPageLink); + + /** + * List private clouds 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 + */ + ServiceFuture> listInSubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List private clouds 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<PrivateCloud> object + */ + Observable> listInSubscriptionNextAsync(final String nextPageLink); + + /** + * List private clouds 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<PrivateCloud> object + */ + Observable>> listInSubscriptionNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/WorkloadNetworks.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/WorkloadNetworks.java new file mode 100644 index 0000000000000..11f5a9852bddf --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/WorkloadNetworks.java @@ -0,0 +1,1997 @@ +/** + * 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.avs.v2020_07_17_preview; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkDhcp; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkGateway; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkPortMirroring; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkSegment; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkVirtualMachine; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkVMGroup; +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 java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkloadNetworks. + */ +public interface WorkloadNetworks { + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkSegment> object if successful. + */ + PagedList listSegments(final String resourceGroupName, final String privateCloudName); + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listSegmentsAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkSegment> object + */ + Observable> listSegmentsAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkSegment> object + */ + Observable>> listSegmentsWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 WorkloadNetworkSegment object if successful. + */ + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback); + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable getSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable> getSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + WorkloadNetworkSegment createSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable createSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable> createSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + WorkloadNetworkSegment beginCreateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable beginCreateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable> beginCreateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + WorkloadNetworkSegment updateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable updateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable> updateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + WorkloadNetworkSegment beginUpdateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginUpdateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable beginUpdateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + Observable> beginUpdateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 + */ + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 + */ + void beginDeleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkDhcp> object if successful. + */ + PagedList listDhcp(final String resourceGroupName, final String privateCloudName); + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listDhcpAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkDhcp> object + */ + Observable> listDhcpAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkDhcp> object + */ + Observable>> listDhcpWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @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 WorkloadNetworkDhcp object if successful. + */ + WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getDhcpAsync(String resourceGroupName, String dhcpId, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable getDhcpAsync(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable> getDhcpWithServiceResponseAsync(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + WorkloadNetworkDhcp createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable createDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable> createDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + WorkloadNetworkDhcp beginCreateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable beginCreateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable> beginCreateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + WorkloadNetworkDhcp updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable updateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable> updateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + WorkloadNetworkDhcp beginUpdateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginUpdateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable beginUpdateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + Observable> beginUpdateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 + */ + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, final ServiceCallback serviceCallback); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 + */ + void beginDeleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, final ServiceCallback serviceCallback); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkGateway> object if successful. + */ + PagedList listGateways(final String resourceGroupName, final String privateCloudName); + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listGatewaysAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkGateway> object + */ + Observable> listGatewaysAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkGateway> object + */ + Observable>> listGatewaysWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @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 WorkloadNetworkGateway object if successful. + */ + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getGatewayAsync(String resourceGroupName, String privateCloudName, String gatewayId, final ServiceCallback serviceCallback); + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkGateway object + */ + Observable getGatewayAsync(String resourceGroupName, String privateCloudName, String gatewayId); + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkGateway object + */ + Observable> getGatewayWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String gatewayId); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkPortMirroring> object if successful. + */ + PagedList listPortMirroring(final String resourceGroupName, final String privateCloudName); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listPortMirroringAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkPortMirroring> object + */ + Observable> listPortMirroringAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkPortMirroring> object + */ + Observable>> listPortMirroringWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @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 WorkloadNetworkPortMirroring object if successful. + */ + WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId); + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, final ServiceCallback serviceCallback); + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable getPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId); + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable> getPortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + WorkloadNetworkPortMirroring createPortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable createPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable> createPortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + WorkloadNetworkPortMirroring beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable> beginCreatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + WorkloadNetworkPortMirroring updatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture updatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable updatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable> updatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + WorkloadNetworkPortMirroring beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + Observable> beginUpdatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 + */ + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deletePortMirroringWithServiceResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 + */ + void beginDeletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeletePortMirroringWithServiceResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkVMGroup> object if successful. + */ + PagedList listVMGroups(final String resourceGroupName, final String privateCloudName); + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listVMGroupsAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVMGroup> object + */ + Observable> listVMGroupsAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVMGroup> object + */ + Observable>> listVMGroupsWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @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 WorkloadNetworkVMGroup object if successful. + */ + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, final ServiceCallback serviceCallback); + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable getVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId); + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable> getVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + WorkloadNetworkVMGroup createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 + */ + ServiceFuture createVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable createVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable> createVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + WorkloadNetworkVMGroup beginCreateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 + */ + ServiceFuture beginCreateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable beginCreateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable> beginCreateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + WorkloadNetworkVMGroup updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 + */ + ServiceFuture updateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable updateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable> updateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + WorkloadNetworkVMGroup beginUpdateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 + */ + ServiceFuture beginUpdateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable beginUpdateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + Observable> beginUpdateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 + */ + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteVMGroupWithServiceResponseAsync(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 + */ + void beginDeleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, final ServiceCallback serviceCallback); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> beginDeleteVMGroupWithServiceResponseAsync(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkVirtualMachine> object if successful. + */ + PagedList listVirtualMachines(final String resourceGroupName, final String privateCloudName); + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listVirtualMachinesAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback); + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVirtualMachine> object + */ + Observable> listVirtualMachinesAsync(final String resourceGroupName, final String privateCloudName); + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVirtualMachine> object + */ + Observable>> listVirtualMachinesWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName); + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @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 WorkloadNetworkVirtualMachine object if successful. + */ + WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, String virtualMachineId); + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getVirtualMachineAsync(String resourceGroupName, String privateCloudName, String virtualMachineId, final ServiceCallback serviceCallback); + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVirtualMachine object + */ + Observable getVirtualMachineAsync(String resourceGroupName, String privateCloudName, String virtualMachineId); + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVirtualMachine object + */ + Observable> getVirtualMachineWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId); + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object if successful. + */ + PagedList listSegmentsNext(final String nextPageLink); + + /** + * List of segments in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listSegmentsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object + */ + Observable> listSegmentsNextAsync(final String nextPageLink); + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object + */ + Observable>> listSegmentsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object if successful. + */ + PagedList listDhcpNext(final String nextPageLink); + + /** + * List dhcp in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listDhcpNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object + */ + Observable> listDhcpNextAsync(final String nextPageLink); + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object + */ + Observable>> listDhcpNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object if successful. + */ + PagedList listGatewaysNext(final String nextPageLink); + + /** + * List of gateways in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listGatewaysNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object + */ + Observable> listGatewaysNextAsync(final String nextPageLink); + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object + */ + Observable>> listGatewaysNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object if successful. + */ + PagedList listPortMirroringNext(final String nextPageLink); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listPortMirroringNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object + */ + Observable> listPortMirroringNextAsync(final String nextPageLink); + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object + */ + Observable>> listPortMirroringNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object if successful. + */ + PagedList listVMGroupsNext(final String nextPageLink); + + /** + * List of vm groups in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listVMGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object + */ + Observable> listVMGroupsNextAsync(final String nextPageLink); + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object + */ + Observable>> listVMGroupsNextWithServiceResponseAsync(final String nextPageLink); + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object if successful. + */ + PagedList listVirtualMachinesNext(final String nextPageLink); + + /** + * List of virtual machines in a private cloud workload network. + * + * @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 + */ + ServiceFuture> listVirtualMachinesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object + */ + Observable> listVirtualMachinesNextAsync(final String nextPageLink); + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object + */ + Observable>> listVirtualMachinesNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AuthorizationsImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AuthorizationsImpl.java new file mode 100644 index 0000000000000..1bc50d00757d0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AuthorizationsImpl.java @@ -0,0 +1,762 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.Authorizations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.ExpressRouteAuthorization; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +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 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 Authorizations. + */ +public class AuthorizationsImpl implements Authorizations { + /** The Retrofit service to perform REST calls. */ + private AuthorizationsService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of AuthorizationsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AuthorizationsImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(AuthorizationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Authorizations to be + * used by Retrofit to perform actually REST calls. + */ + interface AuthorizationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Authorizations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.Authorizations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("authorizationName") String authorizationName, @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.avs.v20200717preview.Authorizations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("authorizationName") String authorizationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ExpressRouteAuthorization authorization, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Authorizations beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("authorizationName") String authorizationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ExpressRouteAuthorization authorization, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Authorizations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("authorizationName") String authorizationName, @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.avs.v20200717preview.Authorizations beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("authorizationName") String authorizationName, @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.avs.v20200717preview.Authorizations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<ExpressRouteAuthorization> object if successful. + */ + public PagedList list(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteAuthorization> object + */ + public Observable> listAsync(final String resourceGroupName, final String privateCloudName) { + return listWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExpressRouteAuthorization> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listSinglePageAsync(resourceGroupName, privateCloudName) + .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)); + } + }); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteAuthorization> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(), resourceGroupName, privateCloudName, 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); + } + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + public ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).toBlocking().single().body(); + } + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 getAsync(String resourceGroupName, String privateCloudName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName), serviceCallback); + } + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable getAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).map(new Func1, ExpressRouteAuthorization>() { + @Override + public ExpressRouteAuthorization call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an ExpressRoute Circuit Authorization by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, privateCloudName, authorizationName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + 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); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + public ExpressRouteAuthorization createOrUpdate(String resourceGroupName, String privateCloudName, String authorizationName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).toBlocking().last().body(); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName), serviceCallback); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).map(new Func1, ExpressRouteAuthorization>() { + @Override + public ExpressRouteAuthorization call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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.createOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, authorizationName, this.client.apiVersion(), this.client.acceptLanguage(), authorization, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 ExpressRouteAuthorization object if successful. + */ + public ExpressRouteAuthorization beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String authorizationName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).toBlocking().single().body(); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName), serviceCallback); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).map(new Func1, ExpressRouteAuthorization>() { + @Override + public ExpressRouteAuthorization call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, authorizationName, this.client.apiVersion(), this.client.acceptLanguage(), authorization, 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); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName) { + deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).toBlocking().last().body(); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName), serviceCallback); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, authorizationName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).toBlocking().single().body(); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @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 privateCloudName, String authorizationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName), serviceCallback); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an ExpressRoute Circuit Authorization in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (authorizationName == null) { + throw new IllegalArgumentException("Parameter authorizationName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, authorizationName, 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); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> 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(); + } + }; + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + * @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<ExpressRouteAuthorization> 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)); + } + }); + } + + /** + * List ExpressRoute Circuit Authorizations in a private cloud. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressRouteAuthorization> 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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AvsClientImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AvsClientImpl.java new file mode 100644 index 0000000000000..2f760f09f5aaf --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/AvsClientImpl.java @@ -0,0 +1,303 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.management.avs.v20200717preview.Authorizations; +import com.microsoft.azure.management.avs.v20200717preview.AvsClient; +import com.microsoft.azure.management.avs.v20200717preview.Clusters; +import com.microsoft.azure.management.avs.v20200717preview.GlobalReachConnections; +import com.microsoft.azure.management.avs.v20200717preview.HcxEnterpriseSites; +import com.microsoft.azure.management.avs.v20200717preview.Locations; +import com.microsoft.azure.management.avs.v20200717preview.Operations; +import com.microsoft.azure.management.avs.v20200717preview.PrivateClouds; +import com.microsoft.azure.management.avs.v20200717preview.WorkloadNetworks; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the AvsClientImpl class. + */ +public class AvsClientImpl extends AzureServiceClient implements AvsClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** The API version to use for this operation. */ + private String apiVersion; + + /** + * Gets The API version to use for this operation. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The ID of the target subscription. */ + private String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public AvsClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public AvsClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public AvsClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public AvsClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The Operations object to access its operations. + */ + private Operations operations; + + /** + * Gets the Operations object to access its operations. + * @return the Operations object. + */ + public Operations operations() { + return this.operations; + } + + /** + * The Locations object to access its operations. + */ + private Locations locations; + + /** + * Gets the Locations object to access its operations. + * @return the Locations object. + */ + public Locations locations() { + return this.locations; + } + + /** + * The PrivateClouds object to access its operations. + */ + private PrivateClouds privateClouds; + + /** + * Gets the PrivateClouds object to access its operations. + * @return the PrivateClouds object. + */ + public PrivateClouds privateClouds() { + return this.privateClouds; + } + + /** + * The Clusters object to access its operations. + */ + private Clusters clusters; + + /** + * Gets the Clusters object to access its operations. + * @return the Clusters object. + */ + public Clusters clusters() { + return this.clusters; + } + + /** + * The HcxEnterpriseSites object to access its operations. + */ + private HcxEnterpriseSites hcxEnterpriseSites; + + /** + * Gets the HcxEnterpriseSites object to access its operations. + * @return the HcxEnterpriseSites object. + */ + public HcxEnterpriseSites hcxEnterpriseSites() { + return this.hcxEnterpriseSites; + } + + /** + * The Authorizations object to access its operations. + */ + private Authorizations authorizations; + + /** + * Gets the Authorizations object to access its operations. + * @return the Authorizations object. + */ + public Authorizations authorizations() { + return this.authorizations; + } + + /** + * The GlobalReachConnections object to access its operations. + */ + private GlobalReachConnections globalReachConnections; + + /** + * Gets the GlobalReachConnections object to access its operations. + * @return the GlobalReachConnections object. + */ + public GlobalReachConnections globalReachConnections() { + return this.globalReachConnections; + } + + /** + * The WorkloadNetworks object to access its operations. + */ + private WorkloadNetworks workloadNetworks; + + /** + * Gets the WorkloadNetworks object to access its operations. + * @return the WorkloadNetworks object. + */ + public WorkloadNetworks workloadNetworks() { + return this.workloadNetworks; + } + + /** + * Initializes an instance of AvsClient client. + * + * @param credentials the management credentials for Azure + */ + public AvsClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of AvsClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public AvsClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of AvsClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public AvsClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-07-17-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsImpl(restClient().retrofit(), this); + this.locations = new LocationsImpl(restClient().retrofit(), this); + this.privateClouds = new PrivateCloudsImpl(restClient().retrofit(), this); + this.clusters = new ClustersImpl(restClient().retrofit(), this); + this.hcxEnterpriseSites = new HcxEnterpriseSitesImpl(restClient().retrofit(), this); + this.authorizations = new AuthorizationsImpl(restClient().retrofit(), this); + this.globalReachConnections = new GlobalReachConnectionsImpl(restClient().retrofit(), this); + this.workloadNetworks = new WorkloadNetworksImpl(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s)", super.userAgent(), "AvsClient", "2020-07-17-preview"); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/ClustersImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/ClustersImpl.java new file mode 100644 index 0000000000000..b812b33c11a03 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/ClustersImpl.java @@ -0,0 +1,975 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.Clusters; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.Cluster; +import com.microsoft.azure.management.avs.v20200717preview.models.ClusterUpdate; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Clusters. + */ +public class ClustersImpl implements Clusters { + /** The Retrofit service to perform REST calls. */ + private ClustersService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of ClustersImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ClustersImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(ClustersService.class); + this.client = client; + } + + /** + * The interface defining all the services for Clusters to be + * used by Retrofit to perform actually REST calls. + */ + interface ClustersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Clusters list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.Clusters get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @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.avs.v20200717preview.Clusters createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @Body Cluster cluster, @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.avs.v20200717preview.Clusters beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @Body Cluster cluster, @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.avs.v20200717preview.Clusters update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @Body ClusterUpdate clusterUpdate, @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.avs.v20200717preview.Clusters beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @Body ClusterUpdate clusterUpdate, @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.avs.v20200717preview.Clusters delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @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.avs.v20200717preview.Clusters beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("clusterName") String clusterName, @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.avs.v20200717preview.Clusters listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<Cluster> object if successful. + */ + public PagedList list(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Cluster> object + */ + public Observable> listAsync(final String resourceGroupName, final String privateCloudName) { + return listWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List clusters in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Cluster> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listSinglePageAsync(resourceGroupName, privateCloudName) + .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)); + } + }); + } + + /** + * List clusters in a private cloud. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Cluster> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(), resourceGroupName, privateCloudName, 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); + } + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 Cluster object if successful. + */ + public Cluster get(String resourceGroupName, String privateCloudName, String clusterName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).toBlocking().single().body(); + } + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 getAsync(String resourceGroupName, String privateCloudName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName), serviceCallback); + } + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable getAsync(String resourceGroupName, String privateCloudName, String clusterName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + 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); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 Cluster object if successful. + */ + public Cluster createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).toBlocking().last().body(); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster), serviceCallback); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (cluster == null) { + throw new IllegalArgumentException("Parameter cluster 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(cluster); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, cluster, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 Cluster object if successful. + */ + public Cluster beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).toBlocking().single().body(); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @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 privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster), serviceCallback); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (cluster == null) { + throw new IllegalArgumentException("Parameter cluster 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(cluster); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, cluster, 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); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 Cluster object if successful. + */ + public Cluster update(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).toBlocking().last().body(); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 updateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate), serviceCallback); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (clusterUpdate == null) { + throw new IllegalArgumentException("Parameter clusterUpdate 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(clusterUpdate); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, clusterUpdate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 Cluster object if successful. + */ + public Cluster beginUpdate(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).toBlocking().single().body(); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate), serviceCallback); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param clusterUpdate The cluster properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName is required and cannot be null."); + } + if (clusterUpdate == null) { + throw new IllegalArgumentException("Parameter clusterUpdate 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(clusterUpdate); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, clusterUpdate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(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); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 privateCloudName, String clusterName) { + deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).toBlocking().last().body(); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 privateCloudName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName), serviceCallback); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String privateCloudName, String clusterName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 privateCloudName, String clusterName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).toBlocking().single().body(); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @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 privateCloudName, String clusterName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName), serviceCallback); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String clusterName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (clusterName == null) { + throw new IllegalArgumentException("Parameter clusterName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, 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); + } + + /** + * List clusters in a private cloud. + * + * @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<Cluster> 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(); + } + }; + } + + /** + * List clusters in a private cloud. + * + * @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); + } + + /** + * List clusters in a private cloud. + * + * @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<Cluster> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List clusters in a private cloud. + * + * @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<Cluster> 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)); + } + }); + } + + /** + * List clusters in a private cloud. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Cluster> 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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/GlobalReachConnectionsImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/GlobalReachConnectionsImpl.java new file mode 100644 index 0000000000000..46befb4423ba6 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/GlobalReachConnectionsImpl.java @@ -0,0 +1,779 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.GlobalReachConnections; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.GlobalReachConnection; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +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 GlobalReachConnections. + */ +public class GlobalReachConnectionsImpl implements GlobalReachConnections { + /** The Retrofit service to perform REST calls. */ + private GlobalReachConnectionsService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of GlobalReachConnectionsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GlobalReachConnectionsImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(GlobalReachConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for GlobalReachConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface GlobalReachConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.GlobalReachConnections list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.GlobalReachConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("globalReachConnectionName") String globalReachConnectionName, @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.avs.v20200717preview.GlobalReachConnections createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("globalReachConnectionName") String globalReachConnectionName, @Body GlobalReachConnection globalReachConnection, @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.avs.v20200717preview.GlobalReachConnections beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("globalReachConnectionName") String globalReachConnectionName, @Body GlobalReachConnection globalReachConnection, @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.avs.v20200717preview.GlobalReachConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("globalReachConnectionName") String globalReachConnectionName, @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.avs.v20200717preview.GlobalReachConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("globalReachConnectionName") String globalReachConnectionName, @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.avs.v20200717preview.GlobalReachConnections listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<GlobalReachConnection> object if successful. + */ + public PagedList list(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GlobalReachConnection> object + */ + public Observable> listAsync(final String resourceGroupName, final String privateCloudName) { + return listWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List global reach connections in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GlobalReachConnection> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listSinglePageAsync(resourceGroupName, privateCloudName) + .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)); + } + }); + } + + /** + * List global reach connections in a private cloud. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GlobalReachConnection> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(), resourceGroupName, privateCloudName, 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); + } + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + public GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).toBlocking().single().body(); + } + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 getAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName), serviceCallback); + } + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + public Observable getAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).map(new Func1, GlobalReachConnection>() { + @Override + public GlobalReachConnection call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a global reach connection by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (globalReachConnectionName == null) { + throw new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + 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); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + public GlobalReachConnection createOrUpdate(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection).toBlocking().last().body(); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection), serviceCallback); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection).map(new Func1, GlobalReachConnection>() { + @Override + public GlobalReachConnection call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (globalReachConnectionName == null) { + throw new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null."); + } + if (globalReachConnection == null) { + throw new IllegalArgumentException("Parameter globalReachConnection 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(globalReachConnection); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 GlobalReachConnection object if successful. + */ + public GlobalReachConnection beginCreateOrUpdate(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection).toBlocking().single().body(); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection), serviceCallback); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection).map(new Func1, GlobalReachConnection>() { + @Override + public GlobalReachConnection call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @param globalReachConnection A global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GlobalReachConnection object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnection globalReachConnection) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (globalReachConnectionName == null) { + throw new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null."); + } + if (globalReachConnection == null) { + throw new IllegalArgumentException("Parameter globalReachConnection 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(globalReachConnection); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, 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); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName) { + deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).toBlocking().last().body(); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName), serviceCallback); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (globalReachConnectionName == null) { + throw new IllegalArgumentException("Parameter globalReachConnectionName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).toBlocking().single().body(); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @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 privateCloudName, String globalReachConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName), serviceCallback); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a global reach connection in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param globalReachConnectionName Name of the global reach connection in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (globalReachConnectionName == null) { + throw new IllegalArgumentException("Parameter globalReachConnectionName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, 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); + } + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> 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(); + } + }; + } + + /** + * List global reach connections in a private cloud. + * + * @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); + } + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List global reach connections in a private cloud. + * + * @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<GlobalReachConnection> 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)); + } + }); + } + + /** + * List global reach connections in a private cloud. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GlobalReachConnection> 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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/HcxEnterpriseSitesImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/HcxEnterpriseSitesImpl.java new file mode 100644 index 0000000000000..02ea559eae309 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/HcxEnterpriseSitesImpl.java @@ -0,0 +1,602 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.HcxEnterpriseSites; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.HcxEnterpriseSite; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +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 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 HcxEnterpriseSites. + */ +public class HcxEnterpriseSitesImpl implements HcxEnterpriseSites { + /** The Retrofit service to perform REST calls. */ + private HcxEnterpriseSitesService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of HcxEnterpriseSitesImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public HcxEnterpriseSitesImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(HcxEnterpriseSitesService.class); + this.client = client; + } + + /** + * The interface defining all the services for HcxEnterpriseSites to be + * used by Retrofit to perform actually REST calls. + */ + interface HcxEnterpriseSitesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.HcxEnterpriseSites list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.HcxEnterpriseSites get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @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.avs.v20200717preview.HcxEnterpriseSites createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body HcxEnterpriseSite hcxEnterpriseSite, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.HcxEnterpriseSites delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @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.avs.v20200717preview.HcxEnterpriseSites listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<HcxEnterpriseSite> object if successful. + */ + public PagedList list(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HcxEnterpriseSite> object + */ + public Observable> listAsync(final String resourceGroupName, final String privateCloudName) { + return listWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<HcxEnterpriseSite> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listSinglePageAsync(resourceGroupName, privateCloudName) + .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)); + } + }); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HcxEnterpriseSite> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(), resourceGroupName, privateCloudName, 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); + } + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 HcxEnterpriseSite object if successful. + */ + public HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).toBlocking().single().body(); + } + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 getAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName), serviceCallback); + } + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable getAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).map(new Func1, HcxEnterpriseSite>() { + @Override + public HcxEnterpriseSite call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an HCX Enterprise Site by name in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (hcxEnterpriseSiteName == null) { + throw new IllegalArgumentException("Parameter hcxEnterpriseSiteName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + 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); + } + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 HcxEnterpriseSite object if successful. + */ + public HcxEnterpriseSite createOrUpdate(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).toBlocking().single().body(); + } + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName), serviceCallback); + } + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).map(new Func1, HcxEnterpriseSite>() { + @Override + public HcxEnterpriseSite call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (hcxEnterpriseSiteName == null) { + throw new IllegalArgumentException("Parameter hcxEnterpriseSiteName 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.createOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.client.apiVersion(), this.client.acceptLanguage(), hcxEnterpriseSite, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(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); + } + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 privateCloudName, String hcxEnterpriseSiteName) { + deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).toBlocking().single().body(); + } + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @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 privateCloudName, String hcxEnterpriseSiteName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName), serviceCallback); + } + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an HCX Enterprise Site in a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (hcxEnterpriseSiteName == null) { + throw new IllegalArgumentException("Parameter hcxEnterpriseSiteName 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.delete(this.client.subscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> 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(); + } + }; + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + * @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<HcxEnterpriseSite> 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)); + } + }); + } + + /** + * List HCX Enterprise Sites in a private cloud. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<HcxEnterpriseSite> 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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/LocationsImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/LocationsImpl.java new file mode 100644 index 0000000000000..ddacb4d3dfe6b --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/LocationsImpl.java @@ -0,0 +1,225 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.Locations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.avs.v20200717preview.models.Quota; +import com.microsoft.azure.management.avs.v20200717preview.models.Trial; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Locations. + */ +public class LocationsImpl implements Locations { + /** The Retrofit service to perform REST calls. */ + private LocationsService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of LocationsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LocationsImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(LocationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Locations to be + * used by Retrofit to perform actually REST calls. + */ + interface LocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Locations checkTrialAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") + Observable> checkTrialAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @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.avs.v20200717preview.Locations checkQuotaAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability") + Observable> checkQuotaAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @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 Trial object if successful. + */ + public Trial checkTrialAvailability(String location) { + return checkTrialAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @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 checkTrialAvailabilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkTrialAvailabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Trial object + */ + public Observable checkTrialAvailabilityAsync(String location) { + return checkTrialAvailabilityWithServiceResponseAsync(location).map(new Func1, Trial>() { + @Override + public Trial call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Return trial status for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Trial object + */ + public Observable> checkTrialAvailabilityWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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.checkTrialAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkTrialAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkTrialAvailabilityDelegate(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); + } + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @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 Quota object if successful. + */ + public Quota checkQuotaAvailability(String location) { + return checkQuotaAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @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 checkQuotaAvailabilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkQuotaAvailabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Quota object + */ + public Observable checkQuotaAvailabilityAsync(String location) { + return checkQuotaAvailabilityWithServiceResponseAsync(location).map(new Func1, Quota>() { + @Override + public Quota call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Quota object + */ + public Observable> checkQuotaAvailabilityWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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.checkQuotaAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkQuotaAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkQuotaAvailabilityDelegate(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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/OperationsImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..ffc5cfd259fa0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/OperationsImpl.java @@ -0,0 +1,286 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.Operations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.Operation; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsImpl implements Operations { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of OperationsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.Operations list" }) + @GET("providers/Microsoft.AVS/operations") + Observable> list(@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.avs.v20200717preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available operations. + * + * @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<Operation> 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(); + } + }; + } + + /** + * Lists all of the available operations. + * + * @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); + } + + /** + * Lists all of the available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Operation> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Operation> 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)); + } + }); + } + + /** + * Lists all of the available operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Operation> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(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); + } + + /** + * Lists all of the available operations. + * + * @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<Operation> 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(); + } + }; + } + + /** + * Lists all of the available operations. + * + * @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); + } + + /** + * Lists all of the available operations. + * + * @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<Operation> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available operations. + * + * @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<Operation> 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)); + } + }); + } + + /** + * Lists all of the available operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Operation> 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); + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/PrivateCloudsImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/PrivateCloudsImpl.java new file mode 100644 index 0000000000000..0fb96f2abf717 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/PrivateCloudsImpl.java @@ -0,0 +1,1236 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.PrivateClouds; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +import com.microsoft.azure.management.avs.v20200717preview.models.PrivateCloud; +import com.microsoft.azure.management.avs.v20200717preview.models.PrivateCloudUpdate; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateClouds. + */ +public class PrivateCloudsImpl implements PrivateClouds { + /** The Retrofit service to perform REST calls. */ + private PrivateCloudsService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of PrivateCloudsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateCloudsImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(PrivateCloudsService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateClouds to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateCloudsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.PrivateClouds list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.PrivateClouds listInSubscription" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds") + Observable> listInSubscription(@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.avs.v20200717preview.PrivateClouds get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.PrivateClouds createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Body PrivateCloud privateCloud, @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.avs.v20200717preview.PrivateClouds beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Body PrivateCloud privateCloud, @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.avs.v20200717preview.PrivateClouds update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Body PrivateCloudUpdate privateCloudUpdate, @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.avs.v20200717preview.PrivateClouds beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Body PrivateCloudUpdate privateCloudUpdate, @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.avs.v20200717preview.PrivateClouds delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.PrivateClouds beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.PrivateClouds listAdminCredentials" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials") + Observable> listAdminCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.PrivateClouds 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.avs.v20200717preview.PrivateClouds listInSubscriptionNext" }) + @GET + Observable> listInSubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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<PrivateCloud> object if successful. + */ + public PagedList list(final String resourceGroupName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + public Observable> listAsync(final String resourceGroupName) { + return listWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName) { + return listSinglePageAsync(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(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List private clouds in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateCloud> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, 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); + } + + /** + * List private clouds 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<PrivateCloud> object if successful. + */ + public PagedList listInSubscription() { + ServiceResponse> response = listInSubscriptionSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInSubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List private clouds 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> listInSubscriptionAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInSubscriptionSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInSubscriptionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + public Observable> listInSubscriptionAsync() { + return listInSubscriptionWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateCloud> object + */ + public Observable>> listInSubscriptionWithServiceResponseAsync() { + return listInSubscriptionSinglePageAsync() + .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(listInSubscriptionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateCloud> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInSubscriptionSinglePageAsync() { + 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.listInSubscription(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 = listInSubscriptionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInSubscriptionDelegate(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); + } + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 PrivateCloud object if successful. + */ + public PrivateCloud get(String resourceGroupName, String privateCloudName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName).toBlocking().single().body(); + } + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 getAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, privateCloudName), serviceCallback); + } + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable getAsync(String resourceGroupName, String privateCloudName) { + return getWithServiceResponseAsync(resourceGroupName, privateCloudName).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + 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); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 PrivateCloud object if successful. + */ + public PrivateCloud createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).toBlocking().last().body(); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud), serviceCallback); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (privateCloud == null) { + throw new IllegalArgumentException("Parameter privateCloud 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(privateCloud); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, privateCloud, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 PrivateCloud object if successful. + */ + public PrivateCloud beginCreateOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).toBlocking().single().body(); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @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 privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud), serviceCallback); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (privateCloud == null) { + throw new IllegalArgumentException("Parameter privateCloud 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(privateCloud); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, privateCloud, 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); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 PrivateCloud object if successful. + */ + public PrivateCloud update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate).toBlocking().last().body(); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate), serviceCallback); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (privateCloudUpdate == null) { + throw new IllegalArgumentException("Parameter privateCloudUpdate 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(privateCloudUpdate); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, privateCloudName, privateCloudUpdate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 PrivateCloud object if successful. + */ + public PrivateCloud beginUpdate(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate).toBlocking().single().body(); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate), serviceCallback); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param privateCloudUpdate The private cloud properties to be updated + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateCloud object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (privateCloudUpdate == null) { + throw new IllegalArgumentException("Parameter privateCloudUpdate 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(privateCloudUpdate); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, privateCloudName, privateCloudUpdate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(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); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 privateCloudName) { + deleteWithServiceResponseAsync(resourceGroupName, privateCloudName).toBlocking().last().body(); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, privateCloudName), serviceCallback); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String privateCloudName) { + return deleteWithServiceResponseAsync(resourceGroupName, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 privateCloudName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName).toBlocking().single().body(); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName), serviceCallback); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String privateCloudName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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(this.client.subscriptionId(), resourceGroupName, privateCloudName, 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); + } + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 AdminCredentials object if successful. + */ + public AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName) { + return listAdminCredentialsWithServiceResponseAsync(resourceGroupName, privateCloudName).toBlocking().single().body(); + } + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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 listAdminCredentialsAsync(String resourceGroupName, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAdminCredentialsWithServiceResponseAsync(resourceGroupName, privateCloudName), serviceCallback); + } + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AdminCredentials object + */ + public Observable listAdminCredentialsAsync(String resourceGroupName, String privateCloudName) { + return listAdminCredentialsWithServiceResponseAsync(resourceGroupName, privateCloudName).map(new Func1, AdminCredentials>() { + @Override + public AdminCredentials call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AdminCredentials object + */ + public Observable> listAdminCredentialsWithServiceResponseAsync(String resourceGroupName, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listAdminCredentials(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAdminCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAdminCredentialsDelegate(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); + } + + /** + * List private clouds 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<PrivateCloud> 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(); + } + }; + } + + /** + * List private clouds 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> 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); + } + + /** + * List private clouds 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<PrivateCloud> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List private clouds 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<PrivateCloud> 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)); + } + }); + } + + /** + * List private clouds 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<PrivateCloud> 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); + } + + /** + * List private clouds 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<PrivateCloud> object if successful. + */ + public PagedList listInSubscriptionNext(final String nextPageLink) { + ServiceResponse> response = listInSubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listInSubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List private clouds 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> listInSubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listInSubscriptionNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInSubscriptionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List private clouds 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<PrivateCloud> object + */ + public Observable> listInSubscriptionNextAsync(final String nextPageLink) { + return listInSubscriptionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List private clouds 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<PrivateCloud> object + */ + public Observable>> listInSubscriptionNextWithServiceResponseAsync(final String nextPageLink) { + return listInSubscriptionNextSinglePageAsync(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(listInSubscriptionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List private clouds 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<PrivateCloud> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInSubscriptionNextSinglePageAsync(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.listInSubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInSubscriptionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInSubscriptionNextDelegate(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/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/WorkloadNetworksImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/WorkloadNetworksImpl.java new file mode 100644 index 0000000000000..2a161a5e01bc1 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/WorkloadNetworksImpl.java @@ -0,0 +1,4369 @@ +/** + * 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.avs.v2020_07_17_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200717preview.WorkloadNetworks; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200717preview.models.PageImpl; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkDhcp; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkGateway; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkPortMirroring; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkSegment; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkVirtualMachine; +import com.microsoft.azure.management.avs.v20200717preview.models.WorkloadNetworkVMGroup; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.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 WorkloadNetworks. + */ +public class WorkloadNetworksImpl implements WorkloadNetworks { + /** The Retrofit service to perform REST calls. */ + private WorkloadNetworksService service; + /** The service client containing this operation class. */ + private AvsClientImpl client; + + /** + * Initializes an instance of WorkloadNetworksImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkloadNetworksImpl(Retrofit retrofit, AvsClientImpl client) { + this.service = retrofit.create(WorkloadNetworksService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkloadNetworks to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkloadNetworksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.avs.v20200717preview.WorkloadNetworks listSegments" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") + Observable> listSegments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getSegment" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + Observable> getSegment(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @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.avs.v20200717preview.WorkloadNetworks createSegments" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + Observable> createSegments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @Query("api-version") String apiVersion, @Body WorkloadNetworkSegment workloadNetworkSegment, @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.avs.v20200717preview.WorkloadNetworks beginCreateSegments" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + Observable> beginCreateSegments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @Query("api-version") String apiVersion, @Body WorkloadNetworkSegment workloadNetworkSegment, @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.avs.v20200717preview.WorkloadNetworks updateSegments" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + Observable> updateSegments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @Query("api-version") String apiVersion, @Body WorkloadNetworkSegment workloadNetworkSegment, @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.avs.v20200717preview.WorkloadNetworks beginUpdateSegments" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + Observable> beginUpdateSegments(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @Query("api-version") String apiVersion, @Body WorkloadNetworkSegment workloadNetworkSegment, @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.avs.v20200717preview.WorkloadNetworks deleteSegment" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", method = "DELETE", hasBody = true) + Observable> deleteSegment(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @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.avs.v20200717preview.WorkloadNetworks beginDeleteSegment" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", method = "DELETE", hasBody = true) + Observable> beginDeleteSegment(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("segmentId") String segmentId, @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.avs.v20200717preview.WorkloadNetworks listDhcp" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") + Observable> listDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getDhcp" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + Observable> getDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("dhcpId") String dhcpId, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks createDhcp" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + Observable> createDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @Query("api-version") String apiVersion, @Body WorkloadNetworkDhcp workloadNetworkDhcp, @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.avs.v20200717preview.WorkloadNetworks beginCreateDhcp" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + Observable> beginCreateDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @Query("api-version") String apiVersion, @Body WorkloadNetworkDhcp workloadNetworkDhcp, @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.avs.v20200717preview.WorkloadNetworks updateDhcp" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + Observable> updateDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @Query("api-version") String apiVersion, @Body WorkloadNetworkDhcp workloadNetworkDhcp, @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.avs.v20200717preview.WorkloadNetworks beginUpdateDhcp" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + Observable> beginUpdateDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @Query("api-version") String apiVersion, @Body WorkloadNetworkDhcp workloadNetworkDhcp, @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.avs.v20200717preview.WorkloadNetworks deleteDhcp" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", method = "DELETE", hasBody = true) + Observable> deleteDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @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.avs.v20200717preview.WorkloadNetworks beginDeleteDhcp" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", method = "DELETE", hasBody = true) + Observable> beginDeleteDhcp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("dhcpId") String dhcpId, @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.avs.v20200717preview.WorkloadNetworks listGateways" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") + Observable> listGateways(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getGateway" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") + Observable> getGateway(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("gatewayId") String gatewayId, @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.avs.v20200717preview.WorkloadNetworks listPortMirroring" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") + Observable> listPortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getPortMirroring" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + Observable> getPortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("portMirroringId") String portMirroringId, @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.avs.v20200717preview.WorkloadNetworks createPortMirroring" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + Observable> createPortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("portMirroringId") String portMirroringId, @Query("api-version") String apiVersion, @Body WorkloadNetworkPortMirroring workloadNetworkPortMirroring, @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.avs.v20200717preview.WorkloadNetworks beginCreatePortMirroring" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + Observable> beginCreatePortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("portMirroringId") String portMirroringId, @Query("api-version") String apiVersion, @Body WorkloadNetworkPortMirroring workloadNetworkPortMirroring, @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.avs.v20200717preview.WorkloadNetworks updatePortMirroring" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + Observable> updatePortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("portMirroringId") String portMirroringId, @Query("api-version") String apiVersion, @Body WorkloadNetworkPortMirroring workloadNetworkPortMirroring, @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.avs.v20200717preview.WorkloadNetworks beginUpdatePortMirroring" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + Observable> beginUpdatePortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("portMirroringId") String portMirroringId, @Query("api-version") String apiVersion, @Body WorkloadNetworkPortMirroring workloadNetworkPortMirroring, @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.avs.v20200717preview.WorkloadNetworks deletePortMirroring" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", method = "DELETE", hasBody = true) + Observable> deletePortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("portMirroringId") String portMirroringId, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks beginDeletePortMirroring" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", method = "DELETE", hasBody = true) + Observable> beginDeletePortMirroring(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("portMirroringId") String portMirroringId, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks listVMGroups" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") + Observable> listVMGroups(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getVMGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + Observable> getVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("vmGroupId") String vmGroupId, @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.avs.v20200717preview.WorkloadNetworks createVMGroup" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + Observable> createVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("vmGroupId") String vmGroupId, @Query("api-version") String apiVersion, @Body WorkloadNetworkVMGroup workloadNetworkVMGroup, @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.avs.v20200717preview.WorkloadNetworks beginCreateVMGroup" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + Observable> beginCreateVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("vmGroupId") String vmGroupId, @Query("api-version") String apiVersion, @Body WorkloadNetworkVMGroup workloadNetworkVMGroup, @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.avs.v20200717preview.WorkloadNetworks updateVMGroup" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + Observable> updateVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("vmGroupId") String vmGroupId, @Query("api-version") String apiVersion, @Body WorkloadNetworkVMGroup workloadNetworkVMGroup, @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.avs.v20200717preview.WorkloadNetworks beginUpdateVMGroup" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + Observable> beginUpdateVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("vmGroupId") String vmGroupId, @Query("api-version") String apiVersion, @Body WorkloadNetworkVMGroup workloadNetworkVMGroup, @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.avs.v20200717preview.WorkloadNetworks deleteVMGroup" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", method = "DELETE", hasBody = true) + Observable> deleteVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vmGroupId") String vmGroupId, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks beginDeleteVMGroup" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", method = "DELETE", hasBody = true) + Observable> beginDeleteVMGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vmGroupId") String vmGroupId, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks listVirtualMachines" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") + Observable> listVirtualMachines(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @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.avs.v20200717preview.WorkloadNetworks getVirtualMachine" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") + Observable> getVirtualMachine(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("privateCloudName") String privateCloudName, @Path("virtualMachineId") String virtualMachineId, @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.avs.v20200717preview.WorkloadNetworks listSegmentsNext" }) + @GET + Observable> listSegmentsNext(@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.avs.v20200717preview.WorkloadNetworks listDhcpNext" }) + @GET + Observable> listDhcpNext(@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.avs.v20200717preview.WorkloadNetworks listGatewaysNext" }) + @GET + Observable> listGatewaysNext(@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.avs.v20200717preview.WorkloadNetworks listPortMirroringNext" }) + @GET + Observable> listPortMirroringNext(@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.avs.v20200717preview.WorkloadNetworks listVMGroupsNext" }) + @GET + Observable> listVMGroupsNext(@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.avs.v20200717preview.WorkloadNetworks listVirtualMachinesNext" }) + @GET + Observable> listVirtualMachinesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkSegment> object if successful. + */ + public PagedList listSegments(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listSegmentsSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSegmentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listSegmentsAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSegmentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkSegment> object + */ + public Observable> listSegmentsAsync(final String resourceGroupName, final String privateCloudName) { + return listSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of segments in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkSegment> object + */ + public Observable>> listSegmentsWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listSegmentsSinglePageAsync(resourceGroupName, privateCloudName) + .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(listSegmentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of segments in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkSegment> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSegmentsSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listSegments(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSegmentsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSegmentsDelegate(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); + } + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 WorkloadNetworkSegment object if successful. + */ + public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + return getSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).toBlocking().single().body(); + } + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 getSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId), serviceCallback); + } + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable getSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return getSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).map(new Func1, WorkloadNetworkSegment>() { + @Override + public WorkloadNetworkSegment call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable> getSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId 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.getSegment(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSegmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSegmentDelegate(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); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + public WorkloadNetworkSegment createSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return createSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).toBlocking().last().body(); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 createSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment), serviceCallback); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return createSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).map(new Func1, WorkloadNetworkSegment>() { + @Override + public WorkloadNetworkSegment call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkSegment == null) { + throw new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null."); + } + Validator.validate(workloadNetworkSegment); + Observable> observable = service.createSegments(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), workloadNetworkSegment, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + public WorkloadNetworkSegment beginCreateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return beginCreateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).toBlocking().single().body(); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 beginCreateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment), serviceCallback); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable beginCreateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return beginCreateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).map(new Func1, WorkloadNetworkSegment>() { + @Override + public WorkloadNetworkSegment call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable> beginCreateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkSegment == null) { + throw new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null."); + } + Validator.validate(workloadNetworkSegment); + return service.beginCreateSegments(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), workloadNetworkSegment, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateSegmentsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateSegmentsDelegate(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); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + public WorkloadNetworkSegment updateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return updateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).toBlocking().last().body(); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 updateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment), serviceCallback); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return updateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).map(new Func1, WorkloadNetworkSegment>() { + @Override + public WorkloadNetworkSegment call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkSegment == null) { + throw new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null."); + } + Validator.validate(workloadNetworkSegment); + Observable> observable = service.updateSegments(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), workloadNetworkSegment, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 WorkloadNetworkSegment object if successful. + */ + public WorkloadNetworkSegment beginUpdateSegments(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return beginUpdateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).toBlocking().single().body(); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @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 beginUpdateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment), serviceCallback); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable beginUpdateSegmentsAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + return beginUpdateSegmentsWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).map(new Func1, WorkloadNetworkSegment>() { + @Override + public WorkloadNetworkSegment call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @param workloadNetworkSegment NSX Segment + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkSegment object + */ + public Observable> beginUpdateSegmentsWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegment workloadNetworkSegment) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkSegment == null) { + throw new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null."); + } + Validator.validate(workloadNetworkSegment); + return service.beginUpdateSegments(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), workloadNetworkSegment, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateSegmentsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateSegmentsDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + deleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).toBlocking().last().body(); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId), serviceCallback); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return deleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId 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.deleteSegment(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 beginDeleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + beginDeleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).toBlocking().single().body(); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @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 beginDeleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId), serviceCallback); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return beginDeleteSegmentWithServiceResponseAsync(resourceGroupName, privateCloudName, segmentId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a segment by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteSegmentWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String segmentId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (segmentId == null) { + throw new IllegalArgumentException("Parameter segmentId 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.beginDeleteSegment(this.client.subscriptionId(), resourceGroupName, privateCloudName, segmentId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteSegmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteSegmentDelegate(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); + } + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkDhcp> object if successful. + */ + public PagedList listDhcp(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listDhcpSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDhcpNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listDhcpAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDhcpSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDhcpNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkDhcp> object + */ + public Observable> listDhcpAsync(final String resourceGroupName, final String privateCloudName) { + return listDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List dhcp in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkDhcp> object + */ + public Observable>> listDhcpWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listDhcpSinglePageAsync(resourceGroupName, privateCloudName) + .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(listDhcpNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List dhcp in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkDhcp> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDhcpSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDhcpDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDhcpDelegate(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); + } + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @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 WorkloadNetworkDhcp object if successful. + */ + public WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { + return getDhcpWithServiceResponseAsync(resourceGroupName, dhcpId, privateCloudName).toBlocking().single().body(); + } + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @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 getDhcpAsync(String resourceGroupName, String dhcpId, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDhcpWithServiceResponseAsync(resourceGroupName, dhcpId, privateCloudName), serviceCallback); + } + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable getDhcpAsync(String resourceGroupName, String dhcpId, String privateCloudName) { + return getDhcpWithServiceResponseAsync(resourceGroupName, dhcpId, privateCloudName).map(new Func1, WorkloadNetworkDhcp>() { + @Override + public WorkloadNetworkDhcp call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable> getDhcpWithServiceResponseAsync(String resourceGroupName, String dhcpId, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.getDhcp(this.client.subscriptionId(), resourceGroupName, dhcpId, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDhcpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDhcpDelegate(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); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + public WorkloadNetworkDhcp createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return createDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).toBlocking().last().body(); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 createDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp), serviceCallback); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return createDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).map(new Func1, WorkloadNetworkDhcp>() { + @Override + public WorkloadNetworkDhcp call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkDhcp == null) { + throw new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null."); + } + Validator.validate(workloadNetworkDhcp); + Observable> observable = service.createDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), workloadNetworkDhcp, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + public WorkloadNetworkDhcp beginCreateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return beginCreateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).toBlocking().single().body(); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 beginCreateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp), serviceCallback); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable beginCreateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return beginCreateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).map(new Func1, WorkloadNetworkDhcp>() { + @Override + public WorkloadNetworkDhcp call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable> beginCreateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkDhcp == null) { + throw new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null."); + } + Validator.validate(workloadNetworkDhcp); + return service.beginCreateDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), workloadNetworkDhcp, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDhcpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDhcpDelegate(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); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + public WorkloadNetworkDhcp updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return updateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).toBlocking().last().body(); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 updateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp), serviceCallback); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return updateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).map(new Func1, WorkloadNetworkDhcp>() { + @Override + public WorkloadNetworkDhcp call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkDhcp == null) { + throw new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null."); + } + Validator.validate(workloadNetworkDhcp); + Observable> observable = service.updateDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), workloadNetworkDhcp, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 WorkloadNetworkDhcp object if successful. + */ + public WorkloadNetworkDhcp beginUpdateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return beginUpdateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).toBlocking().single().body(); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @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 beginUpdateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp), serviceCallback); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable beginUpdateDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + return beginUpdateDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).map(new Func1, WorkloadNetworkDhcp>() { + @Override + public WorkloadNetworkDhcp call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @param workloadNetworkDhcp NSX DHCP + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkDhcp object + */ + public Observable> beginUpdateDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcp workloadNetworkDhcp) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkDhcp == null) { + throw new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null."); + } + Validator.validate(workloadNetworkDhcp); + return service.beginUpdateDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), workloadNetworkDhcp, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDhcpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDhcpDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { + deleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId).toBlocking().last().body(); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId), serviceCallback); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + return deleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId 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.deleteDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 beginDeleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { + beginDeleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId).toBlocking().single().body(); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @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 beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId), serviceCallback); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + return beginDeleteDhcpWithServiceResponseAsync(resourceGroupName, privateCloudName, dhcpId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete dhcp by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteDhcpWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (dhcpId == null) { + throw new IllegalArgumentException("Parameter dhcpId 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.beginDeleteDhcp(this.client.subscriptionId(), resourceGroupName, privateCloudName, dhcpId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDhcpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDhcpDelegate(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); + } + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkGateway> object if successful. + */ + public PagedList listGateways(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listGatewaysSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGatewaysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listGatewaysAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGatewaysNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkGateway> object + */ + public Observable> listGatewaysAsync(final String resourceGroupName, final String privateCloudName) { + return listGatewaysWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of gateways in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkGateway> object + */ + public Observable>> listGatewaysWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listGatewaysSinglePageAsync(resourceGroupName, privateCloudName) + .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(listGatewaysNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of gateways in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkGateway> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGatewaysSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listGateways(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGatewaysDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGatewaysDelegate(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); + } + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @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 WorkloadNetworkGateway object if successful. + */ + public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + return getGatewayWithServiceResponseAsync(resourceGroupName, privateCloudName, gatewayId).toBlocking().single().body(); + } + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @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 getGatewayAsync(String resourceGroupName, String privateCloudName, String gatewayId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getGatewayWithServiceResponseAsync(resourceGroupName, privateCloudName, gatewayId), serviceCallback); + } + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkGateway object + */ + public Observable getGatewayAsync(String resourceGroupName, String privateCloudName, String gatewayId) { + return getGatewayWithServiceResponseAsync(resourceGroupName, privateCloudName, gatewayId).map(new Func1, WorkloadNetworkGateway>() { + @Override + public WorkloadNetworkGateway call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a gateway by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkGateway object + */ + public Observable> getGatewayWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String gatewayId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (gatewayId == null) { + throw new IllegalArgumentException("Parameter gatewayId 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.getGateway(this.client.subscriptionId(), resourceGroupName, privateCloudName, gatewayId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getGatewayDelegate(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); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkPortMirroring> object if successful. + */ + public PagedList listPortMirroring(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPortMirroringNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listPortMirroringAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPortMirroringNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkPortMirroring> object + */ + public Observable> listPortMirroringAsync(final String resourceGroupName, final String privateCloudName) { + return listPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkPortMirroring> object + */ + public Observable>> listPortMirroringWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName) + .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(listPortMirroringNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkPortMirroring> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPortMirroringSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listPortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPortMirroringDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPortMirroringDelegate(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); + } + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @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 WorkloadNetworkPortMirroring object if successful. + */ + public WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId) { + return getPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId).toBlocking().single().body(); + } + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @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 getPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId), serviceCallback); + } + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable getPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { + return getPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId).map(new Func1, WorkloadNetworkPortMirroring>() { + @Override + public WorkloadNetworkPortMirroring call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable> getPortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId 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.getPortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, portMirroringId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPortMirroringDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPortMirroringDelegate(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); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + public WorkloadNetworkPortMirroring createPortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return createPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).toBlocking().last().body(); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 createPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring), serviceCallback); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createPortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return createPortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).map(new Func1, WorkloadNetworkPortMirroring>() { + @Override + public WorkloadNetworkPortMirroring call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createPortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkPortMirroring == null) { + throw new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null."); + } + Validator.validate(workloadNetworkPortMirroring); + Observable> observable = service.createPortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, portMirroringId, this.client.apiVersion(), workloadNetworkPortMirroring, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + public WorkloadNetworkPortMirroring beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return beginCreatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).toBlocking().single().body(); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring), serviceCallback); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return beginCreatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).map(new Func1, WorkloadNetworkPortMirroring>() { + @Override + public WorkloadNetworkPortMirroring call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable> beginCreatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkPortMirroring == null) { + throw new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null."); + } + Validator.validate(workloadNetworkPortMirroring); + return service.beginCreatePortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, portMirroringId, this.client.apiVersion(), workloadNetworkPortMirroring, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreatePortMirroringDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreatePortMirroringDelegate(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); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + public WorkloadNetworkPortMirroring updatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return updatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).toBlocking().last().body(); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 updatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring), serviceCallback); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return updatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).map(new Func1, WorkloadNetworkPortMirroring>() { + @Override + public WorkloadNetworkPortMirroring call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkPortMirroring == null) { + throw new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null."); + } + Validator.validate(workloadNetworkPortMirroring); + Observable> observable = service.updatePortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, portMirroringId, this.client.apiVersion(), workloadNetworkPortMirroring, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 WorkloadNetworkPortMirroring object if successful. + */ + public WorkloadNetworkPortMirroring beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return beginUpdatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).toBlocking().single().body(); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @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 beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring), serviceCallback); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + return beginUpdatePortMirroringWithServiceResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).map(new Func1, WorkloadNetworkPortMirroring>() { + @Override + public WorkloadNetworkPortMirroring call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param workloadNetworkPortMirroring NSX port mirroring + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkPortMirroring object + */ + public Observable> beginUpdatePortMirroringWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroring workloadNetworkPortMirroring) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkPortMirroring == null) { + throw new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null."); + } + Validator.validate(workloadNetworkPortMirroring); + return service.beginUpdatePortMirroring(this.client.subscriptionId(), resourceGroupName, privateCloudName, portMirroringId, this.client.apiVersion(), workloadNetworkPortMirroring, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdatePortMirroringDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdatePortMirroringDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + deletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName).toBlocking().last().body(); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 deletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName), serviceCallback); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + return deletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deletePortMirroringWithServiceResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.deletePortMirroring(this.client.subscriptionId(), resourceGroupName, portMirroringId, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 beginDeletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + beginDeletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName).toBlocking().single().body(); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @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 beginDeletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName), serviceCallback); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeletePortMirroringAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + return beginDeletePortMirroringWithServiceResponseAsync(resourceGroupName, portMirroringId, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a port mirroring profile by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeletePortMirroringWithServiceResponseAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (portMirroringId == null) { + throw new IllegalArgumentException("Parameter portMirroringId is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.beginDeletePortMirroring(this.client.subscriptionId(), resourceGroupName, portMirroringId, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeletePortMirroringDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeletePortMirroringDelegate(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); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkVMGroup> object if successful. + */ + public PagedList listVMGroups(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVMGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listVMGroupsAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVMGroupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVMGroup> object + */ + public Observable> listVMGroupsAsync(final String resourceGroupName, final String privateCloudName) { + return listVMGroupsWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVMGroup> object + */ + public Observable>> listVMGroupsWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName) + .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(listVMGroupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of vm groups in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkVMGroup> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVMGroupsSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listVMGroups(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVMGroupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVMGroupsDelegate(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); + } + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @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 WorkloadNetworkVMGroup object if successful. + */ + public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId).toBlocking().single().body(); + } + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @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 getVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId), serviceCallback); + } + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable getVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId).map(new Func1, WorkloadNetworkVMGroup>() { + @Override + public WorkloadNetworkVMGroup call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable> getVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId 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.getVMGroup(this.client.subscriptionId(), resourceGroupName, privateCloudName, vmGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVMGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVMGroupDelegate(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); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + public WorkloadNetworkVMGroup createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return createVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).toBlocking().last().body(); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 createVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup), serviceCallback); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return createVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).map(new Func1, WorkloadNetworkVMGroup>() { + @Override + public WorkloadNetworkVMGroup call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkVMGroup == null) { + throw new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null."); + } + Validator.validate(workloadNetworkVMGroup); + Observable> observable = service.createVMGroup(this.client.subscriptionId(), resourceGroupName, privateCloudName, vmGroupId, this.client.apiVersion(), workloadNetworkVMGroup, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + public WorkloadNetworkVMGroup beginCreateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return beginCreateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).toBlocking().single().body(); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 beginCreateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup), serviceCallback); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable beginCreateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return beginCreateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).map(new Func1, WorkloadNetworkVMGroup>() { + @Override + public WorkloadNetworkVMGroup call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable> beginCreateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkVMGroup == null) { + throw new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null."); + } + Validator.validate(workloadNetworkVMGroup); + return service.beginCreateVMGroup(this.client.subscriptionId(), resourceGroupName, privateCloudName, vmGroupId, this.client.apiVersion(), workloadNetworkVMGroup, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateVMGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateVMGroupDelegate(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); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + public WorkloadNetworkVMGroup updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return updateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).toBlocking().last().body(); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 updateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup), serviceCallback); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return updateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).map(new Func1, WorkloadNetworkVMGroup>() { + @Override + public WorkloadNetworkVMGroup call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkVMGroup == null) { + throw new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null."); + } + Validator.validate(workloadNetworkVMGroup); + Observable> observable = service.updateVMGroup(this.client.subscriptionId(), resourceGroupName, privateCloudName, vmGroupId, this.client.apiVersion(), workloadNetworkVMGroup, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 WorkloadNetworkVMGroup object if successful. + */ + public WorkloadNetworkVMGroup beginUpdateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return beginUpdateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).toBlocking().single().body(); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM 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 beginUpdateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup), serviceCallback); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable beginUpdateVMGroupAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + return beginUpdateVMGroupWithServiceResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).map(new Func1, WorkloadNetworkVMGroup>() { + @Override + public WorkloadNetworkVMGroup call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param workloadNetworkVMGroup NSX VM Group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVMGroup object + */ + public Observable> beginUpdateVMGroupWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroup workloadNetworkVMGroup) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (workloadNetworkVMGroup == null) { + throw new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null."); + } + Validator.validate(workloadNetworkVMGroup); + return service.beginUpdateVMGroup(this.client.subscriptionId(), resourceGroupName, privateCloudName, vmGroupId, this.client.apiVersion(), workloadNetworkVMGroup, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateVMGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateVMGroupDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + deleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName).toBlocking().last().body(); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName), serviceCallback); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + return deleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteVMGroupWithServiceResponseAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.deleteVMGroup(this.client.subscriptionId(), resourceGroupName, vmGroupId, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 beginDeleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + beginDeleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName).toBlocking().single().body(); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @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 beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName), serviceCallback); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + return beginDeleteVMGroupWithServiceResponseAsync(resourceGroupName, vmGroupId, privateCloudName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a vm group by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteVMGroupWithServiceResponseAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmGroupId == null) { + throw new IllegalArgumentException("Parameter vmGroupId is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.beginDeleteVMGroup(this.client.subscriptionId(), resourceGroupName, vmGroupId, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteVMGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteVMGroupDelegate(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); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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<WorkloadNetworkVirtualMachine> object if successful. + */ + public PagedList listVirtualMachines(final String resourceGroupName, final String privateCloudName) { + ServiceResponse> response = listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachinesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @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> listVirtualMachinesAsync(final String resourceGroupName, final String privateCloudName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachinesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVirtualMachine> object + */ + public Observable> listVirtualMachinesAsync(final String resourceGroupName, final String privateCloudName) { + return listVirtualMachinesWithServiceResponseAsync(resourceGroupName, privateCloudName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<WorkloadNetworkVirtualMachine> object + */ + public Observable>> listVirtualMachinesWithServiceResponseAsync(final String resourceGroupName, final String privateCloudName) { + return listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName) + .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(listVirtualMachinesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of virtual machines in a private cloud workload network. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkVirtualMachine> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachinesSinglePageAsync(final String resourceGroupName, final String privateCloudName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName 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.listVirtualMachines(this.client.subscriptionId(), resourceGroupName, privateCloudName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachinesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachinesDelegate(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); + } + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @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 WorkloadNetworkVirtualMachine object if successful. + */ + public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, String virtualMachineId) { + return getVirtualMachineWithServiceResponseAsync(resourceGroupName, privateCloudName, virtualMachineId).toBlocking().single().body(); + } + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @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 getVirtualMachineAsync(String resourceGroupName, String privateCloudName, String virtualMachineId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVirtualMachineWithServiceResponseAsync(resourceGroupName, privateCloudName, virtualMachineId), serviceCallback); + } + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVirtualMachine object + */ + public Observable getVirtualMachineAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { + return getVirtualMachineWithServiceResponseAsync(resourceGroupName, privateCloudName, virtualMachineId).map(new Func1, WorkloadNetworkVirtualMachine>() { + @Override + public WorkloadNetworkVirtualMachine call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a virtual machine by id in a private cloud workload network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param virtualMachineId NSX Virtual Machine identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkloadNetworkVirtualMachine object + */ + public Observable> getVirtualMachineWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (privateCloudName == null) { + throw new IllegalArgumentException("Parameter privateCloudName is required and cannot be null."); + } + if (virtualMachineId == null) { + throw new IllegalArgumentException("Parameter virtualMachineId 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.getVirtualMachine(this.client.subscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVirtualMachineDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVirtualMachineDelegate(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); + } + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object if successful. + */ + public PagedList listSegmentsNext(final String nextPageLink) { + ServiceResponse> response = listSegmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSegmentsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of segments in a private cloud workload network. + * + * @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> listSegmentsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSegmentsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSegmentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object + */ + public Observable> listSegmentsNextAsync(final String nextPageLink) { + return listSegmentsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of segments in a private cloud workload network. + * + * @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<WorkloadNetworkSegment> object + */ + public Observable>> listSegmentsNextWithServiceResponseAsync(final String nextPageLink) { + return listSegmentsNextSinglePageAsync(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(listSegmentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of segments in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkSegment> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSegmentsNextSinglePageAsync(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.listSegmentsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSegmentsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSegmentsNextDelegate(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); + } + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object if successful. + */ + public PagedList listDhcpNext(final String nextPageLink) { + ServiceResponse> response = listDhcpNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listDhcpNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List dhcp in a private cloud workload network. + * + * @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> listDhcpNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listDhcpNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDhcpNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object + */ + public Observable> listDhcpNextAsync(final String nextPageLink) { + return listDhcpNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List dhcp in a private cloud workload network. + * + * @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<WorkloadNetworkDhcp> object + */ + public Observable>> listDhcpNextWithServiceResponseAsync(final String nextPageLink) { + return listDhcpNextSinglePageAsync(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(listDhcpNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List dhcp in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkDhcp> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDhcpNextSinglePageAsync(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.listDhcpNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDhcpNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDhcpNextDelegate(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); + } + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object if successful. + */ + public PagedList listGatewaysNext(final String nextPageLink) { + ServiceResponse> response = listGatewaysNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGatewaysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of gateways in a private cloud workload network. + * + * @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> listGatewaysNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGatewaysNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGatewaysNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object + */ + public Observable> listGatewaysNextAsync(final String nextPageLink) { + return listGatewaysNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of gateways in a private cloud workload network. + * + * @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<WorkloadNetworkGateway> object + */ + public Observable>> listGatewaysNextWithServiceResponseAsync(final String nextPageLink) { + return listGatewaysNextSinglePageAsync(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(listGatewaysNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of gateways in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkGateway> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGatewaysNextSinglePageAsync(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.listGatewaysNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGatewaysNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGatewaysNextDelegate(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); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object if successful. + */ + public PagedList listPortMirroringNext(final String nextPageLink) { + ServiceResponse> response = listPortMirroringNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPortMirroringNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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> listPortMirroringNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPortMirroringNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPortMirroringNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object + */ + public Observable> listPortMirroringNextAsync(final String nextPageLink) { + return listPortMirroringNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + * @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<WorkloadNetworkPortMirroring> object + */ + public Observable>> listPortMirroringNextWithServiceResponseAsync(final String nextPageLink) { + return listPortMirroringNextSinglePageAsync(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(listPortMirroringNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of port mirroring profiles in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkPortMirroring> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPortMirroringNextSinglePageAsync(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.listPortMirroringNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPortMirroringNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPortMirroringNextDelegate(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); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object if successful. + */ + public PagedList listVMGroupsNext(final String nextPageLink) { + ServiceResponse> response = listVMGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVMGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of vm groups in a private cloud workload network. + * + * @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> listVMGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVMGroupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVMGroupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object + */ + public Observable> listVMGroupsNextAsync(final String nextPageLink) { + return listVMGroupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of vm groups in a private cloud workload network. + * + * @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<WorkloadNetworkVMGroup> object + */ + public Observable>> listVMGroupsNextWithServiceResponseAsync(final String nextPageLink) { + return listVMGroupsNextSinglePageAsync(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(listVMGroupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of vm groups in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkVMGroup> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVMGroupsNextSinglePageAsync(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.listVMGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVMGroupsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVMGroupsNextDelegate(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); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object if successful. + */ + public PagedList listVirtualMachinesNext(final String nextPageLink) { + ServiceResponse> response = listVirtualMachinesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listVirtualMachinesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @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> listVirtualMachinesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listVirtualMachinesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listVirtualMachinesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object + */ + public Observable> listVirtualMachinesNextAsync(final String nextPageLink) { + return listVirtualMachinesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List of virtual machines in a private cloud workload network. + * + * @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<WorkloadNetworkVirtualMachine> object + */ + public Observable>> listVirtualMachinesNextWithServiceResponseAsync(final String nextPageLink) { + return listVirtualMachinesNextSinglePageAsync(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(listVirtualMachinesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of virtual machines in a private cloud workload network. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkloadNetworkVirtualMachine> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listVirtualMachinesNextSinglePageAsync(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.listVirtualMachinesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listVirtualMachinesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVirtualMachinesNextDelegate(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/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/package-info.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/package-info.java new file mode 100644 index 0000000000000..94b4741d8e709 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/implementation/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the implementation classes for AvsClient. + * Azure VMware Solution API. + */ +package com.microsoft.azure.management.avs.v2020_07_17_preview.implementation; diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/AdminCredentials.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/AdminCredentials.java new file mode 100644 index 0000000000000..4d11d5e3d1ef8 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/AdminCredentials.java @@ -0,0 +1,77 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Administrative credentials for accessing vCenter and NSX-T. + */ +public class AdminCredentials { + /** + * NSX-T Manager username. + */ + @JsonProperty(value = "nsxtUsername", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtUsername; + + /** + * NSX-T Manager password. + */ + @JsonProperty(value = "nsxtPassword", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtPassword; + + /** + * vCenter admin username. + */ + @JsonProperty(value = "vcenterUsername", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterUsername; + + /** + * vCenter admin password. + */ + @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterPassword; + + /** + * Get nSX-T Manager username. + * + * @return the nsxtUsername value + */ + public String nsxtUsername() { + return this.nsxtUsername; + } + + /** + * Get nSX-T Manager password. + * + * @return the nsxtPassword value + */ + public String nsxtPassword() { + return this.nsxtPassword; + } + + /** + * Get vCenter admin username. + * + * @return the vcenterUsername value + */ + public String vcenterUsername() { + return this.vcenterUsername; + } + + /** + * Get vCenter admin password. + * + * @return the vcenterPassword value + */ + public String vcenterPassword() { + return this.vcenterPassword; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Circuit.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Circuit.java new file mode 100644 index 0000000000000..84266d80a6d83 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Circuit.java @@ -0,0 +1,77 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An ExpressRoute Circuit. + */ +public class Circuit { + /** + * CIDR of primary subnet. + */ + @JsonProperty(value = "primarySubnet", access = JsonProperty.Access.WRITE_ONLY) + private String primarySubnet; + + /** + * CIDR of secondary subnet. + */ + @JsonProperty(value = "secondarySubnet", access = JsonProperty.Access.WRITE_ONLY) + private String secondarySubnet; + + /** + * Identifier of the ExpressRoute Circuit (Microsoft Colo only). + */ + @JsonProperty(value = "expressRouteID", access = JsonProperty.Access.WRITE_ONLY) + private String expressRouteID; + + /** + * ExpressRoute Circuit private peering identifier. + */ + @JsonProperty(value = "expressRoutePrivatePeeringID", access = JsonProperty.Access.WRITE_ONLY) + private String expressRoutePrivatePeeringID; + + /** + * Get cIDR of primary subnet. + * + * @return the primarySubnet value + */ + public String primarySubnet() { + return this.primarySubnet; + } + + /** + * Get cIDR of secondary subnet. + * + * @return the secondarySubnet value + */ + public String secondarySubnet() { + return this.secondarySubnet; + } + + /** + * Get identifier of the ExpressRoute Circuit (Microsoft Colo only). + * + * @return the expressRouteID value + */ + public String expressRouteID() { + return this.expressRouteID; + } + + /** + * Get expressRoute Circuit private peering identifier. + * + * @return the expressRoutePrivatePeeringID value + */ + public String expressRoutePrivatePeeringID() { + return this.expressRoutePrivatePeeringID; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Cluster.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Cluster.java new file mode 100644 index 0000000000000..5b0ce4a9e7abb --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Cluster.java @@ -0,0 +1,119 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * A cluster resource. + */ +@JsonFlatten +public class Cluster extends ProxyResource { + /** + * The cluster SKU. + */ + @JsonProperty(value = "sku", required = true) + private Sku sku; + + /** + * The state of the cluster provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /** + * The cluster size. + */ + @JsonProperty(value = "properties.clusterSize") + private Integer clusterSize; + + /** + * The identity. + */ + @JsonProperty(value = "properties.clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /** + * The hosts. + */ + @JsonProperty(value = "properties.hosts", access = JsonProperty.Access.WRITE_ONLY) + private List hosts; + + /** + * Get the cluster SKU. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the cluster SKU. + * + * @param sku the sku value to set + * @return the Cluster object itself. + */ + public Cluster withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cluster size. + * + * @return the clusterSize value + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the cluster size. + * + * @param clusterSize the clusterSize value to set + * @return the Cluster object itself. + */ + public Cluster withClusterSize(Integer clusterSize) { + this.clusterSize = clusterSize; + return this; + } + + /** + * Get the identity. + * + * @return the clusterId value + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts. + * + * @return the hosts value + */ + public List hosts() { + return this.hosts; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterProvisioningState.java new file mode 100644 index 0000000000000..6b8ab959f29fa --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterProvisioningState. + */ +public final class ClusterProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ClusterProvisioningState. */ + public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ClusterProvisioningState. */ + public static final ClusterProvisioningState FAILED = fromString("Failed"); + + /** Static value Cancelled for ClusterProvisioningState. */ + public static final ClusterProvisioningState CANCELLED = fromString("Cancelled"); + + /** Static value Deleting for ClusterProvisioningState. */ + public static final ClusterProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for ClusterProvisioningState. */ + public static final ClusterProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a ClusterProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ClusterProvisioningState + */ + @JsonCreator + public static ClusterProvisioningState fromString(String name) { + return fromString(name, ClusterProvisioningState.class); + } + + /** + * @return known ClusterProvisioningState values + */ + public static Collection values() { + return values(ClusterProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterUpdate.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterUpdate.java new file mode 100644 index 0000000000000..7daf545a4cade --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ClusterUpdate.java @@ -0,0 +1,45 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * An update of a cluster resource. + */ +@JsonFlatten +public class ClusterUpdate { + /** + * The cluster size. + */ + @JsonProperty(value = "properties.clusterSize") + private Integer clusterSize; + + /** + * Get the cluster size. + * + * @return the clusterSize value + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the cluster size. + * + * @param clusterSize the clusterSize value to set + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withClusterSize(Integer clusterSize) { + this.clusterSize = clusterSize; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/CommonClusterProperties.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/CommonClusterProperties.java new file mode 100644 index 0000000000000..33943ea648abd --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/CommonClusterProperties.java @@ -0,0 +1,90 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The common properties of a cluster. + */ +public class CommonClusterProperties { + /** + * The state of the cluster provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /** + * The cluster size. + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /** + * The identity. + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /** + * The hosts. + */ + @JsonProperty(value = "hosts", access = JsonProperty.Access.WRITE_ONLY) + private List hosts; + + /** + * Get the state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cluster size. + * + * @return the clusterSize value + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the cluster size. + * + * @param clusterSize the clusterSize value to set + * @return the CommonClusterProperties object itself. + */ + public CommonClusterProperties withClusterSize(Integer clusterSize) { + this.clusterSize = clusterSize; + return this; + } + + /** + * Get the identity. + * + * @return the clusterId value + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts. + * + * @return the hosts value + */ + public List hosts() { + return this.hosts; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Endpoints.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Endpoints.java new file mode 100644 index 0000000000000..408c7d27d127d --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Endpoints.java @@ -0,0 +1,62 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Endpoint addresses. + */ +public class Endpoints { + /** + * Endpoint for the NSX-T Data Center manager. + */ + @JsonProperty(value = "nsxtManager", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtManager; + + /** + * Endpoint for Virtual Center Server Appliance. + */ + @JsonProperty(value = "vcsa", access = JsonProperty.Access.WRITE_ONLY) + private String vcsa; + + /** + * Endpoint for the HCX Cloud Manager. + */ + @JsonProperty(value = "hcxCloudManager", access = JsonProperty.Access.WRITE_ONLY) + private String hcxCloudManager; + + /** + * Get endpoint for the NSX-T Data Center manager. + * + * @return the nsxtManager value + */ + public String nsxtManager() { + return this.nsxtManager; + } + + /** + * Get endpoint for Virtual Center Server Appliance. + * + * @return the vcsa value + */ + public String vcsa() { + return this.vcsa; + } + + /** + * Get endpoint for the HCX Cloud Manager. + * + * @return the hcxCloudManager value + */ + public String hcxCloudManager() { + return this.hcxCloudManager; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorAdditionalInfo.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorAdditionalInfo.java new file mode 100644 index 0000000000000..47edf4256e6d2 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorAdditionalInfo.java @@ -0,0 +1,47 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error additional info. + */ +public class ErrorAdditionalInfo { + /** + * The additional info type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The additional info. + */ + @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY) + private Object info; + + /** + * Get the additional info type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the additional info. + * + * @return the info value + */ + public Object info() { + return this.info; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorResponse.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorResponse.java new file mode 100644 index 0000000000000..523941fb11102 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ErrorResponse.java @@ -0,0 +1,96 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error Response. + * Common error response for all Azure Resource Manager APIs to return error + * details for failed operations. (This also follows the OData error response + * format.). + */ +public class ErrorResponse { + /** + * The error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * The error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * The error target. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * The error details. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * The error additional info. + */ + @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) + private List additionalInfo; + + /** + * Get the error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Get the error additional info. + * + * @return the additionalInfo value + */ + public List additionalInfo() { + return this.additionalInfo; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorization.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorization.java new file mode 100644 index 0000000000000..764641bf3fc84 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorization.java @@ -0,0 +1,66 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * ExpressRoute Circuit Authorization. + */ +@JsonFlatten +public class ExpressRouteAuthorization extends ProxyResource { + /** + * The state of the ExpressRoute Circuit Authorization provisioning. + * Possible values include: 'Succeeded', 'Failed', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ExpressRouteAuthorizationProvisioningState provisioningState; + + /** + * The ID of the ExpressRoute Circuit Authorization. + */ + @JsonProperty(value = "properties.expressRouteAuthorizationId", access = JsonProperty.Access.WRITE_ONLY) + private String expressRouteAuthorizationId; + + /** + * The key of the ExpressRoute Circuit Authorization. + */ + @JsonProperty(value = "properties.expressRouteAuthorizationKey", access = JsonProperty.Access.WRITE_ONLY) + private String expressRouteAuthorizationKey; + + /** + * Get the state of the ExpressRoute Circuit Authorization provisioning. Possible values include: 'Succeeded', 'Failed', 'Updating'. + * + * @return the provisioningState value + */ + public ExpressRouteAuthorizationProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the ID of the ExpressRoute Circuit Authorization. + * + * @return the expressRouteAuthorizationId value + */ + public String expressRouteAuthorizationId() { + return this.expressRouteAuthorizationId; + } + + /** + * Get the key of the ExpressRoute Circuit Authorization. + * + * @return the expressRouteAuthorizationKey value + */ + public String expressRouteAuthorizationKey() { + return this.expressRouteAuthorizationKey; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorizationProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorizationProvisioningState.java new file mode 100644 index 0000000000000..b144862328580 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ExpressRouteAuthorizationProvisioningState.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ExpressRouteAuthorizationProvisioningState. + */ +public final class ExpressRouteAuthorizationProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ExpressRouteAuthorizationProvisioningState. */ + public static final ExpressRouteAuthorizationProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ExpressRouteAuthorizationProvisioningState. */ + public static final ExpressRouteAuthorizationProvisioningState FAILED = fromString("Failed"); + + /** Static value Updating for ExpressRouteAuthorizationProvisioningState. */ + public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a ExpressRouteAuthorizationProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteAuthorizationProvisioningState + */ + @JsonCreator + public static ExpressRouteAuthorizationProvisioningState fromString(String name) { + return fromString(name, ExpressRouteAuthorizationProvisioningState.class); + } + + /** + * @return known ExpressRouteAuthorizationProvisioningState values + */ + public static Collection values() { + return values(ExpressRouteAuthorizationProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnection.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnection.java new file mode 100644 index 0000000000000..16b4d99ff5029 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnection.java @@ -0,0 +1,122 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * A global reach connection resource. + */ +@JsonFlatten +public class GlobalReachConnection extends ProxyResource { + /** + * The state of the ExpressRoute Circuit Authorization provisioning. + * Possible values include: 'Succeeded', 'Failed', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private GlobalReachConnectionProvisioningState provisioningState; + + /** + * The network used for global reach carved out from the original network + * block provided for the private cloud. + */ + @JsonProperty(value = "properties.addressPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String addressPrefix; + + /** + * Authorization key from the peer express route used for the global reach + * connection. + */ + @JsonProperty(value = "properties.authorizationKey") + private String authorizationKey; + + /** + * The connection status of the global reach connection. Possible values + * include: 'Connected', 'Connecting', 'Disconnected'. + */ + @JsonProperty(value = "properties.circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + private GlobalReachConnectionStatus circuitConnectionStatus; + + /** + * Identifier of the ExpressRoute Circuit to peer with in the global reach + * connection. + */ + @JsonProperty(value = "properties.peerExpressRouteCircuit") + private String peerExpressRouteCircuit; + + /** + * Get the state of the ExpressRoute Circuit Authorization provisioning. Possible values include: 'Succeeded', 'Failed', 'Updating'. + * + * @return the provisioningState value + */ + public GlobalReachConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the network used for global reach carved out from the original network block provided for the private cloud. + * + * @return the addressPrefix value + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Get authorization key from the peer express route used for the global reach connection. + * + * @return the authorizationKey value + */ + public String authorizationKey() { + return this.authorizationKey; + } + + /** + * Set authorization key from the peer express route used for the global reach connection. + * + * @param authorizationKey the authorizationKey value to set + * @return the GlobalReachConnection object itself. + */ + public GlobalReachConnection withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + + /** + * Get the connection status of the global reach connection. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @return the circuitConnectionStatus value + */ + public GlobalReachConnectionStatus circuitConnectionStatus() { + return this.circuitConnectionStatus; + } + + /** + * Get identifier of the ExpressRoute Circuit to peer with in the global reach connection. + * + * @return the peerExpressRouteCircuit value + */ + public String peerExpressRouteCircuit() { + return this.peerExpressRouteCircuit; + } + + /** + * Set identifier of the ExpressRoute Circuit to peer with in the global reach connection. + * + * @param peerExpressRouteCircuit the peerExpressRouteCircuit value to set + * @return the GlobalReachConnection object itself. + */ + public GlobalReachConnection withPeerExpressRouteCircuit(String peerExpressRouteCircuit) { + this.peerExpressRouteCircuit = peerExpressRouteCircuit; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionProvisioningState.java new file mode 100644 index 0000000000000..2d3d4d6fc7532 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionProvisioningState.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for GlobalReachConnectionProvisioningState. + */ +public final class GlobalReachConnectionProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for GlobalReachConnectionProvisioningState. */ + public static final GlobalReachConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for GlobalReachConnectionProvisioningState. */ + public static final GlobalReachConnectionProvisioningState FAILED = fromString("Failed"); + + /** Static value Updating for GlobalReachConnectionProvisioningState. */ + public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a GlobalReachConnectionProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding GlobalReachConnectionProvisioningState + */ + @JsonCreator + public static GlobalReachConnectionProvisioningState fromString(String name) { + return fromString(name, GlobalReachConnectionProvisioningState.class); + } + + /** + * @return known GlobalReachConnectionProvisioningState values + */ + public static Collection values() { + return values(GlobalReachConnectionProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionStatus.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionStatus.java new file mode 100644 index 0000000000000..14404837e4686 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/GlobalReachConnectionStatus.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for GlobalReachConnectionStatus. + */ +public final class GlobalReachConnectionStatus extends ExpandableStringEnum { + /** Static value Connected for GlobalReachConnectionStatus. */ + public static final GlobalReachConnectionStatus CONNECTED = fromString("Connected"); + + /** Static value Connecting for GlobalReachConnectionStatus. */ + public static final GlobalReachConnectionStatus CONNECTING = fromString("Connecting"); + + /** Static value Disconnected for GlobalReachConnectionStatus. */ + public static final GlobalReachConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a GlobalReachConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding GlobalReachConnectionStatus + */ + @JsonCreator + public static GlobalReachConnectionStatus fromString(String name) { + return fromString(name, GlobalReachConnectionStatus.class); + } + + /** + * @return known GlobalReachConnectionStatus values + */ + public static Collection values() { + return values(GlobalReachConnectionStatus.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSite.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSite.java new file mode 100644 index 0000000000000..4493a92204fe9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSite.java @@ -0,0 +1,51 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * An HCX Enterprise Site resource. + */ +@JsonFlatten +public class HcxEnterpriseSite extends ProxyResource { + /** + * The activation key. + */ + @JsonProperty(value = "properties.activationKey", access = JsonProperty.Access.WRITE_ONLY) + private String activationKey; + + /** + * The status of the HCX Enterprise Site. Possible values include: + * 'Available', 'Consumed', 'Deactivated', 'Deleted'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private HcxEnterpriseSiteStatus status; + + /** + * Get the activation key. + * + * @return the activationKey value + */ + public String activationKey() { + return this.activationKey; + } + + /** + * Get the status of the HCX Enterprise Site. Possible values include: 'Available', 'Consumed', 'Deactivated', 'Deleted'. + * + * @return the status value + */ + public HcxEnterpriseSiteStatus status() { + return this.status; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSiteStatus.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSiteStatus.java new file mode 100644 index 0000000000000..584600b26931b --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/HcxEnterpriseSiteStatus.java @@ -0,0 +1,47 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HcxEnterpriseSiteStatus. + */ +public final class HcxEnterpriseSiteStatus extends ExpandableStringEnum { + /** Static value Available for HcxEnterpriseSiteStatus. */ + public static final HcxEnterpriseSiteStatus AVAILABLE = fromString("Available"); + + /** Static value Consumed for HcxEnterpriseSiteStatus. */ + public static final HcxEnterpriseSiteStatus CONSUMED = fromString("Consumed"); + + /** Static value Deactivated for HcxEnterpriseSiteStatus. */ + public static final HcxEnterpriseSiteStatus DEACTIVATED = fromString("Deactivated"); + + /** Static value Deleted for HcxEnterpriseSiteStatus. */ + public static final HcxEnterpriseSiteStatus DELETED = fromString("Deleted"); + + /** + * Creates or finds a HcxEnterpriseSiteStatus from its string representation. + * @param name a name to look for + * @return the corresponding HcxEnterpriseSiteStatus + */ + @JsonCreator + public static HcxEnterpriseSiteStatus fromString(String name) { + return fromString(name, HcxEnterpriseSiteStatus.class); + } + + /** + * @return known HcxEnterpriseSiteStatus values + */ + public static Collection values() { + return values(HcxEnterpriseSiteStatus.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/IdentitySource.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/IdentitySource.java new file mode 100644 index 0000000000000..85be56901a732 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/IdentitySource.java @@ -0,0 +1,280 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * vCenter Single Sign On Identity Source. + */ +public class IdentitySource { + /** + * The name of the identity source. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The domain's NetBIOS name. + */ + @JsonProperty(value = "alias") + private String alias; + + /** + * The domain's dns name. + */ + @JsonProperty(value = "domain") + private String domain; + + /** + * The base distinguished name for users. + */ + @JsonProperty(value = "baseUserDN") + private String baseUserDN; + + /** + * The base distinguished name for groups. + */ + @JsonProperty(value = "baseGroupDN") + private String baseGroupDN; + + /** + * Primary server URL. + */ + @JsonProperty(value = "primaryServer") + private String primaryServer; + + /** + * Secondary server URL. + */ + @JsonProperty(value = "secondaryServer") + private String secondaryServer; + + /** + * Protect LDAP communication using SSL certificate (LDAPS). Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "ssl") + private SslEnum ssl; + + /** + * The ID of an Active Directory user with a minimum of read-only access to + * Base DN for users and group. + */ + @JsonProperty(value = "username") + private String username; + + /** + * The password of the Active Directory user with a minimum of read-only + * access to Base DN for users and groups. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the name of the identity source. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the identity source. + * + * @param name the name value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the domain's NetBIOS name. + * + * @return the alias value + */ + public String alias() { + return this.alias; + } + + /** + * Set the domain's NetBIOS name. + * + * @param alias the alias value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withAlias(String alias) { + this.alias = alias; + return this; + } + + /** + * Get the domain's dns name. + * + * @return the domain value + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain's dns name. + * + * @param domain the domain value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the base distinguished name for users. + * + * @return the baseUserDN value + */ + public String baseUserDN() { + return this.baseUserDN; + } + + /** + * Set the base distinguished name for users. + * + * @param baseUserDN the baseUserDN value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withBaseUserDN(String baseUserDN) { + this.baseUserDN = baseUserDN; + return this; + } + + /** + * Get the base distinguished name for groups. + * + * @return the baseGroupDN value + */ + public String baseGroupDN() { + return this.baseGroupDN; + } + + /** + * Set the base distinguished name for groups. + * + * @param baseGroupDN the baseGroupDN value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withBaseGroupDN(String baseGroupDN) { + this.baseGroupDN = baseGroupDN; + return this; + } + + /** + * Get primary server URL. + * + * @return the primaryServer value + */ + public String primaryServer() { + return this.primaryServer; + } + + /** + * Set primary server URL. + * + * @param primaryServer the primaryServer value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withPrimaryServer(String primaryServer) { + this.primaryServer = primaryServer; + return this; + } + + /** + * Get secondary server URL. + * + * @return the secondaryServer value + */ + public String secondaryServer() { + return this.secondaryServer; + } + + /** + * Set secondary server URL. + * + * @param secondaryServer the secondaryServer value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withSecondaryServer(String secondaryServer) { + this.secondaryServer = secondaryServer; + return this; + } + + /** + * Get protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled'. + * + * @return the ssl value + */ + public SslEnum ssl() { + return this.ssl; + } + + /** + * Set protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled'. + * + * @param ssl the ssl value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withSsl(SslEnum ssl) { + this.ssl = ssl; + return this; + } + + /** + * Get the ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set the ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. + * + * @param username the username value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * + * @param password the password value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/InternetEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/InternetEnum.java new file mode 100644 index 0000000000000..7c2ba6cbca7a3 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/InternetEnum.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InternetEnum. + */ +public final class InternetEnum extends ExpandableStringEnum { + /** Static value Enabled for InternetEnum. */ + public static final InternetEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for InternetEnum. */ + public static final InternetEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a InternetEnum from its string representation. + * @param name a name to look for + * @return the corresponding InternetEnum + */ + @JsonCreator + public static InternetEnum fromString(String name) { + return fromString(name, InternetEnum.class); + } + + /** + * @return known InternetEnum values + */ + public static Collection values() { + return values(InternetEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/LogSpecification.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/LogSpecification.java new file mode 100644 index 0000000000000..1bb18e7371ad8 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/LogSpecification.java @@ -0,0 +1,95 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Log for Azure Monitoring. + */ +public class LogSpecification { + /** + * Name of the log. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the log. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Blob duration of the log. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get name of the log. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the log. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the log. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the log. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get blob duration of the log. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set blob duration of the log. + * + * @param blobDuration the blobDuration value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ManagementCluster.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ManagementCluster.java new file mode 100644 index 0000000000000..f609aab2be2b2 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ManagementCluster.java @@ -0,0 +1,16 @@ +/** + * 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.avs.v2020_07_17_preview.models; + + +/** + * The properties of a management cluster. + */ +public class ManagementCluster extends CommonClusterProperties { +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricDimension.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricDimension.java new file mode 100644 index 0000000000000..afb8b382a4f9e --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricDimension.java @@ -0,0 +1,69 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Dimension of metrics. + */ +public class MetricDimension { + /** + * Name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the dimension. + * + * @param name the name value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the dimension. + * + * @param displayName the displayName value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricSpecification.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricSpecification.java new file mode 100644 index 0000000000000..00bb16aec1fa8 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/MetricSpecification.java @@ -0,0 +1,359 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +public class MetricSpecification { + /** + * Name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Localized friendly description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Unit that makes sense for the metric. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Name of the metric category that the metric belongs to. A metric can + * only belong to a single category. + */ + @JsonProperty(value = "category") + private String category; + + /** + * Only provide one value for this field. Valid values: Average, Minimum, + * Maximum, Total, Count. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * Supported aggregation types. + */ + @JsonProperty(value = "supportedAggregationTypes") + private List supportedAggregationTypes; + + /** + * Supported time grain types. + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /** + * Optional. If set to true, then zero will be returned for time duration + * where no metric is emitted/published. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * Dimensions of the metric. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Whether or not the service is using regional MDM accounts. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private String enableRegionalMdmAccount; + + /** + * The name of the MDM account. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /** + * The name of the MDM namespace. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /** + * Get name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get localized friendly description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set localized friendly description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get unit that makes sense for the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set unit that makes sense for the metric. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get supported aggregation types. + * + * @return the supportedAggregationTypes value + */ + public List supportedAggregationTypes() { + return this.supportedAggregationTypes; + } + + /** + * Set supported aggregation types. + * + * @param supportedAggregationTypes the supportedAggregationTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { + this.supportedAggregationTypes = supportedAggregationTypes; + return this; + } + + /** + * Get supported time grain types. + * + * @return the supportedTimeGrainTypes value + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set supported time grain types. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + + /** + * Get optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get dimensions of the metric. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set dimensions of the metric. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get whether or not the service is using regional MDM accounts. + * + * @return the enableRegionalMdmAccount value + */ + public String enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set whether or not the service is using regional MDM accounts. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(String enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get the name of the MDM account. + * + * @return the sourceMdmAccount value + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the name of the MDM account. + * + * @param sourceMdmAccount the sourceMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the name of the MDM namespace. + * + * @return the sourceMdmNamespace value + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the name of the MDM namespace. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/NsxtAdminRotateEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/NsxtAdminRotateEnum.java new file mode 100644 index 0000000000000..30735638c8975 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/NsxtAdminRotateEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NsxtAdminRotateEnum. + */ +public final class NsxtAdminRotateEnum extends ExpandableStringEnum { + /** Static value OnetimeRotate for NsxtAdminRotateEnum. */ + public static final NsxtAdminRotateEnum ONETIME_ROTATE = fromString("OnetimeRotate"); + + /** + * Creates or finds a NsxtAdminRotateEnum from its string representation. + * @param name a name to look for + * @return the corresponding NsxtAdminRotateEnum + */ + @JsonCreator + public static NsxtAdminRotateEnum fromString(String name) { + return fromString(name, NsxtAdminRotateEnum.class); + } + + /** + * @return known NsxtAdminRotateEnum values + */ + public static Collection values() { + return values(NsxtAdminRotateEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Operation.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Operation.java new file mode 100644 index 0000000000000..5c7507e123a9a --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Operation.java @@ -0,0 +1,126 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A REST API operation. + */ +public class Operation { + /** + * Name of the operation being performed on this object. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Contains the localized display information for this operation. + */ + @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) + private OperationDisplay display; + + /** + * Gets or sets a value indicating whether the operation is a data action + * or not. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private OperationProperties properties; + + /** + * Get name of the operation being performed on this object. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get contains the localized display information for this operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get gets or sets a value indicating whether the operation is a data action or not. + * + * @return the isDataAction value + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set gets or sets a value indicating whether the operation is a data action or not. + * + * @param isDataAction the isDataAction value to set + * @return the Operation object itself. + */ + public Operation withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the Operation object itself. + */ + public Operation withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get properties of the operation. + * + * @return the properties value + */ + public OperationProperties properties() { + return this.properties; + } + + /** + * Set properties of the operation. + * + * @param properties the properties value to set + * @return the Operation object itself. + */ + public Operation withProperties(OperationProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationDisplay.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationDisplay.java new file mode 100644 index 0000000000000..74c3fb1971038 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationDisplay.java @@ -0,0 +1,77 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the localized display information for this operation. + */ +public class OperationDisplay { + /** + * Localized friendly form of the resource provider name. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Localized friendly form of the resource type related to this operation. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * Localized friendly name for the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Localized friendly description for the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get localized friendly form of the resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get localized friendly form of the resource type related to this operation. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get localized friendly name for the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get localized friendly description for the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationProperties.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationProperties.java new file mode 100644 index 0000000000000..250e4ed4b3024 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/OperationProperties.java @@ -0,0 +1,43 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Extra Operation properties. + */ +public class OperationProperties { + /** + * Service specifications of the operation. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get service specifications of the operation. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set service specifications of the operation. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationProperties object itself. + */ + public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PageImpl.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PageImpl.java new file mode 100644 index 0000000000000..a37a354d7c1dd --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PageImpl.java @@ -0,0 +1,75 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringDirectionEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringDirectionEnum.java new file mode 100644 index 0000000000000..3ff8fc6af4116 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringDirectionEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PortMirroringDirectionEnum. + */ +public final class PortMirroringDirectionEnum extends ExpandableStringEnum { + /** Static value INGRESS, EGRESS, BIDIRECTIONAL for PortMirroringDirectionEnum. */ + public static final PortMirroringDirectionEnum INGRESS_EGRESS_BIDIRECTIONAL = fromString("INGRESS, EGRESS, BIDIRECTIONAL"); + + /** + * Creates or finds a PortMirroringDirectionEnum from its string representation. + * @param name a name to look for + * @return the corresponding PortMirroringDirectionEnum + */ + @JsonCreator + public static PortMirroringDirectionEnum fromString(String name) { + return fromString(name, PortMirroringDirectionEnum.class); + } + + /** + * @return known PortMirroringDirectionEnum values + */ + public static Collection values() { + return values(PortMirroringDirectionEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringStatusEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringStatusEnum.java new file mode 100644 index 0000000000000..f4f6ee96bd81f --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PortMirroringStatusEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PortMirroringStatusEnum. + */ +public final class PortMirroringStatusEnum extends ExpandableStringEnum { + /** Static value SUCCESS, FAILURE for PortMirroringStatusEnum. */ + public static final PortMirroringStatusEnum SUCCESS_FAILURE = fromString("SUCCESS, FAILURE"); + + /** + * Creates or finds a PortMirroringStatusEnum from its string representation. + * @param name a name to look for + * @return the corresponding PortMirroringStatusEnum + */ + @JsonCreator + public static PortMirroringStatusEnum fromString(String name) { + return fromString(name, PortMirroringStatusEnum.class); + } + + /** + * @return known PortMirroringStatusEnum values + */ + public static Collection values() { + return values(PortMirroringStatusEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloud.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloud.java new file mode 100644 index 0000000000000..f3f2184226ba1 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloud.java @@ -0,0 +1,344 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A private cloud resource. + */ +@JsonFlatten +@SkipParentValidation +public class PrivateCloud extends Resource { + /** + * The private cloud SKU. + */ + @JsonProperty(value = "sku", required = true) + private Sku sku; + + /** + * The default cluster used for management. + */ + @JsonProperty(value = "properties.managementCluster") + private ManagementCluster managementCluster; + + /** + * Connectivity to internet is enabled or disabled. Possible values + * include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.internet") + private InternetEnum internet; + + /** + * vCenter Single Sign On Identity Sources. + */ + @JsonProperty(value = "properties.identitySources") + private List identitySources; + + /** + * Indicate to rotate the vCenter admin password for the private cloud. + * Possible values include: 'OnetimeRotate'. + */ + @JsonProperty(value = "properties.vcenterPassword") + private VcsaAdminRotateEnum vcenterPassword; + + /** + * Indicate to rotate the NSX-T Manager password for the private cloud. + * Possible values include: 'OnetimeRotate'. + */ + @JsonProperty(value = "properties.nsxtPassword") + private NsxtAdminRotateEnum nsxtPassword; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Pending', 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateCloudProvisioningState provisioningState; + + /** + * An ExpressRoute Circuit. + */ + @JsonProperty(value = "properties.circuit") + private Circuit circuit; + + /** + * The endpoints. + */ + @JsonProperty(value = "properties.endpoints", access = JsonProperty.Access.WRITE_ONLY) + private Endpoints endpoints; + + /** + * The block of addresses should be unique across VNet in your subscription + * as well as on-premise. Make sure the CIDR format is conformed to + * (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and + * 22. + */ + @JsonProperty(value = "properties.networkBlock", required = true) + private String networkBlock; + + /** + * Network used to access vCenter Server and NSX-T Manager. + */ + @JsonProperty(value = "properties.managementNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String managementNetwork; + + /** + * Used for virtual machine cold migration, cloning, and snapshot + * migration. + */ + @JsonProperty(value = "properties.provisioningNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningNetwork; + + /** + * Used for live migration of virtual machines. + */ + @JsonProperty(value = "properties.vmotionNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String vmotionNetwork; + + /** + * Thumbprint of the vCenter Server SSL certificate. + */ + @JsonProperty(value = "properties.vcenterCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterCertificateThumbprint; + + /** + * Thumbprint of the NSX-T Manager SSL certificate. + */ + @JsonProperty(value = "properties.nsxtCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtCertificateThumbprint; + + /** + * Get the private cloud SKU. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the private cloud SKU. + * + * @param sku the sku value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the default cluster used for management. + * + * @return the managementCluster value + */ + public ManagementCluster managementCluster() { + return this.managementCluster; + } + + /** + * Set the default cluster used for management. + * + * @param managementCluster the managementCluster value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withManagementCluster(ManagementCluster managementCluster) { + this.managementCluster = managementCluster; + return this; + } + + /** + * Get connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the internet value + */ + public InternetEnum internet() { + return this.internet; + } + + /** + * Set connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param internet the internet value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withInternet(InternetEnum internet) { + this.internet = internet; + return this; + } + + /** + * Get vCenter Single Sign On Identity Sources. + * + * @return the identitySources value + */ + public List identitySources() { + return this.identitySources; + } + + /** + * Set vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withIdentitySources(List identitySources) { + this.identitySources = identitySources; + return this; + } + + /** + * Get indicate to rotate the vCenter admin password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @return the vcenterPassword value + */ + public VcsaAdminRotateEnum vcenterPassword() { + return this.vcenterPassword; + } + + /** + * Set indicate to rotate the vCenter admin password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @param vcenterPassword the vcenterPassword value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withVcenterPassword(VcsaAdminRotateEnum vcenterPassword) { + this.vcenterPassword = vcenterPassword; + return this; + } + + /** + * Get indicate to rotate the NSX-T Manager password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @return the nsxtPassword value + */ + public NsxtAdminRotateEnum nsxtPassword() { + return this.nsxtPassword; + } + + /** + * Set indicate to rotate the NSX-T Manager password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @param nsxtPassword the nsxtPassword value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withNsxtPassword(NsxtAdminRotateEnum nsxtPassword) { + this.nsxtPassword = nsxtPassword; + return this; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public PrivateCloudProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get an ExpressRoute Circuit. + * + * @return the circuit value + */ + public Circuit circuit() { + return this.circuit; + } + + /** + * Set an ExpressRoute Circuit. + * + * @param circuit the circuit value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withCircuit(Circuit circuit) { + this.circuit = circuit; + return this; + } + + /** + * Get the endpoints. + * + * @return the endpoints value + */ + public Endpoints endpoints() { + return this.endpoints; + } + + /** + * Get the block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. + * + * @return the networkBlock value + */ + public String networkBlock() { + return this.networkBlock; + } + + /** + * Set the block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22. + * + * @param networkBlock the networkBlock value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withNetworkBlock(String networkBlock) { + this.networkBlock = networkBlock; + return this; + } + + /** + * Get network used to access vCenter Server and NSX-T Manager. + * + * @return the managementNetwork value + */ + public String managementNetwork() { + return this.managementNetwork; + } + + /** + * Get used for virtual machine cold migration, cloning, and snapshot migration. + * + * @return the provisioningNetwork value + */ + public String provisioningNetwork() { + return this.provisioningNetwork; + } + + /** + * Get used for live migration of virtual machines. + * + * @return the vmotionNetwork value + */ + public String vmotionNetwork() { + return this.vmotionNetwork; + } + + /** + * Get thumbprint of the vCenter Server SSL certificate. + * + * @return the vcenterCertificateThumbprint value + */ + public String vcenterCertificateThumbprint() { + return this.vcenterCertificateThumbprint; + } + + /** + * Get thumbprint of the NSX-T Manager SSL certificate. + * + * @return the nsxtCertificateThumbprint value + */ + public String nsxtCertificateThumbprint() { + return this.nsxtCertificateThumbprint; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudProvisioningState.java new file mode 100644 index 0000000000000..73e218ed4ba23 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudProvisioningState.java @@ -0,0 +1,56 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateCloudProvisioningState. + */ +public final class PrivateCloudProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState FAILED = fromString("Failed"); + + /** Static value Cancelled for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState CANCELLED = fromString("Cancelled"); + + /** Static value Pending for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState PENDING = fromString("Pending"); + + /** Static value Building for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState BUILDING = fromString("Building"); + + /** Static value Deleting for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a PrivateCloudProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding PrivateCloudProvisioningState + */ + @JsonCreator + public static PrivateCloudProvisioningState fromString(String name) { + return fromString(name, PrivateCloudProvisioningState.class); + } + + /** + * @return known PrivateCloudProvisioningState values + */ + public static Collection values() { + return values(PrivateCloudProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudUpdate.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudUpdate.java new file mode 100644 index 0000000000000..e47a53d93f2fa --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/PrivateCloudUpdate.java @@ -0,0 +1,180 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * An update to a private cloud resource. + */ +@JsonFlatten +public class PrivateCloudUpdate { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The default cluster used for management. + */ + @JsonProperty(value = "properties.managementCluster") + private ManagementCluster managementCluster; + + /** + * Connectivity to internet is enabled or disabled. Possible values + * include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.internet") + private InternetEnum internet; + + /** + * vCenter Single Sign On Identity Sources. + */ + @JsonProperty(value = "properties.identitySources") + private List identitySources; + + /** + * Indicate to rotate the vCenter admin password for the private cloud. + * Possible values include: 'OnetimeRotate'. + */ + @JsonProperty(value = "properties.vcenterPassword") + private VcsaAdminRotateEnum vcenterPassword; + + /** + * Indicate to rotate the NSX-T Manager password for the private cloud. + * Possible values include: 'OnetimeRotate'. + */ + @JsonProperty(value = "properties.nsxtPassword") + private NsxtAdminRotateEnum nsxtPassword; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the default cluster used for management. + * + * @return the managementCluster value + */ + public ManagementCluster managementCluster() { + return this.managementCluster; + } + + /** + * Set the default cluster used for management. + * + * @param managementCluster the managementCluster value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withManagementCluster(ManagementCluster managementCluster) { + this.managementCluster = managementCluster; + return this; + } + + /** + * Get connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @return the internet value + */ + public InternetEnum internet() { + return this.internet; + } + + /** + * Set connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled'. + * + * @param internet the internet value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withInternet(InternetEnum internet) { + this.internet = internet; + return this; + } + + /** + * Get vCenter Single Sign On Identity Sources. + * + * @return the identitySources value + */ + public List identitySources() { + return this.identitySources; + } + + /** + * Set vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withIdentitySources(List identitySources) { + this.identitySources = identitySources; + return this; + } + + /** + * Get indicate to rotate the vCenter admin password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @return the vcenterPassword value + */ + public VcsaAdminRotateEnum vcenterPassword() { + return this.vcenterPassword; + } + + /** + * Set indicate to rotate the vCenter admin password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @param vcenterPassword the vcenterPassword value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withVcenterPassword(VcsaAdminRotateEnum vcenterPassword) { + this.vcenterPassword = vcenterPassword; + return this; + } + + /** + * Get indicate to rotate the NSX-T Manager password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @return the nsxtPassword value + */ + public NsxtAdminRotateEnum nsxtPassword() { + return this.nsxtPassword; + } + + /** + * Set indicate to rotate the NSX-T Manager password for the private cloud. Possible values include: 'OnetimeRotate'. + * + * @param nsxtPassword the nsxtPassword value to set + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withNsxtPassword(NsxtAdminRotateEnum nsxtPassword) { + this.nsxtPassword = nsxtPassword; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Quota.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Quota.java new file mode 100644 index 0000000000000..2e4ed7f6a1af1 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Quota.java @@ -0,0 +1,49 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription quotas. + */ +public class Quota { + /** + * Remaining hosts quota by sku type. + */ + @JsonProperty(value = "hostsRemaining", access = JsonProperty.Access.WRITE_ONLY) + private Map hostsRemaining; + + /** + * Host quota is active for current subscription. Possible values include: + * 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "quotaEnabled", access = JsonProperty.Access.WRITE_ONLY) + private QuotaEnabled quotaEnabled; + + /** + * Get remaining hosts quota by sku type. + * + * @return the hostsRemaining value + */ + public Map hostsRemaining() { + return this.hostsRemaining; + } + + /** + * Get host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled'. + * + * @return the quotaEnabled value + */ + public QuotaEnabled quotaEnabled() { + return this.quotaEnabled; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/QuotaEnabled.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/QuotaEnabled.java new file mode 100644 index 0000000000000..253efcd329105 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/QuotaEnabled.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for QuotaEnabled. + */ +public final class QuotaEnabled extends ExpandableStringEnum { + /** Static value Enabled for QuotaEnabled. */ + public static final QuotaEnabled ENABLED = fromString("Enabled"); + + /** Static value Disabled for QuotaEnabled. */ + public static final QuotaEnabled DISABLED = fromString("Disabled"); + + /** + * Creates or finds a QuotaEnabled from its string representation. + * @param name a name to look for + * @return the corresponding QuotaEnabled + */ + @JsonCreator + public static QuotaEnabled fromString(String name) { + return fromString(name, QuotaEnabled.class); + } + + /** + * @return known QuotaEnabled values + */ + public static Collection values() { + return values(QuotaEnabled.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SegmentStatusEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SegmentStatusEnum.java new file mode 100644 index 0000000000000..5cc82fc658496 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SegmentStatusEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SegmentStatusEnum. + */ +public final class SegmentStatusEnum extends ExpandableStringEnum { + /** Static value SUCCESS, FAILURE for SegmentStatusEnum. */ + public static final SegmentStatusEnum SUCCESS_FAILURE = fromString("SUCCESS, FAILURE"); + + /** + * Creates or finds a SegmentStatusEnum from its string representation. + * @param name a name to look for + * @return the corresponding SegmentStatusEnum + */ + @JsonCreator + public static SegmentStatusEnum fromString(String name) { + return fromString(name, SegmentStatusEnum.class); + } + + /** + * @return known SegmentStatusEnum values + */ + public static Collection values() { + return values(SegmentStatusEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ServiceSpecification.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ServiceSpecification.java new file mode 100644 index 0000000000000..9215058e22c35 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/ServiceSpecification.java @@ -0,0 +1,70 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service specification payload. + */ +public class ServiceSpecification { + /** + * Specifications of the Log for Azure Monitoring. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Specifications of the Metrics for Azure Monitoring. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get specifications of the Log for Azure Monitoring. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set specifications of the Log for Azure Monitoring. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + + /** + * Get specifications of the Metrics for Azure Monitoring. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set specifications of the Metrics for Azure Monitoring. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Sku.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Sku.java new file mode 100644 index 0000000000000..403c41f5d7d59 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Sku.java @@ -0,0 +1,43 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource model definition representing SKU. + */ +public class Sku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the Sku object itself. + */ + public Sku withName(String name) { + this.name = name; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SslEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SslEnum.java new file mode 100644 index 0000000000000..77e546e430f87 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/SslEnum.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SslEnum. + */ +public final class SslEnum extends ExpandableStringEnum { + /** Static value Enabled for SslEnum. */ + public static final SslEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for SslEnum. */ + public static final SslEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a SslEnum from its string representation. + * @param name a name to look for + * @return the corresponding SslEnum + */ + @JsonCreator + public static SslEnum fromString(String name) { + return fromString(name, SslEnum.class); + } + + /** + * @return known SslEnum values + */ + public static Collection values() { + return values(SslEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Trial.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Trial.java new file mode 100644 index 0000000000000..1904c5bc89bc6 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/Trial.java @@ -0,0 +1,48 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription trial availability. + */ +public class Trial { + /** + * Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', + * 'TrialDisabled'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private TrialStatus status; + + /** + * Number of trial hosts available. + */ + @JsonProperty(value = "availableHosts", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableHosts; + + /** + * Get trial status. Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled'. + * + * @return the status value + */ + public TrialStatus status() { + return this.status; + } + + /** + * Get number of trial hosts available. + * + * @return the availableHosts value + */ + public Integer availableHosts() { + return this.availableHosts; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/TrialStatus.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/TrialStatus.java new file mode 100644 index 0000000000000..f788123312dac --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/TrialStatus.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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TrialStatus. + */ +public final class TrialStatus extends ExpandableStringEnum { + /** Static value TrialAvailable for TrialStatus. */ + public static final TrialStatus TRIAL_AVAILABLE = fromString("TrialAvailable"); + + /** Static value TrialUsed for TrialStatus. */ + public static final TrialStatus TRIAL_USED = fromString("TrialUsed"); + + /** Static value TrialDisabled for TrialStatus. */ + public static final TrialStatus TRIAL_DISABLED = fromString("TrialDisabled"); + + /** + * Creates or finds a TrialStatus from its string representation. + * @param name a name to look for + * @return the corresponding TrialStatus + */ + @JsonCreator + public static TrialStatus fromString(String name) { + return fromString(name, TrialStatus.class); + } + + /** + * @return known TrialStatus values + */ + public static Collection values() { + return values(TrialStatus.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMGroupStatusEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMGroupStatusEnum.java new file mode 100644 index 0000000000000..54875a8028a5e --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMGroupStatusEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VMGroupStatusEnum. + */ +public final class VMGroupStatusEnum extends ExpandableStringEnum { + /** Static value SUCCESS, FAILURE for VMGroupStatusEnum. */ + public static final VMGroupStatusEnum SUCCESS_FAILURE = fromString("SUCCESS, FAILURE"); + + /** + * Creates or finds a VMGroupStatusEnum from its string representation. + * @param name a name to look for + * @return the corresponding VMGroupStatusEnum + */ + @JsonCreator + public static VMGroupStatusEnum fromString(String name) { + return fromString(name, VMGroupStatusEnum.class); + } + + /** + * @return known VMGroupStatusEnum values + */ + public static Collection values() { + return values(VMGroupStatusEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMTypeEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMTypeEnum.java new file mode 100644 index 0000000000000..ccf5a779e51a0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VMTypeEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VMTypeEnum. + */ +public final class VMTypeEnum extends ExpandableStringEnum { + /** Static value REGULAR, EDGE, SERVICE for VMTypeEnum. */ + public static final VMTypeEnum REGULAR_EDGE_SERVICE = fromString("REGULAR, EDGE, SERVICE"); + + /** + * Creates or finds a VMTypeEnum from its string representation. + * @param name a name to look for + * @return the corresponding VMTypeEnum + */ + @JsonCreator + public static VMTypeEnum fromString(String name) { + return fromString(name, VMTypeEnum.class); + } + + /** + * @return known VMTypeEnum values + */ + public static Collection values() { + return values(VMTypeEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VcsaAdminRotateEnum.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VcsaAdminRotateEnum.java new file mode 100644 index 0000000000000..2101a14bfcd8b --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/VcsaAdminRotateEnum.java @@ -0,0 +1,38 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VcsaAdminRotateEnum. + */ +public final class VcsaAdminRotateEnum extends ExpandableStringEnum { + /** Static value OnetimeRotate for VcsaAdminRotateEnum. */ + public static final VcsaAdminRotateEnum ONETIME_ROTATE = fromString("OnetimeRotate"); + + /** + * Creates or finds a VcsaAdminRotateEnum from its string representation. + * @param name a name to look for + * @return the corresponding VcsaAdminRotateEnum + */ + @JsonCreator + public static VcsaAdminRotateEnum fromString(String name) { + return fromString(name, VcsaAdminRotateEnum.class); + } + + /** + * @return known VcsaAdminRotateEnum values + */ + public static Collection values() { + return values(VcsaAdminRotateEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcp.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcp.java new file mode 100644 index 0000000000000..92c0b92be5486 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcp.java @@ -0,0 +1,104 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX DHCP. + */ +@JsonFlatten +public class WorkloadNetworkDhcp extends ProxyResource { + /** + * Display name of the DHCP entity. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * NSX Segments consuming DHCP. + */ + @JsonProperty(value = "properties.segments", access = JsonProperty.Access.WRITE_ONLY) + private List segments; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkDhcpProvisioningState provisioningState; + + /** + * NSX revision number. + */ + @JsonProperty(value = "properties.revision") + private Long revision; + + /** + * Get display name of the DHCP entity. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the DHCP entity. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkDhcp object itself. + */ + public WorkloadNetworkDhcp withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get nSX Segments consuming DHCP. + * + * @return the segments value + */ + public List segments() { + return this.segments; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get nSX revision number. + * + * @return the revision value + */ + public Long revision() { + return this.revision; + } + + /** + * Set nSX revision number. + * + * @param revision the revision value to set + * @return the WorkloadNetworkDhcp object itself. + */ + public WorkloadNetworkDhcp withRevision(Long revision) { + this.revision = revision; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpEntity.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpEntity.java new file mode 100644 index 0000000000000..11e06fc981252 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpEntity.java @@ -0,0 +1,111 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + * inherit from. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType", defaultImpl = WorkloadNetworkDhcpEntity.class) +@JsonTypeName("WorkloadNetworkDhcpEntity") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServer.class), + @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class) +}) +public class WorkloadNetworkDhcpEntity { + /** + * Display name of the DHCP entity. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * NSX Segments consuming DHCP. + */ + @JsonProperty(value = "segments", access = JsonProperty.Access.WRITE_ONLY) + private List segments; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkDhcpProvisioningState provisioningState; + + /** + * NSX revision number. + */ + @JsonProperty(value = "revision") + private Long revision; + + /** + * Get display name of the DHCP entity. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the DHCP entity. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkDhcpEntity object itself. + */ + public WorkloadNetworkDhcpEntity withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get nSX Segments consuming DHCP. + * + * @return the segments value + */ + public List segments() { + return this.segments; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get nSX revision number. + * + * @return the revision value + */ + public Long revision() { + return this.revision; + } + + /** + * Set nSX revision number. + * + * @param revision the revision value to set + * @return the WorkloadNetworkDhcpEntity object itself. + */ + public WorkloadNetworkDhcpEntity withRevision(Long revision) { + this.revision = revision; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpProvisioningState.java new file mode 100644 index 0000000000000..9f92074e794d4 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkloadNetworkDhcpProvisioningState. + */ +public final class WorkloadNetworkDhcpProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for WorkloadNetworkDhcpProvisioningState. */ + public static final WorkloadNetworkDhcpProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkloadNetworkDhcpProvisioningState. */ + public static final WorkloadNetworkDhcpProvisioningState FAILED = fromString("Failed"); + + /** Static value Building for WorkloadNetworkDhcpProvisioningState. */ + public static final WorkloadNetworkDhcpProvisioningState BUILDING = fromString("Building"); + + /** Static value Deleting for WorkloadNetworkDhcpProvisioningState. */ + public static final WorkloadNetworkDhcpProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for WorkloadNetworkDhcpProvisioningState. */ + public static final WorkloadNetworkDhcpProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a WorkloadNetworkDhcpProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding WorkloadNetworkDhcpProvisioningState + */ + @JsonCreator + public static WorkloadNetworkDhcpProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkDhcpProvisioningState.class); + } + + /** + * @return known WorkloadNetworkDhcpProvisioningState values + */ + public static Collection values() { + return values(WorkloadNetworkDhcpProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpRelay.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpRelay.java new file mode 100644 index 0000000000000..3f4764fe5cf8e --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpRelay.java @@ -0,0 +1,48 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NSX DHCP Relay. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType", defaultImpl = WorkloadNetworkDhcpRelay.class) +@JsonTypeName("RELAY") +public class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { + /** + * DHCP Relay Addresses. Max 3. + */ + @JsonProperty(value = "serverAddresses") + private List serverAddresses; + + /** + * Get dHCP Relay Addresses. Max 3. + * + * @return the serverAddresses value + */ + public List serverAddresses() { + return this.serverAddresses; + } + + /** + * Set dHCP Relay Addresses. Max 3. + * + * @param serverAddresses the serverAddresses value to set + * @return the WorkloadNetworkDhcpRelay object itself. + */ + public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses) { + this.serverAddresses = serverAddresses; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpServer.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpServer.java new file mode 100644 index 0000000000000..69f26f8f58cf3 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkDhcpServer.java @@ -0,0 +1,73 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NSX DHCP Server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType", defaultImpl = WorkloadNetworkDhcpServer.class) +@JsonTypeName("SERVER") +public class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { + /** + * DHCP Server Address. + */ + @JsonProperty(value = "serverAddress") + private String serverAddress; + + /** + * DHCP Server Lease Time. + */ + @JsonProperty(value = "leaseTime") + private Long leaseTime; + + /** + * Get dHCP Server Address. + * + * @return the serverAddress value + */ + public String serverAddress() { + return this.serverAddress; + } + + /** + * Set dHCP Server Address. + * + * @param serverAddress the serverAddress value to set + * @return the WorkloadNetworkDhcpServer object itself. + */ + public WorkloadNetworkDhcpServer withServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return this; + } + + /** + * Get dHCP Server Lease Time. + * + * @return the leaseTime value + */ + public Long leaseTime() { + return this.leaseTime; + } + + /** + * Set dHCP Server Lease Time. + * + * @param leaseTime the leaseTime value to set + * @return the WorkloadNetworkDhcpServer object itself. + */ + public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { + this.leaseTime = leaseTime; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkGateway.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkGateway.java new file mode 100644 index 0000000000000..b104ef1d6e272 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkGateway.java @@ -0,0 +1,61 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX Gateway. + */ +@JsonFlatten +public class WorkloadNetworkGateway extends ProxyResource { + /** + * Display name of the DHCP entity. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * NSX Gateway Path. + */ + @JsonProperty(value = "properties.path", access = JsonProperty.Access.WRITE_ONLY) + private String path; + + /** + * Get display name of the DHCP entity. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the DHCP entity. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkGateway object itself. + */ + public WorkloadNetworkGateway withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get nSX Gateway Path. + * + * @return the path value + */ + public String path() { + return this.path; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroring.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroring.java new file mode 100644 index 0000000000000..0a3dad8c2b0f9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroring.java @@ -0,0 +1,182 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX Port Mirroring. + */ +@JsonFlatten +public class WorkloadNetworkPortMirroring extends ProxyResource { + /** + * Display name of the port mirroring profile. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Direction of port mirroring profile. Possible values include: 'INGRESS, + * EGRESS, BIDIRECTIONAL'. + */ + @JsonProperty(value = "properties.direction") + private PortMirroringDirectionEnum direction; + + /** + * Source VM Group. + */ + @JsonProperty(value = "properties.source") + private String source; + + /** + * Destination VM Group. + */ + @JsonProperty(value = "properties.destination") + private String destination; + + /** + * Port Mirroring Status. Possible values include: 'SUCCESS, FAILURE'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private PortMirroringStatusEnum status; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkPortMirroringProvisioningState provisioningState; + + /** + * NSX revision number. + */ + @JsonProperty(value = "properties.revision") + private Long revision; + + /** + * Get display name of the port mirroring profile. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the port mirroring profile. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkPortMirroring object itself. + */ + public WorkloadNetworkPortMirroring withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get direction of port mirroring profile. Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL'. + * + * @return the direction value + */ + public PortMirroringDirectionEnum direction() { + return this.direction; + } + + /** + * Set direction of port mirroring profile. Possible values include: 'INGRESS, EGRESS, BIDIRECTIONAL'. + * + * @param direction the direction value to set + * @return the WorkloadNetworkPortMirroring object itself. + */ + public WorkloadNetworkPortMirroring withDirection(PortMirroringDirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Get source VM Group. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set source VM Group. + * + * @param source the source value to set + * @return the WorkloadNetworkPortMirroring object itself. + */ + public WorkloadNetworkPortMirroring withSource(String source) { + this.source = source; + return this; + } + + /** + * Get destination VM Group. + * + * @return the destination value + */ + public String destination() { + return this.destination; + } + + /** + * Set destination VM Group. + * + * @param destination the destination value to set + * @return the WorkloadNetworkPortMirroring object itself. + */ + public WorkloadNetworkPortMirroring withDestination(String destination) { + this.destination = destination; + return this; + } + + /** + * Get port Mirroring Status. Possible values include: 'SUCCESS, FAILURE'. + * + * @return the status value + */ + public PortMirroringStatusEnum status() { + return this.status; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public WorkloadNetworkPortMirroringProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get nSX revision number. + * + * @return the revision value + */ + public Long revision() { + return this.revision; + } + + /** + * Set nSX revision number. + * + * @param revision the revision value to set + * @return the WorkloadNetworkPortMirroring object itself. + */ + public WorkloadNetworkPortMirroring withRevision(Long revision) { + this.revision = revision; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroringProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroringProvisioningState.java new file mode 100644 index 0000000000000..84e2a221f9b18 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkPortMirroringProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkloadNetworkPortMirroringProvisioningState. + */ +public final class WorkloadNetworkPortMirroringProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. */ + public static final WorkloadNetworkPortMirroringProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkloadNetworkPortMirroringProvisioningState. */ + public static final WorkloadNetworkPortMirroringProvisioningState FAILED = fromString("Failed"); + + /** Static value Building for WorkloadNetworkPortMirroringProvisioningState. */ + public static final WorkloadNetworkPortMirroringProvisioningState BUILDING = fromString("Building"); + + /** Static value Deleting for WorkloadNetworkPortMirroringProvisioningState. */ + public static final WorkloadNetworkPortMirroringProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for WorkloadNetworkPortMirroringProvisioningState. */ + public static final WorkloadNetworkPortMirroringProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a WorkloadNetworkPortMirroringProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding WorkloadNetworkPortMirroringProvisioningState + */ + @JsonCreator + public static WorkloadNetworkPortMirroringProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkPortMirroringProvisioningState.class); + } + + /** + * @return known WorkloadNetworkPortMirroringProvisioningState values + */ + public static Collection values() { + return values(WorkloadNetworkPortMirroringProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegment.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegment.java new file mode 100644 index 0000000000000..52daa9f713fac --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegment.java @@ -0,0 +1,171 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX Segment. + */ +@JsonFlatten +public class WorkloadNetworkSegment extends ProxyResource { + /** + * Display name of the segment. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Gateway which to connect segment to. + */ + @JsonProperty(value = "properties.connectedGateway") + private String connectedGateway; + + /** + * Subnet which to connect segment to. + */ + @JsonProperty(value = "properties.subnet") + private WorkloadNetworkSegmentSubnet subnet; + + /** + * Port Vif which segment is associated with. + */ + @JsonProperty(value = "properties.portVif", access = JsonProperty.Access.WRITE_ONLY) + private List portVif; + + /** + * Segment status. Possible values include: 'SUCCESS, FAILURE'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private SegmentStatusEnum status; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkSegmentProvisioningState provisioningState; + + /** + * NSX revision number. + */ + @JsonProperty(value = "properties.revision") + private Long revision; + + /** + * Get display name of the segment. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the segment. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkSegment object itself. + */ + public WorkloadNetworkSegment withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get gateway which to connect segment to. + * + * @return the connectedGateway value + */ + public String connectedGateway() { + return this.connectedGateway; + } + + /** + * Set gateway which to connect segment to. + * + * @param connectedGateway the connectedGateway value to set + * @return the WorkloadNetworkSegment object itself. + */ + public WorkloadNetworkSegment withConnectedGateway(String connectedGateway) { + this.connectedGateway = connectedGateway; + return this; + } + + /** + * Get subnet which to connect segment to. + * + * @return the subnet value + */ + public WorkloadNetworkSegmentSubnet subnet() { + return this.subnet; + } + + /** + * Set subnet which to connect segment to. + * + * @param subnet the subnet value to set + * @return the WorkloadNetworkSegment object itself. + */ + public WorkloadNetworkSegment withSubnet(WorkloadNetworkSegmentSubnet subnet) { + this.subnet = subnet; + return this; + } + + /** + * Get port Vif which segment is associated with. + * + * @return the portVif value + */ + public List portVif() { + return this.portVif; + } + + /** + * Get segment status. Possible values include: 'SUCCESS, FAILURE'. + * + * @return the status value + */ + public SegmentStatusEnum status() { + return this.status; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public WorkloadNetworkSegmentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get nSX revision number. + * + * @return the revision value + */ + public Long revision() { + return this.revision; + } + + /** + * Set nSX revision number. + * + * @param revision the revision value to set + * @return the WorkloadNetworkSegment object itself. + */ + public WorkloadNetworkSegment withRevision(Long revision) { + this.revision = revision; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentPortVif.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentPortVif.java new file mode 100644 index 0000000000000..dfba3b35a0c27 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentPortVif.java @@ -0,0 +1,43 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Ports and any VIF attached to segment. + */ +public class WorkloadNetworkSegmentPortVif { + /** + * Name of port or VIF attached to segment. + */ + @JsonProperty(value = "portName") + private String portName; + + /** + * Get name of port or VIF attached to segment. + * + * @return the portName value + */ + public String portName() { + return this.portName; + } + + /** + * Set name of port or VIF attached to segment. + * + * @param portName the portName value to set + * @return the WorkloadNetworkSegmentPortVif object itself. + */ + public WorkloadNetworkSegmentPortVif withPortName(String portName) { + this.portName = portName; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentProvisioningState.java new file mode 100644 index 0000000000000..c36299bfb428b --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkloadNetworkSegmentProvisioningState. + */ +public final class WorkloadNetworkSegmentProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for WorkloadNetworkSegmentProvisioningState. */ + public static final WorkloadNetworkSegmentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkloadNetworkSegmentProvisioningState. */ + public static final WorkloadNetworkSegmentProvisioningState FAILED = fromString("Failed"); + + /** Static value Building for WorkloadNetworkSegmentProvisioningState. */ + public static final WorkloadNetworkSegmentProvisioningState BUILDING = fromString("Building"); + + /** Static value Deleting for WorkloadNetworkSegmentProvisioningState. */ + public static final WorkloadNetworkSegmentProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for WorkloadNetworkSegmentProvisioningState. */ + public static final WorkloadNetworkSegmentProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a WorkloadNetworkSegmentProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding WorkloadNetworkSegmentProvisioningState + */ + @JsonCreator + public static WorkloadNetworkSegmentProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkSegmentProvisioningState.class); + } + + /** + * @return known WorkloadNetworkSegmentProvisioningState values + */ + public static Collection values() { + return values(WorkloadNetworkSegmentProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentSubnet.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentSubnet.java new file mode 100644 index 0000000000000..885e61e176520 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkSegmentSubnet.java @@ -0,0 +1,70 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subnet configuration for segment. + */ +public class WorkloadNetworkSegmentSubnet { + /** + * DHCP Range assigned for subnet. + */ + @JsonProperty(value = "dhcpRanges") + private List dhcpRanges; + + /** + * Gateway address. + */ + @JsonProperty(value = "gatewayAddress") + private String gatewayAddress; + + /** + * Get dHCP Range assigned for subnet. + * + * @return the dhcpRanges value + */ + public List dhcpRanges() { + return this.dhcpRanges; + } + + /** + * Set dHCP Range assigned for subnet. + * + * @param dhcpRanges the dhcpRanges value to set + * @return the WorkloadNetworkSegmentSubnet object itself. + */ + public WorkloadNetworkSegmentSubnet withDhcpRanges(List dhcpRanges) { + this.dhcpRanges = dhcpRanges; + return this; + } + + /** + * Get gateway address. + * + * @return the gatewayAddress value + */ + public String gatewayAddress() { + return this.gatewayAddress; + } + + /** + * Set gateway address. + * + * @param gatewayAddress the gatewayAddress value to set + * @return the WorkloadNetworkSegmentSubnet object itself. + */ + public WorkloadNetworkSegmentSubnet withGatewayAddress(String gatewayAddress) { + this.gatewayAddress = gatewayAddress; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroup.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroup.java new file mode 100644 index 0000000000000..e3bce86432f03 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroup.java @@ -0,0 +1,130 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX VM Group. + */ +@JsonFlatten +public class WorkloadNetworkVMGroup extends ProxyResource { + /** + * Display name of the VM group. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Virtual machine members of this group. + */ + @JsonProperty(value = "properties.members") + private List members; + + /** + * VM Group status. Possible values include: 'SUCCESS, FAILURE'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private VMGroupStatusEnum status; + + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Building', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkVMGroupProvisioningState provisioningState; + + /** + * NSX revision number. + */ + @JsonProperty(value = "properties.revision") + private Long revision; + + /** + * Get display name of the VM group. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the VM group. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkVMGroup object itself. + */ + public WorkloadNetworkVMGroup withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get virtual machine members of this group. + * + * @return the members value + */ + public List members() { + return this.members; + } + + /** + * Set virtual machine members of this group. + * + * @param members the members value to set + * @return the WorkloadNetworkVMGroup object itself. + */ + public WorkloadNetworkVMGroup withMembers(List members) { + this.members = members; + return this; + } + + /** + * Get vM Group status. Possible values include: 'SUCCESS, FAILURE'. + * + * @return the status value + */ + public VMGroupStatusEnum status() { + return this.status; + } + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Building', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public WorkloadNetworkVMGroupProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get nSX revision number. + * + * @return the revision value + */ + public Long revision() { + return this.revision; + } + + /** + * Set nSX revision number. + * + * @param revision the revision value to set + * @return the WorkloadNetworkVMGroup object itself. + */ + public WorkloadNetworkVMGroup withRevision(Long revision) { + this.revision = revision; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroupProvisioningState.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroupProvisioningState.java new file mode 100644 index 0000000000000..56f570863496a --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVMGroupProvisioningState.java @@ -0,0 +1,50 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for WorkloadNetworkVMGroupProvisioningState. + */ +public final class WorkloadNetworkVMGroupProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. */ + public static final WorkloadNetworkVMGroupProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for WorkloadNetworkVMGroupProvisioningState. */ + public static final WorkloadNetworkVMGroupProvisioningState FAILED = fromString("Failed"); + + /** Static value Building for WorkloadNetworkVMGroupProvisioningState. */ + public static final WorkloadNetworkVMGroupProvisioningState BUILDING = fromString("Building"); + + /** Static value Deleting for WorkloadNetworkVMGroupProvisioningState. */ + public static final WorkloadNetworkVMGroupProvisioningState DELETING = fromString("Deleting"); + + /** Static value Updating for WorkloadNetworkVMGroupProvisioningState. */ + public static final WorkloadNetworkVMGroupProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates or finds a WorkloadNetworkVMGroupProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding WorkloadNetworkVMGroupProvisioningState + */ + @JsonCreator + public static WorkloadNetworkVMGroupProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkVMGroupProvisioningState.class); + } + + /** + * @return known WorkloadNetworkVMGroupProvisioningState values + */ + public static Collection values() { + return values(WorkloadNetworkVMGroupProvisioningState.class); + } +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVirtualMachine.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVirtualMachine.java new file mode 100644 index 0000000000000..18d700b877bba --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/WorkloadNetworkVirtualMachine.java @@ -0,0 +1,61 @@ +/** + * 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.avs.v2020_07_17_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * NSX Virtual Machine. + */ +@JsonFlatten +public class WorkloadNetworkVirtualMachine extends ProxyResource { + /** + * Display name of the VM. + */ + @JsonProperty(value = "properties.displayName") + private String displayName; + + /** + * Virtual machine type. Possible values include: 'REGULAR, EDGE, SERVICE'. + */ + @JsonProperty(value = "properties.vmType", access = JsonProperty.Access.WRITE_ONLY) + private VMTypeEnum vmType; + + /** + * Get display name of the VM. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display name of the VM. + * + * @param displayName the displayName value to set + * @return the WorkloadNetworkVirtualMachine object itself. + */ + public WorkloadNetworkVirtualMachine withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get virtual machine type. Possible values include: 'REGULAR, EDGE, SERVICE'. + * + * @return the vmType value + */ + public VMTypeEnum vmType() { + return this.vmType; + } + +} diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/package-info.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/package-info.java new file mode 100644 index 0000000000000..8fa4a143d17f2 --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/models/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the models classes for AvsClient. + * Azure VMware Solution API. + */ +package com.microsoft.azure.management.avs.v2020_07_17_preview.models; diff --git a/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/package-info.java b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/package-info.java new file mode 100644 index 0000000000000..94f54a95dfe1d --- /dev/null +++ b/sdk/avs/mgmt-v2020_07_17_preview/src/main/java/com/microsoft/azure/management/avs/v20200717preview/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the classes for AvsClient. + * Azure VMware Solution API. + */ +package com.microsoft.azure.management.avs.v2020_07_17_preview;