diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/AccountSasParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/AccountSasParameters.java new file mode 100644 index 00000000000..12fd40e3346 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/AccountSasParameters.java @@ -0,0 +1,236 @@ +/** + * 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; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters to list SAS credentials of a storage account. + */ +public class AccountSasParameters { + /** + * The signed services accessible with the account SAS. Possible values + * include: Blob (b), Queue (q), Table (t), File (f). Possible values + * include: 'b', 'q', 't', 'f'. + */ + @JsonProperty(value = "signedServices", required = true) + private Services services; + + /** + * The signed resource types that are accessible with the account SAS. + * Service (s): Access to service-level APIs; Container (c): Access to + * container-level APIs; Object (o): Access to object-level APIs for blobs, + * queue messages, table entities, and files. Possible values include: 's', + * 'c', 'o'. + */ + @JsonProperty(value = "signedResourceTypes", required = true) + private SignedResourceTypes resourceTypes; + + /** + * The signed permissions for the account SAS. Possible values include: + * Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update + * (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', + * 'c', 'u', 'p'. + */ + @JsonProperty(value = "signedPermission", required = true) + private Permissions permissions; + + /** + * An IP address or a range of IP addresses from which to accept requests. + */ + @JsonProperty(value = "signedIp") + private String iPAddressOrRange; + + /** + * The protocol permitted for a request made with the account SAS. Possible + * values include: 'https,http', 'https'. + */ + @JsonProperty(value = "signedProtocol") + private HttpProtocol protocols; + + /** + * The time at which the SAS becomes valid. + */ + @JsonProperty(value = "signedStart") + private DateTime sharedAccessStartTime; + + /** + * The time at which the shared access signature becomes invalid. + */ + @JsonProperty(value = "signedExpiry", required = true) + private DateTime sharedAccessExpiryTime; + + /** + * The key to sign the account SAS token with. + */ + @JsonProperty(value = "keyToSign") + private String keyToSign; + + /** + * Get the signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'b', 'q', 't', 'f'. + * + * @return the services value + */ + public Services services() { + return this.services; + } + + /** + * Set the signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). Possible values include: 'b', 'q', 't', 'f'. + * + * @param services the services value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withServices(Services services) { + this.services = services; + return this; + } + + /** + * Get the signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 's', 'c', 'o'. + * + * @return the resourceTypes value + */ + public SignedResourceTypes resourceTypes() { + return this.resourceTypes; + } + + /** + * Set the signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. Possible values include: 's', 'c', 'o'. + * + * @param resourceTypes the resourceTypes value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withResourceTypes(SignedResourceTypes resourceTypes) { + this.resourceTypes = resourceTypes; + return this; + } + + /** + * Get the signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @return the permissions value + */ + public Permissions permissions() { + return this.permissions; + } + + /** + * Set the signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @param permissions the permissions value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withPermissions(Permissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get an IP address or a range of IP addresses from which to accept requests. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set an IP address or a range of IP addresses from which to accept requests. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * Get the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @return the protocols value + */ + public HttpProtocol protocols() { + return this.protocols; + } + + /** + * Set the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @param protocols the protocols value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withProtocols(HttpProtocol protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get the time at which the SAS becomes valid. + * + * @return the sharedAccessStartTime value + */ + public DateTime sharedAccessStartTime() { + return this.sharedAccessStartTime; + } + + /** + * Set the time at which the SAS becomes valid. + * + * @param sharedAccessStartTime the sharedAccessStartTime value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) { + this.sharedAccessStartTime = sharedAccessStartTime; + return this; + } + + /** + * Get the time at which the shared access signature becomes invalid. + * + * @return the sharedAccessExpiryTime value + */ + public DateTime sharedAccessExpiryTime() { + return this.sharedAccessExpiryTime; + } + + /** + * Set the time at which the shared access signature becomes invalid. + * + * @param sharedAccessExpiryTime the sharedAccessExpiryTime value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withSharedAccessExpiryTime(DateTime sharedAccessExpiryTime) { + this.sharedAccessExpiryTime = sharedAccessExpiryTime; + return this; + } + + /** + * Get the key to sign the account SAS token with. + * + * @return the keyToSign value + */ + public String keyToSign() { + return this.keyToSign; + } + + /** + * Set the key to sign the account SAS token with. + * + * @param keyToSign the keyToSign value to set + * @return the AccountSasParameters object itself. + */ + public AccountSasParameters withKeyToSign(String keyToSign) { + this.keyToSign = keyToSign; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java new file mode 100644 index 00000000000..816d3144db4 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for CreateOrUpdateImmutabilityPolicy operation. + */ +public class BlobContainersCreateOrUpdateImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersCreateOrUpdateImmutabilityPolicyHeaders object itself. + */ + public BlobContainersCreateOrUpdateImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersDeleteImmutabilityPolicyHeaders.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersDeleteImmutabilityPolicyHeaders.java new file mode 100644 index 00000000000..282a444955a --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersDeleteImmutabilityPolicyHeaders.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for DeleteImmutabilityPolicy operation. + */ +public class BlobContainersDeleteImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobContainersDeleteImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersExtendImmutabilityPolicyHeaders.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersExtendImmutabilityPolicyHeaders.java new file mode 100644 index 00000000000..80930f5683f --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersExtendImmutabilityPolicyHeaders.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for ExtendImmutabilityPolicy operation. + */ +public class BlobContainersExtendImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersExtendImmutabilityPolicyHeaders object itself. + */ + public BlobContainersExtendImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersGetImmutabilityPolicyHeaders.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersGetImmutabilityPolicyHeaders.java new file mode 100644 index 00000000000..1cc5641bf1b --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersGetImmutabilityPolicyHeaders.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for GetImmutabilityPolicy operation. + */ +public class BlobContainersGetImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersGetImmutabilityPolicyHeaders object itself. + */ + public BlobContainersGetImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersLockImmutabilityPolicyHeaders.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersLockImmutabilityPolicyHeaders.java new file mode 100644 index 00000000000..0e79395735b --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/BlobContainersLockImmutabilityPolicyHeaders.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for LockImmutabilityPolicy operation. + */ +public class BlobContainersLockImmutabilityPolicyHeaders { + /** + * The ETag HTTP response header. This is an opaque string. You can use it + * to detect whether the resource has changed between requests. In + * particular, you can pass the ETag to one of the If-Match or + * If-None-Match headers. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /** + * Get the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @return the eTag value + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Match or If-None-Match headers. + * + * @param eTag the eTag value to set + * @return the BlobContainersLockImmutabilityPolicyHeaders object itself. + */ + public BlobContainersLockImmutabilityPolicyHeaders withETag(String eTag) { + this.eTag = eTag; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/CustomDomain.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/CustomDomain.java index 6ad0b15d389..d2e501195da 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/CustomDomain.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/CustomDomain.java @@ -30,7 +30,7 @@ public class CustomDomain { private Boolean useSubDomain; /** - * Get the name value. + * Get gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. * * @return the name value */ @@ -39,7 +39,7 @@ public String name() { } /** - * Set the name value. + * Set gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. * * @param name the name value to set * @return the CustomDomain object itself. @@ -50,7 +50,7 @@ public CustomDomain withName(String name) { } /** - * Get the useSubDomain value. + * Get indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. * * @return the useSubDomain value */ @@ -59,7 +59,7 @@ public Boolean useSubDomain() { } /** - * Set the useSubDomain value. + * 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 * @return the CustomDomain object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Dimension.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Dimension.java index 4ff16f095d3..64a89816e65 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Dimension.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Dimension.java @@ -27,7 +27,7 @@ public class Dimension { private String displayName; /** - * Get the name value. + * Get display name of dimension. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Set the name value. + * Set display name of dimension. * * @param name the name value to set * @return the Dimension object itself. @@ -47,7 +47,7 @@ public Dimension withName(String name) { } /** - * Get the displayName value. + * Get display name of dimension. * * @return the displayName value */ @@ -56,7 +56,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set display name of dimension. * * @param displayName the displayName value to set * @return the Dimension object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Encryption.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Encryption.java index 3b63626f92e..aefb3d4bbbe 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Encryption.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Encryption.java @@ -35,7 +35,7 @@ public class Encryption { private KeyVaultProperties keyVaultProperties; /** - * Get the services value. + * Get list of services which support encryption. * * @return the services value */ @@ -44,7 +44,7 @@ public EncryptionServices services() { } /** - * Set the services value. + * Set list of services which support encryption. * * @param services the services value to set * @return the Encryption object itself. @@ -55,7 +55,7 @@ public Encryption withServices(EncryptionServices services) { } /** - * Get the keySource value. + * Get the encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. * * @return the keySource value */ @@ -64,7 +64,7 @@ public KeySource keySource() { } /** - * Set the keySource value. + * Set the encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. * * @param keySource the keySource value to set * @return the Encryption object itself. @@ -75,7 +75,7 @@ public Encryption withKeySource(KeySource keySource) { } /** - * Get the keyVaultProperties value. + * Get properties provided by key vault. * * @return the keyVaultProperties value */ @@ -84,7 +84,7 @@ public KeyVaultProperties keyVaultProperties() { } /** - * Set the keyVaultProperties value. + * Set properties provided by key vault. * * @param keyVaultProperties the keyVaultProperties value to set * @return the Encryption object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionService.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionService.java index a528345c53d..d74aa576af2 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionService.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionService.java @@ -32,7 +32,7 @@ public class EncryptionService { private DateTime lastEnabledTime; /** - * Get the enabled value. + * Get a boolean indicating whether or not the service encrypts the data as it is stored. * * @return the enabled value */ @@ -41,7 +41,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set a boolean indicating whether or not the service encrypts the data as it is stored. * * @param enabled the enabled value to set * @return the EncryptionService object itself. @@ -52,7 +52,7 @@ public EncryptionService withEnabled(Boolean enabled) { } /** - * Get the lastEnabledTime value. + * Get gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. * * @return the lastEnabledTime value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionServices.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionServices.java index 2fa5712808a..b56a9e5446a 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionServices.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/EncryptionServices.java @@ -39,7 +39,7 @@ public class EncryptionServices { private EncryptionService queue; /** - * Get the blob value. + * Get the encryption function of the blob storage service. * * @return the blob value */ @@ -48,7 +48,7 @@ public EncryptionService blob() { } /** - * Set the blob value. + * Set the encryption function of the blob storage service. * * @param blob the blob value to set * @return the EncryptionServices object itself. @@ -59,7 +59,7 @@ public EncryptionServices withBlob(EncryptionService blob) { } /** - * Get the file value. + * Get the encryption function of the file storage service. * * @return the file value */ @@ -68,7 +68,7 @@ public EncryptionService file() { } /** - * Set the file value. + * Set the encryption function of the file storage service. * * @param file the file value to set * @return the EncryptionServices object itself. @@ -79,7 +79,7 @@ public EncryptionServices withFile(EncryptionService file) { } /** - * Get the table value. + * Get the encryption function of the table storage service. * * @return the table value */ @@ -88,7 +88,7 @@ public EncryptionService table() { } /** - * Get the queue value. + * Get the encryption function of the queue storage service. * * @return the queue value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Endpoints.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Endpoints.java index 79b2415bf79..1d34e73ce3e 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Endpoints.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Endpoints.java @@ -40,7 +40,7 @@ public class Endpoints { private String file; /** - * Get the blob value. + * Get gets the blob endpoint. * * @return the blob value */ @@ -49,7 +49,7 @@ public String blob() { } /** - * Get the queue value. + * Get gets the queue endpoint. * * @return the queue value */ @@ -58,7 +58,7 @@ public String queue() { } /** - * Get the table value. + * Get gets the table endpoint. * * @return the table value */ @@ -67,7 +67,7 @@ public String table() { } /** - * Get the file value. + * Get gets the file endpoint. * * @return the file value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/IPRule.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/IPRule.java index fdbfff33bca..17736e080f4 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/IPRule.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/IPRule.java @@ -28,7 +28,7 @@ public class IPRule { private Action action; /** - * Get the iPAddressOrRange value. + * Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. * * @return the iPAddressOrRange value */ @@ -37,7 +37,7 @@ public String iPAddressOrRange() { } /** - * Set the iPAddressOrRange value. + * Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. * * @param iPAddressOrRange the iPAddressOrRange value to set * @return the IPRule object itself. @@ -48,7 +48,7 @@ public IPRule withIPAddressOrRange(String iPAddressOrRange) { } /** - * Get the action value. + * Get the action of IP ACL rule. Possible values include: 'Allow'. * * @return the action value */ @@ -57,7 +57,7 @@ public Action action() { } /** - * Set the action value. + * Set the action of IP ACL rule. Possible values include: 'Allow'. * * @param action the action value to set * @return the IPRule object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Identity.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Identity.java index 8b61e08b2cc..8ec974600eb 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Identity.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Identity.java @@ -40,7 +40,7 @@ public Identity() { } /** - * Get the principalId value. + * Get the principal ID of resource identity. * * @return the principalId value */ @@ -49,7 +49,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant ID of resource. * * @return the tenantId value */ @@ -58,7 +58,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the identity type. * * @return the type value */ @@ -67,7 +67,7 @@ public String type() { } /** - * Set the type value. + * Set the identity type. * * @param type the type value to set * @return the Identity object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ImmutabilityPolicyProperties.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ImmutabilityPolicyProperties.java index 35e07d05913..df18c6ac407 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ImmutabilityPolicyProperties.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ImmutabilityPolicyProperties.java @@ -45,7 +45,7 @@ public class ImmutabilityPolicyProperties { private List updateHistory; /** - * Get the immutabilityPeriodSinceCreationInDays value. + * Get the immutability period for the blobs in the container since the policy creation, in days. * * @return the immutabilityPeriodSinceCreationInDays value */ @@ -54,7 +54,7 @@ public int immutabilityPeriodSinceCreationInDays() { } /** - * Set the immutabilityPeriodSinceCreationInDays value. + * Set the immutability period for the blobs in the container since the policy creation, in days. * * @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set * @return the ImmutabilityPolicyProperties object itself. @@ -65,7 +65,7 @@ public ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(in } /** - * Get the state value. + * Get the ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'. * * @return the state value */ @@ -74,7 +74,7 @@ public ImmutabilityPolicyState state() { } /** - * Get the etag value. + * Get immutabilityPolicy Etag. * * @return the etag value */ @@ -83,7 +83,7 @@ public String etag() { } /** - * Get the updateHistory value. + * Get the ImmutabilityPolicy update history of the blob container. * * @return the updateHistory value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/KeyVaultProperties.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/KeyVaultProperties.java index bf28ccba56a..0124717daf3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/KeyVaultProperties.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/KeyVaultProperties.java @@ -33,7 +33,7 @@ public class KeyVaultProperties { private String keyVaultUri; /** - * Get the keyName value. + * Get the name of KeyVault key. * * @return the keyName value */ @@ -42,7 +42,7 @@ public String keyName() { } /** - * Set the keyName value. + * Set the name of KeyVault key. * * @param keyName the keyName value to set * @return the KeyVaultProperties object itself. @@ -53,7 +53,7 @@ public KeyVaultProperties withKeyName(String keyName) { } /** - * Get the keyVersion value. + * Get the version of KeyVault key. * * @return the keyVersion value */ @@ -62,7 +62,7 @@ public String keyVersion() { } /** - * Set the keyVersion value. + * Set the version of KeyVault key. * * @param keyVersion the keyVersion value to set * @return the KeyVaultProperties object itself. @@ -73,7 +73,7 @@ public KeyVaultProperties withKeyVersion(String keyVersion) { } /** - * Get the keyVaultUri value. + * Get the Uri of KeyVault. * * @return the keyVaultUri value */ @@ -82,7 +82,7 @@ public String keyVaultUri() { } /** - * Set the keyVaultUri value. + * Set the Uri of KeyVault. * * @param keyVaultUri the keyVaultUri value to set * @return the KeyVaultProperties object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/LegalHoldProperties.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/LegalHoldProperties.java index 3eed4d2c177..946521b16d3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/LegalHoldProperties.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/LegalHoldProperties.java @@ -32,7 +32,7 @@ public class LegalHoldProperties { private List tags; /** - * Get the hasLegalHold value. + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. * * @return the hasLegalHold value */ @@ -41,7 +41,7 @@ public Boolean hasLegalHold() { } /** - * Get the tags value. + * Get the list of LegalHold tags of a blob container. * * @return the tags value */ @@ -50,7 +50,7 @@ public List tags() { } /** - * Set the tags value. + * Set the list of LegalHold tags of a blob container. * * @param tags the tags value to set * @return the LegalHoldProperties object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ListContainerItem.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ListContainerItem.java index 9c9f6cd1122..8dd4b98fa64 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ListContainerItem.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ListContainerItem.java @@ -92,7 +92,7 @@ public class ListContainerItem extends AzureEntityResourceInner { private Boolean hasImmutabilityPolicy; /** - * Get the publicAccess value. + * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. * * @return the publicAccess value */ @@ -101,7 +101,7 @@ public PublicAccess publicAccess() { } /** - * Set the publicAccess value. + * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. * * @param publicAccess the publicAccess value to set * @return the ListContainerItem object itself. @@ -112,7 +112,7 @@ public ListContainerItem withPublicAccess(PublicAccess publicAccess) { } /** - * Get the lastModifiedTime value. + * Get returns the date and time the container was last modified. * * @return the lastModifiedTime value */ @@ -121,7 +121,7 @@ public DateTime lastModifiedTime() { } /** - * Get the leaseStatus value. + * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. * * @return the leaseStatus value */ @@ -130,7 +130,7 @@ public LeaseStatus leaseStatus() { } /** - * Get the leaseState value. + * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. * * @return the leaseState value */ @@ -139,7 +139,7 @@ public LeaseState leaseState() { } /** - * Get the leaseDuration value. + * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. * * @return the leaseDuration value */ @@ -148,7 +148,7 @@ public LeaseDuration leaseDuration() { } /** - * Get the metadata value. + * Get a name-value pair to associate with the container as metadata. * * @return the metadata value */ @@ -157,7 +157,7 @@ public Map metadata() { } /** - * Set the metadata value. + * Set a name-value pair to associate with the container as metadata. * * @param metadata the metadata value to set * @return the ListContainerItem object itself. @@ -168,7 +168,7 @@ public ListContainerItem withMetadata(Map metadata) { } /** - * Get the immutabilityPolicy value. + * Get the ImmutabilityPolicy property of the container. * * @return the immutabilityPolicy value */ @@ -177,7 +177,7 @@ public ImmutabilityPolicyProperties immutabilityPolicy() { } /** - * Get the legalHold value. + * Get the LegalHold property of the container. * * @return the legalHold value */ @@ -186,7 +186,7 @@ public LegalHoldProperties legalHold() { } /** - * Get the hasLegalHold value. + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. * * @return the hasLegalHold value */ @@ -195,7 +195,7 @@ public Boolean hasLegalHold() { } /** - * Get the hasImmutabilityPolicy value. + * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. * * @return the hasImmutabilityPolicy value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ManagementPoliciesRulesSetParameter.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ManagementPoliciesRulesSetParameter.java new file mode 100644 index 00000000000..67d438a3d05 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ManagementPoliciesRulesSetParameter.java @@ -0,0 +1,49 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * 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. + */ +@JsonFlatten +public class ManagementPoliciesRulesSetParameter { + /** + * 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. + */ + @JsonProperty(value = "properties.policy") + private Object policy; + + /** + * Get 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 policy value + */ + public Object policy() { + return this.policy; + } + + /** + * Set 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. + * + * @param policy the policy value to set + * @return the ManagementPoliciesRulesSetParameter object itself. + */ + public ManagementPoliciesRulesSetParameter withPolicy(Object policy) { + this.policy = policy; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/MetricSpecification.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/MetricSpecification.java index 8be7985c122..97bd96b37ba 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/MetricSpecification.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/MetricSpecification.java @@ -70,7 +70,7 @@ public class MetricSpecification { private String resourceIdDimensionNameOverride; /** - * Get the name value. + * Get name of metric specification. * * @return the name value */ @@ -79,7 +79,7 @@ public String name() { } /** - * Set the name value. + * Set name of metric specification. * * @param name the name value to set * @return the MetricSpecification object itself. @@ -90,7 +90,7 @@ public MetricSpecification withName(String name) { } /** - * Get the displayName value. + * Get display name of metric specification. * * @return the displayName value */ @@ -99,7 +99,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set display name of metric specification. * * @param displayName the displayName value to set * @return the MetricSpecification object itself. @@ -110,7 +110,7 @@ public MetricSpecification withDisplayName(String displayName) { } /** - * Get the displayDescription value. + * Get display description of metric specification. * * @return the displayDescription value */ @@ -119,7 +119,7 @@ public String displayDescription() { } /** - * Set the displayDescription value. + * Set display description of metric specification. * * @param displayDescription the displayDescription value to set * @return the MetricSpecification object itself. @@ -130,7 +130,7 @@ public MetricSpecification withDisplayDescription(String displayDescription) { } /** - * Get the unit value. + * Get unit could be Bytes or Count. * * @return the unit value */ @@ -139,7 +139,7 @@ public String unit() { } /** - * Set the unit value. + * Set unit could be Bytes or Count. * * @param unit the unit value to set * @return the MetricSpecification object itself. @@ -150,7 +150,7 @@ public MetricSpecification withUnit(String unit) { } /** - * Get the dimensions value. + * Get dimensions of blobs, including blob type and access tier. * * @return the dimensions value */ @@ -159,7 +159,7 @@ public List dimensions() { } /** - * Set the dimensions value. + * Set dimensions of blobs, including blob type and access tier. * * @param dimensions the dimensions value to set * @return the MetricSpecification object itself. @@ -170,7 +170,7 @@ public MetricSpecification withDimensions(List dimensions) { } /** - * Get the aggregationType value. + * Get aggregation type could be Average. * * @return the aggregationType value */ @@ -179,7 +179,7 @@ public String aggregationType() { } /** - * Set the aggregationType value. + * Set aggregation type could be Average. * * @param aggregationType the aggregationType value to set * @return the MetricSpecification object itself. @@ -190,7 +190,7 @@ public MetricSpecification withAggregationType(String aggregationType) { } /** - * Get the fillGapWithZero value. + * Get the property to decide fill gap with zero or not. * * @return the fillGapWithZero value */ @@ -199,7 +199,7 @@ public Boolean fillGapWithZero() { } /** - * Set the fillGapWithZero value. + * Set the property to decide fill gap with zero or not. * * @param fillGapWithZero the fillGapWithZero value to set * @return the MetricSpecification object itself. @@ -210,7 +210,7 @@ public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { } /** - * Get the category value. + * Get the category this metric specification belong to, could be Capacity. * * @return the category value */ @@ -219,7 +219,7 @@ public String category() { } /** - * Set the category value. + * Set the category this metric specification belong to, could be Capacity. * * @param category the category value to set * @return the MetricSpecification object itself. @@ -230,7 +230,7 @@ public MetricSpecification withCategory(String category) { } /** - * Get the resourceIdDimensionNameOverride value. + * Get account Resource Id. * * @return the resourceIdDimensionNameOverride value */ @@ -239,7 +239,7 @@ public String resourceIdDimensionNameOverride() { } /** - * Set the resourceIdDimensionNameOverride value. + * Set account Resource Id. * * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set * @return the MetricSpecification object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/NetworkRuleSet.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/NetworkRuleSet.java index dc4b07ca939..2682002e112 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/NetworkRuleSet.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/NetworkRuleSet.java @@ -45,7 +45,7 @@ public class NetworkRuleSet { private DefaultAction defaultAction; /** - * Get the bypass value. + * Get specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices'. * * @return the bypass value */ @@ -54,7 +54,7 @@ public Bypass bypass() { } /** - * Set the bypass value. + * Set specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. Possible values include: 'None', 'Logging', 'Metrics', 'AzureServices'. * * @param bypass the bypass value to set * @return the NetworkRuleSet object itself. @@ -65,7 +65,7 @@ public NetworkRuleSet withBypass(Bypass bypass) { } /** - * Get the virtualNetworkRules value. + * Get sets the virtual network rules. * * @return the virtualNetworkRules value */ @@ -74,7 +74,7 @@ public List virtualNetworkRules() { } /** - * Set the virtualNetworkRules value. + * Set sets the virtual network rules. * * @param virtualNetworkRules the virtualNetworkRules value to set * @return the NetworkRuleSet object itself. @@ -85,7 +85,7 @@ public NetworkRuleSet withVirtualNetworkRules(List virtualNe } /** - * Get the ipRules value. + * Get sets the IP ACL rules. * * @return the ipRules value */ @@ -94,7 +94,7 @@ public List ipRules() { } /** - * Set the ipRules value. + * Set sets the IP ACL rules. * * @param ipRules the ipRules value to set * @return the NetworkRuleSet object itself. @@ -105,7 +105,7 @@ public NetworkRuleSet withIpRules(List ipRules) { } /** - * Get the defaultAction value. + * Get specifies the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. * * @return the defaultAction value */ @@ -114,7 +114,7 @@ public DefaultAction defaultAction() { } /** - * Set the defaultAction value. + * Set specifies the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'. * * @param defaultAction the defaultAction value to set * @return the NetworkRuleSet object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/OperationDisplay.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/OperationDisplay.java index d535b38c645..6aa22daf3d4 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/OperationDisplay.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/OperationDisplay.java @@ -33,7 +33,7 @@ public class OperationDisplay { private String operation; /** - * Get the provider value. + * Get service provider: Microsoft Storage. * * @return the provider value */ @@ -42,7 +42,7 @@ public String provider() { } /** - * Set the provider value. + * Set service provider: Microsoft Storage. * * @param provider the provider value to set * @return the OperationDisplay object itself. @@ -53,7 +53,7 @@ public OperationDisplay withProvider(String provider) { } /** - * Get the resource value. + * Get resource on which the operation is performed etc. * * @return the resource value */ @@ -62,7 +62,7 @@ public String resource() { } /** - * Set the resource value. + * Set resource on which the operation is performed etc. * * @param resource the resource value to set * @return the OperationDisplay object itself. @@ -73,7 +73,7 @@ public OperationDisplay withResource(String resource) { } /** - * Get the operation value. + * Get type of operation: get, read, delete, etc. * * @return the operation value */ @@ -82,7 +82,7 @@ public String operation() { } /** - * Set the operation value. + * Set type of operation: get, read, delete, etc. * * @param operation the operation value to set * @return the OperationDisplay object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Restriction.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Restriction.java index 15fce9b59fd..a62934cef98 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Restriction.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Restriction.java @@ -40,7 +40,7 @@ public class Restriction { private ReasonCode reasonCode; /** - * Get the type value. + * Get the type of restrictions. As of now only possible value for this is location. * * @return the type value */ @@ -49,7 +49,7 @@ public String type() { } /** - * Get the values value. + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. * * @return the values value */ @@ -58,7 +58,7 @@ public List values() { } /** - * Get the reasonCode value. + * Get the reason for the restriction. As of now this can be “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The “NotAvailableForSubscription” is related to capacity at DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. * * @return the reasonCode value */ @@ -67,7 +67,7 @@ public ReasonCode reasonCode() { } /** - * Set the reasonCode value. + * Set the reason for the restriction. As of now this can be “QuotaId” or “NotAvailableForSubscription”. Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The “NotAvailableForSubscription” is related to capacity at DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. * * @param reasonCode the reasonCode value to set * @return the Restriction object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/SKUCapability.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/SKUCapability.java index 999fe48e9e9..6fc3344ecd4 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/SKUCapability.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/SKUCapability.java @@ -30,7 +30,7 @@ public class SKUCapability { private String value; /** - * Get the name value. + * Get the name of capability, The capability information in the specified sku, including file encryption, network acls, change notification, etc. * * @return the name value */ @@ -39,7 +39,7 @@ public String name() { } /** - * Get the value value. + * Get a string value to indicate states of given capability. Possibly 'true' or 'false'. * * @return the value value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSasParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSasParameters.java new file mode 100644 index 00000000000..b939e509689 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSasParameters.java @@ -0,0 +1,493 @@ +/** + * 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; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The parameters to list service SAS credentials of a speicific resource. + */ +public class ServiceSasParameters { + /** + * The canonical path to the signed resource. + */ + @JsonProperty(value = "canonicalizedResource", required = true) + private String canonicalizedResource; + + /** + * The signed services accessible with the service SAS. Possible values + * include: Blob (b), Container (c), File (f), Share (s). Possible values + * include: 'b', 'c', 'f', 's'. + */ + @JsonProperty(value = "signedResource", required = true) + private SignedResource resource; + + /** + * The signed permissions for the service SAS. Possible values include: + * Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update + * (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', + * 'c', 'u', 'p'. + */ + @JsonProperty(value = "signedPermission") + private Permissions permissions; + + /** + * An IP address or a range of IP addresses from which to accept requests. + */ + @JsonProperty(value = "signedIp") + private String iPAddressOrRange; + + /** + * The protocol permitted for a request made with the account SAS. Possible + * values include: 'https,http', 'https'. + */ + @JsonProperty(value = "signedProtocol") + private HttpProtocol protocols; + + /** + * The time at which the SAS becomes valid. + */ + @JsonProperty(value = "signedStart") + private DateTime sharedAccessStartTime; + + /** + * The time at which the shared access signature becomes invalid. + */ + @JsonProperty(value = "signedExpiry") + private DateTime sharedAccessExpiryTime; + + /** + * A unique value up to 64 characters in length that correlates to an + * access policy specified for the container, queue, or table. + */ + @JsonProperty(value = "signedIdentifier") + private String identifier; + + /** + * The start of partition key. + */ + @JsonProperty(value = "startPk") + private String partitionKeyStart; + + /** + * The end of partition key. + */ + @JsonProperty(value = "endPk") + private String partitionKeyEnd; + + /** + * The start of row key. + */ + @JsonProperty(value = "startRk") + private String rowKeyStart; + + /** + * The end of row key. + */ + @JsonProperty(value = "endRk") + private String rowKeyEnd; + + /** + * The key to sign the account SAS token with. + */ + @JsonProperty(value = "keyToSign") + private String keyToSign; + + /** + * The response header override for cache control. + */ + @JsonProperty(value = "rscc") + private String cacheControl; + + /** + * The response header override for content disposition. + */ + @JsonProperty(value = "rscd") + private String contentDisposition; + + /** + * The response header override for content encoding. + */ + @JsonProperty(value = "rsce") + private String contentEncoding; + + /** + * The response header override for content language. + */ + @JsonProperty(value = "rscl") + private String contentLanguage; + + /** + * The response header override for content type. + */ + @JsonProperty(value = "rsct") + private String contentType; + + /** + * Get the canonical path to the signed resource. + * + * @return the canonicalizedResource value + */ + public String canonicalizedResource() { + return this.canonicalizedResource; + } + + /** + * Set the canonical path to the signed resource. + * + * @param canonicalizedResource the canonicalizedResource value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withCanonicalizedResource(String canonicalizedResource) { + this.canonicalizedResource = canonicalizedResource; + return this; + } + + /** + * Get the signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'b', 'c', 'f', 's'. + * + * @return the resource value + */ + public SignedResource resource() { + return this.resource; + } + + /** + * Set the signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). Possible values include: 'b', 'c', 'f', 's'. + * + * @param resource the resource value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withResource(SignedResource resource) { + this.resource = resource; + return this; + } + + /** + * Get the signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @return the permissions value + */ + public Permissions permissions() { + return this.permissions; + } + + /** + * Set the signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p'. + * + * @param permissions the permissions value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPermissions(Permissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get an IP address or a range of IP addresses from which to accept requests. + * + * @return the iPAddressOrRange value + */ + public String iPAddressOrRange() { + return this.iPAddressOrRange; + } + + /** + * Set an IP address or a range of IP addresses from which to accept requests. + * + * @param iPAddressOrRange the iPAddressOrRange value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withIPAddressOrRange(String iPAddressOrRange) { + this.iPAddressOrRange = iPAddressOrRange; + return this; + } + + /** + * Get the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @return the protocols value + */ + public HttpProtocol protocols() { + return this.protocols; + } + + /** + * Set the protocol permitted for a request made with the account SAS. Possible values include: 'https,http', 'https'. + * + * @param protocols the protocols value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withProtocols(HttpProtocol protocols) { + this.protocols = protocols; + return this; + } + + /** + * Get the time at which the SAS becomes valid. + * + * @return the sharedAccessStartTime value + */ + public DateTime sharedAccessStartTime() { + return this.sharedAccessStartTime; + } + + /** + * Set the time at which the SAS becomes valid. + * + * @param sharedAccessStartTime the sharedAccessStartTime value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) { + this.sharedAccessStartTime = sharedAccessStartTime; + return this; + } + + /** + * Get the time at which the shared access signature becomes invalid. + * + * @return the sharedAccessExpiryTime value + */ + public DateTime sharedAccessExpiryTime() { + return this.sharedAccessExpiryTime; + } + + /** + * Set the time at which the shared access signature becomes invalid. + * + * @param sharedAccessExpiryTime the sharedAccessExpiryTime value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withSharedAccessExpiryTime(DateTime sharedAccessExpiryTime) { + this.sharedAccessExpiryTime = sharedAccessExpiryTime; + return this; + } + + /** + * Get a unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. + * + * @return the identifier value + */ + public String identifier() { + return this.identifier; + } + + /** + * Set a unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. + * + * @param identifier the identifier value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the start of partition key. + * + * @return the partitionKeyStart value + */ + public String partitionKeyStart() { + return this.partitionKeyStart; + } + + /** + * Set the start of partition key. + * + * @param partitionKeyStart the partitionKeyStart value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPartitionKeyStart(String partitionKeyStart) { + this.partitionKeyStart = partitionKeyStart; + return this; + } + + /** + * Get the end of partition key. + * + * @return the partitionKeyEnd value + */ + public String partitionKeyEnd() { + return this.partitionKeyEnd; + } + + /** + * Set the end of partition key. + * + * @param partitionKeyEnd the partitionKeyEnd value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withPartitionKeyEnd(String partitionKeyEnd) { + this.partitionKeyEnd = partitionKeyEnd; + return this; + } + + /** + * Get the start of row key. + * + * @return the rowKeyStart value + */ + public String rowKeyStart() { + return this.rowKeyStart; + } + + /** + * Set the start of row key. + * + * @param rowKeyStart the rowKeyStart value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withRowKeyStart(String rowKeyStart) { + this.rowKeyStart = rowKeyStart; + return this; + } + + /** + * Get the end of row key. + * + * @return the rowKeyEnd value + */ + public String rowKeyEnd() { + return this.rowKeyEnd; + } + + /** + * Set the end of row key. + * + * @param rowKeyEnd the rowKeyEnd value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withRowKeyEnd(String rowKeyEnd) { + this.rowKeyEnd = rowKeyEnd; + return this; + } + + /** + * Get the key to sign the account SAS token with. + * + * @return the keyToSign value + */ + public String keyToSign() { + return this.keyToSign; + } + + /** + * Set the key to sign the account SAS token with. + * + * @param keyToSign the keyToSign value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withKeyToSign(String keyToSign) { + this.keyToSign = keyToSign; + return this; + } + + /** + * Get the response header override for cache control. + * + * @return the cacheControl value + */ + public String cacheControl() { + return this.cacheControl; + } + + /** + * Set the response header override for cache control. + * + * @param cacheControl the cacheControl value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the response header override for content disposition. + * + * @return the contentDisposition value + */ + public String contentDisposition() { + return this.contentDisposition; + } + + /** + * Set the response header override for content disposition. + * + * @param contentDisposition the contentDisposition value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the response header override for content encoding. + * + * @return the contentEncoding value + */ + public String contentEncoding() { + return this.contentEncoding; + } + + /** + * Set the response header override for content encoding. + * + * @param contentEncoding the contentEncoding value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the response header override for content language. + * + * @return the contentLanguage value + */ + public String contentLanguage() { + return this.contentLanguage; + } + + /** + * Set the response header override for content language. + * + * @param contentLanguage the contentLanguage value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the response header override for content type. + * + * @return the contentType value + */ + public String contentType() { + return this.contentType; + } + + /** + * Set the response header override for content type. + * + * @param contentType the contentType value to set + * @return the ServiceSasParameters object itself. + */ + public ServiceSasParameters withContentType(String contentType) { + this.contentType = contentType; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSpecification.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSpecification.java index 495b287b18f..01f13661070 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSpecification.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/ServiceSpecification.java @@ -22,7 +22,7 @@ public class ServiceSpecification { private List metricSpecifications; /** - * Get the metricSpecifications value. + * Get metric specifications of operation. * * @return the metricSpecifications value */ @@ -31,7 +31,7 @@ public List metricSpecifications() { } /** - * Set the metricSpecifications value. + * Set metric specifications of operation. * * @param metricSpecifications the metricSpecifications value to set * @return the ServiceSpecification object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCheckNameAvailabilityParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCheckNameAvailabilityParameters.java index 11c95edcb1c..7e227371b55 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCheckNameAvailabilityParameters.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCheckNameAvailabilityParameters.java @@ -28,13 +28,14 @@ public class StorageAccountCheckNameAvailabilityParameters { /** * Creates an instance of StorageAccountCheckNameAvailabilityParameters class. + * @param name the storage account name. */ public StorageAccountCheckNameAvailabilityParameters() { type = "Microsoft.Storage/storageAccounts"; } /** - * Get the name value. + * Get the storage account name. * * @return the name value */ @@ -43,7 +44,7 @@ public String name() { } /** - * Set the name value. + * Set the storage account name. * * @param name the name value to set * @return the StorageAccountCheckNameAvailabilityParameters object itself. @@ -54,7 +55,7 @@ public StorageAccountCheckNameAvailabilityParameters withName(String name) { } /** - * Get the type value. + * Get the type of resource, Microsoft.Storage/storageAccounts. * * @return the type value */ @@ -63,7 +64,7 @@ public String type() { } /** - * Set the type value. + * Set the type of resource, Microsoft.Storage/storageAccounts. * * @param type the type value to set * @return the StorageAccountCheckNameAvailabilityParameters object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCreateParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCreateParameters.java new file mode 100644 index 00000000000..b8358ee8060 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountCreateParameters.java @@ -0,0 +1,296 @@ +/** + * 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; + +import com.microsoft.azure.management.storage.implementation.SkuInner; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters used when creating a storage account. + */ +@JsonFlatten +public class StorageAccountCreateParameters { + /** + * Required. Gets or sets the sku name. + */ + @JsonProperty(value = "sku", required = true) + private SkuInner sku; + + /** + * Required. Indicates the type of storage account. Possible values + * include: 'Storage', 'StorageV2', 'BlobStorage'. + */ + @JsonProperty(value = "kind", required = true) + private Kind kind; + + /** + * Required. Gets or sets the location of the resource. This will be one of + * the supported and registered Azure Geo Regions (e.g. West US, East US, + * Southeast Asia, etc.). The geo region of a resource cannot be changed + * once it is created, but if an identical geo region is specified on + * update, the request will succeed. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used for viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key with a length no greater than 128 characters and a value + * with a length no greater than 256 characters. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * User domain assigned to the storage account. Name is the CNAME source. + * Only one custom domain is supported per storage account at this time. To + * clear the existing custom domain, use an empty string for the custom + * domain name property. + */ + @JsonProperty(value = "properties.customDomain") + private CustomDomain customDomain; + + /** + * Provides the encryption settings on the account. If left unspecified the + * account encryption settings will remain the same. The default setting is + * unencrypted. + */ + @JsonProperty(value = "properties.encryption") + private Encryption encryption; + + /** + * Network rule set. + */ + @JsonProperty(value = "properties.networkAcls") + private NetworkRuleSet networkRuleSet; + + /** + * Required for storage accounts where kind = BlobStorage. The access tier + * used for billing. Possible values include: 'Hot', 'Cool'. + */ + @JsonProperty(value = "properties.accessTier") + private AccessTier accessTier; + + /** + * Allows https traffic only to storage service if sets to true. + */ + @JsonProperty(value = "properties.supportsHttpsTrafficOnly") + private Boolean enableHttpsTrafficOnly; + + /** + * Get required. Gets or sets the sku name. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + + /** + * Set required. Gets or sets the sku name. + * + * @param sku the sku value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withSku(SkuInner sku) { + this.sku = sku; + return this; + } + + /** + * Get required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set required. Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. + * + * @param kind the kind value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. + * + * @param location the location value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. + * + * @param tags the tags value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get user domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @return the customDomain value + */ + public CustomDomain customDomain() { + return this.customDomain; + } + + /** + * Set user domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @param customDomain the customDomain value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withCustomDomain(CustomDomain customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * Get provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set provides the encryption settings on the account. If left unspecified the account encryption settings will remain the same. The default setting is unencrypted. + * + * @param encryption the encryption value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get network rule set. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set network rule set. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @return the accessTier value + */ + public AccessTier accessTier() { + return this.accessTier; + } + + /** + * Set required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @param accessTier the accessTier value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withAccessTier(AccessTier accessTier) { + this.accessTier = accessTier; + return this; + } + + /** + * Get allows https traffic only to storage service if sets to true. + * + * @return the enableHttpsTrafficOnly value + */ + public Boolean enableHttpsTrafficOnly() { + return this.enableHttpsTrafficOnly; + } + + /** + * Set allows https traffic only to storage service if sets to true. + * + * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set + * @return the StorageAccountCreateParameters object itself. + */ + public StorageAccountCreateParameters withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.enableHttpsTrafficOnly = enableHttpsTrafficOnly; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountKey.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountKey.java index ebb46e7c767..dab504e323c 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountKey.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountKey.java @@ -34,7 +34,7 @@ public class StorageAccountKey { private KeyPermission permissions; /** - * Get the keyName value. + * Get name of the key. * * @return the keyName value */ @@ -43,7 +43,7 @@ public String keyName() { } /** - * Get the value value. + * Get base 64-encoded value of the key. * * @return the value value */ @@ -52,7 +52,7 @@ public String value() { } /** - * Get the permissions value. + * Get permissions for the key -- read-only or full permissions. Possible values include: 'Read', 'Full'. * * @return the permissions value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountRegenerateKeyParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountRegenerateKeyParameters.java index a42820d0a95..1db38cb5019 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountRegenerateKeyParameters.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountRegenerateKeyParameters.java @@ -22,7 +22,7 @@ public class StorageAccountRegenerateKeyParameters { private String keyName; /** - * Get the keyName value. + * Get the name of storage keys that want to be regenerated, possible vaules are key1, key2. * * @return the keyName value */ @@ -31,7 +31,7 @@ public String keyName() { } /** - * Set the keyName value. + * Set the name of storage keys that want to be regenerated, possible vaules are key1, key2. * * @param keyName the keyName value to set * @return the StorageAccountRegenerateKeyParameters object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountUpdateParameters.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountUpdateParameters.java new file mode 100644 index 00000000000..4922206de22 --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountUpdateParameters.java @@ -0,0 +1,269 @@ +/** + * 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; + +import com.microsoft.azure.management.storage.implementation.SkuInner; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The parameters that can be provided when updating the storage account + * properties. + */ +@JsonFlatten +public class StorageAccountUpdateParameters { + /** + * Gets or sets the SKU name. Note that the SKU name cannot be updated to + * Standard_ZRS or Premium_LRS, nor can accounts of those sku names be + * updated to any other value. + */ + @JsonProperty(value = "sku") + private SkuInner sku; + + /** + * Gets or sets a list of key value pairs that describe the resource. These + * tags can be used in viewing and grouping this resource (across resource + * groups). A maximum of 15 tags can be provided for a resource. Each tag + * must have a key no greater in length than 128 characters and a value no + * greater in length than 256 characters. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /** + * Custom domain assigned to the storage account by the user. Name is the + * CNAME source. Only one custom domain is supported per storage account at + * this time. To clear the existing custom domain, use an empty string for + * the custom domain name property. + */ + @JsonProperty(value = "properties.customDomain") + private CustomDomain customDomain; + + /** + * Provides the encryption settings on the account. The default setting is + * unencrypted. + */ + @JsonProperty(value = "properties.encryption") + private Encryption encryption; + + /** + * Required for storage accounts where kind = BlobStorage. The access tier + * used for billing. Possible values include: 'Hot', 'Cool'. + */ + @JsonProperty(value = "properties.accessTier") + private AccessTier accessTier; + + /** + * Allows https traffic only to storage service if sets to true. + */ + @JsonProperty(value = "properties.supportsHttpsTrafficOnly") + private Boolean enableHttpsTrafficOnly; + + /** + * Network rule set. + */ + @JsonProperty(value = "properties.networkAcls") + private NetworkRuleSet networkRuleSet; + + /** + * Optional. Indicates the type of storage account. Currently only + * StorageV2 value supported by server. Possible values include: 'Storage', + * 'StorageV2', 'BlobStorage'. + */ + @JsonProperty(value = "kind") + private Kind kind; + + /** + * Get gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku names be updated to any other value. + * + * @return the sku value + */ + public SkuInner sku() { + return this.sku; + } + + /** + * Set gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS or Premium_LRS, nor can accounts of those sku names be updated to any other value. + * + * @param sku the sku value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withSku(SkuInner sku) { + this.sku = sku; + return this; + } + + /** + * Get gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + * + * @param tags the tags value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity of the resource. + * + * @return the identity value + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity of the resource. + * + * @param identity the identity value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @return the customDomain value + */ + public CustomDomain customDomain() { + return this.customDomain; + } + + /** + * Set custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + * + * @param customDomain the customDomain value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withCustomDomain(CustomDomain customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * Get provides the encryption settings on the account. The default setting is unencrypted. + * + * @return the encryption value + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set provides the encryption settings on the account. The default setting is unencrypted. + * + * @param encryption the encryption value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @return the accessTier value + */ + public AccessTier accessTier() { + return this.accessTier; + } + + /** + * Set required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. + * + * @param accessTier the accessTier value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withAccessTier(AccessTier accessTier) { + this.accessTier = accessTier; + return this; + } + + /** + * Get allows https traffic only to storage service if sets to true. + * + * @return the enableHttpsTrafficOnly value + */ + public Boolean enableHttpsTrafficOnly() { + return this.enableHttpsTrafficOnly; + } + + /** + * Set allows https traffic only to storage service if sets to true. + * + * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withEnableHttpsTrafficOnly(Boolean enableHttpsTrafficOnly) { + this.enableHttpsTrafficOnly = enableHttpsTrafficOnly; + return this; + } + + /** + * Get network rule set. + * + * @return the networkRuleSet value + */ + public NetworkRuleSet networkRuleSet() { + return this.networkRuleSet; + } + + /** + * Set network rule set. + * + * @param networkRuleSet the networkRuleSet value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) { + this.networkRuleSet = networkRuleSet; + return this; + } + + /** + * Get optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. + * + * @return the kind value + */ + public Kind kind() { + return this.kind; + } + + /** + * Set optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. + * + * @param kind the kind value to set + * @return the StorageAccountUpdateParameters object itself. + */ + public StorageAccountUpdateParameters withKind(Kind kind) { + this.kind = kind; + return this; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/TagProperty.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/TagProperty.java index d510ca9c655..51498128ec2 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/TagProperty.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/TagProperty.java @@ -56,7 +56,7 @@ public String tag() { } /** - * Get the timestamp value. + * Get returns the date and time the tag was added. * * @return the timestamp value */ @@ -65,7 +65,7 @@ public DateTime timestamp() { } /** - * Get the objectIdentifier value. + * Get returns the Object ID of the user who added the tag. * * @return the objectIdentifier value */ @@ -74,7 +74,7 @@ public String objectIdentifier() { } /** - * Get the tenantId value. + * Get returns the Tenant ID that issued the token for the user who added the tag. * * @return the tenantId value */ @@ -83,7 +83,7 @@ public String tenantId() { } /** - * Get the upn value. + * Get returns the User Principal Name of the user who added the tag. * * @return the upn value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UpdateHistoryProperty.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UpdateHistoryProperty.java index 4b5f96b12ad..39eab3d5ced 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UpdateHistoryProperty.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UpdateHistoryProperty.java @@ -57,7 +57,7 @@ public class UpdateHistoryProperty { private String upn; /** - * Get the update value. + * Get the ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. Possible values include: 'put', 'lock', 'extend'. * * @return the update value */ @@ -66,7 +66,7 @@ public ImmutabilityPolicyUpdateType update() { } /** - * Get the immutabilityPeriodSinceCreationInDays value. + * Get the immutability period for the blobs in the container since the policy creation, in days. * * @return the immutabilityPeriodSinceCreationInDays value */ @@ -75,7 +75,7 @@ public Integer immutabilityPeriodSinceCreationInDays() { } /** - * Get the timestamp value. + * Get returns the date and time the ImmutabilityPolicy was updated. * * @return the timestamp value */ @@ -84,7 +84,7 @@ public DateTime timestamp() { } /** - * Get the objectIdentifier value. + * Get returns the Object ID of the user who updated the ImmutabilityPolicy. * * @return the objectIdentifier value */ @@ -93,7 +93,7 @@ public String objectIdentifier() { } /** - * Get the tenantId value. + * Get returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. * * @return the tenantId value */ @@ -102,7 +102,7 @@ public String tenantId() { } /** - * Get the upn value. + * Get returns the User Principal Name of the user who updated the ImmutabilityPolicy. * * @return the upn value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UsageName.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UsageName.java index 38db9a4bb28..d244ba68f43 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UsageName.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/UsageName.java @@ -27,7 +27,7 @@ public class UsageName { private String localizedValue; /** - * Get the value value. + * Get gets a string describing the resource name. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Get the localizedValue value. + * Get gets a localized string describing the resource name. * * @return the localizedValue value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/VirtualNetworkRule.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/VirtualNetworkRule.java index d05b2a46f58..c4ae50cc44b 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/VirtualNetworkRule.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/VirtualNetworkRule.java @@ -36,7 +36,7 @@ public class VirtualNetworkRule { private State state; /** - * Get the virtualNetworkResourceId value. + * Get resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @return the virtualNetworkResourceId value */ @@ -45,7 +45,7 @@ public String virtualNetworkResourceId() { } /** - * Set the virtualNetworkResourceId value. + * Set resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. * * @param virtualNetworkResourceId the virtualNetworkResourceId value to set * @return the VirtualNetworkRule object itself. @@ -56,7 +56,7 @@ public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkReso } /** - * Get the action value. + * Get the action of virtual network rule. Possible values include: 'Allow'. * * @return the action value */ @@ -65,7 +65,7 @@ public Action action() { } /** - * Set the action value. + * Set the action of virtual network rule. Possible values include: 'Allow'. * * @param action the action value to set * @return the VirtualNetworkRule object itself. @@ -76,7 +76,7 @@ public VirtualNetworkRule withAction(Action action) { } /** - * Get the state value. + * Get gets the state of virtual network rule. Possible values include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', 'networkSourceDeleted'. * * @return the state value */ @@ -85,7 +85,7 @@ public State state() { } /** - * Set the state value. + * Set gets the state of virtual network rule. Possible values include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', 'networkSourceDeleted'. * * @param state the state value to set * @return the VirtualNetworkRule object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/AzureEntityResourceInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/AzureEntityResourceInner.java index 7fc468566c7..034dec5643b 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/AzureEntityResourceInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/AzureEntityResourceInner.java @@ -9,13 +9,13 @@ package com.microsoft.azure.management.storage.implementation; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; +import com.microsoft.azure.ProxyResource; /** * The resource model definition for a Azure Resource Manager resource with an * etag. */ -public class AzureEntityResourceInner extends Resource { +public class AzureEntityResourceInner extends ProxyResource { /** * Resource Etag. */ @@ -23,7 +23,7 @@ public class AzureEntityResourceInner extends Resource { private String etag; /** - * Get the etag value. + * Get resource Etag. * * @return the etag value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainerInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainerInner.java index 2ded2622773..728588e638d 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainerInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainerInner.java @@ -98,7 +98,7 @@ public class BlobContainerInner extends AzureEntityResourceInner { private Boolean hasImmutabilityPolicy; /** - * Get the publicAccess value. + * Get specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. * * @return the publicAccess value */ @@ -107,7 +107,7 @@ public PublicAccess publicAccess() { } /** - * Set the publicAccess value. + * Set specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'Container', 'Blob', 'None'. * * @param publicAccess the publicAccess value to set * @return the BlobContainerInner object itself. @@ -118,7 +118,7 @@ public BlobContainerInner withPublicAccess(PublicAccess publicAccess) { } /** - * Get the lastModifiedTime value. + * Get returns the date and time the container was last modified. * * @return the lastModifiedTime value */ @@ -127,7 +127,7 @@ public DateTime lastModifiedTime() { } /** - * Get the leaseStatus value. + * Get the lease status of the container. Possible values include: 'Locked', 'Unlocked'. * * @return the leaseStatus value */ @@ -136,7 +136,7 @@ public LeaseStatus leaseStatus() { } /** - * Get the leaseState value. + * Get lease state of the container. Possible values include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken'. * * @return the leaseState value */ @@ -145,7 +145,7 @@ public LeaseState leaseState() { } /** - * Get the leaseDuration value. + * Get specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. Possible values include: 'Infinite', 'Fixed'. * * @return the leaseDuration value */ @@ -154,7 +154,7 @@ public LeaseDuration leaseDuration() { } /** - * Get the metadata value. + * Get a name-value pair to associate with the container as metadata. * * @return the metadata value */ @@ -163,7 +163,7 @@ public Map metadata() { } /** - * Set the metadata value. + * Set a name-value pair to associate with the container as metadata. * * @param metadata the metadata value to set * @return the BlobContainerInner object itself. @@ -174,7 +174,7 @@ public BlobContainerInner withMetadata(Map metadata) { } /** - * Get the immutabilityPolicy value. + * Get the ImmutabilityPolicy property of the container. * * @return the immutabilityPolicy value */ @@ -183,7 +183,7 @@ public ImmutabilityPolicyProperties immutabilityPolicy() { } /** - * Get the legalHold value. + * Get the LegalHold property of the container. * * @return the legalHold value */ @@ -192,7 +192,7 @@ public LegalHoldProperties legalHold() { } /** - * Get the hasLegalHold value. + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. * * @return the hasLegalHold value */ @@ -201,7 +201,7 @@ public Boolean hasLegalHold() { } /** - * Get the hasImmutabilityPolicy value. + * Get the hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. * * @return the hasImmutabilityPolicy value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainersInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainersInner.java index fd04f0f1147..c00fb322266 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainersInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/BlobContainersInner.java @@ -11,6 +11,11 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.storage.BlobContainersCreateOrUpdateImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.BlobContainersDeleteImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.BlobContainersExtendImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.BlobContainersGetImmutabilityPolicyHeaders; +import com.microsoft.azure.management.storage.BlobContainersLockImmutabilityPolicyHeaders; import com.microsoft.azure.management.storage.PublicAccess; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; @@ -1023,9 +1028,9 @@ public ServiceFuture createOrUpdateImmutabilityPolicyAs * @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>() { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1041,7 +1046,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) { + public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1062,11 +1067,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1120,9 +1125,9 @@ public ServiceFuture createOrUpdateImmutabilityPolicyAs * @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>() { + return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabilityPeriodSinceCreationInDays, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1139,7 +1144,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { + public Observable> createOrUpdateImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1159,11 +1164,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = createOrUpdateImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1172,11 +1177,11 @@ public Observable createOrUpdateImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponseWithHeaders createOrUpdateImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) - .buildWithHeaders(response, BlobContainersCreateOrUpdateImmutabilityPolicyHeadersInner.class); + .buildWithHeaders(response, BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.class); } /** @@ -1218,9 +1223,9 @@ public ServiceFuture getImmutabilityPolicyAsync(String * @return the observable to the ImmutabilityPolicyInner object */ public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) { - return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, ImmutabilityPolicyInner>() { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1235,7 +1240,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName) { + public Observable> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1254,11 +1259,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1309,9 +1314,9 @@ public ServiceFuture getImmutabilityPolicyAsync(String * @return the observable to the ImmutabilityPolicyInner object */ public Observable getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { - return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1327,7 +1332,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + public Observable> getImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1345,11 +1350,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = getImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1358,11 +1363,11 @@ public Observable getImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponseWithHeaders getImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) - .buildWithHeaders(response, BlobContainersGetImmutabilityPolicyHeadersInner.class); + .buildWithHeaders(response, BlobContainersGetImmutabilityPolicyHeaders.class); } /** @@ -1407,9 +1412,9 @@ public ServiceFuture deleteImmutabilityPolicyAsync(Stri * @return the observable to the ImmutabilityPolicyInner object */ public Observable deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { - return deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + return deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1425,7 +1430,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> deleteImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + public Observable> deleteImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1446,11 +1451,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = deleteImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = deleteImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1459,11 +1464,11 @@ public Observable deleteImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponseWithHeaders deleteImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) - .buildWithHeaders(response, BlobContainersDeleteImmutabilityPolicyHeadersInner.class); + .buildWithHeaders(response, BlobContainersDeleteImmutabilityPolicyHeaders.class); } /** @@ -1508,9 +1513,9 @@ public ServiceFuture lockImmutabilityPolicyAsync(String * @return the observable to the ImmutabilityPolicyInner object */ public Observable lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { - return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { + return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1526,7 +1531,7 @@ public ImmutabilityPolicyInner call(ServiceResponseWithHeaders> lockImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { + public Observable> lockImmutabilityPolicyWithServiceResponseAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1546,11 +1551,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = lockImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = lockImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1559,11 +1564,11 @@ public Observable lockImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponseWithHeaders lockImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) - .buildWithHeaders(response, BlobContainersLockImmutabilityPolicyHeadersInner.class); + .buildWithHeaders(response, BlobContainersLockImmutabilityPolicyHeaders.class); } /** @@ -1611,9 +1616,9 @@ public ServiceFuture extendImmutabilityPolicyAsync(Stri * @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>() { + return extendImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch, immutabilityPeriodSinceCreationInDays).map(new Func1, ImmutabilityPolicyInner>() { @Override - public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { + public ImmutabilityPolicyInner call(ServiceResponseWithHeaders response) { return response.body(); } }); @@ -1630,7 +1635,7 @@ 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, int immutabilityPeriodSinceCreationInDays) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1652,11 +1657,11 @@ public Observable, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponseWithHeaders clientResponse = extendImmutabilityPolicyDelegate(response); + ServiceResponseWithHeaders clientResponse = extendImmutabilityPolicyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1665,11 +1670,11 @@ public Observable extendImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponseWithHeaders extendImmutabilityPolicyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) - .buildWithHeaders(response, BlobContainersExtendImmutabilityPolicyHeadersInner.class); + .buildWithHeaders(response, BlobContainersExtendImmutabilityPolicyHeaders.class); } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/CheckNameAvailabilityResultInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/CheckNameAvailabilityResultInner.java index 45ae874dbb9..1e05c2ff630 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/CheckNameAvailabilityResultInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/CheckNameAvailabilityResultInner.java @@ -38,7 +38,7 @@ public class CheckNameAvailabilityResultInner { private String message; /** - * Get the nameAvailable value. + * Get gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. * * @return the nameAvailable value */ @@ -47,7 +47,7 @@ public Boolean nameAvailable() { } /** - * Get the reason value. + * Get gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists'. * * @return the reason value */ @@ -56,7 +56,7 @@ public Reason reason() { } /** - * Get the message value. + * Get gets an error message explaining the Reason value in more detail. * * @return the message value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ImmutabilityPolicyInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ImmutabilityPolicyInner.java index 5454aadc364..0596d0f9e2f 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ImmutabilityPolicyInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ImmutabilityPolicyInner.java @@ -34,7 +34,7 @@ public class ImmutabilityPolicyInner extends AzureEntityResourceInner { private ImmutabilityPolicyState state; /** - * Get the immutabilityPeriodSinceCreationInDays value. + * Get the immutability period for the blobs in the container since the policy creation, in days. * * @return the immutabilityPeriodSinceCreationInDays value */ @@ -43,7 +43,7 @@ public int immutabilityPeriodSinceCreationInDays() { } /** - * Set the immutabilityPeriodSinceCreationInDays value. + * Set the immutability period for the blobs in the container since the policy creation, in days. * * @param immutabilityPeriodSinceCreationInDays the immutabilityPeriodSinceCreationInDays value to set * @return the ImmutabilityPolicyInner object itself. @@ -54,7 +54,7 @@ public ImmutabilityPolicyInner withImmutabilityPeriodSinceCreationInDays(int imm } /** - * Get the state value. + * Get the ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'. * * @return the state value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/LegalHoldInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/LegalHoldInner.java index 31a0eabd185..c78d84dc4ee 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/LegalHoldInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/LegalHoldInner.java @@ -33,7 +33,7 @@ public class LegalHoldInner { private List tags; /** - * Get the hasLegalHold value. + * Get the hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. * * @return the hasLegalHold value */ @@ -42,7 +42,7 @@ public Boolean hasLegalHold() { } /** - * Get the tags value. + * Get each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. * * @return the tags value */ @@ -51,7 +51,7 @@ public List tags() { } /** - * Set the tags value. + * Set each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. * * @param tags the tags value to set * @return the LegalHoldInner object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListAccountSasResponseInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListAccountSasResponseInner.java index 294235a5088..0b57e05f7ba 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListAccountSasResponseInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListAccountSasResponseInner.java @@ -21,7 +21,7 @@ public class ListAccountSasResponseInner { private String accountSasToken; /** - * Get the accountSasToken value. + * Get list SAS credentials of storage account. * * @return the accountSasToken value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListContainerItemsInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListContainerItemsInner.java index b478e56d009..75156a84462 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListContainerItemsInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListContainerItemsInner.java @@ -23,7 +23,7 @@ public class ListContainerItemsInner { private List value; /** - * Get the value value. + * Get the list of blob containers. * * @return the value value */ @@ -32,7 +32,7 @@ public List value() { } /** - * Set the value value. + * Set the list of blob containers. * * @param value the value value to set * @return the ListContainerItemsInner object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListServiceSasResponseInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListServiceSasResponseInner.java index 5ad24a3eeef..b6472828928 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListServiceSasResponseInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ListServiceSasResponseInner.java @@ -21,7 +21,7 @@ public class ListServiceSasResponseInner { private String serviceSasToken; /** - * Get the serviceSasToken value. + * Get list service SAS credentials of speicific resource. * * @return the serviceSasToken value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationInner.java index a520c94d2f0..c6510549338 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationInner.java @@ -43,7 +43,7 @@ public class OperationInner { private ServiceSpecification serviceSpecification; /** - * Get the name value. + * Get operation name: {provider}/{resource}/{operation}. * * @return the name value */ @@ -52,7 +52,7 @@ public String name() { } /** - * Set the name value. + * Set operation name: {provider}/{resource}/{operation}. * * @param name the name value to set * @return the OperationInner object itself. @@ -63,7 +63,7 @@ public OperationInner withName(String name) { } /** - * Get the display value. + * Get display metadata associated with the operation. * * @return the display value */ @@ -72,7 +72,7 @@ public OperationDisplay display() { } /** - * Set the display value. + * Set display metadata associated with the operation. * * @param display the display value to set * @return the OperationInner object itself. @@ -83,7 +83,7 @@ public OperationInner withDisplay(OperationDisplay display) { } /** - * Get the origin value. + * Get the origin of operations. * * @return the origin value */ @@ -92,7 +92,7 @@ public String origin() { } /** - * Set the origin value. + * Set the origin of operations. * * @param origin the origin value to set * @return the OperationInner object itself. @@ -103,7 +103,7 @@ public OperationInner withOrigin(String origin) { } /** - * Get the serviceSpecification value. + * Get one property of operation, include metric specifications. * * @return the serviceSpecification value */ @@ -112,7 +112,7 @@ public ServiceSpecification serviceSpecification() { } /** - * Set the serviceSpecification value. + * Set one property of operation, include metric specifications. * * @param serviceSpecification the serviceSpecification value to set * @return the OperationInner object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationsInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationsInner.java index 0ee86ac5301..e615ea26bfb 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationsInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/OperationsInner.java @@ -111,7 +111,11 @@ public Observable>> listWithServiceResponse public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ProxyResourceInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ProxyResourceInner.java index e6a68c927b7..48511afa63f 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ProxyResourceInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/ProxyResourceInner.java @@ -8,11 +8,11 @@ package com.microsoft.azure.management.storage.implementation; -import com.microsoft.azure.Resource; +import com.microsoft.azure.ProxyResource; /** * The resource model definition for a ARM proxy resource. It will have * everything other than required location and tags. */ -public class ProxyResourceInner extends Resource { +public class ProxyResourceInner extends ProxyResource { } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkuInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkuInner.java index efcd0d0c045..bbac7e11ee9 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkuInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkuInner.java @@ -72,7 +72,7 @@ public class SkuInner { private List restrictions; /** - * Get the name value. + * Get gets or sets the sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'. * * @return the name value */ @@ -81,7 +81,7 @@ public SkuName name() { } /** - * Set the name value. + * Set gets or sets the sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'. * * @param name the name value to set * @return the SkuInner object itself. @@ -92,7 +92,7 @@ public SkuInner withName(SkuName name) { } /** - * Get the tier value. + * Get gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'. * * @return the tier value */ @@ -101,7 +101,7 @@ public SkuTier tier() { } /** - * Get the resourceType value. + * Get the type of the resource, usually it is 'storageAccounts'. * * @return the resourceType value */ @@ -110,7 +110,7 @@ public String resourceType() { } /** - * Get the kind value. + * Get indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. * * @return the kind value */ @@ -119,7 +119,7 @@ public Kind kind() { } /** - * Get the locations value. + * Get the set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). * * @return the locations value */ @@ -128,7 +128,7 @@ public List locations() { } /** - * Get the capabilities value. + * Get the capability information in the specified sku, including file encryption, network acls, change notification, etc. * * @return the capabilities value */ @@ -137,7 +137,7 @@ public List capabilities() { } /** - * Get the restrictions value. + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. * * @return the restrictions value */ @@ -146,7 +146,7 @@ public List restrictions() { } /** - * Set the restrictions value. + * Set the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. * * @param restrictions the restrictions value to set * @return the SkuInner object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkusInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkusInner.java index a3c6918c3bd..553e11d346e 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkusInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/SkusInner.java @@ -121,7 +121,11 @@ public Observable>> listWithServiceResponseAsync( public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountInner.java index 0b4736028e2..56b6fb8a316 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountInner.java @@ -148,7 +148,7 @@ public class StorageAccountInner extends TrackedResourceInner { private NetworkRuleSet networkRuleSet; /** - * Get the sku value. + * Get gets the SKU. * * @return the sku value */ @@ -157,7 +157,7 @@ public SkuInner sku() { } /** - * Get the kind value. + * Get gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage'. * * @return the kind value */ @@ -166,7 +166,7 @@ public Kind kind() { } /** - * Get the identity value. + * Get the identity of the resource. * * @return the identity value */ @@ -175,7 +175,7 @@ public Identity identity() { } /** - * Set the identity value. + * Set the identity of the resource. * * @param identity the identity value to set * @return the StorageAccountInner object itself. @@ -186,7 +186,7 @@ public StorageAccountInner withIdentity(Identity identity) { } /** - * Get the provisioningState value. + * Get gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'. * * @return the provisioningState value */ @@ -195,7 +195,7 @@ public ProvisioningState provisioningState() { } /** - * Get the primaryEndpoints value. + * Get gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. * * @return the primaryEndpoints value */ @@ -204,7 +204,7 @@ public Endpoints primaryEndpoints() { } /** - * Get the primaryLocation value. + * Get gets the location of the primary data center for the storage account. * * @return the primaryLocation value */ @@ -213,7 +213,7 @@ public String primaryLocation() { } /** - * Get the statusOfPrimary value. + * Get gets the status indicating whether the primary location of the storage account is available or unavailable. Possible values include: 'available', 'unavailable'. * * @return the statusOfPrimary value */ @@ -222,7 +222,7 @@ public AccountStatus statusOfPrimary() { } /** - * Get the lastGeoFailoverTime value. + * Get gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS. * * @return the lastGeoFailoverTime value */ @@ -231,7 +231,7 @@ public DateTime lastGeoFailoverTime() { } /** - * Get the secondaryLocation value. + * Get gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS. * * @return the secondaryLocation value */ @@ -240,7 +240,7 @@ public String secondaryLocation() { } /** - * Get the statusOfSecondary value. + * Get gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible values include: 'available', 'unavailable'. * * @return the statusOfSecondary value */ @@ -249,7 +249,7 @@ public AccountStatus statusOfSecondary() { } /** - * Get the creationTime value. + * Get gets the creation date and time of the storage account in UTC. * * @return the creationTime value */ @@ -258,7 +258,7 @@ public DateTime creationTime() { } /** - * Get the customDomain value. + * Get gets the custom domain the user assigned to this storage account. * * @return the customDomain value */ @@ -267,7 +267,7 @@ public CustomDomain customDomain() { } /** - * Get the secondaryEndpoints value. + * Get gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. * * @return the secondaryEndpoints value */ @@ -276,7 +276,7 @@ public Endpoints secondaryEndpoints() { } /** - * Get the encryption value. + * Get gets the encryption settings on the account. If unspecified, the account is unencrypted. * * @return the encryption value */ @@ -285,7 +285,7 @@ public Encryption encryption() { } /** - * Get the accessTier value. + * Get required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool'. * * @return the accessTier value */ @@ -294,7 +294,7 @@ public AccessTier accessTier() { } /** - * Get the enableHttpsTrafficOnly value. + * Get allows https traffic only to storage service if sets to true. * * @return the enableHttpsTrafficOnly value */ @@ -303,7 +303,7 @@ public Boolean enableHttpsTrafficOnly() { } /** - * Set the enableHttpsTrafficOnly value. + * Set allows https traffic only to storage service if sets to true. * * @param enableHttpsTrafficOnly the enableHttpsTrafficOnly value to set * @return the StorageAccountInner object itself. @@ -314,7 +314,7 @@ public StorageAccountInner withEnableHttpsTrafficOnly(Boolean enableHttpsTraffic } /** - * Get the networkRuleSet value. + * Get network rule set. * * @return the networkRuleSet value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountListKeysResultInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountListKeysResultInner.java index 2abe6cbb668..1b960083c22 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountListKeysResultInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountListKeysResultInner.java @@ -24,7 +24,7 @@ public class StorageAccountListKeysResultInner { private List keys; /** - * Get the keys value. + * Get gets the list of storage account keys and their properties for the specified storage account. * * @return the keys value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountManagementPoliciesInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountManagementPoliciesInner.java new file mode 100644 index 00000000000..4eeb1f2000c --- /dev/null +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountManagementPoliciesInner.java @@ -0,0 +1,64 @@ +/** + * 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.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * The Get Storage Account ManagementPolicies operation response. + */ +@JsonFlatten +public class StorageAccountManagementPoliciesInner extends ProxyResource { + /** + * 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. + */ + @JsonProperty(value = "properties.policy") + private Object policy; + + /** + * Returns the date and time the ManagementPolicies was last modified. + */ + @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * Get 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 policy value + */ + public Object policy() { + return this.policy; + } + + /** + * Set 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. + * + * @param policy the policy value to set + * @return the StorageAccountManagementPoliciesInner object itself. + */ + public StorageAccountManagementPoliciesInner withPolicy(Object policy) { + this.policy = policy; + return this; + } + + /** + * Get returns the date and time the ManagementPolicies was last modified. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + +} diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java index 3c2f7263460..65899011247 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java @@ -14,8 +14,13 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.storage.AccountSasParameters; +import com.microsoft.azure.management.storage.ManagementPoliciesRulesSetParameter; +import com.microsoft.azure.management.storage.ServiceSasParameters; import com.microsoft.azure.management.storage.StorageAccountCheckNameAvailabilityParameters; +import com.microsoft.azure.management.storage.StorageAccountCreateParameters; import com.microsoft.azure.management.storage.StorageAccountRegenerateKeyParameters; +import com.microsoft.azure.management.storage.StorageAccountUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -71,11 +76,11 @@ interface StorageAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters parameters, @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.StorageAccounts beginCreate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") - Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountCreateParameters parameters, @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.StorageAccounts delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", method = "DELETE", hasBody = true) @@ -87,7 +92,7 @@ interface StorageAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body StorageAccountUpdateParameters parameters, @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.StorageAccounts list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts") @@ -107,11 +112,23 @@ interface StorageAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts listAccountSAS" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas") - Observable> listAccountSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body AccountSasParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAccountSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body AccountSasParameters parameters, @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.StorageAccounts listServiceSAS" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas") - Observable> listServiceSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body ServiceSasParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listServiceSAS(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Body ServiceSasParameters parameters, @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.StorageAccounts getManagementPolicies" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}") + Observable> getManagementPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @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.StorageAccounts createOrUpdateManagementPolicies" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}") + Observable> createOrUpdateManagementPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ManagementPoliciesRulesSetParameter properties, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.StorageAccounts deleteManagementPolicies" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", method = "DELETE", hasBody = true) + Observable> deleteManagementPolicies(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("managementPolicyName") String managementPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -207,7 +224,7 @@ private ServiceResponse checkNameAvailabilityD * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the StorageAccountInner object if successful. */ - public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); } @@ -221,7 +238,7 @@ public StorageAccountInner create(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -234,7 +251,7 @@ public ServiceFuture createAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public Observable createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse response) { @@ -252,7 +269,7 @@ public StorageAccountInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -284,7 +301,7 @@ public Observable> createWithServiceRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the StorageAccountInner object if successful. */ - public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); } @@ -298,7 +315,7 @@ public StorageAccountInner beginCreate(String resourceGroupName, String accountN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -311,7 +328,7 @@ public ServiceFuture beginCreateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */ - public Observable beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public Observable beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse response) { @@ -329,7 +346,7 @@ public StorageAccountInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -551,7 +568,7 @@ private ServiceResponse getByResourceGroupDelegate(Response * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the StorageAccountInner object if successful. */ - public StorageAccountInner update(String resourceGroupName, String accountName, StorageAccountUpdateParametersInner parameters) { + public StorageAccountInner update(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); } @@ -565,7 +582,7 @@ public StorageAccountInner update(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -578,7 +595,7 @@ public ServiceFuture updateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */ - public Observable updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParametersInner parameters) { + public Observable updateAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, StorageAccountInner>() { @Override public StorageAccountInner call(ServiceResponse response) { @@ -596,7 +613,7 @@ public StorageAccountInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the StorageAccountInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountUpdateParametersInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, StorageAccountUpdateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -695,7 +712,11 @@ public Observable>> listWithServiceRes public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -779,7 +800,11 @@ public Observable>> listByResourceGrou public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -987,7 +1012,7 @@ private ServiceResponse regenerateKeyDelegate * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ListAccountSasResponseInner object if successful. */ - public ListAccountSasResponseInner listAccountSAS(String resourceGroupName, String accountName, AccountSasParametersInner parameters) { + public ListAccountSasResponseInner listAccountSAS(String resourceGroupName, String accountName, AccountSasParameters parameters) { return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); } @@ -1001,7 +1026,7 @@ public ListAccountSasResponseInner listAccountSAS(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -1014,7 +1039,7 @@ public ServiceFuture listAccountSASAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListAccountSasResponseInner object */ - public Observable listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParametersInner parameters) { + public Observable listAccountSASAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { return listAccountSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, ListAccountSasResponseInner>() { @Override public ListAccountSasResponseInner call(ServiceResponse response) { @@ -1032,7 +1057,7 @@ public ListAccountSasResponseInner call(ServiceResponse> listAccountSASWithServiceResponseAsync(String resourceGroupName, String accountName, AccountSasParametersInner parameters) { + public Observable> listAccountSASWithServiceResponseAsync(String resourceGroupName, String accountName, AccountSasParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1081,7 +1106,7 @@ private ServiceResponse listAccountSASDelegate(Resp * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ListServiceSasResponseInner object if successful. */ - public ListServiceSasResponseInner listServiceSAS(String resourceGroupName, String accountName, ServiceSasParametersInner parameters) { + public ListServiceSasResponseInner listServiceSAS(String resourceGroupName, String accountName, ServiceSasParameters parameters) { return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); } @@ -1095,7 +1120,7 @@ public ListServiceSasResponseInner listServiceSAS(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters), serviceCallback); } @@ -1108,7 +1133,7 @@ public ServiceFuture listServiceSASAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ListServiceSasResponseInner object */ - public Observable listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParametersInner parameters) { + public Observable listServiceSASAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { return listServiceSASWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1, ListServiceSasResponseInner>() { @Override public ListServiceSasResponseInner call(ServiceResponse response) { @@ -1126,7 +1151,7 @@ public ListServiceSasResponseInner call(ServiceResponse> listServiceSASWithServiceResponseAsync(String resourceGroupName, String accountName, ServiceSasParametersInner parameters) { + public Observable> listServiceSASWithServiceResponseAsync(String resourceGroupName, String accountName, ServiceSasParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1164,4 +1189,354 @@ private ServiceResponse listServiceSASDelegate(Resp .build(response); } + /** + * Gets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object if successful. + */ + public StorageAccountManagementPoliciesInner getManagementPolicies(String resourceGroupName, String accountName) { + return getManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the data policy rules associated with 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 getManagementPoliciesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object + */ + public Observable getManagementPoliciesAsync(String resourceGroupName, String accountName) { + return getManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, StorageAccountManagementPoliciesInner>() { + @Override + public StorageAccountManagementPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object + */ + public Observable> getManagementPoliciesWithServiceResponseAsync(String resourceGroupName, 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."); + } + final String managementPolicyName = "default"; + return service.getManagementPolicies(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getManagementPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getManagementPoliciesDelegate(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); + } + + /** + * Sets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object if successful. + */ + public StorageAccountManagementPoliciesInner createOrUpdateManagementPolicies(String resourceGroupName, String accountName) { + return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Sets the data policy rules associated with 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 createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Sets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object + */ + public Observable createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName) { + return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, StorageAccountManagementPoliciesInner>() { + @Override + public StorageAccountManagementPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the data policy rules associated with 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 StorageAccountManagementPoliciesInner object + */ + public Observable> createOrUpdateManagementPoliciesWithServiceResponseAsync(String resourceGroupName, 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."); + } + final String managementPolicyName = "default"; + final Object policy = null; + ManagementPoliciesRulesSetParameter properties = new ManagementPoliciesRulesSetParameter(); + properties.withPolicy(null); + return service.createOrUpdateManagementPolicies(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), properties, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateManagementPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Sets the data policy rules associated with 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 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. + * @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 StorageAccountManagementPoliciesInner object if successful. + */ + public StorageAccountManagementPoliciesInner createOrUpdateManagementPolicies(String resourceGroupName, String accountName, Object policy) { + return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName, policy).toBlocking().single().body(); + } + + /** + * Sets the data policy rules associated with 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 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. + * @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 createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName, Object policy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName, policy), serviceCallback); + } + + /** + * Sets the data policy rules associated with 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountManagementPoliciesInner object + */ + public Observable createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName, Object policy) { + return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName, policy).map(new Func1, StorageAccountManagementPoliciesInner>() { + @Override + public StorageAccountManagementPoliciesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the data policy rules associated with 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StorageAccountManagementPoliciesInner object + */ + public Observable> createOrUpdateManagementPoliciesWithServiceResponseAsync(String resourceGroupName, String accountName, Object policy) { + 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."); + } + final String managementPolicyName = "default"; + ManagementPoliciesRulesSetParameter properties = new ManagementPoliciesRulesSetParameter(); + properties.withPolicy(policy); + return service.createOrUpdateManagementPolicies(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), properties, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateManagementPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateManagementPoliciesDelegate(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); + } + + /** + * Deletes the data policy rules associated with 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 + */ + public void deleteManagementPolicies(String resourceGroupName, String accountName) { + deleteManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Deletes the data policy rules associated with 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 deleteManagementPoliciesAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the data policy rules associated with 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 {@link ServiceResponse} object if successful. + */ + public Observable deleteManagementPoliciesAsync(String resourceGroupName, String accountName) { + return deleteManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the data policy rules associated with 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 {@link ServiceResponse} object if successful. + */ + public Observable> deleteManagementPoliciesWithServiceResponseAsync(String resourceGroupName, 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."); + } + final String managementPolicyName = "default"; + return service.deleteManagementPolicies(resourceGroupName, accountName, this.client.subscriptionId(), managementPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteManagementPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteManagementPoliciesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManagementClientImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManagementClientImpl.java index 19a5057b26b..33e10bb3ae2 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManagementClientImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageManagementClientImpl.java @@ -228,7 +228,7 @@ public StorageManagementClientImpl(RestClient restClient) { } protected void initialize() { - this.apiVersion = "2018-02-01"; + this.apiVersion = "2018-03-01-preview"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -247,6 +247,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "StorageManagementClient", "2018-02-01"); + return String.format("%s (%s, %s)", super.userAgent(), "StorageManagementClient", "2018-03-01-preview"); } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/TrackedResourceInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/TrackedResourceInner.java index 096cb19c1f5..5b919bb6cfa 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/TrackedResourceInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/TrackedResourceInner.java @@ -10,12 +10,12 @@ import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; +import com.microsoft.azure.ProxyResource; /** * The resource model definition for a ARM tracked top level resource. */ -public class TrackedResourceInner extends Resource { +public class TrackedResourceInner extends ProxyResource { /** * Resource tags. */ @@ -29,7 +29,7 @@ public class TrackedResourceInner extends Resource { private String location; /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -38,7 +38,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the TrackedResourceInner object itself. @@ -49,7 +49,7 @@ public TrackedResourceInner withTags(Map tags) { } /** - * Get the location value. + * Get the geo-location where the resource lives. * * @return the location value */ @@ -58,7 +58,7 @@ public String location() { } /** - * Set the location value. + * Set the geo-location where the resource lives. * * @param location the location value to set * @return the TrackedResourceInner object itself. diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsageInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsageInner.java index f6211b55164..2bf008ffecd 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsageInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsageInner.java @@ -43,7 +43,7 @@ public class UsageInner { private UsageName name; /** - * Get the unit value. + * Get gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'. * * @return the unit value */ @@ -52,7 +52,7 @@ public UsageUnit unit() { } /** - * Get the currentValue value. + * Get gets the current count of the allocated resources in the subscription. * * @return the currentValue value */ @@ -61,7 +61,7 @@ public Integer currentValue() { } /** - * Get the limit value. + * Get gets the maximum count of the resources that can be allocated in the subscription. * * @return the limit value */ @@ -70,7 +70,7 @@ public Integer limit() { } /** - * Get the name value. + * Get gets the name of the type of usage. * * @return the name value */ diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java index 53d7e6acd97..90cc93fb771 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java @@ -58,6 +58,10 @@ interface UsagesService { @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages") Observable> list(@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.Usages listByLocation" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages") + Observable> listByLocation(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -121,7 +125,11 @@ public Observable>> listWithServiceResponseAsyn public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -137,4 +145,88 @@ private ServiceResponse> listDelegate(Response listByLocation(String location) { + return listByLocationWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @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> listByLocationAsync(String location, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByLocationWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageInner> object + */ + public Observable> listByLocationAsync(String location) { + return listByLocationWithServiceResponseAsync(location).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + * + * @param location The location of the Azure Storage resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<UsageInner> object + */ + public Observable>> listByLocationWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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.listByLocation(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByLocationDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByLocationDelegate(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); + } + }