diff --git a/sdk/storage/mgmt-v2018_03_01_preview/pom.xml b/sdk/storage/mgmt-v2018_03_01_preview/pom.xml
index 98679cc96a236..215bdc4115343 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/pom.xml
+++ b/sdk/storage/mgmt-v2018_03_01_preview/pom.xml
@@ -11,7 +11,7 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-storage
@@ -19,7 +19,7 @@
jar
Microsoft Azure SDK for Storage Management
This package contains Microsoft Storage Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-java
The MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
HEAD
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainer.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainer.java
index 54c0197965531..04536a38c6728 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainer.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainer.java
@@ -16,8 +16,8 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.StorageManager;
-import org.joda.time.DateTime;
import java.util.Map;
+import org.joda.time.DateTime;
/**
* Type representing BlobContainer.
@@ -96,7 +96,7 @@ public interface BlobContainer extends HasInner, Indexable,
/**
* The entirety of the BlobContainer definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithBlobService, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithBlobService, DefinitionStages.WithPublicAccess, DefinitionStages.WithMetadata, DefinitionStages.WithCreate {
}
/**
@@ -115,8 +115,35 @@ interface Blank extends WithBlobService {
interface WithBlobService {
/**
* 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
+ */
+ WithPublicAccess withExistingBlobService(String resourceGroupName, String accountName);
+ }
+
+ /**
+ * The stage of the blobcontainer definition allowing to specify PublicAccess.
+ */
+ interface WithPublicAccess {
+ /**
+ * Specifies publicAccess.
+ * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'
+ * @return the next definition stage
+ */
+ WithMetadata withPublicAccess(PublicAccess publicAccess);
+ }
+
+ /**
+ * The stage of the blobcontainer definition allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata A name-value pair to associate with the container as metadata
+ * @return the next definition stage
*/
- WithCreate withExistingBlobService(String resourceGroupName, String accountName);
+ WithCreate withMetadata(Map metadata);
}
/**
@@ -130,12 +157,36 @@ interface WithCreate extends Creatable {
/**
* The template for a BlobContainer update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable {
+ interface Update extends Appliable, UpdateStages.WithPublicAccess, UpdateStages.WithMetadata {
}
/**
* Grouping of BlobContainer update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the blobcontainer update allowing to specify PublicAccess.
+ */
+ interface WithPublicAccess {
+ /**
+ * Specifies publicAccess.
+ * @param publicAccess Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'
+ * @return the next update stage
+ */
+ Update withPublicAccess(PublicAccess publicAccess);
+ }
+
+ /**
+ * The stage of the blobcontainer update allowing to specify Metadata.
+ */
+ interface WithMetadata {
+ /**
+ * Specifies metadata.
+ * @param metadata A name-value pair to associate with the container as metadata
+ * @return the next update stage
+ */
+ Update withMetadata(Map metadata);
+ }
+
}
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainers.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainers.java
index d25debdf12485..c149ef6ec7b3d 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainers.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/BlobContainers.java
@@ -86,6 +86,17 @@ public interface BlobContainers {
*/
Observable clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List tags);
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable leaseAsync(String resourceGroupName, String accountName, String containerName);
+
/**
* Gets the existing immutability policy along with the corresponding ETag in response headers and body.
*
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/CustomDomain.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/CustomDomain.java
index f89dcb1e5d071..875be47845149 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/CustomDomain.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/CustomDomain.java
@@ -26,8 +26,8 @@ public class CustomDomain {
* Indicates whether indirect CName validation is enabled. Default value is
* false. This should only be set on updates.
*/
- @JsonProperty(value = "useSubDomain")
- private Boolean useSubDomain;
+ @JsonProperty(value = "useSubDomainName")
+ private Boolean useSubDomainName;
/**
* Get gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
@@ -52,20 +52,20 @@ public CustomDomain withName(String name) {
/**
* Get indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.
*
- * @return the useSubDomain value
+ * @return the useSubDomainName value
*/
- public Boolean useSubDomain() {
- return this.useSubDomain;
+ public Boolean useSubDomainName() {
+ return this.useSubDomainName;
}
/**
* Set indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.
*
- * @param useSubDomain the useSubDomain value to set
+ * @param useSubDomainName the useSubDomainName value to set
* @return the CustomDomain object itself.
*/
- public CustomDomain withUseSubDomain(Boolean useSubDomain) {
- this.useSubDomain = useSubDomain;
+ public CustomDomain withUseSubDomainName(Boolean useSubDomainName) {
+ this.useSubDomainName = useSubDomainName;
return this;
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/Dimension.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/Dimension.java
index 360fb387ec97a..a8ca737948c5c 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/Dimension.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/Dimension.java
@@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Dimension of blobs, possiblly be blob type or access tier.
+ * Dimension of blobs, possibly be blob type or access tier.
*/
public class Dimension {
/**
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ImmutabilityPolicy.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ImmutabilityPolicy.java
index 7e1f1681b78c1..f5c18548dddce 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ImmutabilityPolicy.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ImmutabilityPolicy.java
@@ -55,7 +55,7 @@ public interface ImmutabilityPolicy extends HasInner, I
/**
* The entirety of the ImmutabilityPolicy definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithImmutabilityPeriodSinceCreationInDays, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithIfMatch, DefinitionStages.WithImmutabilityPeriodSinceCreationInDays, DefinitionStages.WithCreate {
}
/**
@@ -74,8 +74,24 @@ interface Blank extends WithContainer {
interface WithContainer {
/**
* Specifies resourceGroupName, accountName, containerName.
+ * @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
+ * @return the next definition stage
*/
- WithImmutabilityPeriodSinceCreationInDays withExistingContainer(String resourceGroupName, String accountName, String containerName);
+ WithIfMatch withExistingContainer(String resourceGroupName, String accountName, String containerName);
+ }
+
+ /**
+ * The stage of the immutabilitypolicy definition allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @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
+ * @return the next definition stage
+ */
+ WithImmutabilityPeriodSinceCreationInDays withIfMatch(String ifMatch);
}
/**
@@ -84,6 +100,8 @@ interface WithContainer {
interface WithImmutabilityPeriodSinceCreationInDays {
/**
* Specifies immutabilityPeriodSinceCreationInDays.
+ * @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);
}
@@ -99,19 +117,33 @@ interface WithCreate extends Creatable {
/**
* The template for a ImmutabilityPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithImmutabilityPeriodSinceCreationInDays {
+ interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithImmutabilityPeriodSinceCreationInDays {
}
/**
* Grouping of ImmutabilityPolicy update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the immutabilitypolicy update allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @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
+ * @return the next update stage
+ */
+ Update withIfMatch(String ifMatch);
+ }
+
/**
* The stage of the immutabilitypolicy update allowing to specify ImmutabilityPeriodSinceCreationInDays.
*/
interface WithImmutabilityPeriodSinceCreationInDays {
/**
* Specifies immutabilityPeriodSinceCreationInDays.
+ * @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);
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerRequest.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerRequest.java
new file mode 100644
index 0000000000000..20d0da2c42178
--- /dev/null
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerRequest.java
@@ -0,0 +1,152 @@
+/**
+ * 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.v2018_03_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Lease Container request schema.
+ */
+public class LeaseContainerRequest {
+ /**
+ * Specifies the lease action. Can be one of the available actions.
+ * Possible values include: 'Acquire', 'Renew', 'Change', 'Release',
+ * 'Break'.
+ */
+ @JsonProperty(value = "action", required = true)
+ private String action;
+
+ /**
+ * Identifies the lease. Can be specified in any valid GUID string format.
+ */
+ @JsonProperty(value = "leaseId")
+ private String leaseId;
+
+ /**
+ * Optional. For a break action, proposed duration the lease should
+ * continue before it is broken, in seconds, between 0 and 60.
+ */
+ @JsonProperty(value = "breakPeriod")
+ private Integer breakPeriod;
+
+ /**
+ * Required for acquire. Specifies the duration of the lease, in seconds,
+ * or negative one (-1) for a lease that never expires.
+ */
+ @JsonProperty(value = "leaseDuration")
+ private Integer leaseDuration;
+
+ /**
+ * Optional for acquire, required for change. Proposed lease ID, in a GUID
+ * string format.
+ */
+ @JsonProperty(value = "proposedLeaseId")
+ private String proposedLeaseId;
+
+ /**
+ * Get specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break'.
+ *
+ * @return the action value
+ */
+ public String action() {
+ return this.action;
+ }
+
+ /**
+ * Set specifies the lease action. Can be one of the available actions. Possible values include: 'Acquire', 'Renew', 'Change', 'Release', 'Break'.
+ *
+ * @param action the action value to set
+ * @return the LeaseContainerRequest object itself.
+ */
+ public LeaseContainerRequest withAction(String action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get identifies the lease. Can be specified in any valid GUID string format.
+ *
+ * @return the leaseId value
+ */
+ public String leaseId() {
+ return this.leaseId;
+ }
+
+ /**
+ * Set identifies the lease. Can be specified in any valid GUID string format.
+ *
+ * @param leaseId the leaseId value to set
+ * @return the LeaseContainerRequest object itself.
+ */
+ public LeaseContainerRequest withLeaseId(String leaseId) {
+ this.leaseId = leaseId;
+ return this;
+ }
+
+ /**
+ * Get optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.
+ *
+ * @return the breakPeriod value
+ */
+ public Integer breakPeriod() {
+ return this.breakPeriod;
+ }
+
+ /**
+ * Set optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.
+ *
+ * @param breakPeriod the breakPeriod value to set
+ * @return the LeaseContainerRequest object itself.
+ */
+ public LeaseContainerRequest withBreakPeriod(Integer breakPeriod) {
+ this.breakPeriod = breakPeriod;
+ return this;
+ }
+
+ /**
+ * Get required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.
+ *
+ * @return the leaseDuration value
+ */
+ public Integer leaseDuration() {
+ return this.leaseDuration;
+ }
+
+ /**
+ * Set required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.
+ *
+ * @param leaseDuration the leaseDuration value to set
+ * @return the LeaseContainerRequest object itself.
+ */
+ public LeaseContainerRequest withLeaseDuration(Integer leaseDuration) {
+ this.leaseDuration = leaseDuration;
+ return this;
+ }
+
+ /**
+ * Get optional for acquire, required for change. Proposed lease ID, in a GUID string format.
+ *
+ * @return the proposedLeaseId value
+ */
+ public String proposedLeaseId() {
+ return this.proposedLeaseId;
+ }
+
+ /**
+ * Set optional for acquire, required for change. Proposed lease ID, in a GUID string format.
+ *
+ * @param proposedLeaseId the proposedLeaseId value to set
+ * @return the LeaseContainerRequest object itself.
+ */
+ public LeaseContainerRequest withProposedLeaseId(String proposedLeaseId) {
+ this.proposedLeaseId = proposedLeaseId;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerResponse.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerResponse.java
new file mode 100644
index 0000000000000..b3bb6832b9d64
--- /dev/null
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/LeaseContainerResponse.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2018_03_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.StorageManager;
+import com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.LeaseContainerResponseInner;
+
+/**
+ * Type representing LeaseContainerResponse.
+ */
+public interface LeaseContainerResponse extends HasInner, HasManager {
+ /**
+ * @return the leaseId value.
+ */
+ String leaseId();
+
+ /**
+ * @return the leaseTimeSeconds value.
+ */
+ String leaseTimeSeconds();
+
+}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ServiceSasParameters.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ServiceSasParameters.java
index 89e4208e2c524..cd505f805c408 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ServiceSasParameters.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/ServiceSasParameters.java
@@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * The parameters to list service SAS credentials of a speicific resource.
+ * The parameters to list service SAS credentials of a specific resource.
*/
public class ServiceSasParameters {
/**
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccount.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccount.java
index 9338ff33a4128..ce8569751319d 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccount.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccount.java
@@ -144,7 +144,9 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup, Resource.UpdateWithTags {
/**
* The template for a StorageAccountManagementPolicies update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable {
+ interface Update extends Appliable, UpdateStages.WithPolicy {
}
/**
* Grouping of StorageAccountManagementPolicies update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the storageaccountmanagementpolicies update allowing to specify Policy.
+ */
+ interface WithPolicy {
+ /**
+ * Specifies policy.
+ * @param policy The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts
+ * @return the next update stage
+ */
+ Update withPolicy(Object policy);
+ }
+
}
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccountRegenerateKeyParameters.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccountRegenerateKeyParameters.java
index c78fc8a24f889..24f224bdbac62 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccountRegenerateKeyParameters.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccountRegenerateKeyParameters.java
@@ -15,14 +15,14 @@
*/
public class StorageAccountRegenerateKeyParameters {
/**
- * The name of storage keys that want to be regenerated, possible vaules
+ * The name of storage keys that want to be regenerated, possible values
* are key1, key2.
*/
@JsonProperty(value = "keyName", required = true)
private String keyName;
/**
- * Get the name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ * Get the name of storage keys that want to be regenerated, possible values are key1, key2.
*
* @return the keyName value
*/
@@ -31,7 +31,7 @@ public String keyName() {
}
/**
- * Set the name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ * Set the name of storage keys that want to be regenerated, possible values are key1, key2.
*
* @param keyName the keyName value to set
* @return the StorageAccountRegenerateKeyParameters object itself.
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccounts.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccounts.java
index 9250577e7185c..d20553d1ebf19 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccounts.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccounts.java
@@ -45,7 +45,7 @@ public interface StorageAccounts extends SupportsCreating implements BlobContainer, BlobContainer.Definition, BlobContainer.Update {
private final StorageManager manager;
private String resourceGroupName;
private String accountName;
private String containerName;
+ private PublicAccess cpublicAccess;
+ private Map cmetadata;
+ private PublicAccess upublicAccess;
+ private Map umetadata;
BlobContainerImpl(String name, StorageManager manager) {
super(name, new BlobContainerInner());
@@ -39,7 +43,7 @@ class BlobContainerImpl extends CreatableUpdatableImpl createResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.createAsync(this.resourceGroupName, this.accountName, this.containerName)
+ return client.createAsync(this.resourceGroupName, this.accountName, this.containerName, this.cpublicAccess, this.cmetadata)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.updateAsync(this.resourceGroupName, this.accountName, this.containerName)
+ return client.updateAsync(this.resourceGroupName, this.accountName, this.containerName, this.upublicAccess, this.umetadata)
.map(innerToFluentMap(this));
}
@@ -154,4 +158,24 @@ public BlobContainerImpl withExistingBlobService(String resourceGroupName, Strin
return this;
}
+ @Override
+ public BlobContainerImpl withPublicAccess(PublicAccess publicAccess) {
+ if (isInCreateMode()) {
+ this.cpublicAccess = publicAccess;
+ } else {
+ this.upublicAccess = publicAccess;
+ }
+ return this;
+ }
+
+ @Override
+ public BlobContainerImpl withMetadata(Map metadata) {
+ if (isInCreateMode()) {
+ this.cmetadata = metadata;
+ } else {
+ this.umetadata = metadata;
+ }
+ return this;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersImpl.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersImpl.java
index 339a41114f22a..ec1af8ee64fc8 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersImpl.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersImpl.java
@@ -17,6 +17,7 @@
import com.microsoft.azure.management.storage.v2018_03_01_preview.ListContainerItems;
import com.microsoft.azure.management.storage.v2018_03_01_preview.BlobContainer;
import com.microsoft.azure.management.storage.v2018_03_01_preview.LegalHold;
+import com.microsoft.azure.management.storage.v2018_03_01_preview.LeaseContainerResponse;
import java.util.List;
import com.microsoft.azure.management.storage.v2018_03_01_preview.ImmutabilityPolicy;
@@ -120,14 +121,30 @@ public LegalHold call(LegalHoldInner inner) {
});
}
+ @Override
+ public Observable leaseAsync(String resourceGroupName, String accountName, String containerName) {
+ BlobContainersInner client = this.inner();
+ return client.leaseAsync(resourceGroupName, accountName, containerName)
+ .map(new Func1() {
+ @Override
+ public LeaseContainerResponse call(LeaseContainerResponseInner inner) {
+ return new LeaseContainerResponseImpl(inner, manager());
+ }
+ });
+ }
+
@Override
public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) {
BlobContainersInner client = this.inner();
return client.getImmutabilityPolicyAsync(resourceGroupName, accountName, containerName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public ImmutabilityPolicy call(ImmutabilityPolicyInner inner) {
- return wrapImmutabilityPolicyModel(inner);
+ public Observable call(ImmutabilityPolicyInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((ImmutabilityPolicy)wrapImmutabilityPolicyModel(inner));
+ }
}
});
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
index df52c2da27973..165b0f9a5b9fa 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
@@ -16,6 +16,7 @@
import com.microsoft.azure.management.storage.v2018_03_01_preview.BlobContainersExtendImmutabilityPolicyHeaders;
import com.microsoft.azure.management.storage.v2018_03_01_preview.BlobContainersGetImmutabilityPolicyHeaders;
import com.microsoft.azure.management.storage.v2018_03_01_preview.BlobContainersLockImmutabilityPolicyHeaders;
+import com.microsoft.azure.management.storage.v2018_03_01_preview.LeaseContainerRequest;
import com.microsoft.azure.management.storage.v2018_03_01_preview.PublicAccess;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
@@ -114,6 +115,10 @@ interface BlobContainersService {
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend")
Observable> extendImmutabilityPolicy(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Body ImmutabilityPolicyInner parameters, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2018_03_01_preview.BlobContainers lease" })
+ @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease")
+ Observable> lease(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("containerName") String containerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body LeaseContainerRequest parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
}
/**
@@ -1677,4 +1682,189 @@ private ServiceResponseWithHeaders leaseAsync(String resourceGroupName, String accountName, String containerName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName), serviceCallback);
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the LeaseContainerResponseInner object
+ */
+ public Observable leaseAsync(String resourceGroupName, String accountName, String containerName) {
+ return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, LeaseContainerResponseInner>() {
+ @Override
+ public LeaseContainerResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the LeaseContainerResponseInner object
+ */
+ public Observable> leaseWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName) {
+ 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.");
+ }
+ final LeaseContainerRequest parameters = null;
+ return service.lease(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = leaseDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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 parameters Lease Container request body.
+ * @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 LeaseContainerResponseInner object if successful.
+ */
+ public LeaseContainerResponseInner lease(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters) {
+ return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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 parameters Lease Container request body.
+ * @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 leaseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters), serviceCallback);
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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 parameters Lease Container request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the LeaseContainerResponseInner object
+ */
+ public Observable leaseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters) {
+ return leaseWithServiceResponseAsync(resourceGroupName, accountName, containerName, parameters).map(new Func1, LeaseContainerResponseInner>() {
+ @Override
+ public LeaseContainerResponseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
+ *
+ * @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 parameters Lease Container request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the LeaseContainerResponseInner object
+ */
+ public Observable> leaseWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, LeaseContainerRequest parameters) {
+ 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.");
+ }
+ Validator.validate(parameters);
+ return service.lease(resourceGroupName, accountName, containerName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = leaseDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse leaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ImmutabilityPolicyImpl.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ImmutabilityPolicyImpl.java
index 4eff1c639b16f..7bddb6297bb94 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ImmutabilityPolicyImpl.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ImmutabilityPolicyImpl.java
@@ -18,7 +18,9 @@ class ImmutabilityPolicyImpl extends CreatableUpdatableImpl createResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.cimmutabilityPeriodSinceCreationInDays)
+ return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.cimmutabilityPeriodSinceCreationInDays, this.cifMatch)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
BlobContainersInner client = this.manager().inner().blobContainers();
- return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.uimmutabilityPeriodSinceCreationInDays)
+ return client.createOrUpdateImmutabilityPolicyAsync(this.resourceGroupName, this.accountName, this.containerName, this.uimmutabilityPeriodSinceCreationInDays, this.uifMatch)
.map(innerToFluentMap(this));
}
@@ -110,6 +112,16 @@ public ImmutabilityPolicyImpl withExistingContainer(String resourceGroupName, St
return this;
}
+ @Override
+ public ImmutabilityPolicyImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.cifMatch = ifMatch;
+ } else {
+ this.uifMatch = ifMatch;
+ }
+ return this;
+ }
+
@Override
public ImmutabilityPolicyImpl withImmutabilityPeriodSinceCreationInDays(int immutabilityPeriodSinceCreationInDays) {
if (isInCreateMode()) {
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseImpl.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseImpl.java
new file mode 100644
index 0000000000000..b100457c765a3
--- /dev/null
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseImpl.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2018_03_01_preview.implementation;
+
+import com.microsoft.azure.management.storage.v2018_03_01_preview.LeaseContainerResponse;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class LeaseContainerResponseImpl extends WrapperImpl implements LeaseContainerResponse {
+ private final StorageManager manager;
+ LeaseContainerResponseImpl(LeaseContainerResponseInner inner, StorageManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public StorageManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String leaseId() {
+ return this.inner().leaseId();
+ }
+
+ @Override
+ public String leaseTimeSeconds() {
+ return this.inner().leaseTimeSeconds();
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseInner.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseInner.java
new file mode 100644
index 0000000000000..1094eba46a867
--- /dev/null
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/LeaseContainerResponseInner.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2018_03_01_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Lease Container response schema.
+ */
+public class LeaseContainerResponseInner {
+ /**
+ * Returned unique lease ID that must be included with any request to
+ * delete the container, or to renew, change, or release the lease.
+ */
+ @JsonProperty(value = "leaseId")
+ private String leaseId;
+
+ /**
+ * Approximate time remaining in the lease period, in seconds.
+ */
+ @JsonProperty(value = "leaseTimeSeconds")
+ private String leaseTimeSeconds;
+
+ /**
+ * Get returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease.
+ *
+ * @return the leaseId value
+ */
+ public String leaseId() {
+ return this.leaseId;
+ }
+
+ /**
+ * Set returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease.
+ *
+ * @param leaseId the leaseId value to set
+ * @return the LeaseContainerResponseInner object itself.
+ */
+ public LeaseContainerResponseInner withLeaseId(String leaseId) {
+ this.leaseId = leaseId;
+ return this;
+ }
+
+ /**
+ * Get approximate time remaining in the lease period, in seconds.
+ *
+ * @return the leaseTimeSeconds value
+ */
+ public String leaseTimeSeconds() {
+ return this.leaseTimeSeconds;
+ }
+
+ /**
+ * Set approximate time remaining in the lease period, in seconds.
+ *
+ * @param leaseTimeSeconds the leaseTimeSeconds value to set
+ * @return the LeaseContainerResponseInner object itself.
+ */
+ public LeaseContainerResponseInner withLeaseTimeSeconds(String leaseTimeSeconds) {
+ this.leaseTimeSeconds = leaseTimeSeconds;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ListServiceSasResponseInner.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ListServiceSasResponseInner.java
index a7d8f454128e8..ba0d25493b2f3 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ListServiceSasResponseInner.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/ListServiceSasResponseInner.java
@@ -15,13 +15,13 @@
*/
public class ListServiceSasResponseInner {
/**
- * List service SAS credentials of speicific resource.
+ * List service SAS credentials of specific resource.
*/
@JsonProperty(value = "serviceSasToken", access = JsonProperty.Access.WRITE_ONLY)
private String serviceSasToken;
/**
- * Get list service SAS credentials of speicific resource.
+ * Get list service SAS credentials of specific resource.
*
* @return the serviceSasToken value
*/
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountManagementPoliciesImpl.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountManagementPoliciesImpl.java
index 2d7be45a80da9..f7cd3bae8631e 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountManagementPoliciesImpl.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountManagementPoliciesImpl.java
@@ -17,6 +17,8 @@ class StorageAccountManagementPoliciesImpl extends CreatableUpdatableImpl createResourceAsync() {
StorageAccountsInner client = this.manager().inner().storageAccounts();
- return client.createOrUpdateManagementPoliciesAsync(this.resourceGroupName, this.accountName)
+ return client.createOrUpdateManagementPoliciesAsync(this.resourceGroupName, this.accountName, this.cpolicy)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
StorageAccountsInner client = this.manager().inner().storageAccounts();
- return client.createOrUpdateManagementPoliciesAsync(this.resourceGroupName, this.accountName)
+ return client.createOrUpdateManagementPoliciesAsync(this.resourceGroupName, this.accountName, this.upolicy)
.map(innerToFluentMap(this));
}
@@ -100,4 +102,14 @@ public StorageAccountManagementPoliciesImpl withExistingStorageAccount(String re
return this;
}
+ @Override
+ public StorageAccountManagementPoliciesImpl withPolicy(Object policy) {
+ if (isInCreateMode()) {
+ this.cpolicy = policy;
+ } else {
+ this.upolicy = policy;
+ }
+ return this;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsImpl.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsImpl.java
index 3ecaf95ee698e..179a140351e06 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsImpl.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsImpl.java
@@ -226,10 +226,14 @@ private Observable getStorageAccountManag
public Observable getManagementPoliciesAsync(String resourceGroupName, String accountName) {
StorageAccountsInner client = this.inner();
return client.getManagementPoliciesAsync(resourceGroupName, accountName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public StorageAccountManagementPolicies call(StorageAccountManagementPoliciesInner inner) {
- return wrapStorageAccountManagementPoliciesModel(inner);
+ public Observable call(StorageAccountManagementPoliciesInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((StorageAccountManagementPolicies)wrapStorageAccountManagementPoliciesModel(inner));
+ }
}
});
}
diff --git a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
index 6ffe72a5678f0..85fb43cebd58a 100644
--- a/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
+++ b/sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
@@ -911,7 +911,7 @@ private ServiceResponse listKeysDelegate(Resp
*
* @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 keyName The name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2.
* @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
@@ -926,7 +926,7 @@ public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName,
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- * @param keyName The name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
@@ -940,7 +940,7 @@ public ServiceFuture regenerateKeyAsync(Strin
*
* @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 keyName The name of storage keys that want to be regenerated, possible vaules are key1, key2.
+ * @param keyName The name of storage keys that want to be regenerated, possible values are key1, key2.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the StorageAccountListKeysResultInner object
*/
@@ -958,7 +958,7 @@ public StorageAccountListKeysResultInner call(ServiceResponse