diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java new file mode 100644 index 000000000000..8288488aa382 --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/AzureFilesIdentityBasedAuthentication.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for Azure Files identity based authentication. + */ +public class AzureFilesIdentityBasedAuthentication { + /** + * Indicates the directory service used. Possible values include: 'None', + * 'AADDS'. + */ + @JsonProperty(value = "directoryServiceOptions", required = true) + private DirectoryServiceOptions directoryServiceOptions; + + /** + * Get indicates the directory service used. Possible values include: 'None', 'AADDS'. + * + * @return the directoryServiceOptions value + */ + public DirectoryServiceOptions directoryServiceOptions() { + return this.directoryServiceOptions; + } + + /** + * Set indicates the directory service used. Possible values include: 'None', 'AADDS'. + * + * @param directoryServiceOptions the directoryServiceOptions value to set + * @return the AzureFilesIdentityBasedAuthentication object itself. + */ + public AzureFilesIdentityBasedAuthentication withDirectoryServiceOptions(DirectoryServiceOptions directoryServiceOptions) { + this.directoryServiceOptions = directoryServiceOptions; + return this; + } + +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/BlobContainers.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/BlobContainers.java index f49ba49464ba..7c72f750f51c 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/BlobContainers.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/BlobContainers.java @@ -38,7 +38,7 @@ public interface BlobContainers { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(String resourceGroupName, String accountName); + Observable listAsync(final String resourceGroupName, final String accountName); /** * Gets properties of a specified container. diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java new file mode 100644 index 000000000000..9edcdeb415bf --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DirectoryServiceOptions.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_04_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DirectoryServiceOptions. + */ +public final class DirectoryServiceOptions extends ExpandableStringEnum { + /** Static value None for DirectoryServiceOptions. */ + public static final DirectoryServiceOptions NONE = fromString("None"); + + /** Static value AADDS for DirectoryServiceOptions. */ + public static final DirectoryServiceOptions AADDS = fromString("AADDS"); + + /** + * Creates or finds a DirectoryServiceOptions from its string representation. + * @param name a name to look for + * @return the corresponding DirectoryServiceOptions + */ + @JsonCreator + public static DirectoryServiceOptions fromString(String name) { + return fromString(name, DirectoryServiceOptions.class); + } + + /** + * @return known DirectoryServiceOptions values + */ + public static Collection values() { + return values(DirectoryServiceOptions.class); + } +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ListContainerItem.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ListContainerItem.java index 8a9c6ba84489..379337c546e3 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ListContainerItem.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/ListContainerItem.java @@ -8,198 +8,85 @@ package com.microsoft.azure.management.storage.v2019_04_01; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.storage.v2019_04_01.implementation.StorageManager; +import com.microsoft.azure.management.storage.v2019_04_01.implementation.ListContainerItemInner; import org.joda.time.DateTime; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; /** - * The blob container properties be listed out. + * Type representing ListContainerItem. */ -@JsonFlatten -public class ListContainerItem extends AzureEntityResource { +public interface ListContainerItem extends HasInner, HasManager { /** - * Specifies whether data in the container may be accessed publicly and the - * level of access. Possible values include: 'Container', 'Blob', 'None'. + * @return the etag value. */ - @JsonProperty(value = "properties.publicAccess") - private PublicAccess publicAccess; + String etag(); /** - * Returns the date and time the container was last modified. + * @return the hasImmutabilityPolicy value. */ - @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private DateTime lastModifiedTime; + Boolean hasImmutabilityPolicy(); /** - * The lease status of the container. Possible values include: 'Locked', - * 'Unlocked'. + * @return the hasLegalHold value. */ - @JsonProperty(value = "properties.leaseStatus", access = JsonProperty.Access.WRITE_ONLY) - private LeaseStatus leaseStatus; + Boolean hasLegalHold(); /** - * Lease state of the container. Possible values include: 'Available', - * 'Leased', 'Expired', 'Breaking', 'Broken'. + * @return the id value. */ - @JsonProperty(value = "properties.leaseState", access = JsonProperty.Access.WRITE_ONLY) - private LeaseState leaseState; + String id(); /** - * Specifies whether the lease on a container is of infinite or fixed - * duration, only when the container is leased. Possible values include: - * 'Infinite', 'Fixed'. + * @return the immutabilityPolicy value. */ - @JsonProperty(value = "properties.leaseDuration", access = JsonProperty.Access.WRITE_ONLY) - private LeaseDuration leaseDuration; + ImmutabilityPolicyProperties immutabilityPolicy(); /** - * A name-value pair to associate with the container as metadata. + * @return the lastModifiedTime value. */ - @JsonProperty(value = "properties.metadata") - private Map metadata; + DateTime lastModifiedTime(); /** - * The ImmutabilityPolicy property of the container. + * @return the leaseDuration value. */ - @JsonProperty(value = "properties.immutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) - private ImmutabilityPolicyProperties immutabilityPolicy; + LeaseDuration leaseDuration(); /** - * The LegalHold property of the container. + * @return the leaseState value. */ - @JsonProperty(value = "properties.legalHold", access = JsonProperty.Access.WRITE_ONLY) - private LegalHoldProperties legalHold; + LeaseState leaseState(); /** - * The hasLegalHold public property is set to true by SRP if there are at - * least one existing tag. The hasLegalHold public property is set to false - * by SRP if all existing legal hold tags are cleared out. There can be a - * maximum of 1000 blob containers with hasLegalHold=true for a given - * account. + * @return the leaseStatus value. */ - @JsonProperty(value = "properties.hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasLegalHold; + LeaseStatus leaseStatus(); /** - * The hasImmutabilityPolicy public property is set to true by SRP if - * ImmutabilityPolicy has been created for this container. The - * hasImmutabilityPolicy public property is set to false by SRP if - * ImmutabilityPolicy has not been created for this container. + * @return the legalHold value. */ - @JsonProperty(value = "properties.hasImmutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasImmutabilityPolicy; + LegalHoldProperties legalHold(); /** - * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. - * - * @return the publicAccess value + * @return the metadata value. */ - public PublicAccess publicAccess() { - return this.publicAccess; - } + Map metadata(); /** - * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. - * - * @param publicAccess the publicAccess value to set - * @return the ListContainerItem object itself. + * @return the name value. */ - public ListContainerItem withPublicAccess(PublicAccess publicAccess) { - this.publicAccess = publicAccess; - return this; - } + String name(); /** - * Get returns the date and time the container was last modified. - * - * @return the lastModifiedTime value + * @return the publicAccess value. */ - public DateTime lastModifiedTime() { - return this.lastModifiedTime; - } + PublicAccess publicAccess(); /** - * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. - * - * @return the leaseStatus value + * @return the type value. */ - public LeaseStatus leaseStatus() { - return this.leaseStatus; - } - - /** - * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. - * - * @return the leaseState value - */ - public LeaseState leaseState() { - return this.leaseState; - } - - /** - * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. - * - * @return the leaseDuration value - */ - public LeaseDuration leaseDuration() { - return this.leaseDuration; - } - - /** - * Get a name-value pair to associate with the container as metadata. - * - * @return the metadata value - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set a name-value pair to associate with the container as metadata. - * - * @param metadata the metadata value to set - * @return the ListContainerItem object itself. - */ - public ListContainerItem withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the ImmutabilityPolicy property of the container. - * - * @return the immutabilityPolicy value - */ - public ImmutabilityPolicyProperties immutabilityPolicy() { - return this.immutabilityPolicy; - } - - /** - * Get the LegalHold property of the container. - * - * @return the legalHold value - */ - public LegalHoldProperties legalHold() { - return this.legalHold; - } - - /** - * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. - * - * @return the hasLegalHold value - */ - public Boolean hasLegalHold() { - return this.hasLegalHold; - } - - /** - * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. - * - * @return the hasImmutabilityPolicy value - */ - public Boolean hasImmutabilityPolicy() { - return this.hasImmutabilityPolicy; - } + String type(); } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java index 9ef3b5f7cce6..d6573a676d56 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java @@ -15,7 +15,6 @@ import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; -import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.storage.v2019_04_01.implementation.StorageManager; import com.microsoft.azure.management.storage.v2019_04_01.implementation.SkuInner; @@ -31,6 +30,11 @@ public interface StorageAccount extends HasInner, Resource, */ AccessTier accessTier(); + /** + * @return the azureFilesIdentityBasedAuthentication value. + */ + AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication(); + /** * @return the creationTime value. */ @@ -41,11 +45,6 @@ public interface StorageAccount extends HasInner, Resource, */ CustomDomain customDomain(); - /** - * @return the enableAzureFilesAadIntegration value. - */ - Boolean enableAzureFilesAadIntegration(); - /** * @return the enableHttpsTrafficOnly value. */ @@ -131,160 +130,10 @@ public interface StorageAccount extends HasInner, Resource, */ AccountStatus statusOfSecondary(); - /** - * The entirety of the StorageAccount definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithCreate { - } - - /** - * Grouping of StorageAccount definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a StorageAccount definition. - */ - interface Blank extends GroupableResourceCore.DefinitionWithRegion { - } - - /** - * The stage of the StorageAccount definition allowing to specify the resource group. - */ - interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { - } - - /** - * The stage of the storageaccount definition allowing to specify Kind. - */ - interface WithKind { - /** - * Specifies kind. - * @param kind Required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' - * @return the next definition stage -*/ - WithSku withKind(Kind kind); - } - - /** - * The stage of the storageaccount definition allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - * @param sku Required. Gets or sets the SKU name - * @return the next definition stage -*/ - WithCreate withSku(SkuInner sku); - } - - /** - * The stage of the storageaccount definition allowing to specify AccessTier. - */ - interface WithAccessTier { - /** - * Specifies accessTier. - * @param accessTier Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' - * @return the next definition stage - */ - WithCreate withAccessTier(AccessTier accessTier); - } - - /** - * The stage of the storageaccount definition allowing to specify CustomDomain. - */ - interface WithCustomDomain { - /** - * Specifies customDomain. - * @param customDomain User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property - * @return the next definition stage - */ - WithCreate withCustomDomain(CustomDomain customDomain); - } - - /** - * The stage of the storageaccount definition allowing to specify EnableAzureFilesAadIntegration. - */ - interface WithEnableAzureFilesAadIntegration { - /** - * Specifies enableAzureFilesAadIntegration. - * @param enableAzureFilesAadIntegration Enables Azure Files AAD Integration for SMB if sets to true - * @return the next definition stage - */ - WithCreate withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration); - } - - /** - * The stage of the storageaccount definition allowing to specify EnableHttpsTrafficOnly. - */ - interface WithEnableHttpsTrafficOnly { - /** - * Specifies enableHttpsTrafficOnly. - * @param enableHttpsTrafficOnly Allows https traffic only to storage service if sets to true - * @return the next definition stage - */ - WithCreate withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly); - } - - /** - * The stage of the storageaccount definition allowing to specify Encryption. - */ - interface WithEncryption { - /** - * Specifies encryption. - * @param encryption Provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted - * @return the next definition stage - */ - WithCreate withEncryption(Encryption encryption); - } - - /** - * The stage of the storageaccount definition allowing to specify Identity. - */ - interface WithIdentity { - /** - * Specifies identity. - * @param identity The identity of the resource - * @return the next definition stage - */ - WithCreate withIdentity(Identity identity); - } - - /** - * The stage of the storageaccount definition allowing to specify IsHnsEnabled. - */ - interface WithIsHnsEnabled { - /** - * Specifies isHnsEnabled. - * @param isHnsEnabled Account HierarchicalNamespace enabled if sets to true - * @return the next definition stage - */ - WithCreate withIsHnsEnabled(Boolean isHnsEnabled); - } - - /** - * The stage of the storageaccount definition allowing to specify NetworkRuleSet. - */ - interface WithNetworkRuleSet { - /** - * Specifies networkRuleSet. - * @param networkRuleSet Network rule set - * @return the next definition stage - */ - WithCreate withNetworkRuleSet(NetworkRuleSet networkRuleSet); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableAzureFilesAadIntegration, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithNetworkRuleSet { - } - } /** * The template for a StorageAccount update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithCustomDomain, UpdateStages.WithEnableAzureFilesAadIntegration, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { } /** @@ -304,27 +153,27 @@ interface WithAccessTier { } /** - * The stage of the storageaccount update allowing to specify CustomDomain. + * The stage of the storageaccount update allowing to specify AzureFilesIdentityBasedAuthentication. */ - interface WithCustomDomain { + interface WithAzureFilesIdentityBasedAuthentication { /** - * Specifies customDomain. - * @param customDomain Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property + * Specifies azureFilesIdentityBasedAuthentication. + * @param azureFilesIdentityBasedAuthentication Provides the identity based authentication settings for Azure Files * @return the next update stage */ - Update withCustomDomain(CustomDomain customDomain); + Update withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication); } /** - * The stage of the storageaccount update allowing to specify EnableAzureFilesAadIntegration. + * The stage of the storageaccount update allowing to specify CustomDomain. */ - interface WithEnableAzureFilesAadIntegration { + interface WithCustomDomain { /** - * Specifies enableAzureFilesAadIntegration. - * @param enableAzureFilesAadIntegration Enables Azure Files AAD Integration for SMB if sets to true + * Specifies customDomain. + * @param customDomain Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property * @return the next update stage */ - Update withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration); + Update withCustomDomain(CustomDomain customDomain); } /** diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java index a273d1dd9988..a060c5dfec60 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java @@ -89,13 +89,14 @@ public class StorageAccountCreateParameters { private AccessTier accessTier; /** - * Enables Azure Files AAD Integration for SMB if sets to true. + * Provides the identity based authentication settings for Azure Files. */ - @JsonProperty(value = "properties.azureFilesAadIntegration") - private Boolean enableAzureFilesAadIntegration; + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; /** - * Allows https traffic only to storage service if sets to true. + * Allows https traffic only to storage service if sets to true. The + * default value is true since API version 2019-04-01. */ @JsonProperty(value = "properties.supportsHttpsTrafficOnly") private Boolean enableHttpsTrafficOnly; @@ -287,27 +288,27 @@ public StorageAccountCreateParameters withAccessTier(AccessTier accessTier) { } /** - * Get enables Azure Files AAD Integration for SMB if sets to true. + * Get provides the identity based authentication settings for Azure Files. * - * @return the enableAzureFilesAadIntegration value + * @return the azureFilesIdentityBasedAuthentication value */ - public Boolean enableAzureFilesAadIntegration() { - return this.enableAzureFilesAadIntegration; + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; } /** - * Set enables Azure Files AAD Integration for SMB if sets to true. + * Set provides the identity based authentication settings for Azure Files. * - * @param enableAzureFilesAadIntegration the enableAzureFilesAadIntegration value to set + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set * @return the StorageAccountCreateParameters object itself. */ - public StorageAccountCreateParameters withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration) { - this.enableAzureFilesAadIntegration = enableAzureFilesAadIntegration; + public StorageAccountCreateParameters withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; return this; } /** - * Get allows https traffic only to storage service if sets to true. + * Get allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. * * @return the enableHttpsTrafficOnly value */ @@ -316,7 +317,7 @@ public Boolean enableHttpsTrafficOnly() { } /** - * Set allows https traffic only to storage service if sets to true. + * Set allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. * * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set * @return the StorageAccountCreateParameters object itself. diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java index b5a811336a71..14180711401f 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java @@ -67,10 +67,10 @@ public class StorageAccountUpdateParameters { private AccessTier accessTier; /** - * Enables Azure Files AAD Integration for SMB if sets to true. + * Provides the identity based authentication settings for Azure Files. */ - @JsonProperty(value = "properties.azureFilesAadIntegration") - private Boolean enableAzureFilesAadIntegration; + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; /** * Allows https traffic only to storage service if sets to true. @@ -213,22 +213,22 @@ public StorageAccountUpdateParameters withAccessTier(AccessTier accessTier) { } /** - * Get enables Azure Files AAD Integration for SMB if sets to true. + * Get provides the identity based authentication settings for Azure Files. * - * @return the enableAzureFilesAadIntegration value + * @return the azureFilesIdentityBasedAuthentication value */ - public Boolean enableAzureFilesAadIntegration() { - return this.enableAzureFilesAadIntegration; + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; } /** - * Set enables Azure Files AAD Integration for SMB if sets to true. + * Set provides the identity based authentication settings for Azure Files. * - * @param enableAzureFilesAadIntegration the enableAzureFilesAadIntegration value to set + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set * @return the StorageAccountUpdateParameters object itself. */ - public StorageAccountUpdateParameters withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration) { - this.enableAzureFilesAadIntegration = enableAzureFilesAadIntegration; + public StorageAccountUpdateParameters withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; return this; } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java index a460ead84461..ba50ab946a5d 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccounts.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.storage.v2019_04_01; -import com.microsoft.azure.arm.collection.SupportsCreating; import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; @@ -22,7 +21,18 @@ /** * Type representing StorageAccounts. */ -public interface StorageAccounts extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +public interface StorageAccounts extends SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @param parameters The parameters to provide for the created account. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters); + /** * Lists the access keys for the specified storage account. * @@ -74,7 +84,7 @@ public interface StorageAccounts extends SupportsCreating failoverAsync(String resourceGroupName, String accountName); /** * Revoke user delegation keys. diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersImpl.java index 6f4185dae341..bdc7bae3606d 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersImpl.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersImpl.java @@ -14,7 +14,8 @@ import rx.Completable; import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.storage.v2019_04_01.ListContainerItems; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.storage.v2019_04_01.ListContainerItem; import com.microsoft.azure.management.storage.v2019_04_01.BlobContainer; import com.microsoft.azure.management.storage.v2019_04_01.LegalHold; import com.microsoft.azure.management.storage.v2019_04_01.LeaseContainerResponse; @@ -68,13 +69,19 @@ private Observable getImmutabilityPolicyInnerUsingBlobC } @Override - public Observable listAsync(String resourceGroupName, String accountName) { + public Observable listAsync(final String resourceGroupName, final String accountName) { BlobContainersInner client = this.inner(); return client.listAsync(resourceGroupName, accountName) - .map(new Func1() { + .flatMapIterable(new Func1, Iterable>() { @Override - public ListContainerItems call(ListContainerItemsInner inner) { - return new ListContainerItemsImpl(inner, manager()); + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ListContainerItem call(ListContainerItemInner inner) { + return new ListContainerItemImpl(inner, manager()); } }); } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersInner.java index c9bc22307318..b527290a0e2e 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/BlobContainersInner.java @@ -10,7 +10,9 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.storage.v2019_04_01.BlobContainersCreateOrUpdateImmutabilityPolicyHeaders; import com.microsoft.azure.management.storage.v2019_04_01.BlobContainersDeleteImmutabilityPolicyHeaders; import com.microsoft.azure.management.storage.v2019_04_01.BlobContainersExtendImmutabilityPolicyHeaders; @@ -18,6 +20,8 @@ import com.microsoft.azure.management.storage.v2019_04_01.BlobContainersLockImmutabilityPolicyHeaders; import com.microsoft.azure.management.storage.v2019_04_01.LeaseContainerRequest; import com.microsoft.azure.management.storage.v2019_04_01.PublicAccess; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -37,6 +41,7 @@ import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -119,6 +124,10 @@ interface BlobContainersService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease") Observable> lease(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body LeaseContainerRequest parameters, @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.storage.v2019_04_01.BlobContainers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -129,10 +138,16 @@ interface BlobContainersService { * @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 ListContainerItemsInner object if successful. + * @return the PagedList<ListContainerItemInner> object if successful. */ - public ListContainerItemsInner list(String resourceGroupName, String accountName) { - return listWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String accountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -144,8 +159,16 @@ public ListContainerItemsInner list(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -154,15 +177,38 @@ public ServiceFuture listAsync(String resourceGroupName * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ListContainerItemsInner object + * @return the observable to the PagedList<ListContainerItemInner> object */ - public Observable listAsync(String resourceGroupName, String accountName) { - return listWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, ListContainerItemsInner>() { - @Override - public ListContainerItemsInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String accountName) { + return listWithServiceResponseAsync(resourceGroupName, accountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName) { + return listSinglePageAsync(resourceGroupName, accountName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** @@ -171,9 +217,9 @@ public ListContainerItemsInner call(ServiceResponse res * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ListContainerItemsInner object + * @return the PagedList<ListContainerItemInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String accountName) { + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -190,12 +236,12 @@ public Observable> listWithServiceRespo final String maxpagesize = null; final String filter = null; return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), skipToken, maxpagesize, filter, 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 clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -214,10 +260,16 @@ public Observable> call(Response list(final String resourceGroupName, final String accountName, final String skipToken, final String maxpagesize, final String filter) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -232,8 +284,16 @@ public ListContainerItemsInner list(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final String skipToken, final String maxpagesize, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -245,15 +305,16 @@ public ServiceFuture listAsync(String resourceGroupName * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. * @param filter Optional. When specified, only container names starting with the filter will be listed. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ListContainerItemsInner object + * @return the observable to the PagedList<ListContainerItemInner> object */ - public Observable listAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter) { - return listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).map(new Func1, ListContainerItemsInner>() { - @Override - public ListContainerItemsInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String accountName, final String skipToken, final String maxpagesize, final String filter) { + return listWithServiceResponseAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -265,9 +326,34 @@ public ListContainerItemsInner call(ServiceResponse res * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. * @param filter Optional. When specified, only container names starting with the filter will be listed. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ListContainerItemsInner object + * @return the observable to the PagedList<ListContainerItemInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String skipToken, final String maxpagesize, final String filter) { + return listSinglePageAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. + ServiceResponse> * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + ServiceResponse> * @param skipToken Optional. Continuation token for the list operation. + ServiceResponse> * @param maxpagesize Optional. Specified maximum number of containers that can be included in the list. + ServiceResponse> * @param filter Optional. When specified, only container names starting with the filter will be listed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ListContainerItemInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String accountName, String skipToken, String maxpagesize, String filter) { + public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final String skipToken, final String maxpagesize, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -281,12 +367,12 @@ public Observable> listWithServiceRespo throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), skipToken, maxpagesize, filter, 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 clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -294,9 +380,9 @@ public Observable> call(Response listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().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); } @@ -1962,4 +2048,115 @@ private ServiceResponse leaseDelegate(Response listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @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<ListContainerItemInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + * @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<ListContainerItemInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ListContainerItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemImpl.java new file mode 100644 index 000000000000..369b9e8f3af4 --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_04_01.implementation; + +import com.microsoft.azure.management.storage.v2019_04_01.ListContainerItem; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.storage.v2019_04_01.ImmutabilityPolicyProperties; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseDuration; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_04_01.LegalHoldProperties; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_04_01.PublicAccess; + +class ListContainerItemImpl extends WrapperImpl implements ListContainerItem { + private final StorageManager manager; + ListContainerItemImpl(ListContainerItemInner inner, StorageManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public StorageManager manager() { + return this.manager; + } + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public Boolean hasImmutabilityPolicy() { + return this.inner().hasImmutabilityPolicy(); + } + + @Override + public Boolean hasLegalHold() { + return this.inner().hasLegalHold(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.inner().immutabilityPolicy(); + } + + @Override + public DateTime lastModifiedTime() { + return this.inner().lastModifiedTime(); + } + + @Override + public LeaseDuration leaseDuration() { + return this.inner().leaseDuration(); + } + + @Override + public LeaseState leaseState() { + return this.inner().leaseState(); + } + + @Override + public LeaseStatus leaseStatus() { + return this.inner().leaseStatus(); + } + + @Override + public LegalHoldProperties legalHold() { + return this.inner().legalHold(); + } + + @Override + public Map metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PublicAccess publicAccess() { + return this.inner().publicAccess(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemInner.java new file mode 100644 index 000000000000..958611c63ad8 --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ListContainerItemInner.java @@ -0,0 +1,212 @@ +/** + * 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.storage.v2019_04_01.implementation; + +import com.microsoft.azure.management.storage.v2019_04_01.PublicAccess; +import org.joda.time.DateTime; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseStatus; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseState; +import com.microsoft.azure.management.storage.v2019_04_01.LeaseDuration; +import java.util.Map; +import com.microsoft.azure.management.storage.v2019_04_01.ImmutabilityPolicyProperties; +import com.microsoft.azure.management.storage.v2019_04_01.LegalHoldProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.storage.v2019_04_01.AzureEntityResource; + +/** + * The blob container properties be listed out. + */ +@JsonFlatten +public class ListContainerItemInner extends AzureEntityResource { + /** + * Specifies whether data in the container may be accessed publicly and the + * level of access. Possible values include: 'Container', 'Blob', 'None'. + */ + @JsonProperty(value = "properties.publicAccess") + private PublicAccess publicAccess; + + /** + * Returns the date and time the container was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * The lease status of the container. Possible values include: 'Locked', + * 'Unlocked'. + */ + @JsonProperty(value = "properties.leaseStatus", access = JsonProperty.Access.WRITE_ONLY) + private LeaseStatus leaseStatus; + + /** + * Lease state of the container. Possible values include: 'Available', + * 'Leased', 'Expired', 'Breaking', 'Broken'. + */ + @JsonProperty(value = "properties.leaseState", access = JsonProperty.Access.WRITE_ONLY) + private LeaseState leaseState; + + /** + * Specifies whether the lease on a container is of infinite or fixed + * duration, only when the container is leased. Possible values include: + * 'Infinite', 'Fixed'. + */ + @JsonProperty(value = "properties.leaseDuration", access = JsonProperty.Access.WRITE_ONLY) + private LeaseDuration leaseDuration; + + /** + * A name-value pair to associate with the container as metadata. + */ + @JsonProperty(value = "properties.metadata") + private Map metadata; + + /** + * The ImmutabilityPolicy property of the container. + */ + @JsonProperty(value = "properties.immutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private ImmutabilityPolicyProperties immutabilityPolicy; + + /** + * The LegalHold property of the container. + */ + @JsonProperty(value = "properties.legalHold", access = JsonProperty.Access.WRITE_ONLY) + private LegalHoldProperties legalHold; + + /** + * The hasLegalHold public property is set to true by SRP if there are at + * least one existing tag. The hasLegalHold public property is set to false + * by SRP if all existing legal hold tags are cleared out. There can be a + * maximum of 1000 blob containers with hasLegalHold=true for a given + * account. + */ + @JsonProperty(value = "properties.hasLegalHold", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLegalHold; + + /** + * The hasImmutabilityPolicy public property is set to true by SRP if + * ImmutabilityPolicy has been created for this container. The + * hasImmutabilityPolicy public property is set to false by SRP if + * ImmutabilityPolicy has not been created for this container. + */ + @JsonProperty(value = "properties.hasImmutabilityPolicy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasImmutabilityPolicy; + + /** + * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @return the publicAccess value + */ + public PublicAccess publicAccess() { + return this.publicAccess; + } + + /** + * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. + * + * @param publicAccess the publicAccess value to set + * @return the ListContainerItemInner object itself. + */ + public ListContainerItemInner withPublicAccess(PublicAccess publicAccess) { + this.publicAccess = publicAccess; + return this; + } + + /** + * Get returns the date and time the container was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. + * + * @return the leaseStatus value + */ + public LeaseStatus leaseStatus() { + return this.leaseStatus; + } + + /** + * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. + * + * @return the leaseState value + */ + public LeaseState leaseState() { + return this.leaseState; + } + + /** + * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. + * + * @return the leaseDuration value + */ + public LeaseDuration leaseDuration() { + return this.leaseDuration; + } + + /** + * Get a name-value pair to associate with the container as metadata. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set a name-value pair to associate with the container as metadata. + * + * @param metadata the metadata value to set + * @return the ListContainerItemInner object itself. + */ + public ListContainerItemInner withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the ImmutabilityPolicy property of the container. + * + * @return the immutabilityPolicy value + */ + public ImmutabilityPolicyProperties immutabilityPolicy() { + return this.immutabilityPolicy; + } + + /** + * Get the LegalHold property of the container. + * + * @return the legalHold value + */ + public LegalHoldProperties legalHold() { + return this.legalHold; + } + + /** + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + * + * @return the hasLegalHold value + */ + public Boolean hasLegalHold() { + return this.hasLegalHold; + } + + /** + * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. + * + * @return the hasImmutabilityPolicy value + */ + public Boolean hasImmutabilityPolicy() { + return this.hasImmutabilityPolicy; + } + +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ManagementPoliciesInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ManagementPoliciesInner.java index 26ee4642425f..1766cb6630ee 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ManagementPoliciesInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/ManagementPoliciesInner.java @@ -35,7 +35,7 @@ * An instance of this class provides access to all the operations defined * in ManagementPolicies. */ -public class ManagementPoliciesInner implements InnerSupportsDelete { +public class ManagementPoliciesInner implements InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private ManagementPoliciesService service; /** The service client containing this operation class. */ @@ -263,9 +263,10 @@ private ServiceResponse createOrUpdateDelegate(Response deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); } @@ -287,12 +288,12 @@ public ServiceFuture deleteAsync(String resourceGroupName, String accountN * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable deleteAsync(String resourceGroupName, String accountName) { - return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Object>() { @Override - public Void call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -304,9 +305,9 @@ public Void call(ServiceResponse response) { * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -321,11 +322,11 @@ public Observable> deleteWithServiceResponseAsync(String r } final String managementPolicyName = "default"; return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, 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 clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -334,10 +335,10 @@ public Observable> call(Response response) { }); } - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/PageImpl1.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/PageImpl1.java new file mode 100644 index 000000000000..5210ec3ea4c6 --- /dev/null +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.storage.v2019_04_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java index 775082c7cc7f..ef8ee0bb3c1e 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java @@ -12,8 +12,8 @@ import com.microsoft.azure.management.storage.v2019_04_01.StorageAccount; import rx.Observable; import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountUpdateParameters; -import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountCreateParameters; import com.microsoft.azure.management.storage.v2019_04_01.AccessTier; +import com.microsoft.azure.management.storage.v2019_04_01.AzureFilesIdentityBasedAuthentication; import org.joda.time.DateTime; import com.microsoft.azure.management.storage.v2019_04_01.CustomDomain; import com.microsoft.azure.management.storage.v2019_04_01.Encryption; @@ -27,29 +27,17 @@ import com.microsoft.azure.management.storage.v2019_04_01.AccountStatus; import rx.functions.Func1; -class StorageAccountImpl extends GroupableResourceCoreImpl implements StorageAccount, StorageAccount.Definition, StorageAccount.Update { - private StorageAccountCreateParameters createParameter; +class StorageAccountImpl extends GroupableResourceCoreImpl implements StorageAccount, StorageAccount.Update { private StorageAccountUpdateParameters updateParameter; StorageAccountImpl(String name, StorageAccountInner inner, StorageManager manager) { super(name, inner, manager); - this.createParameter = new StorageAccountCreateParameters(); this.updateParameter = new StorageAccountUpdateParameters(); } @Override public Observable createResourceAsync() { StorageAccountsInner client = this.manager().inner().storageAccounts(); - this.createParameter.withLocation(inner().location()); - this.createParameter.withTags(inner().getTags()); - return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) - .map(new Func1() { - @Override - public StorageAccountInner call(StorageAccountInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); + return null; // NOP createResourceAsync implementation as create is not supported } @Override @@ -78,7 +66,6 @@ public boolean isInCreateMode() { } private void resetCreateUpdateParameters() { - this.createParameter = new StorageAccountCreateParameters(); this.updateParameter = new StorageAccountUpdateParameters(); } @@ -87,6 +74,11 @@ public AccessTier accessTier() { return this.inner().accessTier(); } + @Override + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.inner().azureFilesIdentityBasedAuthentication(); + } + @Override public DateTime creationTime() { return this.inner().creationTime(); @@ -97,11 +89,6 @@ public CustomDomain customDomain() { return this.inner().customDomain(); } - @Override - public Boolean enableAzureFilesAadIntegration() { - return this.inner().enableAzureFilesAadIntegration(); - } - @Override public Boolean enableHttpsTrafficOnly() { return this.inner().enableHttpsTrafficOnly(); @@ -193,98 +180,56 @@ public AccountStatus statusOfSecondary() { } @Override - public StorageAccountImpl withIsHnsEnabled(Boolean isHnsEnabled) { - this.createParameter.withIsHnsEnabled(isHnsEnabled); - return this; - } - - @Override - public StorageAccountImpl withKind(Kind kind) { - if (isInCreateMode()) { - this.createParameter.withKind(kind); - } else { - this.updateParameter.withKind(kind); - } + public StorageAccountImpl withAccessTier(AccessTier accessTier) { + this.updateParameter.withAccessTier(accessTier); return this; } @Override - public StorageAccountImpl withSku(SkuInner sku) { - if (isInCreateMode()) { - this.createParameter.withSku(sku); - } else { - this.updateParameter.withSku(sku); - } + public StorageAccountImpl withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.updateParameter.withAzureFilesIdentityBasedAuthentication(azureFilesIdentityBasedAuthentication); return this; } @Override - public StorageAccountImpl withAccessTier(AccessTier accessTier) { - if (isInCreateMode()) { - this.createParameter.withAccessTier(accessTier); - } else { - this.updateParameter.withAccessTier(accessTier); - } + public StorageAccountImpl withCustomDomain(CustomDomain customDomain) { + this.updateParameter.withCustomDomain(customDomain); return this; } @Override - public StorageAccountImpl withCustomDomain(CustomDomain customDomain) { - if (isInCreateMode()) { - this.createParameter.withCustomDomain(customDomain); - } else { - this.updateParameter.withCustomDomain(customDomain); - } + public StorageAccountImpl withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.updateParameter.withEnableHttpsTrafficOnly(enableHttpsTrafficOnly); return this; } @Override - public StorageAccountImpl withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration) { - if (isInCreateMode()) { - this.createParameter.withEnableAzureFilesAadIntegration(enableAzureFilesAadIntegration); - } else { - this.updateParameter.withEnableAzureFilesAadIntegration(enableAzureFilesAadIntegration); - } + public StorageAccountImpl withEncryption(Encryption encryption) { + this.updateParameter.withEncryption(encryption); return this; } @Override - public StorageAccountImpl withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { - if (isInCreateMode()) { - this.createParameter.withEnableHttpsTrafficOnly(enableHttpsTrafficOnly); - } else { - this.updateParameter.withEnableHttpsTrafficOnly(enableHttpsTrafficOnly); - } + public StorageAccountImpl withIdentity(Identity identity) { + this.updateParameter.withIdentity(identity); return this; } @Override - public StorageAccountImpl withEncryption(Encryption encryption) { - if (isInCreateMode()) { - this.createParameter.withEncryption(encryption); - } else { - this.updateParameter.withEncryption(encryption); - } + public StorageAccountImpl withKind(Kind kind) { + this.updateParameter.withKind(kind); return this; } @Override - public StorageAccountImpl withIdentity(Identity identity) { - if (isInCreateMode()) { - this.createParameter.withIdentity(identity); - } else { - this.updateParameter.withIdentity(identity); - } + public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.updateParameter.withNetworkRuleSet(networkRuleSet); return this; } @Override - public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { - if (isInCreateMode()) { - this.createParameter.withNetworkRuleSet(networkRuleSet); - } else { - this.updateParameter.withNetworkRuleSet(networkRuleSet); - } + public StorageAccountImpl withSku(SkuInner sku) { + this.updateParameter.withSku(sku); return this; } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java index 38428c0df7cf..a18bb10bd43d 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java @@ -17,6 +17,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.CustomDomain; import com.microsoft.azure.management.storage.v2019_04_01.Encryption; import com.microsoft.azure.management.storage.v2019_04_01.AccessTier; +import com.microsoft.azure.management.storage.v2019_04_01.AzureFilesIdentityBasedAuthentication; import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.GeoReplicationStats; import com.fasterxml.jackson.annotation.JsonProperty; @@ -138,10 +139,10 @@ public class StorageAccountInner extends Resource { private AccessTier accessTier; /** - * Enables Azure Files AAD Integration for SMB if sets to true. + * Provides the identity based authentication settings for Azure Files. */ - @JsonProperty(value = "properties.azureFilesAadIntegration") - private Boolean enableAzureFilesAadIntegration; + @JsonProperty(value = "properties.azureFilesIdentityBasedAuthentication") + private AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication; /** * Allows https traffic only to storage service if sets to true. @@ -321,22 +322,22 @@ public AccessTier accessTier() { } /** - * Get enables Azure Files AAD Integration for SMB if sets to true. + * Get provides the identity based authentication settings for Azure Files. * - * @return the enableAzureFilesAadIntegration value + * @return the azureFilesIdentityBasedAuthentication value */ - public Boolean enableAzureFilesAadIntegration() { - return this.enableAzureFilesAadIntegration; + public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { + return this.azureFilesIdentityBasedAuthentication; } /** - * Set enables Azure Files AAD Integration for SMB if sets to true. + * Set provides the identity based authentication settings for Azure Files. * - * @param enableAzureFilesAadIntegration the enableAzureFilesAadIntegration value to set + * @param azureFilesIdentityBasedAuthentication the azureFilesIdentityBasedAuthentication value to set * @return the StorageAccountInner object itself. */ - public StorageAccountInner withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration) { - this.enableAzureFilesAadIntegration = enableAzureFilesAadIntegration; + public StorageAccountInner withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { + this.azureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication; return this; } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java index c49c2ea9aa3a..7fae27027023 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsImpl.java @@ -26,6 +26,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.ListAccountSasResponse; import com.microsoft.azure.management.storage.v2019_04_01.ListServiceSasResponse; import com.microsoft.azure.management.storage.v2019_04_01.CheckNameAvailabilityResult; +import com.microsoft.azure.management.storage.v2019_04_01.StorageAccountCreateParameters; import com.microsoft.azure.management.storage.v2019_04_01.AccountSasParameters; import com.microsoft.azure.management.storage.v2019_04_01.ServiceSasParameters; @@ -127,9 +128,10 @@ public StorageAccount call(StorageAccountInner inner) { } @Override - public StorageAccountImpl define(String name) { - return wrapModel(name); - } + public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + StorageAccountsInner client = this.inner(); + return client.createAsync(resourceGroupName, accountName, parameters) + ;} @Override public Observable listKeysAsync(String resourceGroupName, String accountName) { @@ -180,10 +182,10 @@ public ListServiceSasResponse call(ListServiceSasResponseInner inner) { } @Override - public Completable failoverAsync(String resourceGroupName, String accountName) { + public Observable failoverAsync(String resourceGroupName, String accountName) { StorageAccountsInner client = this.inner(); - return client.failoverAsync(resourceGroupName, accountName).toCompletable(); - } + return client.failoverAsync(resourceGroupName, accountName) + ;} @Override public Completable revokeUserDelegationKeysAsync(String resourceGroupName, String accountName) { @@ -210,7 +212,7 @@ protected StorageAccountImpl wrapModel(StorageAccountInner inner) { @Override protected StorageAccountImpl wrapModel(String name) { - return new StorageAccountImpl(name, new StorageAccountInner(), this.manager()); + return null; // Model is not creatable } } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java index 7174b750f392..45da2630be72 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountsInner.java @@ -52,7 +52,7 @@ * An instance of this class provides access to all the operations defined * in StorageAccounts. */ -public class StorageAccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class StorageAccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private StorageAccountsService service; /** The service client containing this operation class. */ @@ -226,9 +226,9 @@ private ServiceResponse checkNameAvailabilityD * @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 StorageAccountInner object if successful. + * @return the Object object if successful. */ - public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + public Object create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); } @@ -242,7 +242,7 @@ public StorageAccountInner create(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + public ServiceFuture createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -255,10 +255,10 @@ public ServiceFuture createAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { + public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, Object>() { @Override - public StorageAccountInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -273,7 +273,7 @@ public StorageAccountInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -291,7 +291,7 @@ public Observable> createWithServiceRespons } Validator.validate(parameters); Observable> observable = service.create(resourceGroupName, accountName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -303,9 +303,9 @@ public Observable> createWithServiceRespons * @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 StorageAccountInner object if successful. + * @return the Object object if successful. */ - public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + public Object beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); } @@ -319,7 +319,7 @@ public StorageAccountInner beginCreate(String resourceGroupName, String accountN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -330,12 +330,12 @@ public ServiceFuture beginCreateAsync(String resourceGroupN * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StorageAccountInner object + * @return the observable to the Object object */ - public Observable beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { + public Observable beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, Object>() { @Override - public StorageAccountInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -348,9 +348,9 @@ public StorageAccountInner call(ServiceResponse response) { * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the StorageAccountInner object + * @return the observable to the Object object */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -368,11 +368,11 @@ public Observable> beginCreateWithServiceRe } Validator.validate(parameters); return service.beginCreate(resourceGroupName, accountName, this.client.subscriptionId(), parameters, 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 clientResponse = beginCreateDelegate(response); + ServiceResponse clientResponse = beginCreateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -381,10 +381,10 @@ public Observable> call(Response beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -397,9 +397,10 @@ private ServiceResponse beginCreateDelegate(Response deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); } @@ -421,12 +422,12 @@ public ServiceFuture deleteAsync(String resourceGroupName, String accountN * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable deleteAsync(String resourceGroupName, String accountName) { - return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Object>() { @Override - public Void call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -438,9 +439,9 @@ public Void call(ServiceResponse response) { * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -454,11 +455,11 @@ public Observable> deleteWithServiceResponseAsync(String r throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), 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 clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -467,10 +468,10 @@ public Observable> call(Response response) { }); } - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1285,9 +1286,10 @@ private ServiceResponse listServiceSASDelegate(Resp * @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 Object object if successful. */ - public void failover(String resourceGroupName, String accountName) { - failoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + public Object failover(String resourceGroupName, String accountName) { + return failoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); } /** @@ -1299,7 +1301,7 @@ public void failover(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture failoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + public ServiceFuture failoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(failoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); } @@ -1311,10 +1313,10 @@ public ServiceFuture failoverAsync(String resourceGroupName, String accoun * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable failoverAsync(String resourceGroupName, String accountName) { - return failoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + public Observable failoverAsync(String resourceGroupName, String accountName) { + return failoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Object>() { @Override - public Void call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -1328,7 +1330,7 @@ public Void call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> failoverWithServiceResponseAsync(String resourceGroupName, String accountName) { + public Observable> failoverWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1342,7 +1344,7 @@ public Observable> failoverWithServiceResponseAsync(String throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Observable> observable = service.failover(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } /** @@ -1353,9 +1355,10 @@ public Observable> failoverWithServiceResponseAsync(String * @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 Object object if successful. */ - public void beginFailover(String resourceGroupName, String accountName) { - beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + public Object beginFailover(String resourceGroupName, String accountName) { + return beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); } /** @@ -1367,7 +1370,7 @@ public void beginFailover(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginFailoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + public ServiceFuture beginFailoverAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginFailoverWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); } @@ -1377,12 +1380,12 @@ public ServiceFuture beginFailoverAsync(String resourceGroupName, String a * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable beginFailoverAsync(String resourceGroupName, String accountName) { - return beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + public Observable beginFailoverAsync(String resourceGroupName, String accountName) { + return beginFailoverWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Object>() { @Override - public Void call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.body(); } }); @@ -1394,9 +1397,9 @@ public Void call(ServiceResponse response) { * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the Object object */ - public Observable> beginFailoverWithServiceResponseAsync(String resourceGroupName, String accountName) { + public Observable> beginFailoverWithServiceResponseAsync(String resourceGroupName, String accountName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1410,11 +1413,11 @@ public Observable> beginFailoverWithServiceResponseAsync(S throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.beginFailover(resourceGroupName, accountName, this.client.subscriptionId(), 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 clientResponse = beginFailoverDelegate(response); + ServiceResponse clientResponse = beginFailoverDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1423,10 +1426,10 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse beginFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); }