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/GenericResource.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/GenericResource.java new file mode 100644 index 0000000000000..4783b134b38b2 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/GenericResource.java @@ -0,0 +1,76 @@ +/** + * 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.GenericResourceInner; +import java.util.Map; + +/** + * Type representing GenericResource. + */ +public interface GenericResource extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the managedBy value. + */ + String managedBy(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the plan value. + */ + Plan plan(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the sku value. + */ + Sku sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} 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..9e186db7bd31e 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 @@ -13,7 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.resources.v2016_09_01.implementation.ResourceGroupsInner; import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.resources.v2016_09_01.ResourcegroupSubscriptionGenericResource; +import com.microsoft.azure.management.resources.v2016_09_01.ResourcegroupSubscriptionGenericResourceExpanded; /** * Type representing ResourceGroups. @@ -26,7 +26,7 @@ public interface ResourceGroups extends SupportsCreating checkExistenceAsync(String resourceGroupName); /** * Captures the specified resource group as a template. @@ -72,6 +72,6 @@ public interface ResourceGroups extends SupportsCreating listByResourceGroupAsync(final String resourceGroupName); + Observable listByResourceGroupAsync(final String resourceGroupName); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourcegroupSubscriptionGenericResourceExpanded.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourcegroupSubscriptionGenericResourceExpanded.java new file mode 100644 index 0000000000000..974dbf5b3a5b0 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/ResourcegroupSubscriptionGenericResourceExpanded.java @@ -0,0 +1,92 @@ +/** + * 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.management.resources.v2016_09_01.implementation.GenericResourceExpandedInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.resources.v2016_09_01.implementation.ResourcesManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing ResourcegroupSubscriptionGenericResourceExpanded. + */ +public interface ResourcegroupSubscriptionGenericResourceExpanded extends HasInner, HasManager { + /** + * @return the changedTime value. + */ + DateTime changedTime(); + + /** + * @return the createdTime value. + */ + DateTime createdTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the managedBy value. + */ + String managedBy(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the plan value. + */ + Plan plan(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the sku value. + */ + Sku sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} 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..8333168647580 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. @@ -47,7 +47,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable createOrUpdateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters); + Observable createOrUpdateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters); /** * Updates a resource by ID. @@ -58,7 +58,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable updateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters); + Observable updateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters); /** * Gets a resource by ID. @@ -68,7 +68,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getByIdAsync(String resourceId, String apiVersion); + Observable getByIdAsync(String resourceId, String apiVersion); /** * Get all the resources in a subscription. @@ -76,13 +76,13 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(); + Observable listAsync(); /** * 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. @@ -130,7 +130,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable createOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters); + Observable createOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters); /** * Updates a resource. @@ -145,7 +145,7 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable updateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters); + Observable updateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters); /** * Gets a resource. @@ -159,6 +159,6 @@ public interface Resources extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion); + Observable getAsync(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/SubscriptionGenericResourceExpanded.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/SubscriptionGenericResourceExpanded.java new file mode 100644 index 0000000000000..f5f9de03c2e16 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/SubscriptionGenericResourceExpanded.java @@ -0,0 +1,92 @@ +/** + * 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.management.resources.v2016_09_01.implementation.GenericResourceExpandedInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.resources.v2016_09_01.implementation.ResourcesManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing SubscriptionGenericResourceExpanded. + */ +public interface SubscriptionGenericResourceExpanded extends HasInner, HasManager { + /** + * @return the changedTime value. + */ + DateTime changedTime(); + + /** + * @return the createdTime value. + */ + DateTime createdTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + Identity identity(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the managedBy value. + */ + String managedBy(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the plan value. + */ + Plan plan(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the sku value. + */ + Sku sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} 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/GenericResourceExpandedInner.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/GenericResourceExpandedInner.java new file mode 100644 index 0000000000000..1f38bb0a39048 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/GenericResourceExpandedInner.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.resources.v2016_09_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Resource information. + */ +public class GenericResourceExpandedInner extends GenericResourceInner { + /** + * The created time of the resource. This is only present if requested via + * the $expand query parameter. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTime; + + /** + * The changed time of the resource. This is only present if requested via + * the $expand query parameter. + */ + @JsonProperty(value = "changedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime changedTime; + + /** + * The provisioning state of the resource. This is only present if + * requested via the $expand query parameter. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the created time of the resource. This is only present if requested via the $expand query parameter. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get the changed time of the resource. This is only present if requested via the $expand query parameter. + * + * @return the changedTime value + */ + public DateTime changedTime() { + return this.changedTime; + } + + /** + * Get the provisioning state of the resource. This is only present if requested via the $expand query parameter. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/GenericResourceImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/GenericResourceImpl.java new file mode 100644 index 0000000000000..15a5c1cb46282 --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/GenericResourceImpl.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.resources.v2016_09_01.implementation; + +import com.microsoft.azure.management.resources.v2016_09_01.GenericResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.resources.v2016_09_01.Identity; +import com.microsoft.azure.management.resources.v2016_09_01.Plan; +import com.microsoft.azure.management.resources.v2016_09_01.Sku; +import java.util.Map; + +class GenericResourceImpl extends WrapperImpl implements GenericResource { + private final ResourcesManager manager; + GenericResourceImpl(GenericResourceInner inner, ResourcesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ResourcesManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String managedBy() { + return this.inner().managedBy(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Plan plan() { + return this.inner().plan(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public Sku sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} 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 implements ResourceGroups { private final ResourcesManager manager; @@ -46,10 +46,10 @@ private ResourceGroupImpl wrapModel(String name) { } @Override - public Completable checkExistenceAsync(String resourceGroupName) { + public Observable 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)); + } } }); } @@ -99,24 +103,24 @@ public Completable deleteAsync(String resourceGroupName) { return client.deleteAsync(resourceGroupName).toCompletable(); } - private ResourcegroupSubscriptionGenericResourceImpl wrapResourcegroupSubscriptionGenericResourceModel(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + private ResourcegroupSubscriptionGenericResourceExpandedImpl wrapResourcegroupSubscriptionGenericResourceExpandedModel(GenericResourceExpandedInner inner) { + return new ResourcegroupSubscriptionGenericResourceExpandedImpl(inner, manager()); } @Override - public Observable listByResourceGroupAsync(final String resourceGroupName) { + public Observable listByResourceGroupAsync(final String resourceGroupName) { ResourceGroupsInner client = this.inner(); return client.listByResourceGroupAsync(resourceGroupName) - .flatMapIterable(new Func1, Iterable>() { + .flatMapIterable(new Func1, Iterable>() { @Override - public Iterable call(Page page) { + public Iterable call(Page page) { return page.items(); } }) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return wrapResourcegroupSubscriptionGenericResourceModel(inner); + public ResourcegroupSubscriptionGenericResourceExpanded call(GenericResourceExpandedInner inner) { + return wrapResourcegroupSubscriptionGenericResourceExpandedModel(inner); } }); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java index 994e3b7163d15..0f4ec70cf979d 100644 --- a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java @@ -118,13 +118,13 @@ interface ResourceGroupsService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GenericResourceInner> object if successful. + * @return the PagedList<GenericResourceExpandedInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -138,12 +138,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, @@ -155,13 +155,13 @@ public Observable>> call(String nextP * * @param resourceGroupName The resource group with the resources to get. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { + public Observable> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -172,13 +172,13 @@ public Page call(ServiceResponse>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -193,9 +193,9 @@ public Observable>> call(ServiceRespo * * @param resourceGroupName The resource group with the resources to get. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -209,12 +209,12 @@ public Observable>> listByResourceGro final String expand = null; final Integer top = null; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -227,18 +227,18 @@ public Observable>> call(Response listByResourceGroup(final String resourceGroupName, final String filter, final String expand, final Integer top) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final String expand, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -249,18 +249,18 @@ public Page nextPage(String nextPageLink) { * * @param resourceGroupName The resource group with the resources to get. * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter + * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. * @param top The number of results to return. If null is passed, returns all resources. * @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> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, @@ -272,16 +272,16 @@ public Observable>> call(String nextP * * @param resourceGroupName The resource group with the resources to get. * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter + * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. * @param top The number of results to return. If null is passed, returns all resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, expand, top) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -292,16 +292,16 @@ public Page call(ServiceResponse>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { return listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -314,14 +314,14 @@ public Observable>> call(ServiceRespo /** * Get all the resources for a resource group. * - ServiceResponse> * @param resourceGroupName The resource group with the resources to get. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param expand The $expand query parameter - ServiceResponse> * @param top The number of results to return. If null is passed, returns all resources. + ServiceResponse> * @param resourceGroupName The resource group with the resources to get. + ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. + ServiceResponse> * @param top The number of results to return. If null is passed, returns all resources. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -332,12 +332,12 @@ public Observable>> listByResourceGro throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -345,9 +345,9 @@ public Observable>> call(Response> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupDelegate(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); } @@ -1151,13 +1151,13 @@ private ServiceResponse> listDelegate(Response listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -1172,12 +1172,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, @@ -1189,13 +1189,13 @@ public Observable>> call(String nextP * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -1206,13 +1206,13 @@ public Page call(ServiceResponse>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -1225,22 +1225,22 @@ public Observable>> call(ServiceRespo /** * Get all the resources for a resource group. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1248,9 +1248,9 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/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/ResourcegroupSubscriptionGenericResourceExpandedImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcegroupSubscriptionGenericResourceExpandedImpl.java new file mode 100644 index 0000000000000..0310219ab838c --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourcegroupSubscriptionGenericResourceExpandedImpl.java @@ -0,0 +1,105 @@ +/** + * 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.ResourcegroupSubscriptionGenericResourceExpanded; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.resources.v2016_09_01.Identity; +import com.microsoft.azure.management.resources.v2016_09_01.Plan; +import com.microsoft.azure.management.resources.v2016_09_01.Sku; +import java.util.Map; + +class ResourcegroupSubscriptionGenericResourceExpandedImpl extends WrapperImpl implements ResourcegroupSubscriptionGenericResourceExpanded { + private final ResourcesManager manager; + + ResourcegroupSubscriptionGenericResourceExpandedImpl(GenericResourceExpandedInner inner, ResourcesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ResourcesManager manager() { + return this.manager; + } + + + + @Override + public DateTime changedTime() { + return this.inner().changedTime(); + } + + @Override + public DateTime createdTime() { + return this.inner().createdTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String managedBy() { + return this.inner().managedBy(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Plan plan() { + return this.inner().plan(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Sku sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} 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..5cc528f74d013 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 @@ -15,8 +15,8 @@ import rx.functions.Func1; import com.microsoft.azure.Page; import rx.Completable; -import com.microsoft.azure.management.resources.v2016_09_01.ResourcegroupSubscriptionGenericResource; -import com.microsoft.azure.management.resources.v2016_09_01.SubscriptionGenericResource; +import com.microsoft.azure.management.resources.v2016_09_01.GenericResource; +import com.microsoft.azure.management.resources.v2016_09_01.SubscriptionGenericResourceExpanded; import com.microsoft.azure.management.resources.v2016_09_01.ResourcesMoveInfo; class ResourcesImpl extends WrapperImpl implements Resources { @@ -31,15 +31,15 @@ public ResourcesManager manager() { return this.manager; } - private SubscriptionGenericResourceImpl wrapModel(GenericResourceInner inner) { - return new SubscriptionGenericResourceImpl(inner, manager()); + private SubscriptionGenericResourceExpandedImpl wrapModel(GenericResourceExpandedInner inner) { + return new SubscriptionGenericResourceExpandedImpl(inner, manager()); } @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) { @@ -48,54 +48,54 @@ public Completable deleteByIdAsync(String resourceId, String apiVersion) { } @Override - public Observable createOrUpdateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { + public Observable createOrUpdateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { ResourcesInner client = this.inner(); return client.createOrUpdateByIdAsync(resourceId, apiVersion, parameters) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } @Override - public Observable updateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { + public Observable updateByIdAsync(String resourceId, String apiVersion, GenericResourceInner parameters) { ResourcesInner client = this.inner(); return client.updateByIdAsync(resourceId, apiVersion, parameters) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } @Override - public Observable getByIdAsync(String resourceId, String apiVersion) { + public Observable getByIdAsync(String resourceId, String apiVersion) { ResourcesInner client = this.inner(); return client.getByIdAsync(resourceId, apiVersion) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } @Override - public Observable listAsync() { + public Observable listAsync() { ResourcesInner client = this.inner(); return client.listAsync() - .flatMapIterable(new Func1, Iterable>() { + .flatMapIterable(new Func1, Iterable>() { @Override - public Iterable call(Page page) { + public Iterable call(Page page) { return page.items(); } }) - .map(new Func1() { + .map(new Func1() { @Override - public SubscriptionGenericResource call(GenericResourceInner inner) { + public SubscriptionGenericResourceExpanded call(GenericResourceExpandedInner inner) { return wrapModel(inner); } }); @@ -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) { @@ -120,37 +120,37 @@ public Completable deleteAsync(String resourceGroupName, String resourceProvider } @Override - public Observable createOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { + public Observable createOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { ResourcesInner client = this.inner(); return client.createOrUpdateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } @Override - public Observable updateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { + public Observable updateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { ResourcesInner client = this.inner(); return client.updateAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } @Override - public Observable getAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { + public Observable getAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { ResourcesInner client = this.inner(); return client.getAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion) - .map(new Func1() { + .map(new Func1() { @Override - public ResourcegroupSubscriptionGenericResource call(GenericResourceInner inner) { - return new ResourcegroupSubscriptionGenericResourceImpl(inner, manager()); + public GenericResource call(GenericResourceInner inner) { + return new GenericResourceImpl(inner, manager()); } }); } 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..d7f3ea0ec654a 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. @@ -317,13 +317,13 @@ private ServiceResponse beginMoveResourcesDelegate(Response * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GenericResourceInner> object if successful. + * @return the PagedList<GenericResourceExpandedInner> object if successful. */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -336,12 +336,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, @@ -352,13 +352,13 @@ public Observable>> call(String nextP * Get all the resources in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listAsync() { + public Observable> listAsync() { return listWithServiceResponseAsync() - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -368,13 +368,13 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync() { + public Observable>> listWithServiceResponseAsync() { return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -388,9 +388,9 @@ public Observable>> call(ServiceRespo * Get all the resources in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -401,12 +401,12 @@ public Observable>> listSinglePageAsy final String expand = null; final Integer top = null; return service.list(this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -418,18 +418,18 @@ public Observable>> call(Response list(final String filter, final String expand, final Integer top) { - ServiceResponse> response = listSinglePageAsync(filter, expand, top).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList list(final String filter, final String expand, final Integer top) { + ServiceResponse> response = listSinglePageAsync(filter, expand, top).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -439,18 +439,18 @@ public Page nextPage(String nextPageLink) { * Get all the resources in a subscription. * * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter. + * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. * @param top The number of results to return. If null is passed, returns all resource groups. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(filter, expand, top), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, @@ -461,16 +461,16 @@ public Observable>> call(String nextP * Get all the resources in a subscription. * * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter. + * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. * @param top The number of results to return. If null is passed, returns all resource groups. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listAsync(final String filter, final String expand, final Integer top) { + public Observable> listAsync(final String filter, final String expand, final Integer top) { return listWithServiceResponseAsync(filter, expand, top) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -480,16 +480,16 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String filter, final String expand, final Integer top) { + public Observable>> listWithServiceResponseAsync(final String filter, final String expand, final Integer top) { return listSinglePageAsync(filter, expand, top) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -502,13 +502,13 @@ public Observable>> call(ServiceRespo /** * Get all the resources in a subscription. * - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param expand The $expand query parameter. - ServiceResponse> * @param top The number of results to return. If null is passed, returns all resource groups. + ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param expand Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. + ServiceResponse> * @param top The number of results to return. If null is passed, returns all resource groups. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync(final String filter, final String expand, final Integer top) { + public Observable>> listSinglePageAsync(final String filter, final String expand, final Integer top) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -516,12 +516,12 @@ public Observable>> listSinglePageAsy throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -529,9 +529,9 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + 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); } @@ -2041,13 +2041,13 @@ private ServiceResponse getByIdDelegate(Response listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; @@ -2062,12 +2062,12 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), - new Func1>>>() { + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { + public Observable>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, @@ -2079,13 +2079,13 @@ public Observable>> call(String nextP * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object + * @return the observable to the PagedList<GenericResourceExpandedInner> object */ - public Observable> listNextAsync(final String nextPageLink) { + public Observable> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); @@ -2096,13 +2096,13 @@ public Page call(ServiceResponse>> listNextWithServiceResponseAsync(final String nextPageLink) { + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); @@ -2115,22 +2115,22 @@ public Observable>> call(ServiceRespo /** * Get all the resources in a subscription. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<GenericResourceExpandedInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2138,9 +2138,9 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/SubscriptionGenericResourceExpandedImpl.java b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/SubscriptionGenericResourceExpandedImpl.java new file mode 100644 index 0000000000000..fc26b495a123a --- /dev/null +++ b/sdk/resources/mgmt-v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/SubscriptionGenericResourceExpandedImpl.java @@ -0,0 +1,105 @@ +/** + * 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.SubscriptionGenericResourceExpanded; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.resources.v2016_09_01.Identity; +import com.microsoft.azure.management.resources.v2016_09_01.Plan; +import com.microsoft.azure.management.resources.v2016_09_01.Sku; +import java.util.Map; + +class SubscriptionGenericResourceExpandedImpl extends WrapperImpl implements SubscriptionGenericResourceExpanded { + private final ResourcesManager manager; + + SubscriptionGenericResourceExpandedImpl(GenericResourceExpandedInner inner, ResourcesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ResourcesManager manager() { + return this.manager; + } + + + + @Override + public DateTime changedTime() { + return this.inner().changedTime(); + } + + @Override + public DateTime createdTime() { + return this.inner().createdTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Identity identity() { + return this.inner().identity(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String managedBy() { + return this.inner().managedBy(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Plan plan() { + return this.inner().plan(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Sku sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} 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; + } + +}