From f1ed6d49349035340bd47f2535f9ad3f27ed683d Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 14 Feb 2020 03:15:13 +0000 Subject: [PATCH] Generated from 86be24b3cd40d55ff18c1b8f98ca36463f5e5ff7 Mark response body properties as readOnly;remove template property --- sdk/resources/mgmt-v2016_09_01/pom.xml | 8 +- .../v2016_09_01/DeploymentExtended.java | 6 ++ .../DeploymentPropertiesExtended.java | 6 +- .../resources/v2016_09_01/Deployments.java | 11 ++- .../v2016_09_01/ErrorAdditionalInfo.java | 47 ++++++++++ .../resources/v2016_09_01/ErrorResponse.java | 93 +++++++++++++++++++ .../v2016_09_01/ExportTemplateRequest.java | 20 ++-- .../resources/v2016_09_01/ParametersLink.java | 2 +- .../resources/v2016_09_01/ResourceGroup.java | 19 ++++ .../resources/v2016_09_01/ResourceGroups.java | 2 +- .../resources/v2016_09_01/Resources.java | 6 +- .../v2016_09_01/TemplateHashResult.java | 30 ++++++ .../DeploymentExtendedImpl.java | 4 +- .../DeploymentOperationImpl.java | 1 + .../DeploymentOperationsImpl.java | 10 +- .../implementation/DeploymentsImpl.java | 29 ++++-- .../implementation/DeploymentsInner.java | 80 ++++++++++++++++ .../implementation/ProviderImpl.java | 1 + .../implementation/ProvidersImpl.java | 10 +- .../implementation/ResourceGroupImpl.java | 2 +- .../implementation/ResourceGroupInner.java | 6 +- .../implementation/ResourceGroupsImpl.java | 16 ++-- .../ResourceManagementClientImpl.java | 20 ++-- .../implementation/ResourcesImpl.java | 12 +-- .../implementation/ResourcesInner.java | 16 ++-- .../TemplateHashResultImpl.java | 36 +++++++ .../TemplateHashResultInner.java | 70 ++++++++++++++ 27 files changed, 492 insertions(+), 71 deletions(-) create mode 100644 sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorAdditionalInfo.java create mode 100644 sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorResponse.java create mode 100644 sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/TemplateHashResult.java create mode 100644 sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultImpl.java create mode 100644 sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultInner.java diff --git a/sdk/resources/mgmt-v2016_09_01/pom.xml b/sdk/resources/mgmt-v2016_09_01/pom.xml index 87cfc54c9749a..6ec58d9359fab 100644 --- a/sdk/resources/mgmt-v2016_09_01/pom.xml +++ b/sdk/resources/mgmt-v2016_09_01/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml azure-mgmt-resources @@ -19,7 +19,7 @@ jar Microsoft Azure SDK for Resources Management This package contains Microsoft Resources Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentExtended.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentExtended.java index 59d732305195c..988bea07ff9e5 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentExtended.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentExtended.java @@ -59,6 +59,8 @@ interface Blank extends WithResourceGroupName { interface WithResourceGroupName { /** * Specifies resourceGroupName. + * @param resourceGroupName The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist + * @return the next definition stage */ WithProperties withResourceGroupName(String resourceGroupName); } @@ -69,6 +71,8 @@ interface WithResourceGroupName { interface WithProperties { /** * Specifies properties. + * @param properties The deployment properties + * @return the next definition stage */ WithCreate withProperties(DeploymentProperties properties); } @@ -97,6 +101,8 @@ interface UpdateStages { interface WithProperties { /** * Specifies properties. + * @param properties The deployment properties + * @return the next update stage */ Update withProperties(DeploymentProperties properties); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentPropertiesExtended.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentPropertiesExtended.java index f4b9edba5924e..e13ee6e467a93 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentPropertiesExtended.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/DeploymentPropertiesExtended.java @@ -36,7 +36,7 @@ public class DeploymentPropertiesExtended { private DateTime timestamp; /** - * Key/value pairs that represent deploymentoutput. + * Key/value pairs that represent deployment output. */ @JsonProperty(value = "outputs") private Object outputs; @@ -120,7 +120,7 @@ public DateTime timestamp() { } /** - * Get key/value pairs that represent deploymentoutput. + * Get key/value pairs that represent deployment output. * * @return the outputs value */ @@ -129,7 +129,7 @@ public Object outputs() { } /** - * Set key/value pairs that represent deploymentoutput. + * Set key/value pairs that represent deployment output. * * @param outputs the outputs value to set * @return the DeploymentPropertiesExtended object itself. diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Deployments.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Deployments.java index 1ddc1b70768e7..328df6e4d4bb5 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Deployments.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Deployments.java @@ -30,7 +30,7 @@ public interface Deployments extends SupportsCreating checkExistenceAsync(String resourceGroupName, String deploymentName); /** * Cancels a currently running template deployment. @@ -64,4 +64,13 @@ public interface Deployments extends SupportsCreating exportTemplateAsync(String resourceGroupName, String deploymentName); + /** + * Calculate the hash of the given template. + * + * @param template The template provided to calculate hash. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable calculateTemplateHashAsync(Object template); + } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorAdditionalInfo.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorAdditionalInfo.java new file mode 100644 index 0000000000000..45670f6b88965 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorAdditionalInfo.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.resources.v2016_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error additional info. + */ +public class ErrorAdditionalInfo { + /** + * The additional info type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * The additional info. + */ + @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY) + private Object info; + + /** + * Get the additional info type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the additional info. + * + * @return the info value + */ + public Object info() { + return this.info; + } + +} diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorResponse.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorResponse.java new file mode 100644 index 0000000000000..8b55312ec490e --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ErrorResponse.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.resources.v2016_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The resource management error response. + */ +public class ErrorResponse { + /** + * The error code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * The error message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * The error target. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * The error details. + */ + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; + + /** + * The error additional info. + */ + @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) + private List additionalInfo; + + /** + * Get the error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the error target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the error details. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Get the error additional info. + * + * @return the additionalInfo value + */ + public List additionalInfo() { + return this.additionalInfo; + } + +} diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ExportTemplateRequest.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ExportTemplateRequest.java index dc8e684b0c386..cb280180737cd 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ExportTemplateRequest.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ExportTemplateRequest.java @@ -16,23 +16,23 @@ */ public class ExportTemplateRequest { /** - * The IDs of the resources. The only supported string currently is '*' - * (all resources). Future updates will support exporting specific - * resources. + * The IDs of the resources to filter the export by. To export all + * resources, supply an array with single entry '*'. */ @JsonProperty(value = "resources") private List resources; /** - * The export template options. Supported values include - * 'IncludeParameterDefaultValue', 'IncludeComments' or - * 'IncludeParameterDefaultValue, IncludeComments. + * The export template options. A CSV-formatted list containing zero or + * more of the following: 'IncludeParameterDefaultValue', + * 'IncludeComments', 'SkipResourceNameParameterization', + * 'SkipAllParameterization'. */ @JsonProperty(value = "options") private String options; /** - * Get the IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources. + * Get the IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. * * @return the resources value */ @@ -41,7 +41,7 @@ public List resources() { } /** - * Set the IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources. + * Set the IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. * * @param resources the resources value to set * @return the ExportTemplateRequest object itself. @@ -52,7 +52,7 @@ public ExportTemplateRequest withResources(List resources) { } /** - * Get the export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments. + * Get the export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'. * * @return the options value */ @@ -61,7 +61,7 @@ public String options() { } /** - * Set the export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments. + * Set the export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'. * * @param options the options value to set * @return the ExportTemplateRequest object itself. diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ParametersLink.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ParametersLink.java index 087bfde92ef66..b8c9489f98564 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ParametersLink.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ParametersLink.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Entity representing the reference to the deployment paramaters. + * Entity representing the reference to the deployment parameters. */ public class ParametersLink { /** diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroup.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroup.java index 8e9df83c6dde9..2878d52f14bc3 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroup.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroup.java @@ -75,6 +75,7 @@ interface Blank extends WithSubscription { interface WithSubscription { /** * Specifies . + * @return the next definition stage */ WithLocation withExistingSubscription(); } @@ -85,6 +86,8 @@ interface WithSubscription { interface WithLocation { /** * Specifies location. + * @param location The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations + * @return the next definition stage */ WithCreate withLocation(String location); } @@ -95,6 +98,8 @@ interface WithLocation { interface WithManagedBy { /** * Specifies managedBy. + * @param managedBy The ID of the resource that manages this resource group + * @return the next definition stage */ WithCreate withManagedBy(String managedBy); } @@ -105,6 +110,8 @@ interface WithManagedBy { interface WithName { /** * Specifies name. + * @param name The name of the resource group + * @return the next definition stage */ WithCreate withName(String name); } @@ -115,6 +122,8 @@ interface WithName { interface WithProperties { /** * Specifies properties. + * @param properties the properties parameter value + * @return the next definition stage */ WithCreate withProperties(ResourceGroupProperties properties); } @@ -125,6 +134,8 @@ interface WithProperties { interface WithTags { /** * Specifies tags. + * @param tags The tags attached to the resource group + * @return the next definition stage */ WithCreate withTags(Map tags); } @@ -153,6 +164,8 @@ interface UpdateStages { interface WithManagedBy { /** * Specifies managedBy. + * @param managedBy The ID of the resource that manages this resource group + * @return the next update stage */ Update withManagedBy(String managedBy); } @@ -163,6 +176,8 @@ interface WithManagedBy { interface WithName { /** * Specifies name. + * @param name The name of the resource group + * @return the next update stage */ Update withName(String name); } @@ -173,6 +188,8 @@ interface WithName { interface WithProperties { /** * Specifies properties. + * @param properties the properties parameter value + * @return the next update stage */ Update withProperties(ResourceGroupProperties properties); } @@ -183,6 +200,8 @@ interface WithProperties { interface WithTags { /** * Specifies tags. + * @param tags The tags attached to the resource group + * @return the next update stage */ Update withTags(Map tags); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroups.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroups.java index 02b11e1e48f91..7ba943d0a5c46 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroups.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourceGroups.java @@ -26,7 +26,7 @@ public interface ResourceGroups extends SupportsCreating checkExistenceAsync(String resourceGroupName); /** * Captures the specified resource group as a template. diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Resources.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Resources.java index 56f92ae104552..c3d71614485dd 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Resources.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/Resources.java @@ -26,7 +26,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Completable checkExistenceByIdAsync(String resourceId, String apiVersion); + Observable checkExistenceByIdAsync(String resourceId, String apiVersion); /** * Deletes a resource by ID. @@ -82,7 +82,7 @@ public interface Resources extends HasInner { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -101,7 +101,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Completable checkExistenceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion); + Observable checkExistenceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion); /** * Deletes a resource. diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/TemplateHashResult.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/TemplateHashResult.java new file mode 100644 index 0000000000000..ac90f3a8c78f8 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/TemplateHashResult.java @@ -0,0 +1,30 @@ +/** + * 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.resources.v2016_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.resources.v2016_09_01.implementation.ResourcesManager; +import com.microsoft.azure.management.resources.v2016_09_01.implementation.TemplateHashResultInner; + +/** + * Type representing TemplateHashResult. + */ +public interface TemplateHashResult extends HasInner, HasManager { + /** + * @return the minifiedTemplate value. + */ + String minifiedTemplate(); + + /** + * @return the templateHash value. + */ + String templateHash(); + +} diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentExtendedImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentExtendedImpl.java index adefb6ea00778..2994ed627d615 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentExtendedImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentExtendedImpl.java @@ -38,10 +38,10 @@ class DeploymentExtendedImpl extends CreatableUpdatableImpl getDeploymentOperationInnerUsingDep public Observable getAsync(String resourceGroupName, String deploymentName, String operationId) { DeploymentOperationsInner client = this.inner(); return client.getAsync(resourceGroupName, deploymentName, operationId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DeploymentOperation call(DeploymentOperationInner inner) { - return wrapDeploymentOperationModel(inner); + public Observable call(DeploymentOperationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DeploymentOperation)wrapDeploymentOperationModel(inner)); + } } }); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsImpl.java index 6c5ef2641c223..07ecffa575ad6 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsImpl.java @@ -25,6 +25,7 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.azure.management.resources.v2016_09_01.DeploymentValidateResult; import com.microsoft.azure.management.resources.v2016_09_01.DeploymentExportResult; +import com.microsoft.azure.management.resources.v2016_09_01.TemplateHashResult; import com.microsoft.azure.management.resources.v2016_09_01.DeploymentProperties; import com.microsoft.azure.arm.utils.PagedListConverter; import com.microsoft.azure.management.resources.v2016_09_01.DeploymentExtended; @@ -62,10 +63,10 @@ private DeploymentExtendedImpl wrapModel(String name) { } @Override - public Completable checkExistenceAsync(String resourceGroupName, String deploymentName) { + public Observable checkExistenceAsync(String resourceGroupName, String deploymentName) { DeploymentsInner client = this.inner(); - return client.checkExistenceAsync(resourceGroupName, deploymentName).toCompletable(); - } + return client.checkExistenceAsync(resourceGroupName, deploymentName) + ;} @Override public Completable cancelAsync(String resourceGroupName, String deploymentName) { @@ -97,6 +98,18 @@ public DeploymentExportResult call(DeploymentExportResultInner inner) { }); } + @Override + public Observable calculateTemplateHashAsync(Object template) { + DeploymentsInner client = this.inner(); + return client.calculateTemplateHashAsync(template) + .map(new Func1() { + @Override + public TemplateHashResult call(TemplateHashResultInner inner) { + return new TemplateHashResultImpl(inner, manager()); + } + }); + } + @Override public PagedList listByResourceGroup(String resourceGroupName) { DeploymentsInner client = this.inner(); @@ -133,10 +146,14 @@ public DeploymentExtended getByResourceGroup(String resourceGroupName, String na @Override public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return this.getInnerAsync(resourceGroupName, name).map(new Func1 () { + return this.getInnerAsync(resourceGroupName, name).flatMap(new Func1> () { @Override - public DeploymentExtended call(DeploymentExtendedInner innerT) { - return wrapModel(innerT); + public Observable call(DeploymentExtendedInner innerT) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DeploymentExtended)wrapModel(innerT)); + } } }); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsInner.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsInner.java index b7764d2caf443..dc7f673a4d005 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsInner.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/DeploymentsInner.java @@ -106,6 +106,10 @@ interface DeploymentsService { @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @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.resources.v2016_09_01.Deployments calculateTemplateHash" }) + @POST("providers/Microsoft.Resources/calculateTemplateHash") + Observable> calculateTemplateHash(@Query("api-version") String apiVersion, @Body Object template, @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.resources.v2016_09_01.Deployments listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1138,6 +1142,82 @@ private ServiceResponse> listByResourceGroupDe .build(response); } + /** + * Calculate the hash of the given template. + * + * @param template The template provided to calculate hash. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 TemplateHashResultInner object if successful. + */ + public TemplateHashResultInner calculateTemplateHash(Object template) { + return calculateTemplateHashWithServiceResponseAsync(template).toBlocking().single().body(); + } + + /** + * Calculate the hash of the given template. + * + * @param template The template provided to calculate hash. + * @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 calculateTemplateHashAsync(Object template, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(calculateTemplateHashWithServiceResponseAsync(template), serviceCallback); + } + + /** + * Calculate the hash of the given template. + * + * @param template The template provided to calculate hash. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TemplateHashResultInner object + */ + public Observable calculateTemplateHashAsync(Object template) { + return calculateTemplateHashWithServiceResponseAsync(template).map(new Func1, TemplateHashResultInner>() { + @Override + public TemplateHashResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Calculate the hash of the given template. + * + * @param template The template provided to calculate hash. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TemplateHashResultInner object + */ + public Observable> calculateTemplateHashWithServiceResponseAsync(Object template) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (template == null) { + throw new IllegalArgumentException("Parameter template is required and cannot be null."); + } + return service.calculateTemplateHash(this.client.apiVersion(), template, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = calculateTemplateHashDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse calculateTemplateHashDelegate(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); + } + /** * Get all the deployments for a resource group. * diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProviderImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProviderImpl.java index bd9a46a0f9cf9..50c234a397b2b 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProviderImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProviderImpl.java @@ -21,6 +21,7 @@ class ProviderImpl extends IndexableRefreshableWrapperImpl getAsync(String resourceProviderNamespace) { ProvidersInner client = this.inner(); return client.getAsync(resourceProviderNamespace) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Provider call(ProviderInner inner) { - return wrapModel(inner); + public Observable call(ProviderInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Provider)wrapModel(inner)); + } } }); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupImpl.java index 4ca46d3d0f7f5..082a772295993 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupImpl.java @@ -31,7 +31,7 @@ class ResourceGroupImpl extends CreatableUpdatableImpl checkExistenceAsync(String resourceGroupName) { ResourceGroupsInner client = this.inner(); - return client.checkExistenceAsync(resourceGroupName).toCompletable(); - } + return client.checkExistenceAsync(resourceGroupName) + ;} @Override public Observable exportTemplateAsync(String resourceGroupName, ExportTemplateRequest parameters) { @@ -85,10 +85,14 @@ public ResourceGroup call(ResourceGroupInner inner) { public Observable getAsync(String resourceGroupName) { ResourceGroupsInner client = this.inner(); return client.getAsync(resourceGroupName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ResourceGroup call(ResourceGroupInner inner) { - return wrapModel(inner); + public Observable call(ResourceGroupInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ResourceGroup)wrapModel(inner)); + } } }); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceManagementClientImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceManagementClientImpl.java index 72efac553a2f5..3ed7ae2ce4b58 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceManagementClientImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceManagementClientImpl.java @@ -63,11 +63,11 @@ public String apiVersion() { return this.apiVersion; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +76,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +86,11 @@ public ResourceManagementClientImpl withAcceptLanguage(String acceptLanguage) { return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ private int longRunningOperationRetryTimeout; /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +109,11 @@ public ResourceManagementClientImpl withLongRunningOperationRetryTimeout(int lon return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** 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 When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * 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. */ @@ -122,7 +122,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * 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 @@ -261,6 +261,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ResourceManagementClient", "2016-09-01"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "ResourceManagementClient", "2016-09-01"); } } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesImpl.java index 2e73f3400cb12..bd29af61cf78a 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesImpl.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesImpl.java @@ -36,10 +36,10 @@ private SubscriptionGenericResourceImpl wrapModel(GenericResourceInner inner) { } @Override - public Completable checkExistenceByIdAsync(String resourceId, String apiVersion) { + public Observable checkExistenceByIdAsync(String resourceId, String apiVersion) { ResourcesInner client = this.inner(); - return client.checkExistenceByIdAsync(resourceId, apiVersion).toCompletable(); - } + return client.checkExistenceByIdAsync(resourceId, apiVersion) + ;} @Override public Completable deleteByIdAsync(String resourceId, String apiVersion) { @@ -108,10 +108,10 @@ public Completable moveResourcesAsync(String sourceResourceGroupName, ResourcesM } @Override - public Completable checkExistenceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { + public Observable checkExistenceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { ResourcesInner client = this.inner(); - return client.checkExistenceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).toCompletable(); - } + return client.checkExistenceAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion) + ;} @Override public Completable deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesInner.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesInner.java index 5da6ae27ece2a..730c0cc67d524 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesInner.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcesInner.java @@ -151,7 +151,7 @@ interface ResourcesService { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -165,7 +165,7 @@ public void moveResources(String sourceResourceGroupName, ResourcesMoveInfo para * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -179,7 +179,7 @@ public ServiceFuture moveResourcesAsync(String sourceResourceGroupName, Re * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -197,7 +197,7 @@ public Void call(ServiceResponse response) { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -224,7 +224,7 @@ public Observable> moveResourcesWithServiceResponseAsync(S * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -238,7 +238,7 @@ public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfo * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -252,7 +252,7 @@ public ServiceFuture beginMoveResourcesAsync(String sourceResourceGroupNam * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. @@ -270,7 +270,7 @@ public Void call(ServiceResponse response) { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the rsources to move. + * @param sourceResourceGroupName The name of the resource group containing the resources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultImpl.java new file mode 100644 index 0000000000000..bfe53597f3003 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultImpl.java @@ -0,0 +1,36 @@ +/** + * 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.resources.v2016_09_01.implementation; + +import com.microsoft.azure.management.resources.v2016_09_01.TemplateHashResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class TemplateHashResultImpl extends WrapperImpl implements TemplateHashResult { + private final ResourcesManager manager; + TemplateHashResultImpl(TemplateHashResultInner inner, ResourcesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ResourcesManager manager() { + return this.manager; + } + + @Override + public String minifiedTemplate() { + return this.inner().minifiedTemplate(); + } + + @Override + public String templateHash() { + return this.inner().templateHash(); + } + +} diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultInner.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultInner.java new file mode 100644 index 0000000000000..4889644f7e443 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/TemplateHashResultInner.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.resources.v2016_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Result of the request to calculate template hash. It contains a string of + * minified template and its hash. + */ +public class TemplateHashResultInner { + /** + * The minified template string. + */ + @JsonProperty(value = "minifiedTemplate") + private String minifiedTemplate; + + /** + * The template hash. + */ + @JsonProperty(value = "templateHash") + private String templateHash; + + /** + * Get the minified template string. + * + * @return the minifiedTemplate value + */ + public String minifiedTemplate() { + return this.minifiedTemplate; + } + + /** + * Set the minified template string. + * + * @param minifiedTemplate the minifiedTemplate value to set + * @return the TemplateHashResultInner object itself. + */ + public TemplateHashResultInner withMinifiedTemplate(String minifiedTemplate) { + this.minifiedTemplate = minifiedTemplate; + return this; + } + + /** + * Get the template hash. + * + * @return the templateHash value + */ + public String templateHash() { + return this.templateHash; + } + + /** + * Set the template hash. + * + * @param templateHash the templateHash value to set + * @return the TemplateHashResultInner object itself. + */ + public TemplateHashResultInner withTemplateHash(String templateHash) { + this.templateHash = templateHash; + return this; + } + +}