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/DateAfterCreation.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterCreation.java index 156d5037b59b..9137170d3a3b 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterCreation.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterCreation.java @@ -15,27 +15,27 @@ */ public class DateAfterCreation { /** - * Integer value indicating the age in days after creation. + * Value indicating the age in days after creation. */ @JsonProperty(value = "daysAfterCreationGreaterThan", required = true) - private int daysAfterCreationGreaterThan; + private double daysAfterCreationGreaterThan; /** - * Get integer value indicating the age in days after creation. + * Get value indicating the age in days after creation. * * @return the daysAfterCreationGreaterThan value */ - public int daysAfterCreationGreaterThan() { + public double daysAfterCreationGreaterThan() { return this.daysAfterCreationGreaterThan; } /** - * Set integer value indicating the age in days after creation. + * Set value indicating the age in days after creation. * * @param daysAfterCreationGreaterThan the daysAfterCreationGreaterThan value to set * @return the DateAfterCreation object itself. */ - public DateAfterCreation withDaysAfterCreationGreaterThan(int daysAfterCreationGreaterThan) { + public DateAfterCreation withDaysAfterCreationGreaterThan(double daysAfterCreationGreaterThan) { this.daysAfterCreationGreaterThan = daysAfterCreationGreaterThan; return this; } diff --git a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterModification.java b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterModification.java index 31c15e504e82..a5e22b744d77 100644 --- a/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterModification.java +++ b/storage/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/DateAfterModification.java @@ -15,27 +15,27 @@ */ public class DateAfterModification { /** - * Integer value indicating the age in days after last modification. + * Value indicating the age in days after last modification. */ @JsonProperty(value = "daysAfterModificationGreaterThan", required = true) - private int daysAfterModificationGreaterThan; + private double daysAfterModificationGreaterThan; /** - * Get integer value indicating the age in days after last modification. + * Get value indicating the age in days after last modification. * * @return the daysAfterModificationGreaterThan value */ - public int daysAfterModificationGreaterThan() { + public double daysAfterModificationGreaterThan() { return this.daysAfterModificationGreaterThan; } /** - * Set integer value indicating the age in days after last modification. + * Set value indicating the age in days after last modification. * * @param daysAfterModificationGreaterThan the daysAfterModificationGreaterThan value to set * @return the DateAfterModification object itself. */ - public DateAfterModification withDaysAfterModificationGreaterThan(int daysAfterModificationGreaterThan) { + public DateAfterModification withDaysAfterModificationGreaterThan(double daysAfterModificationGreaterThan) { this.daysAfterModificationGreaterThan = daysAfterModificationGreaterThan; return this; } 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..3f4800c32440 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 @@ -31,6 +31,11 @@ public interface StorageAccount extends HasInner, Resource, */ AccessTier accessTier(); + /** + * @return the azureFilesIdentityBasedAuthentication value. + */ + AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication(); + /** * @return the creationTime value. */ @@ -41,11 +46,6 @@ public interface StorageAccount extends HasInner, Resource, */ CustomDomain customDomain(); - /** - * @return the enableAzureFilesAadIntegration value. - */ - Boolean enableAzureFilesAadIntegration(); - /** * @return the enableHttpsTrafficOnly value. */ @@ -190,27 +190,27 @@ interface WithAccessTier { } /** - * The stage of the storageaccount definition allowing to specify CustomDomain. + * The stage of the storageaccount definition allowing to specify AzureFilesIdentityBasedAuthentication. */ - interface WithCustomDomain { + interface WithAzureFilesIdentityBasedAuthentication { /** - * 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 + * Specifies azureFilesIdentityBasedAuthentication. + * @param azureFilesIdentityBasedAuthentication Provides the identity based authentication settings for Azure Files * @return the next definition stage */ - WithCreate withCustomDomain(CustomDomain customDomain); + WithCreate withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication); } /** - * The stage of the storageaccount definition allowing to specify EnableAzureFilesAadIntegration. + * The stage of the storageaccount definition 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 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 withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration); + WithCreate withCustomDomain(CustomDomain customDomain); } /** @@ -219,7 +219,7 @@ interface WithEnableAzureFilesAadIntegration { interface WithEnableHttpsTrafficOnly { /** * Specifies enableHttpsTrafficOnly. - * @param enableHttpsTrafficOnly Allows https traffic only to storage service if sets to true + * @param enableHttpsTrafficOnly Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01 * @return the next definition stage */ WithCreate withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly); @@ -278,13 +278,13 @@ interface WithNetworkRuleSet { * 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 { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, 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 +304,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/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/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..9c14e2f82761 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 @@ -14,6 +14,7 @@ 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; @@ -87,6 +88,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 +103,6 @@ public CustomDomain customDomain() { return this.inner().customDomain(); } - @Override - public Boolean enableAzureFilesAadIntegration() { - return this.inner().enableAzureFilesAadIntegration(); - } - @Override public Boolean enableHttpsTrafficOnly() { return this.inner().enableHttpsTrafficOnly(); @@ -229,21 +230,21 @@ public StorageAccountImpl withAccessTier(AccessTier accessTier) { } @Override - public StorageAccountImpl withCustomDomain(CustomDomain customDomain) { + public StorageAccountImpl withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { if (isInCreateMode()) { - this.createParameter.withCustomDomain(customDomain); + this.createParameter.withAzureFilesIdentityBasedAuthentication(azureFilesIdentityBasedAuthentication); } else { - this.updateParameter.withCustomDomain(customDomain); + this.updateParameter.withAzureFilesIdentityBasedAuthentication(azureFilesIdentityBasedAuthentication); } return this; } @Override - public StorageAccountImpl withEnableAzureFilesAadIntegration(Boolean enableAzureFilesAadIntegration) { + public StorageAccountImpl withCustomDomain(CustomDomain customDomain) { if (isInCreateMode()) { - this.createParameter.withEnableAzureFilesAadIntegration(enableAzureFilesAadIntegration); + this.createParameter.withCustomDomain(customDomain); } else { - this.updateParameter.withEnableAzureFilesAadIntegration(enableAzureFilesAadIntegration); + this.updateParameter.withCustomDomain(customDomain); } 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; }