From 734d46d06bef983551d001dfd198195b99a3a4c8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 10 Nov 2020 02:47:28 +0000 Subject: [PATCH] Generated from 30060f5b479356df87a4fe9682e1143c310e288a --- sdk/avs/mgmt-v2019_08_09_preview/pom.xml | 36 +- .../avs/v20190809preview/AvsClient.java | 129 ++ .../avs/v20190809preview/Clusters.java | 454 ++++++ .../avs/v20190809preview/Locations.java | 103 ++ .../avs/v20190809preview/Operations.java | 102 ++ .../avs/v20190809preview/PrivateClouds.java | 541 ++++++++ .../implementation/AvsClientImpl.java | 243 ++++ .../implementation/ClustersImpl.java | 974 +++++++++++++ .../implementation/LocationsImpl.java | 225 +++ .../implementation/OperationsImpl.java | 286 ++++ .../implementation/PrivateCloudsImpl.java | 1235 +++++++++++++++++ .../implementation/package-info.java | 11 + .../models/AdminCredentials.java | 77 + .../avs/v20190809preview/models/ApiError.java | 43 + .../v20190809preview/models/ApiErrorBase.java | 69 + .../models/ApiErrorException.java | 44 + .../avs/v20190809preview/models/Circuit.java | 104 ++ .../avs/v20190809preview/models/Cluster.java | 44 + .../models/ClusterProperties.java | 33 + .../models/ClusterProvisioningState.java | 47 + .../models/DefaultClusterProperties.java | 89 ++ .../v20190809preview/models/Endpoints.java | 47 + .../models/ExpressRouteAuthorization.java | 73 + .../models/IdentitySource.java | 280 ++++ .../v20190809preview/models/InternetEnum.java | 41 + .../models/LogSpecification.java | 95 ++ .../models/MetricDimension.java | 69 + .../models/MetricSpecification.java | 359 +++++ .../v20190809preview/models/Operation.java | 126 ++ .../models/OperationDisplay.java | 77 + .../models/OperationProperties.java | 43 + .../avs/v20190809preview/models/PageImpl.java | 75 + .../v20190809preview/models/PrivateCloud.java | 72 + .../models/PrivateCloudProperties.java | 328 +++++ .../models/PrivateCloudProvisioningState.java | 53 + .../avs/v20190809preview/models/Quota.java | 60 + .../v20190809preview/models/QuotaEnabled.java | 41 + .../models/ServiceSpecification.java | 70 + .../avs/v20190809preview/models/Sku.java | 43 + .../avs/v20190809preview/models/SslEnum.java | 41 + .../avs/v20190809preview/models/Trial.java | 48 + .../v20190809preview/models/package-info.java | 11 + .../avs/v20190809preview/package-info.java | 11 + 43 files changed, 6924 insertions(+), 28 deletions(-) create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/AvsClient.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Clusters.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Locations.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Operations.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/PrivateClouds.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/AvsClientImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/ClustersImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/LocationsImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/OperationsImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/PrivateCloudsImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/package-info.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/AdminCredentials.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiError.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorBase.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorException.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Circuit.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Cluster.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProperties.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProvisioningState.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/DefaultClusterProperties.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Endpoints.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ExpressRouteAuthorization.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/IdentitySource.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/InternetEnum.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/LogSpecification.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricDimension.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricSpecification.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Operation.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationDisplay.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationProperties.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PageImpl.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloud.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProperties.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProvisioningState.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Quota.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/QuotaEnabled.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ServiceSpecification.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Sku.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/SslEnum.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Trial.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/package-info.java create mode 100644 sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/package-info.java diff --git a/sdk/avs/mgmt-v2019_08_09_preview/pom.xml b/sdk/avs/mgmt-v2019_08_09_preview/pom.xml index 3c443679eb219..7419f6a2b47ec 100644 --- a/sdk/avs/mgmt-v2019_08_09_preview/pom.xml +++ b/sdk/avs/mgmt-v2019_08_09_preview/pom.xml @@ -7,18 +7,12 @@ --> 4.0.0 - com.microsoft.azure.avs.v2019_08_09_preview - - com.microsoft.azure - azure-arm-parent - 1.3.0 - ../../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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/AvsClient.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/AvsClient.java new file mode 100644 index 0000000000000..c4d70594149d8 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/AvsClient.java @@ -0,0 +1,129 @@ +/** + * 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.v2019_08_09_preview; + +import com.microsoft.azure.AzureClient; +import com.microsoft.rest.RestClient; + +/** + * The interface for AvsClient class. + */ +public interface AvsClient { + /** + * Gets the REST client. + * + * @return the {@link RestClient} object. + */ + RestClient restClient(); + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + AzureClient getAzureClient(); + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + String userAgent(); + + /** + * Gets Unique identifier for the Azure subscription. + * + * @return the subscriptionId value. + */ + String subscriptionId(); + + /** + * Sets Unique identifier for the Azure subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + AvsClient withSubscriptionId(String subscriptionId); + + /** + * Gets Version of Azure VMware Solution API to be used with the client request. + * + * @return the apiVersion value. + */ + String apiVersion(); + + /** + * 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(); + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Clusters.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Clusters.java new file mode 100644 index 0000000000000..1af2262a5b371 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Clusters.java @@ -0,0 +1,454 @@ +/** + * 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.v2019_08_09_preview; + +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.Cluster; +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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a 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 updateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable updateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a 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 beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster); + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Locations.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Locations.java new file mode 100644 index 0000000000000..426d3f98fd3c0 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview; + +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.Quota; +import com.microsoft.azure.management.avs.v20190809preview.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 ApiErrorException 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 ApiErrorException 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Operations.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/Operations.java new file mode 100644 index 0000000000000..c96ab5fba4a88 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview; + +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.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 ApiErrorException 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 ApiErrorException 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/PrivateClouds.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/PrivateClouds.java new file mode 100644 index 0000000000000..ddb82b3badff4 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/PrivateClouds.java @@ -0,0 +1,541 @@ +/** + * 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.v2019_08_09_preview; + +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.PrivateCloud; +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 Name of the resource group within the Azure subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure 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> listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback); + + /** + * List private clouds in a resource group. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 updateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 updateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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> beginUpdateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud); + + /** + * Delete a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 ApiErrorException 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/AvsClientImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/AvsClientImpl.java new file mode 100644 index 0000000000000..6d56f84c37f44 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/AvsClientImpl.java @@ -0,0 +1,243 @@ +/** + * 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.v2019_08_09_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.management.avs.v20190809preview.AvsClient; +import com.microsoft.azure.management.avs.v20190809preview.Clusters; +import com.microsoft.azure.management.avs.v20190809preview.Locations; +import com.microsoft.azure.management.avs.v20190809preview.Operations; +import com.microsoft.azure.management.avs.v20190809preview.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; + } + + /** Unique identifier for the Azure subscription. */ + private String subscriptionId; + + /** + * Gets Unique identifier for the Azure subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Unique identifier for the Azure subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public AvsClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Version of Azure VMware Solution API to be used with the client request. */ + private String apiVersion; + + /** + * Gets Version of Azure VMware Solution API to be used with the client request. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** 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; + } + + /** + * 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 = "2019-08-09-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsImpl(restClient().retrofit(), this); + this.locations = new LocationsImpl(restClient().retrofit(), this); + this.privateClouds = new PrivateCloudsImpl(restClient().retrofit(), this); + this.clusters = new ClustersImpl(restClient().retrofit(), this); + this.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", "2019-08-09-preview"); + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/ClustersImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/ClustersImpl.java new file mode 100644 index 0000000000000..d66501d5ef092 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/ClustersImpl.java @@ -0,0 +1,974 @@ +/** + * 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.v2019_08_09_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20190809preview.Clusters; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.Cluster; +import com.microsoft.azure.management.avs.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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 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.v20190809preview.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 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.v20190809preview.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.v20190809preview.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.v20190809preview.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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get a cluster by name in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, Cluster cluster) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).toBlocking().last().body(); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a 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 updateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster), serviceCallback); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(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.update(this.client.subscriptionId(), resourceGroupName, privateCloudName, clusterName, cluster, 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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, Cluster cluster) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).toBlocking().single().body(); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a 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 beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster), serviceCallback); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable beginUpdateAsync(String resourceGroupName, String privateCloudName, String clusterName, Cluster cluster) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster).map(new Func1, Cluster>() { + @Override + public Cluster call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in a private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Cluster object + */ + public Observable> beginUpdateWithServiceResponseAsync(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.beginUpdate(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 = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Delete a cluster in a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, 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(ApiErrorException.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/LocationsImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/LocationsImpl.java new file mode 100644 index 0000000000000..3ea99f61548e0 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20190809preview.Locations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.Quota; +import com.microsoft.azure.management.avs.v20190809preview.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.v20190809preview.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.v20190809preview.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Return quota for subscription by region. + * + * @param location Azure region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/OperationsImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..070d1c301615c --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20190809preview.Operations; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.Operation; +import com.microsoft.azure.management.avs.v20190809preview.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.v20190809preview.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.v20190809preview.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/PrivateCloudsImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/PrivateCloudsImpl.java new file mode 100644 index 0000000000000..eeed9486ae424 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/PrivateCloudsImpl.java @@ -0,0 +1,1235 @@ +/** + * 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.v2019_08_09_preview.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.avs.v20190809preview.PrivateClouds; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.avs.v20190809preview.models.AdminCredentials; +import com.microsoft.azure.management.avs.v20190809preview.models.ApiErrorException; +import com.microsoft.azure.management.avs.v20190809preview.models.PageImpl; +import com.microsoft.azure.management.avs.v20190809preview.models.PrivateCloud; +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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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 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.v20190809preview.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 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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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.v20190809preview.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 Name of the resource group within the Azure subscription + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * List private clouds in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, PrivateCloud privateCloud) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).toBlocking().last().body(); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 updateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud), serviceCallback); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 updateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return updateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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> updateWithServiceResponseAsync(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.update(this.client.subscriptionId(), resourceGroupName, privateCloudName, privateCloud, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @param privateCloud The private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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, PrivateCloud privateCloud) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).toBlocking().single().body(); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud), serviceCallback); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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 beginUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloud privateCloud) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, privateCloudName, privateCloud).map(new Func1, PrivateCloud>() { + @Override + public PrivateCloud call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @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> beginUpdateWithServiceResponseAsync(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.beginUpdate(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 = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Delete a private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, 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(ApiErrorException.class) + .build(response); + } + + /** + * List the admin credentials for the private cloud. + * + * @param resourceGroupName Name of the resource group within the Azure subscription + * @param privateCloudName Name of the private cloud + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException 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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 Name of the resource group within the Azure subscription + * @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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.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 ApiErrorException 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 ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/package-info.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/implementation/package-info.java new file mode 100644 index 0000000000000..b8e5818aea957 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.implementation; diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/AdminCredentials.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/AdminCredentials.java new file mode 100644 index 0000000000000..ce6b853551d11 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Administrative credentials for accessing vCenter and NSX-T. + */ +public class AdminCredentials { + /** + * NSX-T Manager username. + */ + @JsonProperty(value = "nsxtUsername", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtUsername; + + /** + * NSX-T Manager password. + */ + @JsonProperty(value = "nsxtPassword", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtPassword; + + /** + * vCenter admin username. + */ + @JsonProperty(value = "vcenterUsername", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterUsername; + + /** + * vCenter admin password. + */ + @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterPassword; + + /** + * Get nSX-T Manager username. + * + * @return the nsxtUsername value + */ + public String nsxtUsername() { + return this.nsxtUsername; + } + + /** + * Get nSX-T Manager password. + * + * @return the nsxtPassword value + */ + public String nsxtPassword() { + return this.nsxtPassword; + } + + /** + * Get vCenter admin username. + * + * @return the vcenterUsername value + */ + public String vcenterUsername() { + return this.vcenterUsername; + } + + /** + * Get vCenter admin password. + * + * @return the vcenterPassword value + */ + public String vcenterPassword() { + return this.vcenterPassword; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiError.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiError.java new file mode 100644 index 0000000000000..fec8b7cb93740 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiError.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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * API error response. + */ +public class ApiError { + /** + * An error returned by the API. + */ + @JsonProperty(value = "error") + private ApiErrorBase error; + + /** + * Get an error returned by the API. + * + * @return the error value + */ + public ApiErrorBase error() { + return this.error; + } + + /** + * Set an error returned by the API. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ApiErrorBase error) { + this.error = error; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorBase.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorBase.java new file mode 100644 index 0000000000000..9b836e0d6aec0 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorBase.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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Api error. + */ +public class ApiErrorBase { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ApiErrorBase object itself. + */ + public ApiErrorBase withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ApiErrorBase object itself. + */ + public ApiErrorBase withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorException.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorException.java new file mode 100644 index 0000000000000..db8b799fc5c36 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ApiErrorException.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.v2019_08_09_preview.models; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Circuit.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Circuit.java new file mode 100644 index 0000000000000..74010277051a5 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Circuit.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.avs.v2019_08_09_preview.models; + +import java.util.List; +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 (Microsoft Colo only). + */ + @JsonProperty(value = "expressRouteID", access = JsonProperty.Access.WRITE_ONLY) + private String expressRouteID; + + /** + * Authorizations for the ExpressRoute (Microsoft Colo only). + */ + @JsonProperty(value = "authorizations") + private List authorizations; + + /** + * ExpressRoute 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 (Microsoft Colo only). + * + * @return the expressRouteID value + */ + public String expressRouteID() { + return this.expressRouteID; + } + + /** + * Get authorizations for the ExpressRoute (Microsoft Colo only). + * + * @return the authorizations value + */ + public List authorizations() { + return this.authorizations; + } + + /** + * Set authorizations for the ExpressRoute (Microsoft Colo only). + * + * @param authorizations the authorizations value to set + * @return the Circuit object itself. + */ + public Circuit withAuthorizations(List authorizations) { + this.authorizations = authorizations; + return this; + } + + /** + * Get expressRoute private peering identifier. + * + * @return the expressRoutePrivatePeeringID value + */ + public String expressRoutePrivatePeeringID() { + return this.expressRoutePrivatePeeringID; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Cluster.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Cluster.java new file mode 100644 index 0000000000000..660a5f560182c --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Cluster.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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * A cluster resource. + */ +public class Cluster extends ProxyResource { + /** + * The properties of a cluster resource. + */ + @JsonProperty(value = "properties") + private ClusterProperties properties; + + /** + * Get the properties of a cluster resource. + * + * @return the properties value + */ + public ClusterProperties properties() { + return this.properties; + } + + /** + * Set the properties of a cluster resource. + * + * @param properties the properties value to set + * @return the Cluster object itself. + */ + public Cluster withProperties(ClusterProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProperties.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProperties.java new file mode 100644 index 0000000000000..8e952a27a02e5 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProperties.java @@ -0,0 +1,33 @@ +/** + * 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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a cluster. + */ +public class ClusterProperties extends DefaultClusterProperties { + /** + * The state of the cluster provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Cancelled', 'Updating'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /** + * Get the state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating'. + * + * @return the provisioningState value + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProvisioningState.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProvisioningState.java new file mode 100644 index 0000000000000..43d157d41502b --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ClusterProvisioningState.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.v2019_08_09_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ClusterProvisioningState. + */ +public final class ClusterProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ClusterProvisioningState. */ + public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ClusterProvisioningState. */ + public static final ClusterProvisioningState FAILED = fromString("Failed"); + + /** Static value Cancelled for ClusterProvisioningState. */ + public static final ClusterProvisioningState CANCELLED = fromString("Cancelled"); + + /** Static value 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/DefaultClusterProperties.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/DefaultClusterProperties.java new file mode 100644 index 0000000000000..dcb67118fc352 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/DefaultClusterProperties.java @@ -0,0 +1,89 @@ +/** + * 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.v2019_08_09_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a default cluster. + */ +public class DefaultClusterProperties { + /** + * The deprecated identity. + */ + @JsonProperty(value = "clusterID", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterID; + + /** + * The identity. + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /** + * The cluster size. + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /** + * The hosts. + */ + @JsonProperty(value = "hosts", access = JsonProperty.Access.WRITE_ONLY) + private List hosts; + + /** + * Get the deprecated identity. + * + * @return the clusterID value + */ + public Integer clusterID() { + return this.clusterID; + } + + /** + * Get the identity. + * + * @return the clusterId value + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * 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 DefaultClusterProperties object itself. + */ + public DefaultClusterProperties withClusterSize(Integer clusterSize) { + this.clusterSize = clusterSize; + return this; + } + + /** + * Get the hosts. + * + * @return the hosts value + */ + public List hosts() { + return this.hosts; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Endpoints.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Endpoints.java new file mode 100644 index 0000000000000..5bc97b8da08a1 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Endpoints.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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Endpoint addresses. + */ +public class Endpoints { + /** + * Endpoint for the NSX-T Data Center manager. + */ + @JsonProperty(value = "nsxtManager", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtManager; + + /** + * Endpoint for Virtual Center Server Appliance. + */ + @JsonProperty(value = "vcsa", access = JsonProperty.Access.WRITE_ONLY) + private String vcsa; + + /** + * 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; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ExpressRouteAuthorization.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ExpressRouteAuthorization.java new file mode 100644 index 0000000000000..61fc029cf9237 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ExpressRouteAuthorization.java @@ -0,0 +1,73 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.avs.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Authorization for an ExpressRoute. + */ +public class ExpressRouteAuthorization { + /** + * The name of the ExpressRoute. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The ID of the ExpressRoute. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The key of the ExpressRoute. + */ + @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) + private String key; + + /** + * Get the name of the ExpressRoute. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the ExpressRoute. + * + * @param name the name value to set + * @return the ExpressRouteAuthorization object itself. + */ + public ExpressRouteAuthorization withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ID of the ExpressRoute. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the key of the ExpressRoute. + * + * @return the key value + */ + public String key() { + return this.key; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/IdentitySource.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/IdentitySource.java new file mode 100644 index 0000000000000..fb53ace1264ec --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * vCenter Single Sign On Identity Source. + */ +public class IdentitySource { + /** + * The name of the identity source. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The domain's NetBIOS name. + */ + @JsonProperty(value = "alias") + private String alias; + + /** + * The domain's dns name. + */ + @JsonProperty(value = "domain") + private String domain; + + /** + * The base distinguished name for users. + */ + @JsonProperty(value = "baseUserDN") + private String baseUserDN; + + /** + * The base distinguished name for groups. + */ + @JsonProperty(value = "baseGroupDN") + private String baseGroupDN; + + /** + * Primary server URL. + */ + @JsonProperty(value = "primaryServer") + private String primaryServer; + + /** + * Secondary server URL. + */ + @JsonProperty(value = "secondaryServer") + private String secondaryServer; + + /** + * Protect LDAP communication using SSL certificate (LDAPS). Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "ssl") + private SslEnum ssl; + + /** + * The ID of an Active Directory user with a minimum of read-only access to + * Base DN for users and group. + */ + @JsonProperty(value = "username") + private String username; + + /** + * The password of the Active Directory user with a minimum of read-only + * access to Base DN for users and groups. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the name of the identity source. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the identity source. + * + * @param name the name value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the domain's NetBIOS name. + * + * @return the alias value + */ + public String alias() { + return this.alias; + } + + /** + * Set the domain's NetBIOS name. + * + * @param alias the alias value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withAlias(String alias) { + this.alias = alias; + return this; + } + + /** + * Get the domain's dns name. + * + * @return the domain value + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain's dns name. + * + * @param domain the domain value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the base distinguished name for users. + * + * @return the baseUserDN value + */ + public String baseUserDN() { + return this.baseUserDN; + } + + /** + * Set the base distinguished name for users. + * + * @param baseUserDN the baseUserDN value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withBaseUserDN(String baseUserDN) { + this.baseUserDN = baseUserDN; + return this; + } + + /** + * Get the base distinguished name for groups. + * + * @return the baseGroupDN value + */ + public String baseGroupDN() { + return this.baseGroupDN; + } + + /** + * Set the base distinguished name for groups. + * + * @param baseGroupDN the baseGroupDN value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withBaseGroupDN(String baseGroupDN) { + this.baseGroupDN = baseGroupDN; + return this; + } + + /** + * Get primary server URL. + * + * @return the primaryServer value + */ + public String primaryServer() { + return this.primaryServer; + } + + /** + * Set primary server URL. + * + * @param primaryServer the primaryServer value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withPrimaryServer(String primaryServer) { + this.primaryServer = primaryServer; + return this; + } + + /** + * Get secondary server URL. + * + * @return the secondaryServer value + */ + public String secondaryServer() { + return this.secondaryServer; + } + + /** + * Set secondary server URL. + * + * @param secondaryServer the secondaryServer value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withSecondaryServer(String secondaryServer) { + this.secondaryServer = secondaryServer; + return this; + } + + /** + * Get protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled'. + * + * @return the ssl value + */ + public SslEnum ssl() { + return this.ssl; + } + + /** + * Set protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled'. + * + * @param ssl the ssl value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withSsl(SslEnum ssl) { + this.ssl = ssl; + return this; + } + + /** + * Get the ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set the ID of an Active Directory user with a minimum of read-only access to Base DN for users and group. + * + * @param username the username value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set the password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * + * @param password the password value to set + * @return the IdentitySource object itself. + */ + public IdentitySource withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/InternetEnum.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/InternetEnum.java new file mode 100644 index 0000000000000..ef72dc4613265 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InternetEnum. + */ +public final class InternetEnum extends ExpandableStringEnum { + /** Static value Enabled for InternetEnum. */ + public static final InternetEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for InternetEnum. */ + public static final InternetEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a InternetEnum from its string representation. + * @param name a name to look for + * @return the corresponding InternetEnum + */ + @JsonCreator + public static InternetEnum fromString(String name) { + return fromString(name, InternetEnum.class); + } + + /** + * @return known InternetEnum values + */ + public static Collection values() { + return values(InternetEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/LogSpecification.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/LogSpecification.java new file mode 100644 index 0000000000000..55be2af11b2ea --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Log for Azure Monitoring. + */ +public class LogSpecification { + /** + * Name of the log. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the log. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Blob duration of the log. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get name of the log. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the log. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the log. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the log. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get blob duration of the log. + * + * @return the blobDuration value + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set blob duration of the log. + * + * @param blobDuration the blobDuration value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricDimension.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricDimension.java new file mode 100644 index 0000000000000..83187caef2e8d --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Dimension of metrics. + */ +public class MetricDimension { + /** + * Name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the dimension. + * + * @param name the name value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the dimension. + * + * @param displayName the displayName value to set + * @return the MetricDimension object itself. + */ + public MetricDimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricSpecification.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/MetricSpecification.java new file mode 100644 index 0000000000000..d6081864d3166 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +public class MetricSpecification { + /** + * Name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Localized friendly description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * Unit that makes sense for the metric. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Name of the metric category that the metric belongs to. A metric can + * only belong to a single category. + */ + @JsonProperty(value = "category") + private String category; + + /** + * Only provide one value for this field. Valid values: Average, Minimum, + * Maximum, Total, Count. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * Supported aggregation types. + */ + @JsonProperty(value = "supportedAggregationTypes") + private List supportedAggregationTypes; + + /** + * Supported time grain types. + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /** + * Optional. If set to true, then zero will be returned for time duration + * where no metric is emitted/published. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /** + * Dimensions of the metric. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Whether or not the service is using regional MDM accounts. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private String enableRegionalMdmAccount; + + /** + * The name of the MDM account. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /** + * The name of the MDM namespace. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /** + * Get name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get localized friendly description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set localized friendly description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get unit that makes sense for the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set unit that makes sense for the metric. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get supported aggregation types. + * + * @return the supportedAggregationTypes value + */ + public List supportedAggregationTypes() { + return this.supportedAggregationTypes; + } + + /** + * Set supported aggregation types. + * + * @param supportedAggregationTypes the supportedAggregationTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { + this.supportedAggregationTypes = supportedAggregationTypes; + return this; + } + + /** + * Get supported time grain types. + * + * @return the supportedTimeGrainTypes value + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set supported time grain types. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + + /** + * Get optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @return the fillGapWithZero value + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get dimensions of the metric. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set dimensions of the metric. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get whether or not the service is using regional MDM accounts. + * + * @return the enableRegionalMdmAccount value + */ + public String enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set whether or not the service is using regional MDM accounts. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(String enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get the name of the MDM account. + * + * @return the sourceMdmAccount value + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the name of the MDM account. + * + * @param sourceMdmAccount the sourceMdmAccount value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the name of the MDM namespace. + * + * @return the sourceMdmNamespace value + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the name of the MDM namespace. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Operation.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Operation.java new file mode 100644 index 0000000000000..8b4dda9e082ab --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A REST API operation. + */ +public class Operation { + /** + * Name of the operation being performed on this object. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Contains the localized display information for this operation. + */ + @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) + private OperationDisplay display; + + /** + * Gets or sets a value indicating whether the operation is a data action + * or not. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + + /** + * Origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Properties of the operation. + */ + @JsonProperty(value = "properties") + private OperationProperties properties; + + /** + * Get name of the operation being performed on this object. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get contains the localized display information for this operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get gets or sets a value indicating whether the operation is a data action or not. + * + * @return the isDataAction value + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set gets or sets a value indicating whether the operation is a data action or not. + * + * @param isDataAction the isDataAction value to set + * @return the Operation object itself. + */ + public Operation withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set origin of the operation. + * + * @param origin the origin value to set + * @return the Operation object itself. + */ + public Operation withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get properties of the operation. + * + * @return the properties value + */ + public OperationProperties properties() { + return this.properties; + } + + /** + * Set properties of the operation. + * + * @param properties the properties value to set + * @return the Operation object itself. + */ + public Operation withProperties(OperationProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationDisplay.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationDisplay.java new file mode 100644 index 0000000000000..8fa0f211a27ad --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the localized display information for this operation. + */ +public class OperationDisplay { + /** + * Localized friendly form of the resource provider name. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Localized friendly form of the resource type related to this operation. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * Localized friendly name for the operation. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Localized friendly description for the operation. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get localized friendly form of the resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get localized friendly form of the resource type related to this operation. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get localized friendly name for the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get localized friendly description for the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationProperties.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/OperationProperties.java new file mode 100644 index 0000000000000..9994d1a171ff2 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Extra Operation properties. + */ +public class OperationProperties { + /** + * Service specifications of the operation. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get service specifications of the operation. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set service specifications of the operation. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationProperties object itself. + */ + public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PageImpl.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PageImpl.java new file mode 100644 index 0000000000000..3b76372eae023 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloud.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloud.java new file mode 100644 index 0000000000000..9d3ac472ddebd --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloud.java @@ -0,0 +1,72 @@ +/** + * 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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A private cloud resource. + */ +@SkipParentValidation +public class PrivateCloud extends Resource { + /** + * The private cloud SKU. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * The properties of a private cloud resource. + */ + @JsonProperty(value = "properties") + private PrivateCloudProperties properties; + + /** + * 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 properties of a private cloud resource. + * + * @return the properties value + */ + public PrivateCloudProperties properties() { + return this.properties; + } + + /** + * Set the properties of a private cloud resource. + * + * @param properties the properties value to set + * @return the PrivateCloud object itself. + */ + public PrivateCloud withProperties(PrivateCloudProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProperties.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProperties.java new file mode 100644 index 0000000000000..cb20f7dddb4de --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProperties.java @@ -0,0 +1,328 @@ +/** + * 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.v2019_08_09_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a private cloud resource. + */ +public class PrivateCloudProperties { + /** + * The provisioning state. Possible values include: 'Succeeded', 'Failed', + * 'Cancelled', 'Pending', 'Building', 'Updating'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateCloudProvisioningState provisioningState; + + /** + * An ExpressRoute Circuit. + */ + @JsonProperty(value = "circuit") + private Circuit circuit; + + /** + * The default cluster used for management. + */ + @JsonProperty(value = "cluster") + private DefaultClusterProperties cluster; + + /** + * The clusters. + */ + @JsonProperty(value = "clusters", access = JsonProperty.Access.WRITE_ONLY) + private List clusters; + + /** + * The endpoints. + */ + @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) + private Endpoints endpoints; + + /** + * Connectivity to internet is enabled or disabled. Possible values + * include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "internet") + private InternetEnum internet; + + /** + * vCenter Single Sign On Identity Sources. + */ + @JsonProperty(value = "identitySources") + private List identitySources; + + /** + * 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 = "networkBlock") + private String networkBlock; + + /** + * Network used to access vCenter Server and NSX-T Manager. + */ + @JsonProperty(value = "managementNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String managementNetwork; + + /** + * Used for virtual machine cold migration, cloning, and snapshot + * migration. + */ + @JsonProperty(value = "provisioningNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningNetwork; + + /** + * Used for live migration of virtual machines. + */ + @JsonProperty(value = "vmotionNetwork", access = JsonProperty.Access.WRITE_ONLY) + private String vmotionNetwork; + + /** + * Optionally, set the vCenter admin password when the private cloud is + * created. + */ + @JsonProperty(value = "vcenterPassword") + private String vcenterPassword; + + /** + * Optionally, set the NSX-T Manager password when the private cloud is + * created. + */ + @JsonProperty(value = "nsxtPassword") + private String nsxtPassword; + + /** + * Thumbprint of the vCenter Server SSL certificate. + */ + @JsonProperty(value = "vcenterCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterCertificateThumbprint; + + /** + * Thumbprint of the NSX-T Manager SSL certificate. + */ + @JsonProperty(value = "nsxtCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtCertificateThumbprint; + + /** + * Get the provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', '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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withCircuit(Circuit circuit) { + this.circuit = circuit; + return this; + } + + /** + * Get the default cluster used for management. + * + * @return the cluster value + */ + public DefaultClusterProperties cluster() { + return this.cluster; + } + + /** + * Set the default cluster used for management. + * + * @param cluster the cluster value to set + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withCluster(DefaultClusterProperties cluster) { + this.cluster = cluster; + return this; + } + + /** + * Get the clusters. + * + * @return the clusters value + */ + public List clusters() { + return this.clusters; + } + + /** + * Get the endpoints. + * + * @return the endpoints value + */ + public Endpoints endpoints() { + return this.endpoints; + } + + /** + * 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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties 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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withIdentitySources(List identitySources) { + this.identitySources = identitySources; + return this; + } + + /** + * 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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties 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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties 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 PrivateCloudProperties object itself. + */ + public PrivateCloudProperties 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProvisioningState.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProvisioningState.java new file mode 100644 index 0000000000000..c2108b67d972a --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/PrivateCloudProvisioningState.java @@ -0,0 +1,53 @@ +/** + * 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.v2019_08_09_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateCloudProvisioningState. + */ +public final class PrivateCloudProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState FAILED = fromString("Failed"); + + /** Static value Cancelled for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState CANCELLED = fromString("Cancelled"); + + /** Static value Pending for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState PENDING = fromString("Pending"); + + /** Static value Building for PrivateCloudProvisioningState. */ + public static final PrivateCloudProvisioningState BUILDING = fromString("Building"); + + /** Static value 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Quota.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Quota.java new file mode 100644 index 0000000000000..06cd9b408c3f4 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Quota.java @@ -0,0 +1,60 @@ +/** + * 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.v2019_08_09_preview.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription quotas. + */ +public class Quota { + /** + * Remaining hosts quota by sku type. + */ + @JsonProperty(value = "hostsRemaining", access = JsonProperty.Access.WRITE_ONLY) + private Map hostsRemaining; + + /** + * Host quota is active for current subscription. Possible values include: + * 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "quotaEnabled") + 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; + } + + /** + * Set host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled'. + * + * @param quotaEnabled the quotaEnabled value to set + * @return the Quota object itself. + */ + public Quota withQuotaEnabled(QuotaEnabled quotaEnabled) { + this.quotaEnabled = quotaEnabled; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/QuotaEnabled.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/QuotaEnabled.java new file mode 100644 index 0000000000000..dd46002df4b0c --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for QuotaEnabled. + */ +public final class QuotaEnabled extends ExpandableStringEnum { + /** Static value Enabled for QuotaEnabled. */ + public static final QuotaEnabled ENABLED = fromString("Enabled"); + + /** Static value Disabled for QuotaEnabled. */ + public static final QuotaEnabled DISABLED = fromString("Disabled"); + + /** + * Creates or finds a QuotaEnabled from its string representation. + * @param name a name to look for + * @return the corresponding QuotaEnabled + */ + @JsonCreator + public static QuotaEnabled fromString(String name) { + return fromString(name, QuotaEnabled.class); + } + + /** + * @return known QuotaEnabled values + */ + public static Collection values() { + return values(QuotaEnabled.class); + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ServiceSpecification.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/ServiceSpecification.java new file mode 100644 index 0000000000000..8d7c0709e2b0d --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service specification payload. + */ +public class ServiceSpecification { + /** + * Specifications of the Log for Azure Monitoring. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Specifications of the Metrics for Azure Monitoring. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get specifications of the Log for Azure Monitoring. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set specifications of the Log for Azure Monitoring. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + + /** + * Get specifications of the Metrics for Azure Monitoring. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set specifications of the Metrics for Azure Monitoring. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Sku.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Sku.java new file mode 100644 index 0000000000000..7333f530db39c --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource model definition representing SKU. + */ +public class Sku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the Sku object itself. + */ + public Sku withName(String name) { + this.name = name; + return this; + } + +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/SslEnum.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/SslEnum.java new file mode 100644 index 0000000000000..93baba79e482e --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SslEnum. + */ +public final class SslEnum extends ExpandableStringEnum { + /** Static value Enabled for SslEnum. */ + public static final SslEnum ENABLED = fromString("Enabled"); + + /** Static value Disabled for SslEnum. */ + public static final SslEnum DISABLED = fromString("Disabled"); + + /** + * Creates or finds a SslEnum from its string representation. + * @param name a name to look for + * @return the corresponding SslEnum + */ + @JsonCreator + public static SslEnum fromString(String name) { + return fromString(name, SslEnum.class); + } + + /** + * @return known SslEnum values + */ + public static Collection values() { + return values(SslEnum.class); + } +} diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Trial.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/Trial.java new file mode 100644 index 0000000000000..fbff7f564a949 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Subscription trial availability. + */ +public class Trial { + /** + * Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', + * 'TrialDisabled'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String 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 String 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-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/package-info.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/models/package-info.java new file mode 100644 index 0000000000000..11092fd770966 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview.models; diff --git a/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/package-info.java b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/package-info.java new file mode 100644 index 0000000000000..4b1a9e580da85 --- /dev/null +++ b/sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v20190809preview/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.v2019_08_09_preview;