diff --git a/sdk/storage/mgmt-v2019_06_01/pom.xml b/sdk/storage/mgmt-v2019_06_01/pom.xml
index 293e5d911070..1ce26f37d839 100644
--- a/sdk/storage/mgmt-v2019_06_01/pom.xml
+++ b/sdk/storage/mgmt-v2019_06_01/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-storage
- 1.0.0-beta-3
+ 1.0.0-beta
jar
Microsoft Azure SDK for Storage Management
This package contains Microsoft Storage Management SDK.
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java
index 4a376f3ef6e1..7d3946aabfed 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobContainers.java
@@ -139,10 +139,9 @@ public interface BlobContainers {
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
* @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays);
+ Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch);
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
index deb5540811cc..0d77af847f63 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
@@ -17,7 +17,6 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
-import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
/**
* Type representing BlobServiceProperties.
@@ -33,6 +32,11 @@ public interface BlobServiceProperties extends HasInner, DefinitionStages.WithAutomaticSnapshotPolicyEnabled, DefinitionStages.WithChangeFeed, DefinitionStages.WithCors, DefinitionStages.WithDefaultServiceVersion, DefinitionStages.WithDeleteRetentionPolicy, DefinitionStages.WithRestorePolicy {
+ interface WithCreate extends Creatable, DefinitionStages.WithAutomaticSnapshotPolicyEnabled, DefinitionStages.WithChangeFeed, DefinitionStages.WithContainerDeleteRetentionPolicy, DefinitionStages.WithCors, DefinitionStages.WithDefaultServiceVersion, DefinitionStages.WithDeleteRetentionPolicy, DefinitionStages.WithIsVersioningEnabled, DefinitionStages.WithRestorePolicy {
}
}
/**
* The template for a BlobServiceProperties update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAutomaticSnapshotPolicyEnabled, UpdateStages.WithChangeFeed, UpdateStages.WithCors, UpdateStages.WithDefaultServiceVersion, UpdateStages.WithDeleteRetentionPolicy, UpdateStages.WithRestorePolicy {
+ interface Update extends Appliable, UpdateStages.WithAutomaticSnapshotPolicyEnabled, UpdateStages.WithChangeFeed, UpdateStages.WithContainerDeleteRetentionPolicy, UpdateStages.WithCors, UpdateStages.WithDefaultServiceVersion, UpdateStages.WithDeleteRetentionPolicy, UpdateStages.WithIsVersioningEnabled, UpdateStages.WithRestorePolicy {
}
/**
@@ -198,7 +231,7 @@ interface UpdateStages {
interface WithAutomaticSnapshotPolicyEnabled {
/**
* Specifies automaticSnapshotPolicyEnabled.
- * @param automaticSnapshotPolicyEnabled Automatic Snapshot is enabled if set to true
+ * @param automaticSnapshotPolicyEnabled Deprecated in favor of isVersioningEnabled property
* @return the next update stage
*/
Update withAutomaticSnapshotPolicyEnabled(Boolean automaticSnapshotPolicyEnabled);
@@ -216,6 +249,18 @@ interface WithChangeFeed {
Update withChangeFeed(ChangeFeed changeFeed);
}
+ /**
+ * The stage of the blobserviceproperties update allowing to specify ContainerDeleteRetentionPolicy.
+ */
+ interface WithContainerDeleteRetentionPolicy {
+ /**
+ * Specifies containerDeleteRetentionPolicy.
+ * @param containerDeleteRetentionPolicy The blob service properties for container soft delete
+ * @return the next update stage
+ */
+ Update withContainerDeleteRetentionPolicy(DeleteRetentionPolicy containerDeleteRetentionPolicy);
+ }
+
/**
* The stage of the blobserviceproperties update allowing to specify Cors.
*/
@@ -252,6 +297,18 @@ interface WithDeleteRetentionPolicy {
Update withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy);
}
+ /**
+ * The stage of the blobserviceproperties update allowing to specify IsVersioningEnabled.
+ */
+ interface WithIsVersioningEnabled {
+ /**
+ * Specifies isVersioningEnabled.
+ * @param isVersioningEnabled Versioning is enabled if set to true
+ * @return the next update stage
+ */
+ Update withIsVersioningEnabled(Boolean isVersioningEnabled);
+ }
+
/**
* The stage of the blobserviceproperties update allowing to specify RestorePolicy.
*/
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScope.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScope.java
new file mode 100644
index 000000000000..9351fab0c5a2
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScope.java
@@ -0,0 +1,186 @@
+/**
+ * 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_06_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.storage.v2019_06_01.implementation.EncryptionScopeInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing EncryptionScope.
+ */
+public interface EncryptionScope extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the creationTime value.
+ */
+ DateTime creationTime();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the keyVaultProperties value.
+ */
+ EncryptionScopeKeyVaultProperties keyVaultProperties();
+
+ /**
+ * @return the lastModifiedTime value.
+ */
+ DateTime lastModifiedTime();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the source value.
+ */
+ EncryptionScopeSource source();
+
+ /**
+ * @return the state value.
+ */
+ EncryptionScopeState state();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the EncryptionScope definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStorageAccount, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of EncryptionScope definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a EncryptionScope definition.
+ */
+ interface Blank extends WithStorageAccount {
+ }
+
+ /**
+ * The stage of the encryptionscope definition allowing to specify StorageAccount.
+ */
+ interface WithStorageAccount {
+ /**
+ * Specifies resourceGroupName, accountName.
+ * @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
+ * @return the next definition stage
+ */
+ WithCreate withExistingStorageAccount(String resourceGroupName, String accountName);
+ }
+
+ /**
+ * The stage of the encryptionscope definition allowing to specify KeyVaultProperties.
+ */
+ interface WithKeyVaultProperties {
+ /**
+ * Specifies keyVaultProperties.
+ * @param keyVaultProperties The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'
+ * @return the next definition stage
+ */
+ WithCreate withKeyVaultProperties(EncryptionScopeKeyVaultProperties keyVaultProperties);
+ }
+
+ /**
+ * The stage of the encryptionscope definition allowing to specify Source.
+ */
+ interface WithSource {
+ /**
+ * Specifies source.
+ * @param source The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'Microsoft.Storage', 'Microsoft.KeyVault'
+ * @return the next definition stage
+ */
+ WithCreate withSource(EncryptionScopeSource source);
+ }
+
+ /**
+ * The stage of the encryptionscope definition allowing to specify State.
+ */
+ interface WithState {
+ /**
+ * Specifies state.
+ * @param state The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
+ */
+ WithCreate withState(EncryptionScopeState state);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithKeyVaultProperties, DefinitionStages.WithSource, DefinitionStages.WithState {
+ }
+ }
+ /**
+ * The template for a EncryptionScope update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithKeyVaultProperties, UpdateStages.WithSource, UpdateStages.WithState {
+ }
+
+ /**
+ * Grouping of EncryptionScope update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the encryptionscope update allowing to specify KeyVaultProperties.
+ */
+ interface WithKeyVaultProperties {
+ /**
+ * Specifies keyVaultProperties.
+ * @param keyVaultProperties The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'
+ * @return the next update stage
+ */
+ Update withKeyVaultProperties(EncryptionScopeKeyVaultProperties keyVaultProperties);
+ }
+
+ /**
+ * The stage of the encryptionscope update allowing to specify Source.
+ */
+ interface WithSource {
+ /**
+ * Specifies source.
+ * @param source The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'Microsoft.Storage', 'Microsoft.KeyVault'
+ * @return the next update stage
+ */
+ Update withSource(EncryptionScopeSource source);
+ }
+
+ /**
+ * The stage of the encryptionscope update allowing to specify State.
+ */
+ interface WithState {
+ /**
+ * Specifies state.
+ * @param state The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
+ */
+ Update withState(EncryptionScopeState state);
+ }
+
+ }
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeKeyVaultProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeKeyVaultProperties.java
new file mode 100644
index 000000000000..847e2de7f53d
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeKeyVaultProperties.java
@@ -0,0 +1,46 @@
+/**
+ * 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_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The key vault properties for the encryption scope. This is a required field
+ * if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
+ */
+public class EncryptionScopeKeyVaultProperties {
+ /**
+ * The object identifier for a key vault key object. When applied, the
+ * encryption scope will use the key referenced by the identifier to enable
+ * customer-managed key support on this encryption scope.
+ */
+ @JsonProperty(value = "keyUri")
+ private String keyUri;
+
+ /**
+ * Get the object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope.
+ *
+ * @return the keyUri value
+ */
+ public String keyUri() {
+ return this.keyUri;
+ }
+
+ /**
+ * Set the object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope.
+ *
+ * @param keyUri the keyUri value to set
+ * @return the EncryptionScopeKeyVaultProperties object itself.
+ */
+ public EncryptionScopeKeyVaultProperties withKeyUri(String keyUri) {
+ this.keyUri = keyUri;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeSource.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeSource.java
new file mode 100644
index 000000000000..71255686c22c
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeSource.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_06_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EncryptionScopeSource.
+ */
+public final class EncryptionScopeSource extends ExpandableStringEnum {
+ /** Static value Microsoft.Storage for EncryptionScopeSource. */
+ public static final EncryptionScopeSource MICROSOFT_STORAGE = fromString("Microsoft.Storage");
+
+ /** Static value Microsoft.KeyVault for EncryptionScopeSource. */
+ public static final EncryptionScopeSource MICROSOFT_KEY_VAULT = fromString("Microsoft.KeyVault");
+
+ /**
+ * Creates or finds a EncryptionScopeSource from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EncryptionScopeSource
+ */
+ @JsonCreator
+ public static EncryptionScopeSource fromString(String name) {
+ return fromString(name, EncryptionScopeSource.class);
+ }
+
+ /**
+ * @return known EncryptionScopeSource values
+ */
+ public static Collection values() {
+ return values(EncryptionScopeSource.class);
+ }
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeState.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeState.java
new file mode 100644
index 000000000000..ff6b058102c2
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopeState.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_06_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EncryptionScopeState.
+ */
+public final class EncryptionScopeState extends ExpandableStringEnum {
+ /** Static value Enabled for EncryptionScopeState. */
+ public static final EncryptionScopeState ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for EncryptionScopeState. */
+ public static final EncryptionScopeState DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a EncryptionScopeState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EncryptionScopeState
+ */
+ @JsonCreator
+ public static EncryptionScopeState fromString(String name) {
+ return fromString(name, EncryptionScopeState.class);
+ }
+
+ /**
+ * @return known EncryptionScopeState values
+ */
+ public static Collection values() {
+ return values(EncryptionScopeState.class);
+ }
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopes.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopes.java
new file mode 100644
index 000000000000..068ff0023151
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/EncryptionScopes.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_06_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Observable;
+import com.microsoft.azure.management.storage.v2019_06_01.implementation.EncryptionScopesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing EncryptionScopes.
+ */
+public interface EncryptionScopes extends SupportsCreating, HasInner {
+ /**
+ * Returns the properties for the specified encryption scope.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String accountName, String encryptionScopeName);
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ * @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 for the request
+ */
+ Observable listAsync(final String resourceGroupName, final String accountName);
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
index 468c2d586e70..8bd2a2d90470 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
@@ -17,7 +17,6 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
-import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
import java.util.List;
/**
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java
index 9c7ed4bc0307..cd80e2877acd 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicy.java
@@ -22,6 +22,11 @@
* Type representing ImmutabilityPolicy.
*/
public interface ImmutabilityPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the allowProtectedAppendWrites value.
+ */
+ Boolean allowProtectedAppendWrites();
+
/**
* @return the etag value.
*/
@@ -35,7 +40,7 @@ public interface ImmutabilityPolicy extends HasInner, I
/**
* @return the immutabilityPeriodSinceCreationInDays value.
*/
- int immutabilityPeriodSinceCreationInDays();
+ Integer immutabilityPeriodSinceCreationInDays();
/**
* @return the name value.
@@ -55,7 +60,7 @@ public interface ImmutabilityPolicy extends HasInner, I
/**
* The entirety of the ImmutabilityPolicy definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithIfMatch, DefinitionStages.WithImmutabilityPeriodSinceCreationInDays, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithIfMatch, DefinitionStages.WithImmutabilityPeriodSinceCreationInDays, DefinitionStages.WithAllowProtectedAppendWrites, DefinitionStages.WithCreate {
}
/**
@@ -103,7 +108,19 @@ interface WithImmutabilityPeriodSinceCreationInDays {
* @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days
* @return the next definition stage
*/
- WithCreate withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays);
+ WithAllowProtectedAppendWrites withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays);
+ }
+
+ /**
+ * The stage of the immutabilitypolicy definition allowing to specify AllowProtectedAppendWrites.
+ */
+ interface WithAllowProtectedAppendWrites {
+ /**
+ * Specifies allowProtectedAppendWrites.
+ * @param allowProtectedAppendWrites This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API
+ * @return the next definition stage
+ */
+ WithCreate withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites);
}
/**
@@ -117,7 +134,7 @@ interface WithCreate extends Creatable {
/**
* The template for a ImmutabilityPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithImmutabilityPeriodSinceCreationInDays {
+ interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithImmutabilityPeriodSinceCreationInDays, UpdateStages.WithAllowProtectedAppendWrites {
}
/**
@@ -145,7 +162,19 @@ interface WithImmutabilityPeriodSinceCreationInDays {
* @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days
* @return the next update stage
*/
- Update withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays);
+ Update withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays);
+ }
+
+ /**
+ * The stage of the immutabilitypolicy update allowing to specify AllowProtectedAppendWrites.
+ */
+ interface WithAllowProtectedAppendWrites {
+ /**
+ * Specifies allowProtectedAppendWrites.
+ * @param allowProtectedAppendWrites This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API
+ * @return the next update stage
+ */
+ Update withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites);
}
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java
index 658464ded45f..fbaa6652f662 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/ImmutabilityPolicyProperties.java
@@ -21,8 +21,8 @@ public class ImmutabilityPolicyProperties {
* The immutability period for the blobs in the container since the policy
* creation, in days.
*/
- @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays", required = true)
- private int immutabilityPeriodSinceCreationInDays;
+ @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays")
+ private Integer immutabilityPeriodSinceCreationInDays;
/**
* The ImmutabilityPolicy state of a blob container, possible values
@@ -32,6 +32,17 @@ public class ImmutabilityPolicyProperties {
@JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
private ImmutabilityPolicyState state;
+ /**
+ * This property can only be changed for unlocked time-based retention
+ * policies. When enabled, new blocks can be written to an append blob
+ * while maintaining immutability protection and compliance. Only new
+ * blocks can be added and any existing blocks cannot be modified or
+ * deleted. This property cannot be changed with ExtendImmutabilityPolicy
+ * API.
+ */
+ @JsonProperty(value = "properties.allowProtectedAppendWrites")
+ private Boolean allowProtectedAppendWrites;
+
/**
* ImmutabilityPolicy Etag.
*/
@@ -49,7 +60,7 @@ public class ImmutabilityPolicyProperties {
*
* @return the immutabilityPeriodSinceCreationInDays value
*/
- public int immutabilityPeriodSinceCreationInDays() {
+ public Integer immutabilityPeriodSinceCreationInDays() {
return this.immutabilityPeriodSinceCreationInDays;
}
@@ -59,7 +70,7 @@ public int immutabilityPeriodSinceCreationInDays() {
* @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set
* @return the ImmutabilityPolicyProperties object itself.
*/
- public ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) {
+ public ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays) {
this.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays;
return this;
}
@@ -73,6 +84,26 @@ public ImmutabilityPolicyState state() {
return this.state;
}
+ /**
+ * Get this property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
+ *
+ * @return the allowProtectedAppendWrites value
+ */
+ public Boolean allowProtectedAppendWrites() {
+ return this.allowProtectedAppendWrites;
+ }
+
+ /**
+ * Set this property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
+ *
+ * @param allowProtectedAppendWrites the allowProtectedAppendWrites value to set
+ * @return the ImmutabilityPolicyProperties object itself.
+ */
+ public ImmutabilityPolicyProperties withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites) {
+ this.allowProtectedAppendWrites = allowProtectedAppendWrites;
+ return this;
+ }
+
/**
* Get immutabilityPolicy Etag.
*
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java
index f2f5bc49673d..e6566dc31e24 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersImpl.java
@@ -175,9 +175,9 @@ public ImmutabilityPolicy call(ImmutabilityPolicyInner inner) {
}
@Override
- public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) {
+ public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) {
BlobContainersInner client = this.inner();
- return client.extendImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays)
+ return client.extendImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatch)
.map(new Func1() {
@Override
public ImmutabilityPolicy call(ImmutabilityPolicyInner inner) {
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java
index 3ac3d44b1170..5c058d0e485c 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainersInner.java
@@ -1172,14 +1172,13 @@ private ServiceResponse clearLegalHoldDelegate(Response createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays), serviceCallback);
+ public ServiceFuture createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback);
}
/**
@@ -1203,12 +1201,11 @@ public ServiceFuture createOrUpdateImmutabilityPolicyAs
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImmutabilityPolicyInner object
*/
- public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) {
- return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() {
+ public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) {
+ return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, ImmutabilityPolicyInner>() {
@Override
public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) {
return response.body();
@@ -1222,11 +1219,10 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) {
+ public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -1244,8 +1240,11 @@ public Observable, Observable>>() {
@Override
@@ -1266,15 +1265,16 @@ public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch), serviceCallback);
+ public ServiceFuture createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays, allowProtectedAppendWrites), serviceCallback);
}
/**
@@ -1299,13 +1300,14 @@ public ServiceFuture createOrUpdateImmutabilityPolicyAs
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days.
* @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
+ * @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days.
+ * @param allowProtectedAppendWrites This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImmutabilityPolicyInner object
*/
- public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) {
- return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch).map(new Func1, ImmutabilityPolicyInner>() {
+ public Observable createOrUpdateImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) {
+ return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays, allowProtectedAppendWrites).map(new Func1, ImmutabilityPolicyInner>() {
@Override
public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) {
return response.body();
@@ -1319,12 +1321,13 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) {
+ public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -1341,8 +1344,12 @@ public Observable, Observable>>() {
@Override
@@ -1751,6 +1758,104 @@ private ServiceResponseWithHeaders extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch), serviceCallback);
+ }
+
+ /**
+ * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ImmutabilityPolicyInner object
+ */
+ public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) {
+ return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() {
+ @Override
+ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ImmutabilityPolicyInner object
+ */
+ public Observable> extendImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (containerName == null) {
+ throw new IllegalArgumentException("Parameter containerName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (ifMatch == null) {
+ throw new IllegalArgumentException("Parameter ifMatch is required and cannot be null.");
+ }
+ final Integer immutabilityPeriodSinceCreationInDays = null;
+ final Boolean allowProtectedAppendWrites = null;
+ ImmutabilityPolicyInner parameters = new ImmutabilityPolicyInner();
+ parameters.withImmutabilityPeriodSinceCreationInDays(null);
+ parameters.withAllowProtectedAppendWrites(null);
+ return service.extendImmutabilityPolicy(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponseWithHeaders clientResponse = extendImmutabilityPolicyDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
/**
* Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
*
@@ -1759,13 +1864,14 @@ private ServiceResponseWithHeaders extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays), serviceCallback);
+ public ServiceFuture extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays, allowProtectedAppendWrites), serviceCallback);
}
/**
@@ -1792,11 +1899,12 @@ public ServiceFuture extendImmutabilityPolicyAsync(Stri
* @param containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
* @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
* @param immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days.
+ * @param allowProtectedAppendWrites This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImmutabilityPolicyInner object
*/
- public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) {
- return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() {
+ public Observable extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) {
+ return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays, allowProtectedAppendWrites).map(new Func1, ImmutabilityPolicyInner>() {
@Override
public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) {
return response.body();
@@ -1812,10 +1920,11 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> extendImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, int immutabilityPeriodSinceCreationInDays) {
+ public Observable> extendImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch, Integer immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -1834,8 +1943,12 @@ public Observable, Observable>>() {
@Override
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
index 57884a6967a0..97d985801b48 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
@@ -81,6 +81,11 @@ public ChangeFeed changeFeed() {
return this.inner().changeFeed();
}
+ @Override
+ public DeleteRetentionPolicy containerDeleteRetentionPolicy() {
+ return this.inner().containerDeleteRetentionPolicy();
+ }
+
@Override
public CorsRules cors() {
return this.inner().cors();
@@ -101,6 +106,11 @@ public String id() {
return this.inner().id();
}
+ @Override
+ public Boolean isVersioningEnabled() {
+ return this.inner().isVersioningEnabled();
+ }
+
@Override
public String name() {
return this.inner().name();
@@ -140,6 +150,12 @@ public BlobServicePropertiesImpl withChangeFeed(ChangeFeed changeFeed) {
return this;
}
+ @Override
+ public BlobServicePropertiesImpl withContainerDeleteRetentionPolicy(DeleteRetentionPolicy containerDeleteRetentionPolicy) {
+ this.inner().withContainerDeleteRetentionPolicy(containerDeleteRetentionPolicy);
+ return this;
+ }
+
@Override
public BlobServicePropertiesImpl withCors(CorsRules cors) {
this.inner().withCors(cors);
@@ -158,6 +174,12 @@ public BlobServicePropertiesImpl withDeleteRetentionPolicy(DeleteRetentionPolicy
return this;
}
+ @Override
+ public BlobServicePropertiesImpl withIsVersioningEnabled(Boolean isVersioningEnabled) {
+ this.inner().withIsVersioningEnabled(isVersioningEnabled);
+ return this;
+ }
+
@Override
public BlobServicePropertiesImpl withRestorePolicy(RestorePolicyProperties restorePolicy) {
this.inner().withRestorePolicy(restorePolicy);
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
index 4a55fb90ecc8..d6e767754dfb 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
@@ -45,7 +45,13 @@ public class BlobServicePropertiesInner extends ProxyResource {
private DeleteRetentionPolicy deleteRetentionPolicy;
/**
- * Automatic Snapshot is enabled if set to true.
+ * Versioning is enabled if set to true.
+ */
+ @JsonProperty(value = "properties.isVersioningEnabled")
+ private Boolean isVersioningEnabled;
+
+ /**
+ * Deprecated in favor of isVersioningEnabled property.
*/
@JsonProperty(value = "properties.automaticSnapshotPolicyEnabled")
private Boolean automaticSnapshotPolicyEnabled;
@@ -62,6 +68,12 @@ public class BlobServicePropertiesInner extends ProxyResource {
@JsonProperty(value = "properties.restorePolicy")
private RestorePolicyProperties restorePolicy;
+ /**
+ * The blob service properties for container soft delete.
+ */
+ @JsonProperty(value = "properties.containerDeleteRetentionPolicy")
+ private DeleteRetentionPolicy containerDeleteRetentionPolicy;
+
/**
* Sku name and tier.
*/
@@ -129,7 +141,27 @@ public BlobServicePropertiesInner withDeleteRetentionPolicy(DeleteRetentionPolic
}
/**
- * Get automatic Snapshot is enabled if set to true.
+ * Get versioning is enabled if set to true.
+ *
+ * @return the isVersioningEnabled value
+ */
+ public Boolean isVersioningEnabled() {
+ return this.isVersioningEnabled;
+ }
+
+ /**
+ * Set versioning is enabled if set to true.
+ *
+ * @param isVersioningEnabled the isVersioningEnabled value to set
+ * @return the BlobServicePropertiesInner object itself.
+ */
+ public BlobServicePropertiesInner withIsVersioningEnabled(Boolean isVersioningEnabled) {
+ this.isVersioningEnabled = isVersioningEnabled;
+ return this;
+ }
+
+ /**
+ * Get deprecated in favor of isVersioningEnabled property.
*
* @return the automaticSnapshotPolicyEnabled value
*/
@@ -138,7 +170,7 @@ public Boolean automaticSnapshotPolicyEnabled() {
}
/**
- * Set automatic Snapshot is enabled if set to true.
+ * Set deprecated in favor of isVersioningEnabled property.
*
* @param automaticSnapshotPolicyEnabled the automaticSnapshotPolicyEnabled value to set
* @return the BlobServicePropertiesInner object itself.
@@ -188,6 +220,26 @@ public BlobServicePropertiesInner withRestorePolicy(RestorePolicyProperties rest
return this;
}
+ /**
+ * Get the blob service properties for container soft delete.
+ *
+ * @return the containerDeleteRetentionPolicy value
+ */
+ public DeleteRetentionPolicy containerDeleteRetentionPolicy() {
+ return this.containerDeleteRetentionPolicy;
+ }
+
+ /**
+ * Set the blob service properties for container soft delete.
+ *
+ * @param containerDeleteRetentionPolicy the containerDeleteRetentionPolicy value to set
+ * @return the BlobServicePropertiesInner object itself.
+ */
+ public BlobServicePropertiesInner withContainerDeleteRetentionPolicy(DeleteRetentionPolicy containerDeleteRetentionPolicy) {
+ this.containerDeleteRetentionPolicy = containerDeleteRetentionPolicy;
+ return this;
+ }
+
/**
* Get sku name and tier.
*
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeImpl.java
new file mode 100644
index 000000000000..ce759ca427cb
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeImpl.java
@@ -0,0 +1,141 @@
+/**
+ * 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_06_01.implementation;
+
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScope;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeSource;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeState;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeKeyVaultProperties;
+
+class EncryptionScopeImpl extends CreatableUpdatableImpl implements EncryptionScope, EncryptionScope.Definition, EncryptionScope.Update {
+ private final StorageManager manager;
+ private String resourceGroupName;
+ private String accountName;
+ private String encryptionScopeName;
+
+ EncryptionScopeImpl(String name, StorageManager manager) {
+ super(name, new EncryptionScopeInner());
+ this.manager = manager;
+ // Set resource name
+ this.encryptionScopeName = name;
+ //
+ }
+
+ EncryptionScopeImpl(EncryptionScopeInner inner, StorageManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.encryptionScopeName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "storageAccounts");
+ this.encryptionScopeName = IdParsingUtils.getValueFromIdByName(inner.id(), "encryptionScopes");
+ //
+ }
+
+ @Override
+ public StorageManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ EncryptionScopesInner client = this.manager().inner().encryptionScopes();
+ return client.putAsync(this.resourceGroupName, this.accountName, this.encryptionScopeName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ EncryptionScopesInner client = this.manager().inner().encryptionScopes();
+ return client.patchAsync(this.resourceGroupName, this.accountName, this.encryptionScopeName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ EncryptionScopesInner client = this.manager().inner().encryptionScopes();
+ return client.getAsync(this.resourceGroupName, this.accountName, this.encryptionScopeName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public DateTime creationTime() {
+ return this.inner().creationTime();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public EncryptionScopeKeyVaultProperties keyVaultProperties() {
+ return this.inner().keyVaultProperties();
+ }
+
+ @Override
+ public DateTime lastModifiedTime() {
+ return this.inner().lastModifiedTime();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public EncryptionScopeSource source() {
+ return this.inner().source();
+ }
+
+ @Override
+ public EncryptionScopeState state() {
+ return this.inner().state();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public EncryptionScopeImpl withExistingStorageAccount(String resourceGroupName, String accountName) {
+ this.resourceGroupName = resourceGroupName;
+ this.accountName = accountName;
+ return this;
+ }
+
+ @Override
+ public EncryptionScopeImpl withKeyVaultProperties(EncryptionScopeKeyVaultProperties keyVaultProperties) {
+ this.inner().withKeyVaultProperties(keyVaultProperties);
+ return this;
+ }
+
+ @Override
+ public EncryptionScopeImpl withSource(EncryptionScopeSource source) {
+ this.inner().withSource(source);
+ return this;
+ }
+
+ @Override
+ public EncryptionScopeImpl withState(EncryptionScopeState state) {
+ this.inner().withState(state);
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeInner.java
new file mode 100644
index 000000000000..f50c949ea0f9
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopeInner.java
@@ -0,0 +1,137 @@
+/**
+ * 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_06_01.implementation;
+
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeSource;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeState;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopeKeyVaultProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The Encryption Scope resource.
+ */
+@JsonFlatten
+public class EncryptionScopeInner extends ProxyResource {
+ /**
+ * The provider for the encryption scope. Possible values
+ * (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible
+ * values include: 'Microsoft.Storage', 'Microsoft.KeyVault'.
+ */
+ @JsonProperty(value = "properties.source")
+ private EncryptionScopeSource source;
+
+ /**
+ * The state of the encryption scope. Possible values (case-insensitive):
+ * Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'.
+ */
+ @JsonProperty(value = "properties.state")
+ private EncryptionScopeState state;
+
+ /**
+ * Gets the creation date and time of the encryption scope in UTC.
+ */
+ @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime creationTime;
+
+ /**
+ * Gets the last modification date and time of the encryption scope in UTC.
+ */
+ @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime lastModifiedTime;
+
+ /**
+ * The key vault properties for the encryption scope. This is a required
+ * field if encryption scope 'source' attribute is set to
+ * 'Microsoft.KeyVault'.
+ */
+ @JsonProperty(value = "properties.keyVaultProperties")
+ private EncryptionScopeKeyVaultProperties keyVaultProperties;
+
+ /**
+ * Get the provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'Microsoft.Storage', 'Microsoft.KeyVault'.
+ *
+ * @return the source value
+ */
+ public EncryptionScopeSource source() {
+ return this.source;
+ }
+
+ /**
+ * Set the provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'Microsoft.Storage', 'Microsoft.KeyVault'.
+ *
+ * @param source the source value to set
+ * @return the EncryptionScopeInner object itself.
+ */
+ public EncryptionScopeInner withSource(EncryptionScopeSource source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @return the state value
+ */
+ public EncryptionScopeState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @param state the state value to set
+ * @return the EncryptionScopeInner object itself.
+ */
+ public EncryptionScopeInner withState(EncryptionScopeState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get gets the creation date and time of the encryption scope in UTC.
+ *
+ * @return the creationTime value
+ */
+ public DateTime creationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Get gets the last modification date and time of the encryption scope in UTC.
+ *
+ * @return the lastModifiedTime value
+ */
+ public DateTime lastModifiedTime() {
+ return this.lastModifiedTime;
+ }
+
+ /**
+ * Get the key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
+ *
+ * @return the keyVaultProperties value
+ */
+ public EncryptionScopeKeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set the key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set
+ * @return the EncryptionScopeInner object itself.
+ */
+ public EncryptionScopeInner withKeyVaultProperties(EncryptionScopeKeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesImpl.java
new file mode 100644
index 000000000000..21d7fa43a507
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesImpl.java
@@ -0,0 +1,78 @@
+/**
+ * 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_06_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopes;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScope;
+
+class EncryptionScopesImpl extends WrapperImpl implements EncryptionScopes {
+ private final StorageManager manager;
+
+ EncryptionScopesImpl(StorageManager manager) {
+ super(manager.inner().encryptionScopes());
+ this.manager = manager;
+ }
+
+ public StorageManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public EncryptionScopeImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private EncryptionScopeImpl wrapModel(EncryptionScopeInner inner) {
+ return new EncryptionScopeImpl(inner, manager());
+ }
+
+ private EncryptionScopeImpl wrapModel(String name) {
+ return new EncryptionScopeImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String accountName) {
+ EncryptionScopesInner client = this.inner();
+ return client.listAsync(resourceGroupName, accountName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EncryptionScope call(EncryptionScopeInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String accountName, String encryptionScopeName) {
+ EncryptionScopesInner client = this.inner();
+ return client.getAsync(resourceGroupName, accountName, encryptionScopeName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(EncryptionScopeInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((EncryptionScope)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesInner.java
new file mode 100644
index 000000000000..0ad89b6b8de3
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/EncryptionScopesInner.java
@@ -0,0 +1,617 @@
+/**
+ * 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_06_01.implementation;
+
+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_06_01.ErrorResponseException;
+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;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in EncryptionScopes.
+ */
+public class EncryptionScopesInner {
+ /** The Retrofit service to perform REST calls. */
+ private EncryptionScopesService service;
+ /** The service client containing this operation class. */
+ private StorageManagementClientImpl client;
+
+ /**
+ * Initializes an instance of EncryptionScopesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public EncryptionScopesInner(Retrofit retrofit, StorageManagementClientImpl client) {
+ this.service = retrofit.create(EncryptionScopesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EncryptionScopes to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface EncryptionScopesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopes put" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}")
+ Observable> put(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("encryptionScopeName") String encryptionScopeName, @Query("api-version") String apiVersion, @Body EncryptionScopeInner encryptionScope, @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_06_01.EncryptionScopes patch" })
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}")
+ Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("encryptionScopeName") String encryptionScopeName, @Query("api-version") String apiVersion, @Body EncryptionScopeInner encryptionScope, @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_06_01.EncryptionScopes get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("encryptionScopeName") String encryptionScopeName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopes list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes")
+ Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopes listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EncryptionScopeInner object if successful.
+ */
+ public EncryptionScopeInner put(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ return putWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope).toBlocking().single().body();
+ }
+
+ /**
+ * Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the create or update.
+ * @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 putAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(putWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope), serviceCallback);
+ }
+
+ /**
+ * Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable putAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ return putWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope).map(new Func1, EncryptionScopeInner>() {
+ @Override
+ public EncryptionScopeInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable> putWithServiceResponseAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (encryptionScopeName == null) {
+ throw new IllegalArgumentException("Parameter encryptionScopeName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (encryptionScope == null) {
+ throw new IllegalArgumentException("Parameter encryptionScope is required and cannot be null.");
+ }
+ Validator.validate(encryptionScope);
+ return service.put(resourceGroupName, accountName, this.client.subscriptionId(), encryptionScopeName, this.client.apiVersion(), encryptionScope, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = putDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse putDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EncryptionScopeInner object if successful.
+ */
+ public EncryptionScopeInner patch(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ return patchWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope).toBlocking().single().body();
+ }
+
+ /**
+ * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the update.
+ * @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 patchAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope), serviceCallback);
+ }
+
+ /**
+ * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable patchAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ return patchWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName, encryptionScope).map(new Func1, EncryptionScopeInner>() {
+ @Override
+ public EncryptionScopeInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param encryptionScope Encryption scope properties to be used for the update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable> patchWithServiceResponseAsync(String resourceGroupName, String accountName, String encryptionScopeName, EncryptionScopeInner encryptionScope) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (encryptionScopeName == null) {
+ throw new IllegalArgumentException("Parameter encryptionScopeName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (encryptionScope == null) {
+ throw new IllegalArgumentException("Parameter encryptionScope is required and cannot be null.");
+ }
+ Validator.validate(encryptionScope);
+ return service.patch(resourceGroupName, accountName, this.client.subscriptionId(), encryptionScopeName, this.client.apiVersion(), encryptionScope, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = patchDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse patchDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Returns the properties for the specified encryption scope.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the EncryptionScopeInner object if successful.
+ */
+ public EncryptionScopeInner get(String resourceGroupName, String accountName, String encryptionScopeName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName).toBlocking().single().body();
+ }
+
+ /**
+ * Returns the properties for the specified encryption scope.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @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 getAsync(String resourceGroupName, String accountName, String encryptionScopeName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName), serviceCallback);
+ }
+
+ /**
+ * Returns the properties for the specified encryption scope.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable getAsync(String resourceGroupName, String accountName, String encryptionScopeName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, encryptionScopeName).map(new Func1, EncryptionScopeInner>() {
+ @Override
+ public EncryptionScopeInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns the properties for the specified encryption scope.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param encryptionScopeName The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the EncryptionScopeInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String encryptionScopeName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (encryptionScopeName == null) {
+ throw new IllegalArgumentException("Parameter encryptionScopeName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(resourceGroupName, accountName, this.client.subscriptionId(), encryptionScopeName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ * @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
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<EncryptionScopeInner> object if successful.
+ */
+ 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();
+ }
+ };
+ }
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
+ * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final String 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);
+ }
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ * @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<EncryptionScopeInner> object
+ */
+ 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 the encryption scopes available under the specified storage account.
+ *
+ * @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<EncryptionScopeInner> 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));
+ }
+ });
+ }
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<EncryptionScopeInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ 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);
+ }
+
+ /**
+ * Lists all the encryption scopes available under the specified storage account.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<EncryptionScopeInner> object if successful.
+ */
+ public PagedList 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 the encryption scopes available under the specified storage account.
+ *
+ * @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 the encryption scopes available under the specified storage account.
+ *
+ * @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<EncryptionScopeInner> 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 the encryption scopes available under the specified storage account.
+ *
+ * @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<EncryptionScopeInner> 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 the encryption scopes available under the specified storage account.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<EncryptionScopeInner> 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/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java
index 3511e77ce5a0..62431b75bb9c 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyImpl.java
@@ -19,9 +19,11 @@ class ImmutabilityPolicyImpl extends CreatableUpdatableImpl createResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.cimmutabilityPeriodSinceCreationInDays, this.cifMatch)
+ return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.cifMatch, this.cimmutabilityPeriodSinceCreationInDays, this.callowProtectedAppendWrites)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.uimmutabilityPeriodSinceCreationInDays, this.uifMatch)
+ return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.uifMatch, this.uimmutabilityPeriodSinceCreationInDays, this.uallowProtectedAppendWrites)
.map(innerToFluentMap(this));
}
@@ -74,6 +76,11 @@ public boolean isInCreateMode() {
}
+ @Override
+ public Boolean allowProtectedAppendWrites() {
+ return this.inner().allowProtectedAppendWrites();
+ }
+
@Override
public String etag() {
return this.inner().etag();
@@ -85,7 +92,7 @@ public String id() {
}
@Override
- public int immutabilityPeriodSinceCreationInDays() {
+ public Integer immutabilityPeriodSinceCreationInDays() {
return this.inner().immutabilityPeriodSinceCreationInDays();
}
@@ -123,7 +130,7 @@ public ImmutabilityPolicyImpl withIfMatch(String ifMatch) {
}
@Override
- public ImmutabilityPolicyImpl withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) {
+ public ImmutabilityPolicyImpl withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays) {
if (isInCreateMode()) {
this.cimmutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays;
} else {
@@ -132,4 +139,14 @@ public ImmutabilityPolicyImpl withImmutabilityPeriodSinceCreationInDays(int immu
return this;
}
+ @Override
+ public ImmutabilityPolicyImpl withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites) {
+ if (isInCreateMode()) {
+ this.callowProtectedAppendWrites = allowProtectedAppendWrites;
+ } else {
+ this.uallowProtectedAppendWrites = allowProtectedAppendWrites;
+ }
+ return this;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java
index 9193455899ec..c9bdbffc611f 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/ImmutabilityPolicyInner.java
@@ -23,8 +23,8 @@ public class ImmutabilityPolicyInner extends AzureEntityResource {
* The immutability period for the blobs in the container since the policy
* creation, in days.
*/
- @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays", required = true)
- private int immutabilityPeriodSinceCreationInDays;
+ @JsonProperty(value = "properties.immutabilityPeriodSinceCreationInDays")
+ private Integer immutabilityPeriodSinceCreationInDays;
/**
* The ImmutabilityPolicy state of a blob container, possible values
@@ -34,12 +34,23 @@ public class ImmutabilityPolicyInner extends AzureEntityResource {
@JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
private ImmutabilityPolicyState state;
+ /**
+ * This property can only be changed for unlocked time-based retention
+ * policies. When enabled, new blocks can be written to an append blob
+ * while maintaining immutability protection and compliance. Only new
+ * blocks can be added and any existing blocks cannot be modified or
+ * deleted. This property cannot be changed with ExtendImmutabilityPolicy
+ * API.
+ */
+ @JsonProperty(value = "properties.allowProtectedAppendWrites")
+ private Boolean allowProtectedAppendWrites;
+
/**
* Get the immutability period for the blobs in the container since the policy creation, in days.
*
* @return the immutabilityPeriodSinceCreationInDays value
*/
- public int immutabilityPeriodSinceCreationInDays() {
+ public Integer immutabilityPeriodSinceCreationInDays() {
return this.immutabilityPeriodSinceCreationInDays;
}
@@ -49,7 +60,7 @@ public int immutabilityPeriodSinceCreationInDays() {
* @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set
* @return the ImmutabilityPolicyInner object itself.
*/
- public ImmutabilityPolicyInner withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) {
+ public ImmutabilityPolicyInner withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays) {
this.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays;
return this;
}
@@ -63,4 +74,24 @@ public ImmutabilityPolicyState state() {
return this.state;
}
+ /**
+ * Get this property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
+ *
+ * @return the allowProtectedAppendWrites value
+ */
+ public Boolean allowProtectedAppendWrites() {
+ return this.allowProtectedAppendWrites;
+ }
+
+ /**
+ * Set this property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
+ *
+ * @param allowProtectedAppendWrites the allowProtectedAppendWrites value to set
+ * @return the ImmutabilityPolicyInner object itself.
+ */
+ public ImmutabilityPolicyInner withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites) {
+ this.allowProtectedAppendWrites = allowProtectedAppendWrites;
+ return this;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java
index f325588fdd1e..de823744ceee 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManagementClientImpl.java
@@ -225,6 +225,19 @@ public PrivateLinkResourcesInner privateLinkResources() {
return this.privateLinkResources;
}
+ /**
+ * The EncryptionScopesInner object to access its operations.
+ */
+ private EncryptionScopesInner encryptionScopes;
+
+ /**
+ * Gets the EncryptionScopesInner object to access its operations.
+ * @return the EncryptionScopesInner object.
+ */
+ public EncryptionScopesInner encryptionScopes() {
+ return this.encryptionScopes;
+ }
+
/**
* The BlobServicesInner object to access its operations.
*/
@@ -319,6 +332,7 @@ protected void initialize() {
this.managementPolicies = new ManagementPoliciesInner(restClient().retrofit(), this);
this.privateEndpointConnections = new PrivateEndpointConnectionsInner(restClient().retrofit(), this);
this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this);
+ this.encryptionScopes = new EncryptionScopesInner(restClient().retrofit(), this);
this.blobServices = new BlobServicesInner(restClient().retrofit(), this);
this.blobContainers = new BlobContainersInner(restClient().retrofit(), this);
this.fileServices = new FileServicesInner(restClient().retrofit(), this);
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java
index fb50ff57405f..b697756ccb6a 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/StorageManager.java
@@ -23,6 +23,7 @@
import com.microsoft.azure.management.storage.v2019_06_01.ManagementPolicies;
import com.microsoft.azure.management.storage.v2019_06_01.PrivateEndpointConnections;
import com.microsoft.azure.management.storage.v2019_06_01.PrivateLinkResources;
+import com.microsoft.azure.management.storage.v2019_06_01.EncryptionScopes;
import com.microsoft.azure.management.storage.v2019_06_01.BlobServices;
import com.microsoft.azure.management.storage.v2019_06_01.BlobContainers;
import com.microsoft.azure.management.storage.v2019_06_01.FileServices;
@@ -41,6 +42,7 @@ public final class StorageManager extends ManagerCore