From e6b4f845620585f50a77562c01a302c42bb2f72b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Mar 2019 23:51:54 +0000 Subject: [PATCH] Generated from 27944089c215a1941a262c7b755d847c5fbf0b29 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into deoletim-adm-clientconfig --- .../v2018-09-01-preview/pom.xml | 133 +++ .../v2018-09-01-preview/ArtifactSource.java | 131 +++ .../ArtifactSourcePropertiesModel.java | 102 ++ .../v2018-09-01-preview/ArtifactSources.java | 23 + .../v2018-09-01-preview/Authentication.java | 24 + .../AzureEntityResource.java | 34 + .../v2018-09-01-preview/CloudErrorBody.java | 100 ++ .../v2018-09-01-preview/DeploymentMode.java | 53 + .../v2018-09-01-preview/Identity.java | 70 ++ .../v2018-09-01-preview/Message.java | 48 + .../v2018-09-01-preview/Operation.java | 40 + .../v2018-09-01-preview/OperationDetail.java | 121 +++ .../v2018-09-01-preview/Operations.java | 19 + .../v2018-09-01-preview/PrePostStep.java | 43 + .../ResourceOperation.java | 133 +++ .../v2018-09-01-preview/Rollout.java | 187 ++++ .../RolloutOperationInfo.java | 97 ++ .../RolloutPropertiesModel.java | 80 ++ .../v2018-09-01-preview/RolloutStep.java | 131 +++ .../v2018-09-01-preview/Rollouts.java | 45 + .../RolloutsCreateOrUpdateHeaders.java | 44 + .../SasAuthentication.java | 52 + .../ServiceProperties.java | 71 ++ .../v2018-09-01-preview/ServiceResource.java | 169 ++++ .../ServiceTopologies.java | 23 + .../ServiceTopologyProperties.java | 44 + .../ServiceTopologyResource.java | 97 ++ .../ServiceUnitArtifacts.java | 121 +++ .../ServiceUnitProperties.java | 97 ++ .../ServiceUnitResource.java | 199 ++++ .../v2018-09-01-preview/ServiceUnits.java | 45 + .../ServiceUnitsCreateOrUpdateHeaders.java | 44 + .../v2018-09-01-preview/Services.java | 43 + .../StepOperationInfo.java | 119 +++ .../v2018-09-01-preview/StepProperties.java | 24 + .../v2018-09-01-preview/StepResource.java | 85 ++ .../v2018-09-01-preview/Steps.java | 23 + .../WaitStepAttributes.java | 43 + .../WaitStepProperties.java | 47 + .../implementation/ArtifactSourceImpl.java | 80 ++ .../implementation/ArtifactSourceInner.java | 106 ++ .../implementation/ArtifactSourcesImpl.java | 88 ++ .../implementation/ArtifactSourcesInner.java | 425 ++++++++ .../AzureDeploymentManagerImpl.java | 280 ++++++ .../DeploymentManagerManager.java | 171 ++++ .../implementation/IdParsingUtils.java | 57 ++ .../implementation/OperationImpl.java | 52 + .../implementation/OperationInner.java | 122 +++ .../implementation/OperationsImpl.java | 68 ++ .../implementation/OperationsInner.java | 144 +++ .../implementation/PageImpl.java | 75 ++ .../implementation/RolloutImpl.java | 148 +++ .../implementation/RolloutInner.java | 216 ++++ .../implementation/RolloutRequestInner.java | 154 +++ .../implementation/RolloutsImpl.java | 113 +++ .../implementation/RolloutsInner.java | 947 ++++++++++++++++++ .../implementation/ServiceInner.java | 71 ++ .../implementation/ServiceResourceImpl.java | 139 +++ .../implementation/ServiceResourceInner.java | 74 ++ .../implementation/ServiceTopologiesImpl.java | 88 ++ .../ServiceTopologiesInner.java | 344 +++++++ .../ServiceTopologyResourceImpl.java | 57 ++ .../ServiceTopologyResourceInner.java | 47 + .../implementation/ServiceUnitInner.java | 72 ++ .../ServiceUnitResourceImpl.java | 155 +++ .../ServiceUnitResourceInner.java | 102 ++ .../implementation/ServiceUnitsImpl.java | 62 ++ .../implementation/ServiceUnitsInner.java | 485 +++++++++ .../implementation/ServicesImpl.java | 62 ++ .../implementation/ServicesInner.java | 363 +++++++ .../implementation/StepInner.java | 150 +++ .../implementation/StepResourceImpl.java | 58 ++ .../implementation/StepResourceInner.java | 45 + .../implementation/StepsImpl.java | 88 ++ .../implementation/StepsInner.java | 425 ++++++++ .../implementation/package-info.java | 11 + .../v2018-09-01-preview/package-info.java | 11 + 77 files changed, 9159 insertions(+) create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/pom.xml create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSourcePropertiesModel.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSources.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Authentication.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/AzureEntityResource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/CloudErrorBody.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/DeploymentMode.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Identity.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Message.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operation.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/OperationDetail.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operations.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/PrePostStep.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ResourceOperation.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollout.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutOperationInfo.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutPropertiesModel.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutStep.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollouts.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutsCreateOrUpdateHeaders.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/SasAuthentication.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceProperties.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceResource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologies.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyProperties.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyResource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitArtifacts.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitProperties.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitResource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnits.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitsCreateOrUpdateHeaders.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Services.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepOperationInfo.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepProperties.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepResource.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Steps.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepAttributes.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepProperties.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/AzureDeploymentManagerImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/DeploymentManagerManager.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/IdParsingUtils.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/PageImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutRequestInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsImpl.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsInner.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/package-info.java create mode 100644 deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/package-info.java diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/pom.xml b/deploymentmanager/resource-manager/v2018-09-01-preview/pom.xml new file mode 100644 index 0000000000000..f8b369bbc2348 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.deploymentmanager.v2018-09-01-preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-deploymentmanager + 1.0.0-beta + jar + Microsoft Azure SDK for DeploymentManager Management + This package contains Microsoft DeploymentManager Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSource.java new file mode 100644 index 0000000000000..3ce6bf78dca98 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSource.java @@ -0,0 +1,131 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ArtifactSourceInner; + +/** + * Type representing ArtifactSource. + */ +public interface ArtifactSource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the artifactRoot value. + */ + String artifactRoot(); + + /** + * @return the authentication value. + */ + Authentication authentication(); + + /** + * @return the sourceType value. + */ + String sourceType(); + + /** + * The entirety of the ArtifactSource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithAuthentication, DefinitionStages.WithSourceType, DefinitionStages.WithCreate { + } + + /** + * Grouping of ArtifactSource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ArtifactSource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ArtifactSource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the artifactsource definition allowing to specify Authentication. + */ + interface WithAuthentication { + /** + * Specifies authentication. + * @param authentication The authentication method to use to access the artifact source + * @return the next definition stage +*/ + WithSourceType withAuthentication(Authentication authentication); + } + + /** + * The stage of the artifactsource definition allowing to specify SourceType. + */ + interface WithSourceType { + /** + * Specifies sourceType. + * @param sourceType The type of artifact source used + * @return the next definition stage +*/ + WithCreate withSourceType(String sourceType); + } + + /** + * The stage of the artifactsource definition allowing to specify ArtifactRoot. + */ + interface WithArtifactRoot { + /** + * Specifies artifactRoot. + * @param artifactRoot The path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found + * @return the next definition stage + */ + WithCreate withArtifactRoot(String artifactRoot); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithArtifactRoot { + } + } + /** + * The template for a ArtifactSource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithArtifactRoot { + } + + /** + * Grouping of ArtifactSource update stages. + */ + interface UpdateStages { + /** + * The stage of the artifactsource update allowing to specify ArtifactRoot. + */ + interface WithArtifactRoot { + /** + * Specifies artifactRoot. + * @param artifactRoot The path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found + * @return the next update stage + */ + Update withArtifactRoot(String artifactRoot); + } + + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSourcePropertiesModel.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSourcePropertiesModel.java new file mode 100644 index 0000000000000..2f0b1390fbfc3 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSourcePropertiesModel.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define the source location where the artifacts are + * located. + */ +public class ArtifactSourcePropertiesModel { + /** + * The type of artifact source used. + */ + @JsonProperty(value = "sourceType", required = true) + private String sourceType; + + /** + * The path from the location that the 'authentication' property [say, a + * SAS URI to the blob container] refers to, to the location of the + * artifacts. This can be used to differentiate different versions of the + * artifacts. Or, different types of artifacts like binaries or templates. + * The location referenced by the authentication property concatenated with + * this optional artifactRoot path forms the artifact source location where + * the artifacts are expected to be found. + */ + @JsonProperty(value = "artifactRoot") + private String artifactRoot; + + /** + * The authentication method to use to access the artifact source. + */ + @JsonProperty(value = "authentication", required = true) + private Authentication authentication; + + /** + * Get the type of artifact source used. + * + * @return the sourceType value + */ + public String sourceType() { + return this.sourceType; + } + + /** + * Set the type of artifact source used. + * + * @param sourceType the sourceType value to set + * @return the ArtifactSourcePropertiesModel object itself. + */ + public ArtifactSourcePropertiesModel withSourceType(String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found. + * + * @return the artifactRoot value + */ + public String artifactRoot() { + return this.artifactRoot; + } + + /** + * Set the path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found. + * + * @param artifactRoot the artifactRoot value to set + * @return the ArtifactSourcePropertiesModel object itself. + */ + public ArtifactSourcePropertiesModel withArtifactRoot(String artifactRoot) { + this.artifactRoot = artifactRoot; + return this; + } + + /** + * Get the authentication method to use to access the artifact source. + * + * @return the authentication value + */ + public Authentication authentication() { + return this.authentication; + } + + /** + * Set the authentication method to use to access the artifact source. + * + * @param authentication the authentication value to set + * @return the ArtifactSourcePropertiesModel object itself. + */ + public ArtifactSourcePropertiesModel withAuthentication(Authentication authentication) { + this.authentication = authentication; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSources.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSources.java new file mode 100644 index 0000000000000..7e0cb56563af0 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ArtifactSources.java @@ -0,0 +1,23 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ArtifactSourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ArtifactSources. + */ +public interface ArtifactSources extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Authentication.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Authentication.java new file mode 100644 index 0000000000000..b33e68531f9e4 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Authentication.java @@ -0,0 +1,24 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Defines the authentication method and properties to access the artifacts. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Authentication") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Sas", value = SasAuthentication.class) +}) +public class Authentication { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/AzureEntityResource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/AzureEntityResource.java new file mode 100644 index 0000000000000..9ed1cb3a72f78 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/AzureEntityResource.java @@ -0,0 +1,34 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * The resource model definition for a Azure Resource Manager resource with an + * etag. + */ +public class AzureEntityResource extends ProxyResource { + /** + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource Etag. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/CloudErrorBody.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/CloudErrorBody.java new file mode 100644 index 0000000000000..353fb70bcd295 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/CloudErrorBody.java @@ -0,0 +1,100 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Detailed error information of any failure. + */ +public class CloudErrorBody { + /** + * Error code string. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Descriptive error information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Error target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * More detailed error information. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get error code string. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get descriptive error information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set error target. + * + * @param target the target value to set + * @return the CloudErrorBody object itself. + */ + public CloudErrorBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get more detailed error information. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set more detailed error information. + * + * @param details the details value to set + * @return the CloudErrorBody object itself. + */ + public CloudErrorBody withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/DeploymentMode.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/DeploymentMode.java new file mode 100644 index 0000000000000..eab41933f3bb8 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/DeploymentMode.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DeploymentMode. + */ +public enum DeploymentMode { + /** Enum value Incremental. */ + INCREMENTAL("Incremental"), + + /** Enum value Complete. */ + COMPLETE("Complete"); + + /** The actual serialized value for a DeploymentMode instance. */ + private String value; + + DeploymentMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DeploymentMode instance. + * + * @param value the serialized value to parse. + * @return the parsed DeploymentMode object, or null if unable to parse. + */ + @JsonCreator + public static DeploymentMode fromString(String value) { + DeploymentMode[] items = DeploymentMode.values(); + for (DeploymentMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Identity.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Identity.java new file mode 100644 index 0000000000000..ed34e3bbf96e6 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Identity.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.deploymentmanager.v2018-09-01-preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class Identity { + /** + * The identity type. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * The list of identities. + */ + @JsonProperty(value = "identityIds", required = true) + private List identityIds; + + /** + * Get the identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the identity type. + * + * @param type the type value to set + * @return the Identity object itself. + */ + public Identity withType(String type) { + this.type = type; + return this; + } + + /** + * Get the list of identities. + * + * @return the identityIds value + */ + public List identityIds() { + return this.identityIds; + } + + /** + * Set the list of identities. + * + * @param identityIds the identityIds value to set + * @return the Identity object itself. + */ + public Identity withIdentityIds(List identityIds) { + this.identityIds = identityIds; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Message.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Message.java new file mode 100644 index 0000000000000..9edd974c57463 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Message.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.deploymentmanager.v2018-09-01-preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Supplementary contextual messages during a rollout. + */ +public class Message { + /** + * Time in UTC this message was provided. + */ + @JsonProperty(value = "timeStamp", access = JsonProperty.Access.WRITE_ONLY) + private DateTime timeStamp; + + /** + * The actual message text. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get time in UTC this message was provided. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Get the actual message text. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operation.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operation.java new file mode 100644 index 0000000000000..7cd29730fea85 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operation.java @@ -0,0 +1,40 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.OperationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDetail display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/OperationDetail.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/OperationDetail.java new file mode 100644 index 0000000000000..27ae4f835f452 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/OperationDetail.java @@ -0,0 +1,121 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The detail about an operation. + */ +public class OperationDetail { + /** + * The name of the provider that supports the operation. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The resource type on which this operation can be performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The name of the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The description of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the name of the provider that supports the operation. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the name of the provider that supports the operation. + * + * @param provider the provider value to set + * @return the OperationDetail object itself. + */ + public OperationDetail withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource type on which this operation can be performed. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource type on which this operation can be performed. + * + * @param resource the resource value to set + * @return the OperationDetail object itself. + */ + public OperationDetail withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the name of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the name of the operation. + * + * @param operation the operation value to set + * @return the OperationDetail object itself. + */ + public OperationDetail withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description of the operation. + * + * @param description the description value to set + * @return the OperationDetail object itself. + */ + public OperationDetail withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operations.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operations.java new file mode 100644 index 0000000000000..3cabaa8037679 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Operations.java @@ -0,0 +1,19 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends SupportsListing, HasInner { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/PrePostStep.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/PrePostStep.java new file mode 100644 index 0000000000000..f65ea72530767 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/PrePostStep.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define a step. + */ +public class PrePostStep { + /** + * The resource Id of the step to be run. + */ + @JsonProperty(value = "stepId", required = true) + private String stepId; + + /** + * Get the resource Id of the step to be run. + * + * @return the stepId value + */ + public String stepId() { + return this.stepId; + } + + /** + * Set the resource Id of the step to be run. + * + * @param stepId the stepId value to set + * @return the PrePostStep object itself. + */ + public PrePostStep withStepId(String stepId) { + this.stepId = stepId; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ResourceOperation.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ResourceOperation.java new file mode 100644 index 0000000000000..d2c43571822b3 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ResourceOperation.java @@ -0,0 +1,133 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Individual resource operation information. + */ +public class ResourceOperation { + /** + * Name of the resource as specified in the artifacts. For ARM resources, + * this is the name of the resource specified in the template. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Unique identifier of the operation. For ARM resources, this is the + * operationId obtained from ARM service. + */ + @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /** + * Type of the resource as specified in the artifacts. For ARM resources, + * this is the type of the resource specified in the template. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * State of the resource deployment. For ARM resources, this is the current + * provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Descriptive information of the resource operation. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Http status code of the operation. + */ + @JsonProperty(value = "statusCode", access = JsonProperty.Access.WRITE_ONLY) + private String statusCode; + + /** + * Get name of the resource as specified in the artifacts. For ARM resources, this is the name of the resource specified in the template. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set name of the resource as specified in the artifacts. For ARM resources, this is the name of the resource specified in the template. + * + * @param resourceName the resourceName value to set + * @return the ResourceOperation object itself. + */ + public ResourceOperation withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get unique identifier of the operation. For ARM resources, this is the operationId obtained from ARM service. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Get type of the resource as specified in the artifacts. For ARM resources, this is the type of the resource specified in the template. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set type of the resource as specified in the artifacts. For ARM resources, this is the type of the resource specified in the template. + * + * @param resourceType the resourceType value to set + * @return the ResourceOperation object itself. + */ + public ResourceOperation withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get state of the resource deployment. For ARM resources, this is the current provisioning state of the resource. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get descriptive information of the resource operation. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get http status code of the operation. + * + * @return the statusCode value + */ + public String statusCode() { + return this.statusCode; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollout.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollout.java new file mode 100644 index 0000000000000..6de5da07b4927 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollout.java @@ -0,0 +1,187 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.StepInner; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.RolloutInner; + +/** + * Type representing Rollout. + */ +public interface Rollout extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the artifactSourceId value. + */ + String artifactSourceId(); + + /** + * @return the buildVersion value. + */ + String buildVersion(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the operationInfo value. + */ + RolloutOperationInfo operationInfo(); + + /** + * @return the services value. + */ + List services(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the stepGroups value. + */ + List stepGroups(); + + /** + * @return the targetServiceTopologyId value. + */ + String targetServiceTopologyId(); + + /** + * @return the totalRetryAttempts value. + */ + Integer totalRetryAttempts(); + + /** + * The entirety of the Rollout definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithBuildVersion, DefinitionStages.WithIdentity, DefinitionStages.WithStepGroups, DefinitionStages.WithTargetServiceTopologyId, DefinitionStages.WithCreate { + } + + /** + * Grouping of Rollout definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Rollout definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Rollout definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the rollout definition allowing to specify BuildVersion. + */ + interface WithBuildVersion { + /** + * Specifies buildVersion. + * @param buildVersion The version of the build being deployed + * @return the next definition stage +*/ + WithIdentity withBuildVersion(String buildVersion); + } + + /** + * The stage of the rollout definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity Identity for the resource + * @return the next definition stage +*/ + WithStepGroups withIdentity(Identity identity); + } + + /** + * The stage of the rollout definition allowing to specify StepGroups. + */ + interface WithStepGroups { + /** + * Specifies stepGroups. + * @param stepGroups The list of step groups that define the orchestration + * @return the next definition stage +*/ + WithTargetServiceTopologyId withStepGroups(List stepGroups); + } + + /** + * The stage of the rollout definition allowing to specify TargetServiceTopologyId. + */ + interface WithTargetServiceTopologyId { + /** + * Specifies targetServiceTopologyId. + * @param targetServiceTopologyId The resource Id of the service topology from which service units are being referenced in step groups to be deployed + * @return the next definition stage +*/ + WithCreate withTargetServiceTopologyId(String targetServiceTopologyId); + } + + /** + * The stage of the rollout definition allowing to specify ArtifactSourceId. + */ + interface WithArtifactSourceId { + /** + * Specifies artifactSourceId. + * @param artifactSourceId The reference to the artifact source resource Id where the payload is located + * @return the next definition stage + */ + WithCreate withArtifactSourceId(String artifactSourceId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithArtifactSourceId { + } + } + /** + * The template for a Rollout update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithArtifactSourceId { + } + + /** + * Grouping of Rollout update stages. + */ + interface UpdateStages { + /** + * The stage of the rollout update allowing to specify ArtifactSourceId. + */ + interface WithArtifactSourceId { + /** + * Specifies artifactSourceId. + * @param artifactSourceId The reference to the artifact source resource Id where the payload is located + * @return the next update stage + */ + Update withArtifactSourceId(String artifactSourceId); + } + + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutOperationInfo.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutOperationInfo.java new file mode 100644 index 0000000000000..b5165476c64d1 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutOperationInfo.java @@ -0,0 +1,97 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Detailed runtime information of the rollout. + */ +public class RolloutOperationInfo { + /** + * The ordinal count of the number of retry attempts on a rollout. 0 if no + * retries of the rollout have been performed. If the rollout is updated + * with a PUT, this count is reset to 0. + */ + @JsonProperty(value = "retryAttempt", access = JsonProperty.Access.WRITE_ONLY) + private Integer retryAttempt; + + /** + * True, if all steps that succeeded on the previous run/attempt were + * chosen to be skipped in this retry attempt. False, otherwise. + */ + @JsonProperty(value = "skipSucceededOnRetry", access = JsonProperty.Access.WRITE_ONLY) + private Boolean skipSucceededOnRetry; + + /** + * The start time of the rollout in UTC. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * The start time of the rollout in UTC. This property will not be set if + * the rollout has not completed yet. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * The detailed error information for any failure. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private CloudErrorBody error; + + /** + * Get the ordinal count of the number of retry attempts on a rollout. 0 if no retries of the rollout have been performed. If the rollout is updated with a PUT, this count is reset to 0. + * + * @return the retryAttempt value + */ + public Integer retryAttempt() { + return this.retryAttempt; + } + + /** + * Get true, if all steps that succeeded on the previous run/attempt were chosen to be skipped in this retry attempt. False, otherwise. + * + * @return the skipSucceededOnRetry value + */ + public Boolean skipSucceededOnRetry() { + return this.skipSucceededOnRetry; + } + + /** + * Get the start time of the rollout in UTC. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the start time of the rollout in UTC. This property will not be set if the rollout has not completed yet. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get the detailed error information for any failure. + * + * @return the error value + */ + public CloudErrorBody error() { + return this.error; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutPropertiesModel.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutPropertiesModel.java new file mode 100644 index 0000000000000..935cee0b47911 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutPropertiesModel.java @@ -0,0 +1,80 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the properties of a rollout. + */ +public class RolloutPropertiesModel { + /** + * The current status of the rollout. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * The cardinal count of total number of retries performed on the rollout + * at a given time. + */ + @JsonProperty(value = "totalRetryAttempts", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalRetryAttempts; + + /** + * Operational information of the rollout. + */ + @JsonProperty(value = "operationInfo", access = JsonProperty.Access.WRITE_ONLY) + private RolloutOperationInfo operationInfo; + + /** + * The detailed information on the services being deployed. + */ + @JsonProperty(value = "services", access = JsonProperty.Access.WRITE_ONLY) + private List services; + + /** + * Get the current status of the rollout. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Get the cardinal count of total number of retries performed on the rollout at a given time. + * + * @return the totalRetryAttempts value + */ + public Integer totalRetryAttempts() { + return this.totalRetryAttempts; + } + + /** + * Get operational information of the rollout. + * + * @return the operationInfo value + */ + public RolloutOperationInfo operationInfo() { + return this.operationInfo; + } + + /** + * Get the detailed information on the services being deployed. + * + * @return the services value + */ + public List services() { + return this.services; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutStep.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutStep.java new file mode 100644 index 0000000000000..7a69d9b447152 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutStep.java @@ -0,0 +1,131 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines a specific step on a target service unit. + */ +public class RolloutStep { + /** + * Name of the step. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Current state of the step. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * The step group the current step is part of. + */ + @JsonProperty(value = "stepGroup") + private String stepGroup; + + /** + * Detailed information of specific action execution. + */ + @JsonProperty(value = "operationInfo", access = JsonProperty.Access.WRITE_ONLY) + private StepOperationInfo operationInfo; + + /** + * Set of resource operations that were performed, if any, on an Azure + * resource. + */ + @JsonProperty(value = "resourceOperations", access = JsonProperty.Access.WRITE_ONLY) + private List resourceOperations; + + /** + * Supplementary informative messages during rollout. + */ + @JsonProperty(value = "messages", access = JsonProperty.Access.WRITE_ONLY) + private List messages; + + /** + * Get name of the step. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the step. + * + * @param name the name value to set + * @return the RolloutStep object itself. + */ + public RolloutStep withName(String name) { + this.name = name; + return this; + } + + /** + * Get current state of the step. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Get the step group the current step is part of. + * + * @return the stepGroup value + */ + public String stepGroup() { + return this.stepGroup; + } + + /** + * Set the step group the current step is part of. + * + * @param stepGroup the stepGroup value to set + * @return the RolloutStep object itself. + */ + public RolloutStep withStepGroup(String stepGroup) { + this.stepGroup = stepGroup; + return this; + } + + /** + * Get detailed information of specific action execution. + * + * @return the operationInfo value + */ + public StepOperationInfo operationInfo() { + return this.operationInfo; + } + + /** + * Get set of resource operations that were performed, if any, on an Azure resource. + * + * @return the resourceOperations value + */ + public List resourceOperations() { + return this.resourceOperations; + } + + /** + * Get supplementary informative messages during rollout. + * + * @return the messages value + */ + public List messages() { + return this.messages; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollouts.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollouts.java new file mode 100644 index 0000000000000..171cdd963d441 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Rollouts.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.RolloutsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Rollouts. + */ +public interface Rollouts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { + /** + * Stops a running rollout. + * Only running rollouts can be canceled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelAsync(String resourceGroupName, String rolloutName); + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable restartAsync(String resourceGroupName, String rolloutName); + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutsCreateOrUpdateHeaders.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutsCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..278ad00b35306 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/RolloutsCreateOrUpdateHeaders.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for CreateOrUpdate operation. + */ +public class RolloutsCreateOrUpdateHeaders { + /** + * Contains the status URL on which clients are expected to poll the status + * of the operation. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get contains the status URL on which clients are expected to poll the status of the operation. + * + * @return the azureAsyncOperation value + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set contains the status URL on which clients are expected to poll the status of the operation. + * + * @param azureAsyncOperation the azureAsyncOperation value to set + * @return the RolloutsCreateOrUpdateHeaders object itself. + */ + public RolloutsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/SasAuthentication.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/SasAuthentication.java new file mode 100644 index 0000000000000..475a3c2753009 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/SasAuthentication.java @@ -0,0 +1,52 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Defines the properties to access the artifacts using an Azure Storage SAS + * URI. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Sas") +@JsonFlatten +public class SasAuthentication extends Authentication { + /** + * The SAS URI to the Azure Storage blob container. Any offset from the + * root of the container to where the artifacts are located can be defined + * in the artifactRoot. + */ + @JsonProperty(value = "properties.sasUri", required = true) + private String sasUri; + + /** + * Get the SAS URI to the Azure Storage blob container. Any offset from the root of the container to where the artifacts are located can be defined in the artifactRoot. + * + * @return the sasUri value + */ + public String sasUri() { + return this.sasUri; + } + + /** + * Set the SAS URI to the Azure Storage blob container. Any offset from the root of the container to where the artifacts are located can be defined in the artifactRoot. + * + * @param sasUri the sasUri value to set + * @return the SasAuthentication object itself. + */ + public SasAuthentication withSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceProperties.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceProperties.java new file mode 100644 index 0000000000000..0b21b46fa8911 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceProperties.java @@ -0,0 +1,71 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a service. + */ +public class ServiceProperties { + /** + * The Azure location to which the resources in the service belong to or + * should be deployed to. + */ + @JsonProperty(value = "targetLocation", required = true) + private String targetLocation; + + /** + * The subscription to which the resources in the service belong to or + * should be deployed to. + */ + @JsonProperty(value = "targetSubscriptionId", required = true) + private String targetSubscriptionId; + + /** + * Get the Azure location to which the resources in the service belong to or should be deployed to. + * + * @return the targetLocation value + */ + public String targetLocation() { + return this.targetLocation; + } + + /** + * Set the Azure location to which the resources in the service belong to or should be deployed to. + * + * @param targetLocation the targetLocation value to set + * @return the ServiceProperties object itself. + */ + public ServiceProperties withTargetLocation(String targetLocation) { + this.targetLocation = targetLocation; + return this; + } + + /** + * Get the subscription to which the resources in the service belong to or should be deployed to. + * + * @return the targetSubscriptionId value + */ + public String targetSubscriptionId() { + return this.targetSubscriptionId; + } + + /** + * Set the subscription to which the resources in the service belong to or should be deployed to. + * + * @param targetSubscriptionId the targetSubscriptionId value to set + * @return the ServiceProperties object itself. + */ + public ServiceProperties withTargetSubscriptionId(String targetSubscriptionId) { + this.targetSubscriptionId = targetSubscriptionId; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceResource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceResource.java new file mode 100644 index 0000000000000..279ab51cb3570 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceResource.java @@ -0,0 +1,169 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import java.util.Map; + +/** + * Type representing ServiceResource. + */ +public interface ServiceResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetLocation value. + */ + String targetLocation(); + + /** + * @return the targetSubscriptionId value. + */ + String targetSubscriptionId(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ServiceResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithServiceTopology, DefinitionStages.WithLocation, DefinitionStages.WithTargetLocation, DefinitionStages.WithTargetSubscriptionId, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceResource definition. + */ + interface Blank extends WithServiceTopology { + } + + /** + * The stage of the serviceresource definition allowing to specify ServiceTopology. + */ + interface WithServiceTopology { + /** + * Specifies resourceGroupName, serviceTopologyName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param serviceTopologyName The name of the service topology + * @return the next definition stage + */ + WithLocation withExistingServiceTopology(String resourceGroupName, String serviceTopologyName); + } + + /** + * The stage of the serviceresource definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location The geo-location where the resource lives + * @return the next definition stage + */ + WithTargetLocation withLocation(String location); + } + + /** + * The stage of the serviceresource definition allowing to specify TargetLocation. + */ + interface WithTargetLocation { + /** + * Specifies targetLocation. + * @param targetLocation The Azure location to which the resources in the service belong to or should be deployed to + * @return the next definition stage + */ + WithTargetSubscriptionId withTargetLocation(String targetLocation); + } + + /** + * The stage of the serviceresource definition allowing to specify TargetSubscriptionId. + */ + interface WithTargetSubscriptionId { + /** + * Specifies targetSubscriptionId. + * @param targetSubscriptionId The subscription to which the resources in the service belong to or should be deployed to + * @return the next definition stage + */ + WithCreate withTargetSubscriptionId(String targetSubscriptionId); + } + + /** + * The stage of the serviceresource definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithTags { + } + } + /** + * The template for a ServiceResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithTags { + } + + /** + * Grouping of ServiceResource update stages. + */ + interface UpdateStages { + /** + * The stage of the serviceresource update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologies.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologies.java new file mode 100644 index 0000000000000..e5e9d71873d21 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologies.java @@ -0,0 +1,23 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceTopologiesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceTopologies. + */ +public interface ServiceTopologies extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyProperties.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyProperties.java new file mode 100644 index 0000000000000..fb122513cfb0d --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyProperties.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a service topology. + */ +public class ServiceTopologyProperties { + /** + * The resource Id of the artifact source that contains the artifacts that + * can be referenced in the service units. + */ + @JsonProperty(value = "artifactSourceId") + private String artifactSourceId; + + /** + * Get the resource Id of the artifact source that contains the artifacts that can be referenced in the service units. + * + * @return the artifactSourceId value + */ + public String artifactSourceId() { + return this.artifactSourceId; + } + + /** + * Set the resource Id of the artifact source that contains the artifacts that can be referenced in the service units. + * + * @param artifactSourceId the artifactSourceId value to set + * @return the ServiceTopologyProperties object itself. + */ + public ServiceTopologyProperties withArtifactSourceId(String artifactSourceId) { + this.artifactSourceId = artifactSourceId; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyResource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyResource.java new file mode 100644 index 0000000000000..6a0e4063ab9a5 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceTopologyResource.java @@ -0,0 +1,97 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceTopologyResourceInner; + +/** + * Type representing ServiceTopologyResource. + */ +public interface ServiceTopologyResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the artifactSourceId value. + */ + String artifactSourceId(); + + /** + * The entirety of the ServiceTopologyResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceTopologyResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceTopologyResource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the ServiceTopologyResource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the servicetopologyresource definition allowing to specify ArtifactSourceId. + */ + interface WithArtifactSourceId { + /** + * Specifies artifactSourceId. + * @param artifactSourceId The resource Id of the artifact source that contains the artifacts that can be referenced in the service units + * @return the next definition stage + */ + WithCreate withArtifactSourceId(String artifactSourceId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithArtifactSourceId { + } + } + /** + * The template for a ServiceTopologyResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithArtifactSourceId { + } + + /** + * Grouping of ServiceTopologyResource update stages. + */ + interface UpdateStages { + /** + * The stage of the servicetopologyresource update allowing to specify ArtifactSourceId. + */ + interface WithArtifactSourceId { + /** + * Specifies artifactSourceId. + * @param artifactSourceId The resource Id of the artifact source that contains the artifacts that can be referenced in the service units + * @return the next update stage + */ + Update withArtifactSourceId(String artifactSourceId); + } + + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitArtifacts.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitArtifacts.java new file mode 100644 index 0000000000000..9037b154dbac5 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitArtifacts.java @@ -0,0 +1,121 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the artifacts of a service unit. + */ +public class ServiceUnitArtifacts { + /** + * The full URI of the ARM template file with the SAS token. + */ + @JsonProperty(value = "templateUri") + private String templateUri; + + /** + * The full URI of the ARM parameters file with the SAS token. + */ + @JsonProperty(value = "parametersUri") + private String parametersUri; + + /** + * The path to the ARM template file relative to the artifact source. + */ + @JsonProperty(value = "templateArtifactSourceRelativePath") + private String templateArtifactSourceRelativePath; + + /** + * The path to the ARM parameters file relative to the artifact source. + */ + @JsonProperty(value = "parametersArtifactSourceRelativePath") + private String parametersArtifactSourceRelativePath; + + /** + * Get the full URI of the ARM template file with the SAS token. + * + * @return the templateUri value + */ + public String templateUri() { + return this.templateUri; + } + + /** + * Set the full URI of the ARM template file with the SAS token. + * + * @param templateUri the templateUri value to set + * @return the ServiceUnitArtifacts object itself. + */ + public ServiceUnitArtifacts withTemplateUri(String templateUri) { + this.templateUri = templateUri; + return this; + } + + /** + * Get the full URI of the ARM parameters file with the SAS token. + * + * @return the parametersUri value + */ + public String parametersUri() { + return this.parametersUri; + } + + /** + * Set the full URI of the ARM parameters file with the SAS token. + * + * @param parametersUri the parametersUri value to set + * @return the ServiceUnitArtifacts object itself. + */ + public ServiceUnitArtifacts withParametersUri(String parametersUri) { + this.parametersUri = parametersUri; + return this; + } + + /** + * Get the path to the ARM template file relative to the artifact source. + * + * @return the templateArtifactSourceRelativePath value + */ + public String templateArtifactSourceRelativePath() { + return this.templateArtifactSourceRelativePath; + } + + /** + * Set the path to the ARM template file relative to the artifact source. + * + * @param templateArtifactSourceRelativePath the templateArtifactSourceRelativePath value to set + * @return the ServiceUnitArtifacts object itself. + */ + public ServiceUnitArtifacts withTemplateArtifactSourceRelativePath(String templateArtifactSourceRelativePath) { + this.templateArtifactSourceRelativePath = templateArtifactSourceRelativePath; + return this; + } + + /** + * Get the path to the ARM parameters file relative to the artifact source. + * + * @return the parametersArtifactSourceRelativePath value + */ + public String parametersArtifactSourceRelativePath() { + return this.parametersArtifactSourceRelativePath; + } + + /** + * Set the path to the ARM parameters file relative to the artifact source. + * + * @param parametersArtifactSourceRelativePath the parametersArtifactSourceRelativePath value to set + * @return the ServiceUnitArtifacts object itself. + */ + public ServiceUnitArtifacts withParametersArtifactSourceRelativePath(String parametersArtifactSourceRelativePath) { + this.parametersArtifactSourceRelativePath = parametersArtifactSourceRelativePath; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitProperties.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitProperties.java new file mode 100644 index 0000000000000..976f9a7ad8ae3 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitProperties.java @@ -0,0 +1,97 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the properties of a service unit. + */ +public class ServiceUnitProperties { + /** + * The Azure Resource Group to which the resources in the service unit + * belong to or should be deployed to. + */ + @JsonProperty(value = "targetResourceGroup", required = true) + private String targetResourceGroup; + + /** + * Describes the type of ARM deployment to be performed on the resource. + * Possible values include: 'Incremental', 'Complete'. + */ + @JsonProperty(value = "deploymentMode", required = true) + private DeploymentMode deploymentMode; + + /** + * The artifacts for the service unit. + */ + @JsonProperty(value = "artifacts") + private ServiceUnitArtifacts artifacts; + + /** + * Get the Azure Resource Group to which the resources in the service unit belong to or should be deployed to. + * + * @return the targetResourceGroup value + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Set the Azure Resource Group to which the resources in the service unit belong to or should be deployed to. + * + * @param targetResourceGroup the targetResourceGroup value to set + * @return the ServiceUnitProperties object itself. + */ + public ServiceUnitProperties withTargetResourceGroup(String targetResourceGroup) { + this.targetResourceGroup = targetResourceGroup; + return this; + } + + /** + * Get describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete'. + * + * @return the deploymentMode value + */ + public DeploymentMode deploymentMode() { + return this.deploymentMode; + } + + /** + * Set describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete'. + * + * @param deploymentMode the deploymentMode value to set + * @return the ServiceUnitProperties object itself. + */ + public ServiceUnitProperties withDeploymentMode(DeploymentMode deploymentMode) { + this.deploymentMode = deploymentMode; + return this; + } + + /** + * Get the artifacts for the service unit. + * + * @return the artifacts value + */ + public ServiceUnitArtifacts artifacts() { + return this.artifacts; + } + + /** + * Set the artifacts for the service unit. + * + * @param artifacts the artifacts value to set + * @return the ServiceUnitProperties object itself. + */ + public ServiceUnitProperties withArtifacts(ServiceUnitArtifacts artifacts) { + this.artifacts = artifacts; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitResource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitResource.java new file mode 100644 index 0000000000000..9625199e70efa --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitResource.java @@ -0,0 +1,199 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceUnitResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import java.util.Map; + +/** + * Type representing ServiceUnitResource. + */ +public interface ServiceUnitResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the artifacts value. + */ + ServiceUnitArtifacts artifacts(); + + /** + * @return the deploymentMode value. + */ + DeploymentMode deploymentMode(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetResourceGroup value. + */ + String targetResourceGroup(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ServiceUnitResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithService, DefinitionStages.WithDeploymentMode, DefinitionStages.WithLocation, DefinitionStages.WithTargetResourceGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceUnitResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceUnitResource definition. + */ + interface Blank extends WithService { + } + + /** + * The stage of the serviceunitresource definition allowing to specify Service. + */ + interface WithService { + /** + * Specifies resourceGroupName, serviceTopologyName, serviceName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param serviceTopologyName The name of the service topology + * @param serviceName The name of the service resource + * @return the next definition stage + */ + WithDeploymentMode withExistingService(String resourceGroupName, String serviceTopologyName, String serviceName); + } + + /** + * The stage of the serviceunitresource definition allowing to specify DeploymentMode. + */ + interface WithDeploymentMode { + /** + * Specifies deploymentMode. + * @param deploymentMode Describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete' + * @return the next definition stage + */ + WithLocation withDeploymentMode(DeploymentMode deploymentMode); + } + + /** + * The stage of the serviceunitresource definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location The geo-location where the resource lives + * @return the next definition stage + */ + WithTargetResourceGroup withLocation(String location); + } + + /** + * The stage of the serviceunitresource definition allowing to specify TargetResourceGroup. + */ + interface WithTargetResourceGroup { + /** + * Specifies targetResourceGroup. + * @param targetResourceGroup The Azure Resource Group to which the resources in the service unit belong to or should be deployed to + * @return the next definition stage + */ + WithCreate withTargetResourceGroup(String targetResourceGroup); + } + + /** + * The stage of the serviceunitresource definition allowing to specify Artifacts. + */ + interface WithArtifacts { + /** + * Specifies artifacts. + * @param artifacts The artifacts for the service unit + * @return the next definition stage + */ + WithCreate withArtifacts(ServiceUnitArtifacts artifacts); + } + + /** + * The stage of the serviceunitresource definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithArtifacts, DefinitionStages.WithTags { + } + } + /** + * The template for a ServiceUnitResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithArtifacts, UpdateStages.WithTags { + } + + /** + * Grouping of ServiceUnitResource update stages. + */ + interface UpdateStages { + /** + * The stage of the serviceunitresource update allowing to specify Artifacts. + */ + interface WithArtifacts { + /** + * Specifies artifacts. + * @param artifacts The artifacts for the service unit + * @return the next update stage + */ + Update withArtifacts(ServiceUnitArtifacts artifacts); + } + + /** + * The stage of the serviceunitresource update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnits.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnits.java new file mode 100644 index 0000000000000..3ce9fe4b9da08 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnits.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServiceUnitsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceUnits. + */ +public interface ServiceUnits extends SupportsCreating, HasInner { + /** + * Gets the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName); + + /** + * Deletes the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName); + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitsCreateOrUpdateHeaders.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitsCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..7bb7e9d7c2c32 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/ServiceUnitsCreateOrUpdateHeaders.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for CreateOrUpdate operation. + */ +public class ServiceUnitsCreateOrUpdateHeaders { + /** + * Contains the status URL on which clients are expected to poll the status + * of the operation. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get contains the status URL on which clients are expected to poll the status of the operation. + * + * @return the azureAsyncOperation value + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set contains the status URL on which clients are expected to poll the status of the operation. + * + * @param azureAsyncOperation the azureAsyncOperation value to set + * @return the ServiceUnitsCreateOrUpdateHeaders object itself. + */ + public ServiceUnitsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Services.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Services.java new file mode 100644 index 0000000000000..e963fa52f3750 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Services.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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.ServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Services. + */ +public interface Services extends SupportsCreating, HasInner { + /** + * Gets the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName); + + /** + * Deletes the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName); + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepOperationInfo.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepOperationInfo.java new file mode 100644 index 0000000000000..63d1b0457f362 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepOperationInfo.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Detailed information of a specific step run. + */ +public class StepOperationInfo { + /** + * The name of the ARM deployment initiated as part of the step. + */ + @JsonProperty(value = "deploymentName", access = JsonProperty.Access.WRITE_ONLY) + private String deploymentName; + + /** + * Unique identifier to track the request for ARM-based resources. + */ + @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) + private String correlationId; + + /** + * Start time of the action in UTC. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * End time of the action in UTC. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Last time in UTC this operation was updated. + */ + @JsonProperty(value = "lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastUpdatedTime; + + /** + * The errors, if any, for the action. + */ + @JsonProperty(value = "error") + private CloudErrorBody error; + + /** + * Get the name of the ARM deployment initiated as part of the step. + * + * @return the deploymentName value + */ + public String deploymentName() { + return this.deploymentName; + } + + /** + * Get unique identifier to track the request for ARM-based resources. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get start time of the action in UTC. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get end time of the action in UTC. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get last time in UTC this operation was updated. + * + * @return the lastUpdatedTime value + */ + public DateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Get the errors, if any, for the action. + * + * @return the error value + */ + public CloudErrorBody error() { + return this.error; + } + + /** + * Set the errors, if any, for the action. + * + * @param error the error value to set + * @return the StepOperationInfo object itself. + */ + public StepOperationInfo withError(CloudErrorBody error) { + this.error = error; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepProperties.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepProperties.java new file mode 100644 index 0000000000000..8d966c513e707 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepProperties.java @@ -0,0 +1,24 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * The properties of a step resource. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "stepType") +@JsonTypeName("StepProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Wait", value = WaitStepProperties.class) +}) +public class StepProperties { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepResource.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepResource.java new file mode 100644 index 0000000000000..a16f7c61975fe --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/StepResource.java @@ -0,0 +1,85 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.DeploymentManagerManager; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.StepResourceInner; + +/** + * Type representing StepResource. + */ +public interface StepResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the properties value. + */ + StepProperties properties(); + + /** + * The entirety of the StepResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * Grouping of StepResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StepResource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the StepResource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the stepresource definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties The properties that define the step + * @return the next definition stage +*/ + WithCreate withProperties(StepProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags { + } + } + /** + * The template for a StepResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags { + } + + /** + * Grouping of StepResource update stages. + */ + interface UpdateStages { + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Steps.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Steps.java new file mode 100644 index 0000000000000..a91b88b91359d --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/Steps.java @@ -0,0 +1,23 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation.StepsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Steps. + */ +public interface Steps extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, HasInner { +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepAttributes.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepAttributes.java new file mode 100644 index 0000000000000..da2ded17363aa --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepAttributes.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters for the wait step. + */ +public class WaitStepAttributes { + /** + * The duration in ISO 8601 format of how long the wait should be. + */ + @JsonProperty(value = "duration", required = true) + private String duration; + + /** + * Get the duration in ISO 8601 format of how long the wait should be. + * + * @return the duration value + */ + public String duration() { + return this.duration; + } + + /** + * Set the duration in ISO 8601 format of how long the wait should be. + * + * @param duration the duration value to set + * @return the WaitStepAttributes object itself. + */ + public WaitStepAttributes withDuration(String duration) { + this.duration = duration; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepProperties.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepProperties.java new file mode 100644 index 0000000000000..2d8ea10bc2117 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/WaitStepProperties.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.deploymentmanager.v2018-09-01-preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Defines the properties of a Wait step. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "stepType") +@JsonTypeName("Wait") +public class WaitStepProperties extends StepProperties { + /** + * The Wait attributes. + */ + @JsonProperty(value = "attributes") + private WaitStepAttributes attributes; + + /** + * Get the Wait attributes. + * + * @return the attributes value + */ + public WaitStepAttributes attributes() { + return this.attributes; + } + + /** + * Set the Wait attributes. + * + * @param attributes the attributes value to set + * @return the WaitStepProperties object itself. + */ + public WaitStepProperties withAttributes(WaitStepAttributes attributes) { + this.attributes = attributes; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceImpl.java new file mode 100644 index 0000000000000..56cf8c19fcded --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceImpl.java @@ -0,0 +1,80 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ArtifactSource; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Authentication; + +class ArtifactSourceImpl extends GroupableResourceCoreImpl implements ArtifactSource, ArtifactSource.Definition, ArtifactSource.Update { + ArtifactSourceImpl(String name, ArtifactSourceInner inner, DeploymentManagerManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ArtifactSourcesInner client = this.manager().inner().artifactSources(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ArtifactSourcesInner client = this.manager().inner().artifactSources(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ArtifactSourcesInner client = this.manager().inner().artifactSources(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String artifactRoot() { + return this.inner().artifactRoot(); + } + + @Override + public Authentication authentication() { + return this.inner().authentication(); + } + + @Override + public String sourceType() { + return this.inner().sourceType(); + } + + @Override + public ArtifactSourceImpl withAuthentication(Authentication authentication) { + this.inner().withAuthentication(authentication); + return this; + } + + @Override + public ArtifactSourceImpl withSourceType(String sourceType) { + this.inner().withSourceType(sourceType); + return this; + } + + @Override + public ArtifactSourceImpl withArtifactRoot(String artifactRoot) { + this.inner().withArtifactRoot(artifactRoot); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceInner.java new file mode 100644 index 0000000000000..e14973b2431a5 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourceInner.java @@ -0,0 +1,106 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Authentication; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The resource that defines the source location where the artifacts are + * located. + */ +@JsonFlatten +public class ArtifactSourceInner extends Resource { + /** + * The type of artifact source used. + */ + @JsonProperty(value = "properties.sourceType", required = true) + private String sourceType; + + /** + * The path from the location that the 'authentication' property [say, a + * SAS URI to the blob container] refers to, to the location of the + * artifacts. This can be used to differentiate different versions of the + * artifacts. Or, different types of artifacts like binaries or templates. + * The location referenced by the authentication property concatenated with + * this optional artifactRoot path forms the artifact source location where + * the artifacts are expected to be found. + */ + @JsonProperty(value = "properties.artifactRoot") + private String artifactRoot; + + /** + * The authentication method to use to access the artifact source. + */ + @JsonProperty(value = "properties.authentication", required = true) + private Authentication authentication; + + /** + * Get the type of artifact source used. + * + * @return the sourceType value + */ + public String sourceType() { + return this.sourceType; + } + + /** + * Set the type of artifact source used. + * + * @param sourceType the sourceType value to set + * @return the ArtifactSourceInner object itself. + */ + public ArtifactSourceInner withSourceType(String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found. + * + * @return the artifactRoot value + */ + public String artifactRoot() { + return this.artifactRoot; + } + + /** + * Set the path from the location that the 'authentication' property [say, a SAS URI to the blob container] refers to, to the location of the artifacts. This can be used to differentiate different versions of the artifacts. Or, different types of artifacts like binaries or templates. The location referenced by the authentication property concatenated with this optional artifactRoot path forms the artifact source location where the artifacts are expected to be found. + * + * @param artifactRoot the artifactRoot value to set + * @return the ArtifactSourceInner object itself. + */ + public ArtifactSourceInner withArtifactRoot(String artifactRoot) { + this.artifactRoot = artifactRoot; + return this; + } + + /** + * Get the authentication method to use to access the artifact source. + * + * @return the authentication value + */ + public Authentication authentication() { + return this.authentication; + } + + /** + * Set the authentication method to use to access the artifact source. + * + * @param authentication the authentication value to set + * @return the ArtifactSourceInner object itself. + */ + public ArtifactSourceInner withAuthentication(Authentication authentication) { + this.authentication = authentication; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesImpl.java new file mode 100644 index 0000000000000..f0ac5d91bb53d --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesImpl.java @@ -0,0 +1,88 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ArtifactSources; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ArtifactSource; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; + +class ArtifactSourcesImpl extends GroupableResourcesCoreImpl implements ArtifactSources { + protected ArtifactSourcesImpl(DeploymentManagerManager manager) { + super(manager.inner().artifactSources(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ArtifactSourcesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ArtifactSourcesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public ArtifactSourceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ArtifactSourceImpl wrapModel(ArtifactSourceInner inner) { + return new ArtifactSourceImpl(inner.name(), inner, manager()); + } + + @Override + protected ArtifactSourceImpl wrapModel(String name) { + return new ArtifactSourceImpl(name, new ArtifactSourceInner(), this.manager()); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesInner.java new file mode 100644 index 0000000000000..ca2589d1ba7c6 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ArtifactSourcesInner.java @@ -0,0 +1,425 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ArtifactSources. + */ +public class ArtifactSourcesInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ArtifactSourcesService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of ArtifactSourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ArtifactSourcesInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(ArtifactSourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ArtifactSources to be + * used by Retrofit to perform actually REST calls. + */ + interface ArtifactSourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ArtifactSources createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("artifactSourceName") String artifactSourceName, @Query("api-version") String apiVersion, @Body ArtifactSourceInner artifactSourceInfo, @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.deploymentmanager.v2018-09-01-preview.ArtifactSources getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("artifactSourceName") String artifactSourceName, @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.deploymentmanager.v2018-09-01-preview.ArtifactSources delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("artifactSourceName") String artifactSourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ArtifactSourceInner object if successful. + */ + public ArtifactSourceInner createOrUpdate(String resourceGroupName, String artifactSourceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName).toBlocking().single().body(); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @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 artifactSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName), serviceCallback); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String artifactSourceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName).map(new Func1, ArtifactSourceInner>() { + @Override + public ArtifactSourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String artifactSourceName) { + 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 (artifactSourceName == null) { + throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final ArtifactSourceInner artifactSourceInfo = null; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, artifactSourceName, this.client.apiVersion(), artifactSourceInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @param artifactSourceInfo Source object that defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ArtifactSourceInner object if successful. + */ + public ArtifactSourceInner createOrUpdate(String resourceGroupName, String artifactSourceName, ArtifactSourceInner artifactSourceInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName, artifactSourceInfo).toBlocking().single().body(); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @param artifactSourceInfo Source object that defines the resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String artifactSourceName, ArtifactSourceInner artifactSourceInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName, artifactSourceInfo), serviceCallback); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @param artifactSourceInfo Source object that defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String artifactSourceName, ArtifactSourceInner artifactSourceInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, artifactSourceName, artifactSourceInfo).map(new Func1, ArtifactSourceInner>() { + @Override + public ArtifactSourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an artifact source. + * Synchronously creates a new artifact source or updates an existing artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @param artifactSourceInfo Source object that defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String artifactSourceName, ArtifactSourceInner artifactSourceInfo) { + 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 (artifactSourceName == null) { + throw new IllegalArgumentException("Parameter artifactSourceName 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(artifactSourceInfo); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, artifactSourceName, this.client.apiVersion(), artifactSourceInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ArtifactSourceInner object if successful. + */ + public ArtifactSourceInner getByResourceGroup(String resourceGroupName, String artifactSourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, artifactSourceName).toBlocking().single().body(); + } + + /** + * Gets an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String artifactSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, artifactSourceName), serviceCallback); + } + + /** + * Gets an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String artifactSourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, artifactSourceName).map(new Func1, ArtifactSourceInner>() { + @Override + public ArtifactSourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ArtifactSourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String artifactSourceName) { + 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 (artifactSourceName == null) { + throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, artifactSourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String artifactSourceName) { + deleteWithServiceResponseAsync(resourceGroupName, artifactSourceName).toBlocking().single().body(); + } + + /** + * Deletes an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @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 artifactSourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, artifactSourceName), serviceCallback); + } + + /** + * Deletes an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String artifactSourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, artifactSourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an artifact source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param artifactSourceName The name of the artifact source. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String artifactSourceName) { + 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 (artifactSourceName == null) { + throw new IllegalArgumentException("Parameter artifactSourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, artifactSourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/AzureDeploymentManagerImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/AzureDeploymentManagerImpl.java new file mode 100644 index 0000000000000..b82b3ae6d253c --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/AzureDeploymentManagerImpl.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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the AzureDeploymentManagerImpl class. + */ +public class AzureDeploymentManagerImpl extends AzureServiceClient { + /** 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; + } + + /** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public AzureDeploymentManagerImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The API version to use for this operation. */ + private String apiVersion; + + /** + * Gets The API version to use for this operation. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The 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 AzureDeploymentManagerImpl 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 AzureDeploymentManagerImpl 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 AzureDeploymentManagerImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ServiceTopologiesInner object to access its operations. + */ + private ServiceTopologiesInner serviceTopologies; + + /** + * Gets the ServiceTopologiesInner object to access its operations. + * @return the ServiceTopologiesInner object. + */ + public ServiceTopologiesInner serviceTopologies() { + return this.serviceTopologies; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The ServiceUnitsInner object to access its operations. + */ + private ServiceUnitsInner serviceUnits; + + /** + * Gets the ServiceUnitsInner object to access its operations. + * @return the ServiceUnitsInner object. + */ + public ServiceUnitsInner serviceUnits() { + return this.serviceUnits; + } + + /** + * The StepsInner object to access its operations. + */ + private StepsInner steps; + + /** + * Gets the StepsInner object to access its operations. + * @return the StepsInner object. + */ + public StepsInner steps() { + return this.steps; + } + + /** + * The RolloutsInner object to access its operations. + */ + private RolloutsInner rollouts; + + /** + * Gets the RolloutsInner object to access its operations. + * @return the RolloutsInner object. + */ + public RolloutsInner rollouts() { + return this.rollouts; + } + + /** + * The ArtifactSourcesInner object to access its operations. + */ + private ArtifactSourcesInner artifactSources; + + /** + * Gets the ArtifactSourcesInner object to access its operations. + * @return the ArtifactSourcesInner object. + */ + public ArtifactSourcesInner artifactSources() { + return this.artifactSources; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * Initializes an instance of AzureDeploymentManager client. + * + * @param credentials the management credentials for Azure + */ + public AzureDeploymentManagerImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of AzureDeploymentManager client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public AzureDeploymentManagerImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of AzureDeploymentManager client. + * + * @param restClient the REST client to connect to Azure. + */ + public AzureDeploymentManagerImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2018-09-01-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.serviceTopologies = new ServiceTopologiesInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.serviceUnits = new ServiceUnitsInner(restClient().retrofit(), this); + this.steps = new StepsInner(restClient().retrofit(), this); + this.rollouts = new RolloutsInner(restClient().retrofit(), this); + this.artifactSources = new ArtifactSourcesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(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, auto-generated)", super.userAgent(), "AzureDeploymentManager", "2018-09-01-preview"); + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/DeploymentManagerManager.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/DeploymentManagerManager.java new file mode 100644 index 0000000000000..b681afcc5e4a4 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/DeploymentManagerManager.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceTopologies; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Services; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnits; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Steps; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Rollouts; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ArtifactSources; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DeploymentManager resource management. + */ +public final class DeploymentManagerManager extends ManagerCore { + private ServiceTopologies serviceTopologies; + private Services services; + private ServiceUnits serviceUnits; + private Steps steps; + private Rollouts rollouts; + private ArtifactSources artifactSources; + private Operations operations; + /** + * Get a Configurable instance that can be used to create DeploymentManagerManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DeploymentManagerManager.ConfigurableImpl(); + } + /** + * Creates an instance of DeploymentManagerManager that exposes DeploymentManager resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DeploymentManagerManager + */ + public static DeploymentManagerManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DeploymentManagerManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DeploymentManagerManager that exposes DeploymentManager resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DeploymentManagerManager + */ + public static DeploymentManagerManager authenticate(RestClient restClient, String subscriptionId) { + return new DeploymentManagerManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DeploymentManagerManager that exposes DeploymentManager management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DeploymentManager management API entry points that work across subscriptions + */ + DeploymentManagerManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ServiceTopologies. + */ + public ServiceTopologies serviceTopologies() { + if (this.serviceTopologies == null) { + this.serviceTopologies = new ServiceTopologiesImpl(this); + } + return this.serviceTopologies; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage ServiceUnits. + */ + public ServiceUnits serviceUnits() { + if (this.serviceUnits == null) { + this.serviceUnits = new ServiceUnitsImpl(this); + } + return this.serviceUnits; + } + + /** + * @return Entry point to manage Steps. + */ + public Steps steps() { + if (this.steps == null) { + this.steps = new StepsImpl(this); + } + return this.steps; + } + + /** + * @return Entry point to manage Rollouts. + */ + public Rollouts rollouts() { + if (this.rollouts == null) { + this.rollouts = new RolloutsImpl(this); + } + return this.rollouts; + } + + /** + * @return Entry point to manage ArtifactSources. + */ + public ArtifactSources artifactSources() { + if (this.artifactSources == null) { + this.artifactSources = new ArtifactSourcesImpl(this); + } + return this.artifactSources; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DeploymentManagerManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DeploymentManagerManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DeploymentManagerManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new AzureDeploymentManagerImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/IdParsingUtils.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..e60b02e2aa67b --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationImpl.java new file mode 100644 index 0000000000000..abdece8914d54 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationImpl.java @@ -0,0 +1,52 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.OperationDetail; + +class OperationImpl extends WrapperImpl implements Operation { + private final DeploymentManagerManager manager; + + OperationImpl(OperationInner inner, DeploymentManagerManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DeploymentManagerManager manager() { + return this.manager; + } + + + + @Override + public OperationDetail display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationInner.java new file mode 100644 index 0000000000000..7844373cfab8d --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationInner.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.OperationDetail; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents an operation that can be performed on the service. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display name of the operation. + */ + @JsonProperty(value = "display") + private OperationDetail display; + + /** + * The origin of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * The properties of the operation. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the operation. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display name of the operation. + * + * @return the display value + */ + public OperationDetail display() { + return this.display; + } + + /** + * Set the display name of the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDetail display) { + this.display = display; + return this; + } + + /** + * Get the origin of the operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin of the operation. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties of the operation. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties of the operation. + * + * @param properties the properties value to set + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..907fd106886bf --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsImpl.java @@ -0,0 +1,68 @@ +/** + * 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. + * jkl + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Operations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.arm.utils.PagedListConverter; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private PagedListConverter converter; + private final DeploymentManagerManager manager; + + OperationsImpl(DeploymentManagerManager manager) { + super(manager.inner().operations()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(OperationInner inner) { + return Observable.just((Operation) wrapModel(inner)); + } + }; + } + + public DeploymentManagerManager manager() { + return this.manager; + } + + private OperationImpl wrapModel(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + + @Override + public PagedList list() { + OperationsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMap(new Func1, Observable>() { + @Override + public Observable call(Page innerPage) { + return Observable.from(innerPage.items()); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsInner.java new file mode 100644 index 0000000000000..4058b22ad9dde --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/OperationsInner.java @@ -0,0 +1,144 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, AzureDeploymentManagerImpl 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.deploymentmanager.v2018-09-01-preview.Operations list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DeploymentManager/operations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an operation resource. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * Gets an operation resource. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets an operation resource. + * + * @return the observable to the List<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * Gets an operation resource. + * + * @return the observable to the List<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/PageImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/PageImpl.java new file mode 100644 index 0000000000000..a85eff89eff39 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/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.deploymentmanager.v2018-09-01-preview.implementation; + +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("") + 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/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutImpl.java new file mode 100644 index 0000000000000..cb2cdd86376e5 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutImpl.java @@ -0,0 +1,148 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Rollout; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Identity; +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.RolloutOperationInfo; +import java.util.ArrayList; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.; +import rx.functions.Func1; + +class RolloutImpl extends GroupableResourceCoreImpl implements Rollout, Rollout.Definition, Rollout.Update { + private RolloutRequestInner createOrUpdateParameter; + RolloutImpl(String name, RolloutInner inner, DeploymentManagerManager manager) { + super(name, inner, manager); + this.createOrUpdateParameter = new RolloutRequestInner(); + } + + @Override + public Observable createResourceAsync() { + RolloutsInner client = this.manager().inner().rollouts(); + this.createOrUpdateParameter.withLocation(inner().location()); + this.createOrUpdateParameter.withTags(inner().getTags()); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.createOrUpdateParameter) + .map(new Func1() { + @Override + public RolloutInner call(RolloutInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + RolloutsInner client = this.manager().inner().rollouts(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.createOrUpdateParameter) + .map(new Func1() { + @Override + public RolloutInner call(RolloutInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + RolloutsInner client = this.manager().inner().rollouts(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createOrUpdateParameter = new RolloutRequestInner(); + } + + @Override + public String artifactSourceId() { + return this.inner().artifactSourceId(); + } + + @Override + public String buildVersion() { + return this.inner().buildVersion(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public RolloutOperationInfo operationInfo() { + return this.inner().operationInfo(); + } + + @Override + public List services() { + return this.inner().services(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public List stepGroups() { + return this.inner().stepGroups(); + } + + @Override + public String targetServiceTopologyId() { + return this.inner().targetServiceTopologyId(); + } + + @Override + public Integer totalRetryAttempts() { + return this.inner().totalRetryAttempts(); + } + + @Override + public RolloutImpl withBuildVersion(String buildVersion) { + this.createOrUpdateParameter.withBuildVersion(buildVersion); + return this; + } + + @Override + public RolloutImpl withIdentity(Identity identity) { + this.createOrUpdateParameter.withIdentity(identity); + return this; + } + + @Override + public RolloutImpl withStepGroups(List stepGroups) { + this.createOrUpdateParameter.withStepGroups(stepGroups); + return this; + } + + @Override + public RolloutImpl withTargetServiceTopologyId(String targetServiceTopologyId) { + this.createOrUpdateParameter.withTargetServiceTopologyId(targetServiceTopologyId); + return this; + } + + @Override + public RolloutImpl withArtifactSourceId(String artifactSourceId) { + this.createOrUpdateParameter.withArtifactSourceId(artifactSourceId); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutInner.java new file mode 100644 index 0000000000000..8188bd64bf9d6 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutInner.java @@ -0,0 +1,216 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Identity; +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.RolloutOperationInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Defines the rollout. + */ +@JsonFlatten +public class RolloutInner extends Resource { + /** + * Identity for the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * The version of the build being deployed. + */ + @JsonProperty(value = "properties.buildVersion", required = true) + private String buildVersion; + + /** + * The reference to the artifact source resource Id where the payload is + * located. + */ + @JsonProperty(value = "properties.artifactSourceId") + private String artifactSourceId; + + /** + * The resource Id of the service topology from which service units are + * being referenced in step groups to be deployed. + */ + @JsonProperty(value = "properties.targetServiceTopologyId", required = true) + private String targetServiceTopologyId; + + /** + * The list of step groups that define the orchestration. + */ + @JsonProperty(value = "properties.stepGroups", required = true) + private List stepGroups; + + /** + * The current status of the rollout. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * The cardinal count of total number of retries performed on the rollout + * at a given time. + */ + @JsonProperty(value = "properties.totalRetryAttempts", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalRetryAttempts; + + /** + * Operational information of the rollout. + */ + @JsonProperty(value = "properties.operationInfo", access = JsonProperty.Access.WRITE_ONLY) + private RolloutOperationInfo operationInfo; + + /** + * The detailed information on the services being deployed. + */ + @JsonProperty(value = "properties.services", access = JsonProperty.Access.WRITE_ONLY) + private List services; + + /** + * Get identity for the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set identity for the resource. + * + * @param identity the identity value to set + * @return the RolloutInner object itself. + */ + public RolloutInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the version of the build being deployed. + * + * @return the buildVersion value + */ + public String buildVersion() { + return this.buildVersion; + } + + /** + * Set the version of the build being deployed. + * + * @param buildVersion the buildVersion value to set + * @return the RolloutInner object itself. + */ + public RolloutInner withBuildVersion(String buildVersion) { + this.buildVersion = buildVersion; + return this; + } + + /** + * Get the reference to the artifact source resource Id where the payload is located. + * + * @return the artifactSourceId value + */ + public String artifactSourceId() { + return this.artifactSourceId; + } + + /** + * Set the reference to the artifact source resource Id where the payload is located. + * + * @param artifactSourceId the artifactSourceId value to set + * @return the RolloutInner object itself. + */ + public RolloutInner withArtifactSourceId(String artifactSourceId) { + this.artifactSourceId = artifactSourceId; + return this; + } + + /** + * Get the resource Id of the service topology from which service units are being referenced in step groups to be deployed. + * + * @return the targetServiceTopologyId value + */ + public String targetServiceTopologyId() { + return this.targetServiceTopologyId; + } + + /** + * Set the resource Id of the service topology from which service units are being referenced in step groups to be deployed. + * + * @param targetServiceTopologyId the targetServiceTopologyId value to set + * @return the RolloutInner object itself. + */ + public RolloutInner withTargetServiceTopologyId(String targetServiceTopologyId) { + this.targetServiceTopologyId = targetServiceTopologyId; + return this; + } + + /** + * Get the list of step groups that define the orchestration. + * + * @return the stepGroups value + */ + public List stepGroups() { + return this.stepGroups; + } + + /** + * Set the list of step groups that define the orchestration. + * + * @param stepGroups the stepGroups value to set + * @return the RolloutInner object itself. + */ + public RolloutInner withStepGroups(List stepGroups) { + this.stepGroups = stepGroups; + return this; + } + + /** + * Get the current status of the rollout. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Get the cardinal count of total number of retries performed on the rollout at a given time. + * + * @return the totalRetryAttempts value + */ + public Integer totalRetryAttempts() { + return this.totalRetryAttempts; + } + + /** + * Get operational information of the rollout. + * + * @return the operationInfo value + */ + public RolloutOperationInfo operationInfo() { + return this.operationInfo; + } + + /** + * Get the detailed information on the services being deployed. + * + * @return the services value + */ + public List services() { + return this.services; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutRequestInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutRequestInner.java new file mode 100644 index 0000000000000..e1d9c88238762 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutRequestInner.java @@ -0,0 +1,154 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Identity; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Defines the PUT rollout request body. + */ +@JsonFlatten +public class RolloutRequestInner extends Resource { + /** + * Identity for the resource. + */ + @JsonProperty(value = "identity", required = true) + private Identity identity; + + /** + * The version of the build being deployed. + */ + @JsonProperty(value = "properties.buildVersion", required = true) + private String buildVersion; + + /** + * The reference to the artifact source resource Id where the payload is + * located. + */ + @JsonProperty(value = "properties.artifactSourceId") + private String artifactSourceId; + + /** + * The resource Id of the service topology from which service units are + * being referenced in step groups to be deployed. + */ + @JsonProperty(value = "properties.targetServiceTopologyId", required = true) + private String targetServiceTopologyId; + + /** + * The list of step groups that define the orchestration. + */ + @JsonProperty(value = "properties.stepGroups", required = true) + private List stepGroups; + + /** + * Get identity for the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set identity for the resource. + * + * @param identity the identity value to set + * @return the RolloutRequestInner object itself. + */ + public RolloutRequestInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the version of the build being deployed. + * + * @return the buildVersion value + */ + public String buildVersion() { + return this.buildVersion; + } + + /** + * Set the version of the build being deployed. + * + * @param buildVersion the buildVersion value to set + * @return the RolloutRequestInner object itself. + */ + public RolloutRequestInner withBuildVersion(String buildVersion) { + this.buildVersion = buildVersion; + return this; + } + + /** + * Get the reference to the artifact source resource Id where the payload is located. + * + * @return the artifactSourceId value + */ + public String artifactSourceId() { + return this.artifactSourceId; + } + + /** + * Set the reference to the artifact source resource Id where the payload is located. + * + * @param artifactSourceId the artifactSourceId value to set + * @return the RolloutRequestInner object itself. + */ + public RolloutRequestInner withArtifactSourceId(String artifactSourceId) { + this.artifactSourceId = artifactSourceId; + return this; + } + + /** + * Get the resource Id of the service topology from which service units are being referenced in step groups to be deployed. + * + * @return the targetServiceTopologyId value + */ + public String targetServiceTopologyId() { + return this.targetServiceTopologyId; + } + + /** + * Set the resource Id of the service topology from which service units are being referenced in step groups to be deployed. + * + * @param targetServiceTopologyId the targetServiceTopologyId value to set + * @return the RolloutRequestInner object itself. + */ + public RolloutRequestInner withTargetServiceTopologyId(String targetServiceTopologyId) { + this.targetServiceTopologyId = targetServiceTopologyId; + return this; + } + + /** + * Get the list of step groups that define the orchestration. + * + * @return the stepGroups value + */ + public List stepGroups() { + return this.stepGroups; + } + + /** + * Set the list of step groups that define the orchestration. + * + * @param stepGroups the stepGroups value to set + * @return the RolloutRequestInner object itself. + */ + public RolloutRequestInner withStepGroups(List stepGroups) { + this.stepGroups = stepGroups; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsImpl.java new file mode 100644 index 0000000000000..bc83a04c547d6 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsImpl.java @@ -0,0 +1,113 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Rollouts; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Rollout; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.arm.utils.PagedListConverter; + +class RolloutsImpl extends GroupableResourcesCoreImpl implements Rollouts { + protected RolloutsImpl(DeploymentManagerManager manager) { + super(manager.inner().rollouts(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + RolloutsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + RolloutsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public RolloutImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable cancelAsync(String resourceGroupName, String rolloutName) { + RolloutsInner client = this.inner(); + return client.cancelAsync(resourceGroupName, rolloutName) + .map(new Func1() { + @Override + public Rollout call(RolloutInner inner) { + return new RolloutImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable restartAsync(String resourceGroupName, String rolloutName) { + RolloutsInner client = this.inner(); + return client.restartAsync(resourceGroupName, rolloutName) + .map(new Func1() { + @Override + public Rollout call(RolloutInner inner) { + return new RolloutImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + protected RolloutImpl wrapModel(RolloutInner inner) { + return new RolloutImpl(inner.name(), inner, manager()); + } + + @Override + protected RolloutImpl wrapModel(String name) { + return new RolloutImpl(name, new RolloutInner(), this.manager()); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsInner.java new file mode 100644 index 0000000000000..b975aa7aa2672 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/RolloutsInner.java @@ -0,0 +1,947 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.RolloutsCreateOrUpdateHeaders; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +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 Rollouts. + */ +public class RolloutsInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private RolloutsService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of RolloutsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public RolloutsInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(RolloutsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Rollouts to be + * used by Retrofit to perform actually REST calls. + */ + interface RolloutsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Rollouts createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @Query("api-version") String apiVersion, @Body RolloutRequestInner rolloutRequest, @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.deploymentmanager.v2018-09-01-preview.Rollouts beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @Query("api-version") String apiVersion, @Body RolloutRequestInner rolloutRequest, @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.deploymentmanager.v2018-09-01-preview.Rollouts getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @Query("api-version") String apiVersion, @Query("retryAttempt") Integer retryAttempt, @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.deploymentmanager.v2018-09-01-preview.Rollouts delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @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.deploymentmanager.v2018-09-01-preview.Rollouts cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @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.deploymentmanager.v2018-09-01-preview.Rollouts restart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/rollouts/{rolloutName}/restart") + Observable> restart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("rolloutName") String rolloutName, @Query("skipSucceeded") Boolean skipSucceeded, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutRequestInner object if successful. + */ + public RolloutRequestInner createOrUpdate(String resourceGroupName, String rolloutName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().last().body(); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String rolloutName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, RolloutRequestInner>() { + @Override + public RolloutRequestInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final RolloutRequestInner rolloutRequest = null; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), rolloutRequest, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), RolloutsCreateOrUpdateHeaders.class); + } + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutRequestInner object if successful. + */ + public RolloutRequestInner createOrUpdate(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest).toBlocking().last().body(); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @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 rolloutName, RolloutRequestInner rolloutRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest), serviceCallback); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest).map(new Func1, RolloutRequestInner>() { + @Override + public RolloutRequestInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName 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(rolloutRequest); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), rolloutRequest, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), RolloutsCreateOrUpdateHeaders.class); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutRequestInner object if successful. + */ + public RolloutRequestInner beginCreateOrUpdate(String resourceGroupName, String rolloutName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().single().body(); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutRequestInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String rolloutName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, RolloutRequestInner>() { + @Override + public RolloutRequestInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutRequestInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final RolloutRequestInner rolloutRequest = null; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), rolloutRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutRequestInner object if successful. + */ + public RolloutRequestInner beginCreateOrUpdate(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest).toBlocking().single().body(); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @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 rolloutName, RolloutRequestInner rolloutRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest), serviceCallback); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutRequestInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, rolloutName, rolloutRequest).map(new Func1, RolloutRequestInner>() { + @Override + public RolloutRequestInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout. + * This is an asynchronous operation and can be polled to completion using the location header returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param rolloutRequest Source rollout request object that defines the rollout. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutRequestInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String rolloutName, RolloutRequestInner rolloutRequest) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName 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(rolloutRequest); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), rolloutRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, RolloutsCreateOrUpdateHeaders.class); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutInner object if successful. + */ + public RolloutInner getByResourceGroup(String resourceGroupName, String rolloutName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().single().body(); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String rolloutName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, RolloutInner>() { + @Override + public RolloutInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer retryAttempt = null; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), retryAttempt, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param retryAttempt Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutInner object if successful. + */ + public RolloutInner getByResourceGroup(String resourceGroupName, String rolloutName, Integer retryAttempt) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName, retryAttempt).toBlocking().single().body(); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param retryAttempt Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String rolloutName, Integer retryAttempt, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName, retryAttempt), serviceCallback); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param retryAttempt Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String rolloutName, Integer retryAttempt) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, rolloutName, retryAttempt).map(new Func1, RolloutInner>() { + @Override + public RolloutInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets detailed information of a rollout. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param retryAttempt Rollout retry attempt ordinal to get the result of. If not specified, result of the latest attempt will be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String rolloutName, Integer retryAttempt) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), retryAttempt, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a rollout resource. + * Only rollouts in terminal state can be deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String rolloutName) { + deleteWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().single().body(); + } + + /** + * Deletes a rollout resource. + * Only rollouts in terminal state can be deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Deletes a rollout resource. + * Only rollouts in terminal state can be deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String rolloutName) { + return deleteWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a rollout resource. + * Only rollouts in terminal state can be deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops a running rollout. + * Only running rollouts can be canceled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutInner object if successful. + */ + public RolloutInner cancel(String resourceGroupName, String rolloutName) { + return cancelWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().single().body(); + } + + /** + * Stops a running rollout. + * Only running rollouts can be canceled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Stops a running rollout. + * Only running rollouts can be canceled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable cancelAsync(String resourceGroupName, String rolloutName) { + return cancelWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, RolloutInner>() { + @Override + public RolloutInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stops a running rollout. + * Only running rollouts can be canceled. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName 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.cancel(this.client.subscriptionId(), resourceGroupName, rolloutName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = cancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse cancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutInner object if successful. + */ + public RolloutInner restart(String resourceGroupName, String rolloutName) { + return restartWithServiceResponseAsync(resourceGroupName, rolloutName).toBlocking().single().body(); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture restartAsync(String resourceGroupName, String rolloutName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, rolloutName), serviceCallback); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable restartAsync(String resourceGroupName, String rolloutName) { + return restartWithServiceResponseAsync(resourceGroupName, rolloutName).map(new Func1, RolloutInner>() { + @Override + public RolloutInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String rolloutName) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean skipSucceeded = null; + return service.restart(this.client.subscriptionId(), resourceGroupName, rolloutName, skipSucceeded, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param skipSucceeded If true, will skip all succeeded steps so far in the rollout. If false, will execute the entire rollout again regardless of the current state of individual resources. Defaults to false if not specified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RolloutInner object if successful. + */ + public RolloutInner restart(String resourceGroupName, String rolloutName, Boolean skipSucceeded) { + return restartWithServiceResponseAsync(resourceGroupName, rolloutName, skipSucceeded).toBlocking().single().body(); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param skipSucceeded If true, will skip all succeeded steps so far in the rollout. If false, will execute the entire rollout again regardless of the current state of individual resources. Defaults to false if not specified. + * @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 restartAsync(String resourceGroupName, String rolloutName, Boolean skipSucceeded, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, rolloutName, skipSucceeded), serviceCallback); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param skipSucceeded If true, will skip all succeeded steps so far in the rollout. If false, will execute the entire rollout again regardless of the current state of individual resources. Defaults to false if not specified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable restartAsync(String resourceGroupName, String rolloutName, Boolean skipSucceeded) { + return restartWithServiceResponseAsync(resourceGroupName, rolloutName, skipSucceeded).map(new Func1, RolloutInner>() { + @Override + public RolloutInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restarts a failed rollout and optionally skips all succeeded steps. + * Only failed rollouts can be restarted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param rolloutName The rollout name. + * @param skipSucceeded If true, will skip all succeeded steps so far in the rollout. If false, will execute the entire rollout again regardless of the current state of individual resources. Defaults to false if not specified. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RolloutInner object + */ + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String rolloutName, Boolean skipSucceeded) { + 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 (rolloutName == null) { + throw new IllegalArgumentException("Parameter rolloutName 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.restart(this.client.subscriptionId(), resourceGroupName, rolloutName, skipSucceeded, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse restartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceInner.java new file mode 100644 index 0000000000000..dcfb8d0373c5e --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceInner.java @@ -0,0 +1,71 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceProperties; + +/** + * Defines a service. + */ +public class ServiceInner extends ServiceProperties { + /** + * Name of the service. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The detailed information about the units that make up the service. + */ + @JsonProperty(value = "serviceUnits") + private List serviceUnits; + + /** + * Get name of the service. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the service. + * + * @param name the name value to set + * @return the ServiceInner object itself. + */ + public ServiceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the detailed information about the units that make up the service. + * + * @return the serviceUnits value + */ + public List serviceUnits() { + return this.serviceUnits; + } + + /** + * Set the detailed information about the units that make up the service. + * + * @param serviceUnits the serviceUnits value to set + * @return the ServiceInner object itself. + */ + public ServiceInner withServiceUnits(List serviceUnits) { + this.serviceUnits = serviceUnits; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceImpl.java new file mode 100644 index 0000000000000..9fd07d482c2d1 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceImpl.java @@ -0,0 +1,139 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; + +class ServiceResourceImpl extends CreatableUpdatableImpl implements ServiceResource, ServiceResource.Definition, ServiceResource.Update { + private final DeploymentManagerManager manager; + private String resourceGroupName; + private String serviceTopologyName; + private String serviceName; + + ServiceResourceImpl(String name, DeploymentManagerManager manager) { + super(name, new ServiceResourceInner()); + this.manager = manager; + // Set resource name + this.serviceName = name; + // + } + + ServiceResourceImpl(ServiceResourceInner inner, DeploymentManagerManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.serviceName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceTopologyName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceTopologies"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + // + } + + @Override + public DeploymentManagerManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServicesInner client = this.manager().inner().services(); + return client.getAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String targetLocation() { + return this.inner().targetLocation(); + } + + @Override + public String targetSubscriptionId() { + return this.inner().targetSubscriptionId(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ServiceResourceImpl withExistingServiceTopology(String resourceGroupName, String serviceTopologyName) { + this.resourceGroupName = resourceGroupName; + this.serviceTopologyName = serviceTopologyName; + return this; + } + + @Override + public ServiceResourceImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public ServiceResourceImpl withTargetLocation(String targetLocation) { + this.inner().withTargetLocation(targetLocation); + return this; + } + + @Override + public ServiceResourceImpl withTargetSubscriptionId(String targetSubscriptionId) { + this.inner().withTargetSubscriptionId(targetSubscriptionId); + return this; + } + + @Override + public ServiceResourceImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceInner.java new file mode 100644 index 0000000000000..5688e4bd2a332 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceResourceInner.java @@ -0,0 +1,74 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The resource representation of a service in a service topology. + */ +@JsonFlatten +public class ServiceResourceInner extends Resource { + /** + * The Azure location to which the resources in the service belong to or + * should be deployed to. + */ + @JsonProperty(value = "properties.targetLocation", required = true) + private String targetLocation; + + /** + * The subscription to which the resources in the service belong to or + * should be deployed to. + */ + @JsonProperty(value = "properties.targetSubscriptionId", required = true) + private String targetSubscriptionId; + + /** + * Get the Azure location to which the resources in the service belong to or should be deployed to. + * + * @return the targetLocation value + */ + public String targetLocation() { + return this.targetLocation; + } + + /** + * Set the Azure location to which the resources in the service belong to or should be deployed to. + * + * @param targetLocation the targetLocation value to set + * @return the ServiceResourceInner object itself. + */ + public ServiceResourceInner withTargetLocation(String targetLocation) { + this.targetLocation = targetLocation; + return this; + } + + /** + * Get the subscription to which the resources in the service belong to or should be deployed to. + * + * @return the targetSubscriptionId value + */ + public String targetSubscriptionId() { + return this.targetSubscriptionId; + } + + /** + * Set the subscription to which the resources in the service belong to or should be deployed to. + * + * @param targetSubscriptionId the targetSubscriptionId value to set + * @return the ServiceResourceInner object itself. + */ + public ServiceResourceInner withTargetSubscriptionId(String targetSubscriptionId) { + this.targetSubscriptionId = targetSubscriptionId; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesImpl.java new file mode 100644 index 0000000000000..84f01f9cce975 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesImpl.java @@ -0,0 +1,88 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceTopologies; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceTopologyResource; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; + +class ServiceTopologiesImpl extends GroupableResourcesCoreImpl implements ServiceTopologies { + protected ServiceTopologiesImpl(DeploymentManagerManager manager) { + super(manager.inner().serviceTopologies(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ServiceTopologiesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ServiceTopologiesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public ServiceTopologyResourceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected ServiceTopologyResourceImpl wrapModel(ServiceTopologyResourceInner inner) { + return new ServiceTopologyResourceImpl(inner.name(), inner, manager()); + } + + @Override + protected ServiceTopologyResourceImpl wrapModel(String name) { + return new ServiceTopologyResourceImpl(name, new ServiceTopologyResourceInner(), this.manager()); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesInner.java new file mode 100644 index 0000000000000..9d8a3a2c5f238 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologiesInner.java @@ -0,0 +1,344 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ServiceTopologies. + */ +public class ServiceTopologiesInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ServiceTopologiesService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of ServiceTopologiesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceTopologiesInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(ServiceTopologiesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceTopologies to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceTopologiesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceTopologies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Body ServiceTopologyResourceInner serviceTopologyInfo, @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.deploymentmanager.v2018-09-01-preview.ServiceTopologies getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @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.deploymentmanager.v2018-09-01-preview.ServiceTopologies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a service topology. + * Synchronously creates a new service topology or updates an existing service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceTopologyInfo Source topology object defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceTopologyResourceInner object if successful. + */ + public ServiceTopologyResourceInner createOrUpdate(String resourceGroupName, String serviceTopologyName, ServiceTopologyResourceInner serviceTopologyInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceTopologyInfo).toBlocking().single().body(); + } + + /** + * Creates or updates a service topology. + * Synchronously creates a new service topology or updates an existing service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceTopologyInfo Source topology object defines the resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serviceTopologyName, ServiceTopologyResourceInner serviceTopologyInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceTopologyInfo), serviceCallback); + } + + /** + * Creates or updates a service topology. + * Synchronously creates a new service topology or updates an existing service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceTopologyInfo Source topology object defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTopologyResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceTopologyName, ServiceTopologyResourceInner serviceTopologyInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceTopologyInfo).map(new Func1, ServiceTopologyResourceInner>() { + @Override + public ServiceTopologyResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service topology. + * Synchronously creates a new service topology or updates an existing service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceTopologyInfo Source topology object defines the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTopologyResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, ServiceTopologyResourceInner serviceTopologyInfo) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceTopologyInfo == null) { + throw new IllegalArgumentException("Parameter serviceTopologyInfo 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(serviceTopologyInfo); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceTopologyInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceTopologyResourceInner object if successful. + */ + public ServiceTopologyResourceInner getByResourceGroup(String resourceGroupName, String serviceTopologyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceTopologyName).toBlocking().single().body(); + } + + /** + * Gets the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String serviceTopologyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceTopologyName), serviceCallback); + } + + /** + * Gets the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTopologyResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String serviceTopologyName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serviceTopologyName).map(new Func1, ServiceTopologyResourceInner>() { + @Override + public ServiceTopologyResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceTopologyResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String serviceTopologyName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName).toBlocking().single().body(); + } + + /** + * Deletes the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @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 serviceTopologyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName), serviceCallback); + } + + /** + * Deletes the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceTopologyName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the service topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceImpl.java new file mode 100644 index 0000000000000..bdce570986be2 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceImpl.java @@ -0,0 +1,57 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceTopologyResource; +import rx.Observable; + +class ServiceTopologyResourceImpl extends GroupableResourceCoreImpl implements ServiceTopologyResource, ServiceTopologyResource.Definition, ServiceTopologyResource.Update { + ServiceTopologyResourceImpl(String name, ServiceTopologyResourceInner inner, DeploymentManagerManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ServiceTopologiesInner client = this.manager().inner().serviceTopologies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServiceTopologiesInner client = this.manager().inner().serviceTopologies(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServiceTopologiesInner client = this.manager().inner().serviceTopologies(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String artifactSourceId() { + return this.inner().artifactSourceId(); + } + + @Override + public ServiceTopologyResourceImpl withArtifactSourceId(String artifactSourceId) { + this.inner().withArtifactSourceId(artifactSourceId); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceInner.java new file mode 100644 index 0000000000000..059422b38fb4c --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceTopologyResourceInner.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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The resource representation of a service topology. + */ +@JsonFlatten +public class ServiceTopologyResourceInner extends Resource { + /** + * The resource Id of the artifact source that contains the artifacts that + * can be referenced in the service units. + */ + @JsonProperty(value = "properties.artifactSourceId") + private String artifactSourceId; + + /** + * Get the resource Id of the artifact source that contains the artifacts that can be referenced in the service units. + * + * @return the artifactSourceId value + */ + public String artifactSourceId() { + return this.artifactSourceId; + } + + /** + * Set the resource Id of the artifact source that contains the artifacts that can be referenced in the service units. + * + * @param artifactSourceId the artifactSourceId value to set + * @return the ServiceTopologyResourceInner object itself. + */ + public ServiceTopologyResourceInner withArtifactSourceId(String artifactSourceId) { + this.artifactSourceId = artifactSourceId; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitInner.java new file mode 100644 index 0000000000000..2e78c550d89a4 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitInner.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.deploymentmanager.v2018-09-01-preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.RolloutStep; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitProperties; + +/** + * Defines a service unit. + */ +public class ServiceUnitInner extends ServiceUnitProperties { + /** + * Name of the service unit. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Detailed step information, if present. + */ + @JsonProperty(value = "steps") + private List steps; + + /** + * Get name of the service unit. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the service unit. + * + * @param name the name value to set + * @return the ServiceUnitInner object itself. + */ + public ServiceUnitInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get detailed step information, if present. + * + * @return the steps value + */ + public List steps() { + return this.steps; + } + + /** + * Set detailed step information, if present. + * + * @param steps the steps value to set + * @return the ServiceUnitInner object itself. + */ + public ServiceUnitInner withSteps(List steps) { + this.steps = steps; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceImpl.java new file mode 100644 index 0000000000000..0f59e147f1045 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceImpl.java @@ -0,0 +1,155 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.DeploymentMode; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitArtifacts; + +class ServiceUnitResourceImpl extends CreatableUpdatableImpl implements ServiceUnitResource, ServiceUnitResource.Definition, ServiceUnitResource.Update { + private final DeploymentManagerManager manager; + private String resourceGroupName; + private String serviceTopologyName; + private String serviceName; + private String serviceUnitName; + + ServiceUnitResourceImpl(String name, DeploymentManagerManager manager) { + super(name, new ServiceUnitResourceInner()); + this.manager = manager; + // Set resource name + this.serviceUnitName = name; + // + } + + ServiceUnitResourceImpl(ServiceUnitResourceInner inner, DeploymentManagerManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.serviceUnitName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceTopologyName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceTopologies"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.serviceUnitName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceUnits"); + // + } + + @Override + public DeploymentManagerManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ServiceUnitsInner client = this.manager().inner().serviceUnits(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName, this.serviceUnitName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServiceUnitsInner client = this.manager().inner().serviceUnits(); + return client.createOrUpdateAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName, this.serviceUnitName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServiceUnitsInner client = this.manager().inner().serviceUnits(); + return client.getAsync(this.resourceGroupName, this.serviceTopologyName, this.serviceName, this.serviceUnitName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public ServiceUnitArtifacts artifacts() { + return this.inner().artifacts(); + } + + @Override + public DeploymentMode deploymentMode() { + return this.inner().deploymentMode(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String targetResourceGroup() { + return this.inner().targetResourceGroup(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ServiceUnitResourceImpl withExistingService(String resourceGroupName, String serviceTopologyName, String serviceName) { + this.resourceGroupName = resourceGroupName; + this.serviceTopologyName = serviceTopologyName; + this.serviceName = serviceName; + return this; + } + + @Override + public ServiceUnitResourceImpl withDeploymentMode(DeploymentMode deploymentMode) { + this.inner().withDeploymentMode(deploymentMode); + return this; + } + + @Override + public ServiceUnitResourceImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public ServiceUnitResourceImpl withTargetResourceGroup(String targetResourceGroup) { + this.inner().withTargetResourceGroup(targetResourceGroup); + return this; + } + + @Override + public ServiceUnitResourceImpl withArtifacts(ServiceUnitArtifacts artifacts) { + this.inner().withArtifacts(artifacts); + return this; + } + + @Override + public ServiceUnitResourceImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceInner.java new file mode 100644 index 0000000000000..4ce349034e062 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitResourceInner.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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.DeploymentMode; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitArtifacts; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Represents the response of a service unit resource. + */ +@JsonFlatten +public class ServiceUnitResourceInner extends Resource { + /** + * The Azure Resource Group to which the resources in the service unit + * belong to or should be deployed to. + */ + @JsonProperty(value = "properties.targetResourceGroup", required = true) + private String targetResourceGroup; + + /** + * Describes the type of ARM deployment to be performed on the resource. + * Possible values include: 'Incremental', 'Complete'. + */ + @JsonProperty(value = "properties.deploymentMode", required = true) + private DeploymentMode deploymentMode; + + /** + * The artifacts for the service unit. + */ + @JsonProperty(value = "properties.artifacts") + private ServiceUnitArtifacts artifacts; + + /** + * Get the Azure Resource Group to which the resources in the service unit belong to or should be deployed to. + * + * @return the targetResourceGroup value + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Set the Azure Resource Group to which the resources in the service unit belong to or should be deployed to. + * + * @param targetResourceGroup the targetResourceGroup value to set + * @return the ServiceUnitResourceInner object itself. + */ + public ServiceUnitResourceInner withTargetResourceGroup(String targetResourceGroup) { + this.targetResourceGroup = targetResourceGroup; + return this; + } + + /** + * Get describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete'. + * + * @return the deploymentMode value + */ + public DeploymentMode deploymentMode() { + return this.deploymentMode; + } + + /** + * Set describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete'. + * + * @param deploymentMode the deploymentMode value to set + * @return the ServiceUnitResourceInner object itself. + */ + public ServiceUnitResourceInner withDeploymentMode(DeploymentMode deploymentMode) { + this.deploymentMode = deploymentMode; + return this; + } + + /** + * Get the artifacts for the service unit. + * + * @return the artifacts value + */ + public ServiceUnitArtifacts artifacts() { + return this.artifacts; + } + + /** + * Set the artifacts for the service unit. + * + * @param artifacts the artifacts value to set + * @return the ServiceUnitResourceInner object itself. + */ + public ServiceUnitResourceInner withArtifacts(ServiceUnitArtifacts artifacts) { + this.artifacts = artifacts; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsImpl.java new file mode 100644 index 0000000000000..0bcfcf5b7006b --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnits; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitResource; + +class ServiceUnitsImpl extends WrapperImpl implements ServiceUnits { + private final DeploymentManagerManager manager; + + ServiceUnitsImpl(DeploymentManagerManager manager) { + super(manager.inner().serviceUnits()); + this.manager = manager; + } + + public DeploymentManagerManager manager() { + return this.manager; + } + + @Override + public ServiceUnitResourceImpl define(String name) { + return wrapModel(name); + } + + private ServiceUnitResourceImpl wrapModel(ServiceUnitResourceInner inner) { + return new ServiceUnitResourceImpl(inner, manager()); + } + + private ServiceUnitResourceImpl wrapModel(String name) { + return new ServiceUnitResourceImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + ServiceUnitsInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName) + .map(new Func1() { + @Override + public ServiceUnitResource call(ServiceUnitResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + ServiceUnitsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).toCompletable(); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsInner.java new file mode 100644 index 0000000000000..26ccffb795080 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServiceUnitsInner.java @@ -0,0 +1,485 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnitsCreateOrUpdateHeaders; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.ServiceResponseWithHeaders; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ServiceUnits. + */ +public class ServiceUnitsInner { + /** The Retrofit service to perform REST calls. */ + private ServiceUnitsService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of ServiceUnitsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceUnitsInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(ServiceUnitsService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceUnits to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceUnitsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceUnits createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Path("serviceUnitName") String serviceUnitName, @Query("api-version") String apiVersion, @Body ServiceUnitResourceInner serviceUnitInfo, @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.deploymentmanager.v2018-09-01-preview.ServiceUnits beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Path("serviceUnitName") String serviceUnitName, @Query("api-version") String apiVersion, @Body ServiceUnitResourceInner serviceUnitInfo, @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.deploymentmanager.v2018-09-01-preview.ServiceUnits get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Path("serviceUnitName") String serviceUnitName, @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.deploymentmanager.v2018-09-01-preview.ServiceUnits delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}/serviceUnits/{serviceUnitName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Path("serviceUnitName") String serviceUnitName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceUnitResourceInner object if successful. + */ + public ServiceUnitResourceInner createOrUpdate(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).toBlocking().last().body(); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @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 serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo), serviceCallback); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).map(new Func1, ServiceUnitResourceInner>() { + @Override + public ServiceUnitResourceInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceUnitName == null) { + throw new IllegalArgumentException("Parameter serviceUnitName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (serviceUnitInfo == null) { + throw new IllegalArgumentException("Parameter serviceUnitInfo is required and cannot be null."); + } + Validator.validate(serviceUnitInfo); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, this.client.apiVersion(), serviceUnitInfo, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultWithHeadersAsync(observable, new TypeToken() { }.getType(), ServiceUnitsCreateOrUpdateHeaders.class); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceUnitResourceInner object if successful. + */ + public ServiceUnitResourceInner beginCreateOrUpdate(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).toBlocking().single().body(); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @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 serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo), serviceCallback); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceUnitResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, serviceUnitInfo).map(new Func1, ServiceUnitResourceInner>() { + @Override + public ServiceUnitResourceInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service unit under the service in the service topology. + * This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceUnitInfo The service unit resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceUnitResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceUnitName == null) { + throw new IllegalArgumentException("Parameter serviceUnitName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (serviceUnitInfo == null) { + throw new IllegalArgumentException("Parameter serviceUnitInfo is required and cannot be null."); + } + Validator.validate(serviceUnitInfo); + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, this.client.apiVersion(), serviceUnitInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .buildWithHeaders(response, ServiceUnitsCreateOrUpdateHeaders.class); + } + + /** + * Gets the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceUnitResourceInner object if successful. + */ + public ServiceUnitResourceInner get(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + return getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).toBlocking().single().body(); + } + + /** + * Gets the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName), serviceCallback); + } + + /** + * Gets the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceUnitResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + return getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).map(new Func1, ServiceUnitResourceInner>() { + @Override + public ServiceUnitResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceUnitResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceUnitName == null) { + throw new IllegalArgumentException("Parameter serviceUnitName 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, serviceTopologyName, serviceName, serviceUnitName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).toBlocking().single().body(); + } + + /** + * Deletes the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName), serviceCallback); + } + + /** + * Deletes the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceUnitName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the service unit. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceUnitName The name of the service unit resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceUnitName == null) { + throw new IllegalArgumentException("Parameter serviceUnitName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesImpl.java new file mode 100644 index 0000000000000..f4a8cd94a86fa --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Services; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.ServiceResource; + +class ServicesImpl extends WrapperImpl implements Services { + private final DeploymentManagerManager manager; + + ServicesImpl(DeploymentManagerManager manager) { + super(manager.inner().services()); + this.manager = manager; + } + + public DeploymentManagerManager manager() { + return this.manager; + } + + @Override + public ServiceResourceImpl define(String name) { + return wrapModel(name); + } + + private ServiceResourceImpl wrapModel(ServiceResourceInner inner) { + return new ServiceResourceImpl(inner, manager()); + } + + private ServiceResourceImpl wrapModel(String name) { + return new ServiceResourceImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + ServicesInner client = this.inner(); + return client.getAsync(resourceGroupName, serviceTopologyName, serviceName) + .map(new Func1() { + @Override + public ServiceResource call(ServiceResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + ServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, serviceTopologyName, serviceName).toCompletable(); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesInner.java new file mode 100644 index 0000000000000..351f89d91e630 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/ServicesInner.java @@ -0,0 +1,363 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Services. + */ +public class ServicesInner { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Services createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body ServiceResourceInner serviceInfo, @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.deploymentmanager.v2018-09-01-preview.Services get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @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.deploymentmanager.v2018-09-01-preview.Services delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serviceTopologyName") String serviceTopologyName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a service in the service topology. + * Synchronously creates a new service or updates an existing service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceInfo The service object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceResourceInner object if successful. + */ + public ServiceResourceInner createOrUpdate(String resourceGroupName, String serviceTopologyName, String serviceName, ServiceResourceInner serviceInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceInfo).toBlocking().single().body(); + } + + /** + * Creates or updates a service in the service topology. + * Synchronously creates a new service or updates an existing service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceInfo The service object + * @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 serviceTopologyName, String serviceName, ServiceResourceInner serviceInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceInfo), serviceCallback); + } + + /** + * Creates or updates a service in the service topology. + * Synchronously creates a new service or updates an existing service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceInfo The service object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String serviceTopologyName, String serviceName, ServiceResourceInner serviceInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName, serviceInfo).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a service in the service topology. + * Synchronously creates a new service or updates an existing service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceInfo The service object + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName, ServiceResourceInner serviceInfo) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (serviceInfo == null) { + throw new IllegalArgumentException("Parameter serviceInfo is required and cannot be null."); + } + Validator.validate(serviceInfo); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceName, this.client.apiVersion(), serviceInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceResourceInner object if successful. + */ + public ServiceResourceInner get(String resourceGroupName, String serviceTopologyName, String serviceName) { + return getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName).toBlocking().single().body(); + } + + /** + * Gets the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String serviceTopologyName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName), serviceCallback); + } + + /** + * Gets the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable getAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + return getWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName).map(new Func1, ServiceResourceInner>() { + @Override + public ServiceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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, serviceTopologyName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String serviceTopologyName, String serviceName) { + deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName).toBlocking().single().body(); + } + + /** + * Deletes the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName), serviceCallback); + } + + /** + * Deletes the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + return deleteWithServiceResponseAsync(resourceGroupName, serviceTopologyName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serviceTopologyName The name of the service topology . + * @param serviceName The name of the service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String serviceTopologyName, String serviceName) { + 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 (serviceTopologyName == null) { + throw new IllegalArgumentException("Parameter serviceTopologyName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, serviceTopologyName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepInner.java new file mode 100644 index 0000000000000..f64969ddf4bba --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepInner.java @@ -0,0 +1,150 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.PrePostStep; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that define an Azure Deployment Manager step. + */ +public class StepInner { + /** + * The name of the step group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The list of step group names on which this step group depends on. + */ + @JsonProperty(value = "dependsOnStepGroups") + private List dependsOnStepGroups; + + /** + * The list of steps to be run before deploying the target. + */ + @JsonProperty(value = "preDeploymentSteps") + private List preDeploymentSteps; + + /** + * The resource Id of service unit to be deployed. The service unit should + * be from the service topology referenced in targetServiceTopologyId. + */ + @JsonProperty(value = "deploymentTargetId", required = true) + private String deploymentTargetId; + + /** + * The list of steps to be run after deploying the target. + */ + @JsonProperty(value = "postDeploymentSteps") + private List postDeploymentSteps; + + /** + * Get the name of the step group. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the step group. + * + * @param name the name value to set + * @return the StepInner object itself. + */ + public StepInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the list of step group names on which this step group depends on. + * + * @return the dependsOnStepGroups value + */ + public List dependsOnStepGroups() { + return this.dependsOnStepGroups; + } + + /** + * Set the list of step group names on which this step group depends on. + * + * @param dependsOnStepGroups the dependsOnStepGroups value to set + * @return the StepInner object itself. + */ + public StepInner withDependsOnStepGroups(List dependsOnStepGroups) { + this.dependsOnStepGroups = dependsOnStepGroups; + return this; + } + + /** + * Get the list of steps to be run before deploying the target. + * + * @return the preDeploymentSteps value + */ + public List preDeploymentSteps() { + return this.preDeploymentSteps; + } + + /** + * Set the list of steps to be run before deploying the target. + * + * @param preDeploymentSteps the preDeploymentSteps value to set + * @return the StepInner object itself. + */ + public StepInner withPreDeploymentSteps(List preDeploymentSteps) { + this.preDeploymentSteps = preDeploymentSteps; + return this; + } + + /** + * Get the resource Id of service unit to be deployed. The service unit should be from the service topology referenced in targetServiceTopologyId. + * + * @return the deploymentTargetId value + */ + public String deploymentTargetId() { + return this.deploymentTargetId; + } + + /** + * Set the resource Id of service unit to be deployed. The service unit should be from the service topology referenced in targetServiceTopologyId. + * + * @param deploymentTargetId the deploymentTargetId value to set + * @return the StepInner object itself. + */ + public StepInner withDeploymentTargetId(String deploymentTargetId) { + this.deploymentTargetId = deploymentTargetId; + return this; + } + + /** + * Get the list of steps to be run after deploying the target. + * + * @return the postDeploymentSteps value + */ + public List postDeploymentSteps() { + return this.postDeploymentSteps; + } + + /** + * Set the list of steps to be run after deploying the target. + * + * @param postDeploymentSteps the postDeploymentSteps value to set + * @return the StepInner object itself. + */ + public StepInner withPostDeploymentSteps(List postDeploymentSteps) { + this.postDeploymentSteps = postDeploymentSteps; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceImpl.java new file mode 100644 index 0000000000000..a74315c123a8e --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceImpl.java @@ -0,0 +1,58 @@ +/** + * 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.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.StepResource; +import rx.Observable; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.StepProperties; + +class StepResourceImpl extends GroupableResourceCoreImpl implements StepResource, StepResource.Definition, StepResource.Update { + StepResourceImpl(String name, StepResourceInner inner, DeploymentManagerManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + StepsInner client = this.manager().inner().steps(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + StepsInner client = this.manager().inner().steps(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StepsInner client = this.manager().inner().steps(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public StepProperties properties() { + return this.inner().properties(); + } + + @Override + public StepResourceImpl withProperties(StepProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceInner.java new file mode 100644 index 0000000000000..4553fc1809c72 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepResourceInner.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.StepProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Resource; + +/** + * The resource representation of a rollout step. + */ +public class StepResourceInner extends Resource { + /** + * The properties that define the step. + */ + @JsonProperty(value = "properties", required = true) + private StepProperties properties; + + /** + * Get the properties that define the step. + * + * @return the properties value + */ + public StepProperties properties() { + return this.properties; + } + + /** + * Set the properties that define the step. + * + * @param properties the properties value to set + * @return the StepResourceInner object itself. + */ + public StepResourceInner withProperties(StepProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsImpl.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsImpl.java new file mode 100644 index 0000000000000..e920b4db763e8 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsImpl.java @@ -0,0 +1,88 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Steps; +import com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.StepResource; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; + +class StepsImpl extends GroupableResourcesCoreImpl implements Steps { + protected StepsImpl(DeploymentManagerManager manager) { + super(manager.inner().steps(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + StepsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + StepsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public StepResourceImpl define(String name) { + return wrapModel(name); + } + + @Override + protected StepResourceImpl wrapModel(StepResourceInner inner) { + return new StepResourceImpl(inner.name(), inner, manager()); + } + + @Override + protected StepResourceImpl wrapModel(String name) { + return new StepResourceImpl(name, new StepResourceInner(), this.manager()); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsInner.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsInner.java new file mode 100644 index 0000000000000..5ed1bc76c36f6 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/StepsInner.java @@ -0,0 +1,425 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Steps. + */ +public class StepsInner implements InnerSupportsGet, InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private StepsService service; + /** The service client containing this operation class. */ + private AzureDeploymentManagerImpl client; + + /** + * Initializes an instance of StepsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public StepsInner(Retrofit retrofit, AzureDeploymentManagerImpl client) { + this.service = retrofit.create(StepsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Steps to be + * used by Retrofit to perform actually REST calls. + */ + interface StepsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.Steps createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("stepName") String stepName, @Query("api-version") String apiVersion, @Body StepResourceInner stepInfo, @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.deploymentmanager.v2018-09-01-preview.Steps getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("stepName") String stepName, @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.deploymentmanager.v2018-09-01-preview.Steps delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/steps/{stepName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("stepName") String stepName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StepResourceInner object if successful. + */ + public StepResourceInner createOrUpdate(String resourceGroupName, String stepName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName).toBlocking().single().body(); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @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 stepName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName), serviceCallback); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String stepName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName).map(new Func1, StepResourceInner>() { + @Override + public StepResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String stepName) { + 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 (stepName == null) { + throw new IllegalArgumentException("Parameter stepName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final StepResourceInner stepInfo = null; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, stepName, this.client.apiVersion(), stepInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @param stepInfo The step object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StepResourceInner object if successful. + */ + public StepResourceInner createOrUpdate(String resourceGroupName, String stepName, StepResourceInner stepInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName, stepInfo).toBlocking().single().body(); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @param stepInfo The step object. + * @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 stepName, StepResourceInner stepInfo, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName, stepInfo), serviceCallback); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @param stepInfo The step object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String stepName, StepResourceInner stepInfo) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, stepName, stepInfo).map(new Func1, StepResourceInner>() { + @Override + public StepResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a rollout step with the given step properties. + * Synchronously creates a new step or updates an existing step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @param stepInfo The step object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String stepName, StepResourceInner stepInfo) { + 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 (stepName == null) { + throw new IllegalArgumentException("Parameter stepName 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(stepInfo); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, stepName, this.client.apiVersion(), stepInfo, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StepResourceInner object if successful. + */ + public StepResourceInner getByResourceGroup(String resourceGroupName, String stepName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, stepName).toBlocking().single().body(); + } + + /** + * Gets the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String stepName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, stepName), serviceCallback); + } + + /** + * Gets the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String stepName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, stepName).map(new Func1, StepResourceInner>() { + @Override + public StepResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StepResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String stepName) { + 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 (stepName == null) { + throw new IllegalArgumentException("Parameter stepName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, stepName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String stepName) { + deleteWithServiceResponseAsync(resourceGroupName, stepName).toBlocking().single().body(); + } + + /** + * Deletes the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @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 stepName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, stepName), serviceCallback); + } + + /** + * Deletes the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String stepName) { + return deleteWithServiceResponseAsync(resourceGroupName, stepName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the step. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param stepName The name of the deployment step. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String stepName) { + 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 (stepName == null) { + throw new IllegalArgumentException("Parameter stepName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, stepName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/package-info.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/implementation/package-info.java new file mode 100644 index 0000000000000..8ff54d9299ce4 --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/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 AzureDeploymentManager. + * REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. + */ +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview.implementation; diff --git a/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/package-info.java b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/package-info.java new file mode 100644 index 0000000000000..9a9a75c20f7ca --- /dev/null +++ b/deploymentmanager/resource-manager/v2018-09-01-preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2018-09-01-preview/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 AzureDeploymentManager. + * REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. + */ +package com.microsoft.azure.management.deploymentmanager.v2018-09-01-preview;