From e5af3396c7a7359e8fd903288311a143d3a96080 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 21 Oct 2020 23:44:26 +0000 Subject: [PATCH] Generated from 31b80bb8a16bb35b4720a71f1c43bf5b43702353 --- sdk/avs/mgmt-v2020_03_20/pom.xml | 36 +- .../avs/v20200320/Authorizations.java | 352 +++++ .../management/avs/v20200320/AvsClient.java | 141 ++ .../management/avs/v20200320/Clusters.java | 455 ++++++ .../avs/v20200320/HcxEnterpriseSites.java | 255 ++++ .../management/avs/v20200320/Locations.java | 103 ++ .../management/avs/v20200320/Operations.java | 102 ++ .../avs/v20200320/PrivateClouds.java | 542 ++++++++ .../implementation/AuthorizationsImpl.java | 776 +++++++++++ .../implementation/AvsClientImpl.java | 273 ++++ .../implementation/ClustersImpl.java | 975 +++++++++++++ .../HcxEnterpriseSitesImpl.java | 609 ++++++++ .../implementation/LocationsImpl.java | 225 +++ .../implementation/OperationsImpl.java | 286 ++++ .../implementation/PrivateCloudsImpl.java | 1236 +++++++++++++++++ .../implementation/package-info.java | 11 + .../v20200320/models/AdminCredentials.java | 77 + .../avs/v20200320/models/Circuit.java | 77 + .../avs/v20200320/models/Cluster.java | 130 ++ .../models/ClusterProvisioningState.java | 50 + .../avs/v20200320/models/ClusterUpdate.java | 45 + .../models/ClusterUpdateProperties.java | 43 + .../avs/v20200320/models/Endpoints.java | 62 + .../v20200320/models/ErrorAdditionalInfo.java | 47 + .../avs/v20200320/models/ErrorResponse.java | 93 ++ .../models/ExpressRouteAuthorization.java | 66 + ...ssRouteAuthorizationProvisioningState.java | 44 + .../v20200320/models/HcxEnterpriseSite.java | 51 + .../models/HcxEnterpriseSiteStatus.java | 47 + .../avs/v20200320/models/IdentitySource.java | 280 ++++ .../avs/v20200320/models/InternetEnum.java | 41 + .../v20200320/models/LogSpecification.java | 95 ++ .../v20200320/models/ManagementCluster.java | 75 + .../avs/v20200320/models/MetricDimension.java | 69 + .../v20200320/models/MetricSpecification.java | 359 +++++ .../avs/v20200320/models/Operation.java | 126 ++ .../v20200320/models/OperationDisplay.java | 77 + .../v20200320/models/OperationProperties.java | 43 + .../avs/v20200320/models/PageImpl.java | 75 + .../avs/v20200320/models/PrivateCloud.java | 344 +++++ .../models/PrivateCloudProvisioningState.java | 56 + .../v20200320/models/PrivateCloudUpdate.java | 126 ++ .../avs/v20200320/models/Quota.java | 49 + .../avs/v20200320/models/QuotaEnabled.java | 41 + .../models/ServiceSpecification.java | 70 + .../management/avs/v20200320/models/Sku.java | 43 + .../avs/v20200320/models/SslEnum.java | 41 + .../avs/v20200320/models/Trial.java | 48 + .../avs/v20200320/models/TrialStatus.java | 44 + .../avs/v20200320/models/package-info.java | 11 + .../avs/v20200320/package-info.java | 11 + 51 files changed, 9305 insertions(+), 28 deletions(-) create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Authorizations.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/AvsClient.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Clusters.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/HcxEnterpriseSites.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Locations.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Operations.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/PrivateClouds.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AuthorizationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AvsClientImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/ClustersImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/HcxEnterpriseSitesImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/LocationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/OperationsImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/PrivateCloudsImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/package-info.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/AdminCredentials.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Circuit.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Cluster.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdate.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdateProperties.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Endpoints.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorAdditionalInfo.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorResponse.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorization.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorizationProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSite.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSiteStatus.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/IdentitySource.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/InternetEnum.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/LogSpecification.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ManagementCluster.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricDimension.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricSpecification.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Operation.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationDisplay.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationProperties.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PageImpl.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloud.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudProvisioningState.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudUpdate.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Quota.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/QuotaEnabled.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ServiceSpecification.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Sku.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/SslEnum.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Trial.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/TrialStatus.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/package-info.java create mode 100644 sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/package-info.java diff --git a/sdk/avs/mgmt-v2020_03_20/pom.xml b/sdk/avs/mgmt-v2020_03_20/pom.xml index 2ee6866b239b8..7419f6a2b47ec 100644 --- a/sdk/avs/mgmt-v2020_03_20/pom.xml +++ b/sdk/avs/mgmt-v2020_03_20/pom.xml @@ -7,18 +7,12 @@ --> 4.0.0 - com.microsoft.azure.avs.v2020_03_20 - - com.microsoft.azure - azure-arm-parent - 1.3.2 - ../../parents/azure-arm-parent/pom.xml - - azure-mgmt-avs - 1.0.0-beta + com.microsoft.azure + azure-avs + 1.7.1-SNAPSHOT jar - Microsoft Azure SDK for AVS Management - This package contains Microsoft AVS Management SDK. + Microsoft Azure SDK for AVS + This package contains Microsoft AVS SDK. https://github.com/Azure/azure-sdk-for-java @@ -46,34 +40,20 @@ com.microsoft.azure azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime + 1.5.3 junit junit + 4.12 test com.microsoft.azure azure-client-authentication + 1.5.3 test - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar - test - - 1.6.5 - diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Authorizations.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Authorizations.java new file mode 100644 index 0000000000000..1818954f9924e --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Authorizations.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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200320.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 + * @param authorization An ExpressRoute Circuit Authorization + * @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, Object authorization); + + /** + * 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 authorization An ExpressRoute Circuit Authorization + * @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, Object authorization, 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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization); + + /** + * 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 authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization); + + /** + * 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 authorization An ExpressRoute Circuit Authorization + * @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, Object authorization); + + /** + * 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 authorization An ExpressRoute Circuit Authorization + * @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, Object authorization, 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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization); + + /** + * 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 authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization); + + /** + * 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/AvsClient.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/AvsClient.java new file mode 100644 index 0000000000000..294f41e5e9bc6 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/AvsClient.java @@ -0,0 +1,141 @@ +/** + * 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_03_20; + +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(); + +} diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Clusters.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Clusters.java new file mode 100644 index 0000000000000..9b57542c23ef4 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200320.models.Cluster; +import com.microsoft.azure.management.avs.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/HcxEnterpriseSites.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/HcxEnterpriseSites.java new file mode 100644 index 0000000000000..c65d7e8b17d3d --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/HcxEnterpriseSites.java @@ -0,0 +1,255 @@ +/** + * 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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200320.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 + * @param hcxEnterpriseSite The HCX Enterprise Site + * @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, Object hcxEnterpriseSite); + + /** + * 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 hcxEnterpriseSite The HCX Enterprise Site + * @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, Object hcxEnterpriseSite, 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 + * @param hcxEnterpriseSite The HCX Enterprise Site + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Object hcxEnterpriseSite); + + /** + * 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 hcxEnterpriseSite The HCX Enterprise Site + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Object hcxEnterpriseSite); + + /** + * 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Locations.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Locations.java new file mode 100644 index 0000000000000..d4ce7160cb1c9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.avs.v20200320.models.Quota; +import com.microsoft.azure.management.avs.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Operations.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/Operations.java new file mode 100644 index 0000000000000..2b66278ea3bca --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/PrivateClouds.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/PrivateClouds.java new file mode 100644 index 0000000000000..427e30fbf5272 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20200320.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20200320.models.PrivateCloud; +import com.microsoft.azure.management.avs.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AuthorizationsImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AuthorizationsImpl.java new file mode 100644 index 0000000000000..58a53e2a251a5 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AuthorizationsImpl.java @@ -0,0 +1,776 @@ +/** + * 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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.models.ExpressRouteAuthorization; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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.v20200320.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, @Body Object authorization, @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.v20200320.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, @Body Object authorization, @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.v20200320.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.v20200320.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.v20200320.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 + * @param authorization An ExpressRoute Circuit Authorization + * @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, Object authorization) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization).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 authorization An ExpressRoute Circuit Authorization + * @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, Object authorization, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization), 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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization).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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization) { + 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 (authorization == null) { + throw new IllegalArgumentException("Parameter authorization 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, authorization, this.client.apiVersion(), this.client.acceptLanguage(), 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 + * @param authorization An ExpressRoute Circuit Authorization + * @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, Object authorization) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization).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 authorization An ExpressRoute Circuit Authorization + * @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, Object authorization, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization), 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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization).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 + * @param authorization An ExpressRoute Circuit Authorization + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExpressRouteAuthorization object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String authorizationName, Object authorization) { + 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 (authorization == null) { + throw new IllegalArgumentException("Parameter authorization 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, authorization, 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 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AvsClientImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AvsClientImpl.java new file mode 100644 index 0000000000000..0c93db9d390a9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/AvsClientImpl.java @@ -0,0 +1,273 @@ +/** + * 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_03_20.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.management.avs.v20200320.Authorizations; +import com.microsoft.azure.management.avs.v20200320.AvsClient; +import com.microsoft.azure.management.avs.v20200320.Clusters; +import com.microsoft.azure.management.avs.v20200320.HcxEnterpriseSites; +import com.microsoft.azure.management.avs.v20200320.Locations; +import com.microsoft.azure.management.avs.v20200320.Operations; +import com.microsoft.azure.management.avs.v20200320.PrivateClouds; +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; + } + + /** + * 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-03-20"; + 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.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-03-20"); + } +} diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/ClustersImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/ClustersImpl.java new file mode 100644 index 0000000000000..25ebfd60a6410 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.models.Cluster; +import com.microsoft.azure.management.avs.v20200320.models.ClusterUpdate; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/HcxEnterpriseSitesImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/HcxEnterpriseSitesImpl.java new file mode 100644 index 0000000000000..5c440415baf8d --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/HcxEnterpriseSitesImpl.java @@ -0,0 +1,609 @@ +/** + * 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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.models.HcxEnterpriseSite; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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.v20200320.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, @Body Object hcxEnterpriseSite, @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.v20200320.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.v20200320.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 + * @param hcxEnterpriseSite The HCX Enterprise Site + * @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, Object hcxEnterpriseSite) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite).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 hcxEnterpriseSite The HCX Enterprise Site + * @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, Object hcxEnterpriseSite, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite), 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 + * @param hcxEnterpriseSite The HCX Enterprise Site + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Object hcxEnterpriseSite) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite).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 + * @param hcxEnterpriseSite The HCX Enterprise Site + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HcxEnterpriseSite object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Object hcxEnterpriseSite) { + 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 (hcxEnterpriseSite == null) { + throw new IllegalArgumentException("Parameter hcxEnterpriseSite 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, hcxEnterpriseSite, this.client.apiVersion(), this.client.acceptLanguage(), 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/LocationsImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/LocationsImpl.java new file mode 100644 index 0000000000000..8fca4d717eb57 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.Locations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.avs.v20200320.models.Quota; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/OperationsImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..bb61d863ae3fe --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.models.Operation; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/PrivateCloudsImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/PrivateCloudsImpl.java new file mode 100644 index 0000000000000..7f45bbd394659 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20200320.models.PageImpl; +import com.microsoft.azure.management.avs.v20200320.models.PrivateCloud; +import com.microsoft.azure.management.avs.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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.v20200320.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/package-info.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/implementation/package-info.java new file mode 100644 index 0000000000000..981c57f54565b --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.implementation; diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/AdminCredentials.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/AdminCredentials.java new file mode 100644 index 0000000000000..95c36fd06bee7 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Circuit.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Circuit.java new file mode 100644 index 0000000000000..e08ae5e26c420 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Cluster.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Cluster.java new file mode 100644 index 0000000000000..0cff268e02581 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Cluster.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_03_20.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 cluster size. + */ + @JsonProperty(value = "properties.clusterSize") + private Integer clusterSize; + + /** + * The state of the cluster provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "properties.provisioningState") + private ClusterProvisioningState provisioningState; + + /** + * 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 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 state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + * + * @return the provisioningState value + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + * + * @param provisioningState the provisioningState value to set + * @return the Cluster object itself. + */ + public Cluster withProvisioningState(ClusterProvisioningState provisioningState) { + this.provisioningState = provisioningState; + 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterProvisioningState.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterProvisioningState.java new file mode 100644 index 0000000000000..447d64f1b109c --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdate.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdate.java new file mode 100644 index 0000000000000..ea2f960bd5c78 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdateProperties.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdateProperties.java new file mode 100644 index 0000000000000..5d4d5fd8de140 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ClusterUpdateProperties.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_03_20.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a cluster that may be updated. + */ +public class ClusterUpdateProperties { + /** + * The cluster size. + */ + @JsonProperty(value = "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 ClusterUpdateProperties object itself. + */ + public ClusterUpdateProperties withClusterSize(Integer clusterSize) { + this.clusterSize = clusterSize; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Endpoints.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Endpoints.java new file mode 100644 index 0000000000000..63b6c5fd10f03 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorAdditionalInfo.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorAdditionalInfo.java new file mode 100644 index 0000000000000..3510ede6eead4 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorResponse.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorResponse.java new file mode 100644 index 0000000000000..fb12ed141d2d0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ErrorResponse.java @@ -0,0 +1,93 @@ +/** + * 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_03_20.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error response. + */ +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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorization.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorization.java new file mode 100644 index 0000000000000..f55b5d727b08d --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorizationProvisioningState.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ExpressRouteAuthorizationProvisioningState.java new file mode 100644 index 0000000000000..ec1b321087f3b --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSite.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSite.java new file mode 100644 index 0000000000000..01350a8998e00 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSiteStatus.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/HcxEnterpriseSiteStatus.java new file mode 100644 index 0000000000000..f3415467dba8b --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/IdentitySource.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/IdentitySource.java new file mode 100644 index 0000000000000..319e8f697161f --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/InternetEnum.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/InternetEnum.java new file mode 100644 index 0000000000000..33e1ce5a36d16 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/LogSpecification.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/LogSpecification.java new file mode 100644 index 0000000000000..f0bf937668ed9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ManagementCluster.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ManagementCluster.java new file mode 100644 index 0000000000000..0db1279045c85 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ManagementCluster.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_03_20.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a default cluster. + */ +public class ManagementCluster extends ClusterUpdateProperties { + /** + * The state of the cluster provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + */ + @JsonProperty(value = "provisioningState") + private ClusterProvisioningState provisioningState; + + /** + * 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; + } + + /** + * Set the state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating'. + * + * @param provisioningState the provisioningState value to set + * @return the ManagementCluster object itself. + */ + public ManagementCluster withProvisioningState(ClusterProvisioningState provisioningState) { + this.provisioningState = provisioningState; + 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricDimension.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricDimension.java new file mode 100644 index 0000000000000..26bef569b0adb --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricSpecification.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/MetricSpecification.java new file mode 100644 index 0000000000000..34b826b22ad1b --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Operation.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Operation.java new file mode 100644 index 0000000000000..1547447ad40c4 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationDisplay.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationDisplay.java new file mode 100644 index 0000000000000..13f10ab14f8e9 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationProperties.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/OperationProperties.java new file mode 100644 index 0000000000000..67d7d6101c58f --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PageImpl.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PageImpl.java new file mode 100644 index 0000000000000..1fe9ace55964e --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloud.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloud.java new file mode 100644 index 0000000000000..a076409b0255c --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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; + + /** + * 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; + + /** + * Optionally, set the vCenter admin password when the private cloud is + * created. + */ + @JsonProperty(value = "properties.vcenterPassword") + private String vcenterPassword; + + /** + * Optionally, set the NSX-T Manager password when the private cloud is + * created. + */ + @JsonProperty(value = "properties.nsxtPassword") + private String nsxtPassword; + + /** + * 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 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 optionally, set the vCenter admin password when the private cloud is created. + * + * @return the vcenterPassword value + */ + public String vcenterPassword() { + return this.vcenterPassword; + } + + /** + * Set optionally, set the vCenter admin password when the private cloud is created. + * + * @param vcenterPassword the vcenterPassword value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withVcenterPassword(String vcenterPassword) { + this.vcenterPassword = vcenterPassword; + return this; + } + + /** + * Get optionally, set the NSX-T Manager password when the private cloud is created. + * + * @return the nsxtPassword value + */ + public String nsxtPassword() { + return this.nsxtPassword; + } + + /** + * Set optionally, set the NSX-T Manager password when the private cloud is created. + * + * @param nsxtPassword the nsxtPassword value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withNsxtPassword(String nsxtPassword) { + this.nsxtPassword = nsxtPassword; + return this; + } + + /** + * 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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudProvisioningState.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudProvisioningState.java new file mode 100644 index 0000000000000..5c44ca36a0736 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudUpdate.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudUpdate.java new file mode 100644 index 0000000000000..d5c272246a311 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/PrivateCloudUpdate.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_03_20.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; + + /** + * 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; + } + +} diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Quota.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Quota.java new file mode 100644 index 0000000000000..01ece3ed07164 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/QuotaEnabled.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/QuotaEnabled.java new file mode 100644 index 0000000000000..2d37170ebb8e6 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ServiceSpecification.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/ServiceSpecification.java new file mode 100644 index 0000000000000..78c7ede11b61c --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Sku.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Sku.java new file mode 100644 index 0000000000000..7477a230879d0 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/SslEnum.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/SslEnum.java new file mode 100644 index 0000000000000..ec2565103cda6 --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Trial.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/Trial.java new file mode 100644 index 0000000000000..148883ba6fa2f --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/TrialStatus.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/TrialStatus.java new file mode 100644 index 0000000000000..83c413746124b --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.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_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/package-info.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/models/package-info.java new file mode 100644 index 0000000000000..396d3de6b4acc --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20.models; diff --git a/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/package-info.java b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/package-info.java new file mode 100644 index 0000000000000..fea2a390ea39a --- /dev/null +++ b/sdk/avs/mgmt-v2020_03_20/src/main/java/com/microsoft/azure/management/avs/v20200320/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_03_20;