From ed4f9ff5b9667acfd2486c4b062d63c4c78d3e61 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 15 Jun 2020 19:01:07 +0000 Subject: [PATCH] Generated from 6d6ccff47614fd8ae245b6caf0bece69b54d7dac Updating description --- .../v2019_04_01/MinimumTlsVersion.java | 44 +++++++++++++ .../storage/v2019_04_01/StorageAccount.java | 62 ++++++++++++++++++- .../StorageAccountCreateParameters.java | 55 ++++++++++++++++ .../StorageAccountUpdateParameters.java | 55 ++++++++++++++++ .../implementation/StorageAccountImpl.java | 31 ++++++++++ .../implementation/StorageAccountInner.java | 56 +++++++++++++++++ 6 files changed, 301 insertions(+), 2 deletions(-) create mode 100644 sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/MinimumTlsVersion.java diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/MinimumTlsVersion.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/MinimumTlsVersion.java new file mode 100644 index 0000000000000..1134ad1ffecf1 --- /dev/null +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/MinimumTlsVersion.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 java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MinimumTlsVersion. + */ +public final class MinimumTlsVersion extends ExpandableStringEnum { + /** Static value TLS1_0 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_0 = fromString("TLS1_0"); + + /** Static value TLS1_1 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_1 = fromString("TLS1_1"); + + /** Static value TLS1_2 for MinimumTlsVersion. */ + public static final MinimumTlsVersion TLS1_2 = fromString("TLS1_2"); + + /** + * Creates or finds a MinimumTlsVersion from its string representation. + * @param name a name to look for + * @return the corresponding MinimumTlsVersion + */ + @JsonCreator + public static MinimumTlsVersion fromString(String name) { + return fromString(name, MinimumTlsVersion.class); + } + + /** + * @return known MinimumTlsVersion values + */ + public static Collection values() { + return values(MinimumTlsVersion.class); + } +} diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java index 5a083c7fffb25..e258ec9386154 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccount.java +++ b/sdk/storage/mgmt-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 allowBlobPublicAccess value. + */ + Boolean allowBlobPublicAccess(); + /** * @return the azureFilesIdentityBasedAuthentication value. */ @@ -91,6 +96,11 @@ public interface StorageAccount extends HasInner, Resource, */ DateTime lastGeoFailoverTime(); + /** + * @return the minimumTlsVersion value. + */ + MinimumTlsVersion minimumTlsVersion(); + /** * @return the networkRuleSet value. */ @@ -194,6 +204,18 @@ interface WithAccessTier { WithCreate withAccessTier(AccessTier accessTier); } + /** + * The stage of the storageaccount definition allowing to specify AllowBlobPublicAccess. + */ + interface WithAllowBlobPublicAccess { + /** + * Specifies allowBlobPublicAccess. + * @param allowBlobPublicAccess Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property + * @return the next definition stage + */ + WithCreate withAllowBlobPublicAccess(Boolean allowBlobPublicAccess); + } + /** * The stage of the storageaccount definition allowing to specify AzureFilesIdentityBasedAuthentication. */ @@ -278,6 +300,18 @@ interface WithLargeFileSharesState { WithCreate withLargeFileSharesState(LargeFileSharesState largeFileSharesState); } + /** + * The stage of the storageaccount definition allowing to specify MinimumTlsVersion. + */ + interface WithMinimumTlsVersion { + /** + * Specifies minimumTlsVersion. + * @param minimumTlsVersion Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + * @return the next definition stage + */ + WithCreate withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion); + } + /** * The stage of the storageaccount definition allowing to specify NetworkRuleSet. */ @@ -295,13 +329,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.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithNetworkRuleSet { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAccessTier, DefinitionStages.WithAllowBlobPublicAccess, DefinitionStages.WithAzureFilesIdentityBasedAuthentication, DefinitionStages.WithCustomDomain, DefinitionStages.WithEnableHttpsTrafficOnly, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithIsHnsEnabled, DefinitionStages.WithLargeFileSharesState, DefinitionStages.WithMinimumTlsVersion, 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.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAccessTier, UpdateStages.WithAllowBlobPublicAccess, UpdateStages.WithAzureFilesIdentityBasedAuthentication, UpdateStages.WithCustomDomain, UpdateStages.WithEnableHttpsTrafficOnly, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLargeFileSharesState, UpdateStages.WithMinimumTlsVersion, UpdateStages.WithNetworkRuleSet, UpdateStages.WithSku { } /** @@ -320,6 +354,18 @@ interface WithAccessTier { Update withAccessTier(AccessTier accessTier); } + /** + * The stage of the storageaccount update allowing to specify AllowBlobPublicAccess. + */ + interface WithAllowBlobPublicAccess { + /** + * Specifies allowBlobPublicAccess. + * @param allowBlobPublicAccess Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property + * @return the next update stage + */ + Update withAllowBlobPublicAccess(Boolean allowBlobPublicAccess); + } + /** * The stage of the storageaccount update allowing to specify AzureFilesIdentityBasedAuthentication. */ @@ -404,6 +450,18 @@ interface WithLargeFileSharesState { Update withLargeFileSharesState(LargeFileSharesState largeFileSharesState); } + /** + * The stage of the storageaccount update allowing to specify MinimumTlsVersion. + */ + interface WithMinimumTlsVersion { + /** + * Specifies minimumTlsVersion. + * @param minimumTlsVersion Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + * @return the next update stage + */ + Update withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion); + } + /** * The stage of the storageaccount update allowing to specify NetworkRuleSet. */ diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java index d8c7b7dc36f3c..1335c4c605643 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountCreateParameters.java @@ -113,6 +113,21 @@ public class StorageAccountCreateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Get required. Gets or sets the SKU name. * @@ -373,4 +388,44 @@ public StorageAccountCreateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + } diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java index 24f969061990b..33f016b44c547 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java @@ -91,6 +91,21 @@ public class StorageAccountUpdateParameters { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Optional. Indicates the type of storage account. Currently only * StorageV2 value supported by server. Possible values include: 'Storage', @@ -299,6 +314,46 @@ public StorageAccountUpdateParameters withLargeFileSharesState(LargeFileSharesSt return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + /** * Get optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage'. * diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java index 60397ba74a9f4..428a070461d76 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountImpl.java @@ -22,6 +22,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.Identity; import com.microsoft.azure.management.storage.v2019_04_01.Kind; import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; +import com.microsoft.azure.management.storage.v2019_04_01.MinimumTlsVersion; import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.Endpoints; import com.microsoft.azure.management.storage.v2019_04_01.ProvisioningState; @@ -89,6 +90,11 @@ public AccessTier accessTier() { return this.inner().accessTier(); } + @Override + public Boolean allowBlobPublicAccess() { + return this.inner().allowBlobPublicAccess(); + } + @Override public AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication() { return this.inner().azureFilesIdentityBasedAuthentication(); @@ -149,6 +155,11 @@ public DateTime lastGeoFailoverTime() { return this.inner().lastGeoFailoverTime(); } + @Override + public MinimumTlsVersion minimumTlsVersion() { + return this.inner().minimumTlsVersion(); + } + @Override public NetworkRuleSet networkRuleSet() { return this.inner().networkRuleSet(); @@ -235,6 +246,16 @@ public StorageAccountImpl withAccessTier(AccessTier accessTier) { return this; } + @Override + public StorageAccountImpl withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + if (isInCreateMode()) { + this.createParameter.withAllowBlobPublicAccess(allowBlobPublicAccess); + } else { + this.updateParameter.withAllowBlobPublicAccess(allowBlobPublicAccess); + } + return this; + } + @Override public StorageAccountImpl withAzureFilesIdentityBasedAuthentication(AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication) { if (isInCreateMode()) { @@ -295,6 +316,16 @@ public StorageAccountImpl withLargeFileSharesState(LargeFileSharesState largeFil return this; } + @Override + public StorageAccountImpl withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + if (isInCreateMode()) { + this.createParameter.withMinimumTlsVersion(minimumTlsVersion); + } else { + this.updateParameter.withMinimumTlsVersion(minimumTlsVersion); + } + return this; + } + @Override public StorageAccountImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) { if (isInCreateMode()) { diff --git a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java index 8f4954da34035..7ca4a4b65317a 100644 --- a/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java +++ b/sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/implementation/StorageAccountInner.java @@ -21,6 +21,7 @@ import com.microsoft.azure.management.storage.v2019_04_01.NetworkRuleSet; import com.microsoft.azure.management.storage.v2019_04_01.GeoReplicationStats; import com.microsoft.azure.management.storage.v2019_04_01.LargeFileSharesState; +import com.microsoft.azure.management.storage.v2019_04_01.MinimumTlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -183,6 +184,21 @@ public class StorageAccountInner extends Resource { @JsonProperty(value = "properties.largeFileSharesState") private LargeFileSharesState largeFileSharesState; + /** + * Allow or disallow public access to all blobs or containers in the + * storage account. The default interpretation is true for this property. + */ + @JsonProperty(value = "properties.allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /** + * Set the minimum TLS version to be permitted on requests to storage. The + * default interpretation is TLS 1.0 for this property. Possible values + * include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + */ + @JsonProperty(value = "properties.minimumTlsVersion") + private MinimumTlsVersion minimumTlsVersion; + /** * Get gets the SKU. * @@ -436,4 +452,44 @@ public StorageAccountInner withLargeFileSharesState(LargeFileSharesState largeFi return this; } + /** + * Get allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @return the allowBlobPublicAccess value + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @return the minimumTlsVersion value + */ + public MinimumTlsVersion minimumTlsVersion() { + return this.minimumTlsVersion; + } + + /** + * Set set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2'. + * + * @param minimumTlsVersion the minimumTlsVersion value to set + * @return the StorageAccountInner object itself. + */ + public StorageAccountInner withMinimumTlsVersion(MinimumTlsVersion minimumTlsVersion) { + this.minimumTlsVersion = minimumTlsVersion; + return this; + } + }