diff --git a/sdk/storage/mgmt-v2019_06_01/pom.xml b/sdk/storage/mgmt-v2019_06_01/pom.xml
index 3f831c08f482..1ce26f37d839 100644
--- a/sdk/storage/mgmt-v2019_06_01/pom.xml
+++ b/sdk/storage/mgmt-v2019_06_01/pom.xml
@@ -11,11 +11,11 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
+ 1.1.0
../../../pom.management.xml
azure-mgmt-storage
- 1.0.0-beta-2
+ 1.0.0-beta
jar
Microsoft Azure SDK for Storage Management
This package contains Microsoft Storage Management SDK.
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreParameters.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreParameters.java
new file mode 100644
index 000000000000..9908a3552e18
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreParameters.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01;
+
+import org.joda.time.DateTime;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Blob restore parameters.
+ */
+public class BlobRestoreParameters {
+ /**
+ * Restore blob to the specified time.
+ */
+ @JsonProperty(value = "timeToRestore", required = true)
+ private DateTime timeToRestore;
+
+ /**
+ * Blob ranges to restore.
+ */
+ @JsonProperty(value = "blobRanges", required = true)
+ private List blobRanges;
+
+ /**
+ * Get restore blob to the specified time.
+ *
+ * @return the timeToRestore value
+ */
+ public DateTime timeToRestore() {
+ return this.timeToRestore;
+ }
+
+ /**
+ * Set restore blob to the specified time.
+ *
+ * @param timeToRestore the timeToRestore value to set
+ * @return the BlobRestoreParameters object itself.
+ */
+ public BlobRestoreParameters withTimeToRestore(DateTime timeToRestore) {
+ this.timeToRestore = timeToRestore;
+ return this;
+ }
+
+ /**
+ * Get blob ranges to restore.
+ *
+ * @return the blobRanges value
+ */
+ public List blobRanges() {
+ return this.blobRanges;
+ }
+
+ /**
+ * Set blob ranges to restore.
+ *
+ * @param blobRanges the blobRanges value to set
+ * @return the BlobRestoreParameters object itself.
+ */
+ public BlobRestoreParameters withBlobRanges(List blobRanges) {
+ this.blobRanges = blobRanges;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreProgressStatus.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreProgressStatus.java
new file mode 100644
index 000000000000..20dd148cca51
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreProgressStatus.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for BlobRestoreProgressStatus.
+ */
+public final class BlobRestoreProgressStatus extends ExpandableStringEnum {
+ /** Static value InProgress for BlobRestoreProgressStatus. */
+ public static final BlobRestoreProgressStatus IN_PROGRESS = fromString("InProgress");
+
+ /** Static value Complete for BlobRestoreProgressStatus. */
+ public static final BlobRestoreProgressStatus COMPLETE = fromString("Complete");
+
+ /** Static value Failed for BlobRestoreProgressStatus. */
+ public static final BlobRestoreProgressStatus FAILED = fromString("Failed");
+
+ /**
+ * Creates or finds a BlobRestoreProgressStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding BlobRestoreProgressStatus
+ */
+ @JsonCreator
+ public static BlobRestoreProgressStatus fromString(String name) {
+ return fromString(name, BlobRestoreProgressStatus.class);
+ }
+
+ /**
+ * @return known BlobRestoreProgressStatus values
+ */
+ public static Collection values() {
+ return values(BlobRestoreProgressStatus.class);
+ }
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreRange.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreRange.java
new file mode 100644
index 000000000000..1569b651a761
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreRange.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Blob range.
+ */
+public class BlobRestoreRange {
+ /**
+ * Blob start range. Empty means account start.
+ */
+ @JsonProperty(value = "startRange", required = true)
+ private String startRange;
+
+ /**
+ * Blob end range. Empty means account end.
+ */
+ @JsonProperty(value = "endRange", required = true)
+ private String endRange;
+
+ /**
+ * Get blob start range. Empty means account start.
+ *
+ * @return the startRange value
+ */
+ public String startRange() {
+ return this.startRange;
+ }
+
+ /**
+ * Set blob start range. Empty means account start.
+ *
+ * @param startRange the startRange value to set
+ * @return the BlobRestoreRange object itself.
+ */
+ public BlobRestoreRange withStartRange(String startRange) {
+ this.startRange = startRange;
+ return this;
+ }
+
+ /**
+ * Get blob end range. Empty means account end.
+ *
+ * @return the endRange value
+ */
+ public String endRange() {
+ return this.endRange;
+ }
+
+ /**
+ * Set blob end range. Empty means account end.
+ *
+ * @param endRange the endRange value to set
+ * @return the BlobRestoreRange object itself.
+ */
+ public BlobRestoreRange withEndRange(String endRange) {
+ this.endRange = endRange;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreStatus.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreStatus.java
new file mode 100644
index 000000000000..6f0d56f2b46e
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobRestoreStatus.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
+import com.microsoft.azure.management.storage.v2019_06_01.implementation.BlobRestoreStatusInner;
+
+/**
+ * Type representing BlobRestoreStatus.
+ */
+public interface BlobRestoreStatus extends HasInner, HasManager {
+ /**
+ * @return the failureReason value.
+ */
+ String failureReason();
+
+ /**
+ * @return the parameters value.
+ */
+ BlobRestoreParameters parameters();
+
+ /**
+ * @return the restoreId value.
+ */
+ String restoreId();
+
+ /**
+ * @return the status value.
+ */
+ BlobRestoreProgressStatus status();
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
index a17747a01972..70ca25de06b3 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/BlobServiceProperties.java
@@ -17,7 +17,6 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
-import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
/**
* Type representing BlobServiceProperties.
@@ -58,6 +57,11 @@ public interface BlobServiceProperties extends HasInner, DefinitionStages.WithAutomaticSnapshotPolicyEnabled, DefinitionStages.WithChangeFeed, DefinitionStages.WithCors, DefinitionStages.WithDefaultServiceVersion, DefinitionStages.WithDeleteRetentionPolicy {
+ interface WithCreate extends Creatable, DefinitionStages.WithAutomaticSnapshotPolicyEnabled, DefinitionStages.WithChangeFeed, DefinitionStages.WithCors, DefinitionStages.WithDefaultServiceVersion, DefinitionStages.WithDeleteRetentionPolicy, DefinitionStages.WithRestorePolicy {
}
}
/**
* The template for a BlobServiceProperties update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAutomaticSnapshotPolicyEnabled, UpdateStages.WithChangeFeed, UpdateStages.WithCors, UpdateStages.WithDefaultServiceVersion, UpdateStages.WithDeleteRetentionPolicy {
+ interface Update extends Appliable, UpdateStages.WithAutomaticSnapshotPolicyEnabled, UpdateStages.WithChangeFeed, UpdateStages.WithCors, UpdateStages.WithDefaultServiceVersion, UpdateStages.WithDeleteRetentionPolicy, UpdateStages.WithRestorePolicy {
}
/**
@@ -235,5 +251,17 @@ interface WithDeleteRetentionPolicy {
Update withDeleteRetentionPolicy(DeleteRetentionPolicy deleteRetentionPolicy);
}
+ /**
+ * The stage of the blobserviceproperties update allowing to specify RestorePolicy.
+ */
+ interface WithRestorePolicy {
+ /**
+ * Specifies restorePolicy.
+ * @param restorePolicy The blob service properties for blob restore policy
+ * @return the next update stage
+ */
+ Update withRestorePolicy(RestorePolicyProperties restorePolicy);
+ }
+
}
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeletedShare.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeletedShare.java
new file mode 100644
index 000000000000..df94b81b7323
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/DeletedShare.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The deleted share to be restored.
+ */
+public class DeletedShare {
+ /**
+ * Required. Identify the name of the deleted share that will be restored.
+ */
+ @JsonProperty(value = "deletedShareName")
+ private String deletedShareName;
+
+ /**
+ * Required. Identify the version of the deleted share that will be
+ * restored.
+ */
+ @JsonProperty(value = "deletedShareVersion")
+ private String deletedShareVersion;
+
+ /**
+ * Get required. Identify the name of the deleted share that will be restored.
+ *
+ * @return the deletedShareName value
+ */
+ public String deletedShareName() {
+ return this.deletedShareName;
+ }
+
+ /**
+ * Set required. Identify the name of the deleted share that will be restored.
+ *
+ * @param deletedShareName the deletedShareName value to set
+ * @return the DeletedShare object itself.
+ */
+ public DeletedShare withDeletedShareName(String deletedShareName) {
+ this.deletedShareName = deletedShareName;
+ return this;
+ }
+
+ /**
+ * Get required. Identify the version of the deleted share that will be restored.
+ *
+ * @return the deletedShareVersion value
+ */
+ public String deletedShareVersion() {
+ return this.deletedShareVersion;
+ }
+
+ /**
+ * Set required. Identify the version of the deleted share that will be restored.
+ *
+ * @param deletedShareVersion the deletedShareVersion value to set
+ * @return the DeletedShare object itself.
+ */
+ public DeletedShare withDeletedShareVersion(String deletedShareVersion) {
+ this.deletedShareVersion = deletedShareVersion;
+ return this;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
index 468c2d586e70..8bd2a2d90470 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileServiceProperties.java
@@ -17,7 +17,6 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
-import com.microsoft.azure.management.storage.v2019_06_01.implementation.SkuInner;
import java.util.List;
/**
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java
index c36a39ec536f..6451be473dea 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShare.java
@@ -16,13 +16,23 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageManager;
-import java.util.Map;
import org.joda.time.DateTime;
+import java.util.Map;
/**
* Type representing FileShare.
*/
public interface FileShare extends HasInner, Indexable, Updatable, HasManager {
+ /**
+ * @return the deleted value.
+ */
+ Boolean deleted();
+
+ /**
+ * @return the deletedTime value.
+ */
+ DateTime deletedTime();
+
/**
* @return the etag value.
*/
@@ -48,6 +58,11 @@ public interface FileShare extends HasInner, Indexable, Updatabl
*/
String name();
+ /**
+ * @return the remainingRetentionDays value.
+ */
+ Integer remainingRetentionDays();
+
/**
* @return the shareQuota value.
*/
@@ -58,10 +73,15 @@ public interface FileShare extends HasInner, Indexable, Updatabl
*/
String type();
+ /**
+ * @return the version value.
+ */
+ String version();
+
/**
* The entirety of the FileShare definition.
*/
- interface Definition extends DefinitionStages.Blank, DefinitionStages.WithFileService, DefinitionStages.WithMetadata, DefinitionStages.WithShareQuota, DefinitionStages.WithCreate {
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithFileService, DefinitionStages.WithCreate {
}
/**
@@ -84,45 +104,57 @@ interface WithFileService {
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only
* @return the next definition stage
*/
- WithMetadata withExistingFileService(String resourceGroupName, String accountName);
+ WithCreate withExistingFileService(String resourceGroupName, String accountName);
}
/**
* The stage of the fileshare definition allowing to specify Metadata.
*/
interface WithMetadata {
- /**
- * Specifies metadata.
- * @param metadata A name-value pair to associate with the share as metadata
- * @return the next definition stage
- */
- WithShareQuota withMetadata(Map metadata);
+ /**
+ * Specifies metadata.
+ * @param metadata A name-value pair to associate with the share as metadata
+ * @return the next definition stage
+ */
+ WithCreate withMetadata(Map metadata);
}
/**
* The stage of the fileshare definition allowing to specify ShareQuota.
*/
interface WithShareQuota {
- /**
- * Specifies shareQuota.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400
- * @return the next definition stage
- */
+ /**
+ * Specifies shareQuota.
+ * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400
+ * @return the next definition stage
+ */
WithCreate withShareQuota(Integer shareQuota);
}
+ /**
+ * The stage of the fileshare definition allowing to specify Version.
+ */
+ interface WithVersion {
+ /**
+ * Specifies version.
+ * @param version The version of the share
+ * @return the next definition stage
+ */
+ WithCreate withVersion(String version);
+ }
+
/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
- interface WithCreate extends Creatable {
+ interface WithCreate extends Creatable, DefinitionStages.WithMetadata, DefinitionStages.WithShareQuota, DefinitionStages.WithVersion {
}
}
/**
* The template for a FileShare update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithMetadata, UpdateStages.WithShareQuota {
+ interface Update extends Appliable, UpdateStages.WithMetadata, UpdateStages.WithShareQuota, UpdateStages.WithVersion {
}
/**
@@ -153,5 +185,17 @@ interface WithShareQuota {
Update withShareQuota(Integer shareQuota);
}
+ /**
+ * The stage of the fileshare update allowing to specify Version.
+ */
+ interface WithVersion {
+ /**
+ * Specifies version.
+ * @param version The version of the share
+ * @return the next update stage
+ */
+ Update withVersion(String version);
+ }
+
}
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java
index d0e56e51ef15..6994014145d9 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShareItem.java
@@ -19,6 +19,16 @@
* Type representing FileShareItem.
*/
public interface FileShareItem extends HasInner, HasManager {
+ /**
+ * @return the deleted value.
+ */
+ Boolean deleted();
+
+ /**
+ * @return the deletedTime value.
+ */
+ DateTime deletedTime();
+
/**
* @return the etag value.
*/
@@ -44,6 +54,11 @@ public interface FileShareItem extends HasInner, HasManager<
*/
String name();
+ /**
+ * @return the remainingRetentionDays value.
+ */
+ Integer remainingRetentionDays();
+
/**
* @return the shareQuota value.
*/
@@ -54,4 +69,9 @@ public interface FileShareItem extends HasInner, HasManager<
*/
String type();
+ /**
+ * @return the version value.
+ */
+ String version();
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java
index d81fe9cd759f..e31c7c123c9b 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/FileShares.java
@@ -50,4 +50,15 @@ public interface FileShares extends SupportsCreating, Resource,
*/
AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication();
+ /**
+ * @return the blobRestoreStatus value.
+ */
+ BlobRestoreStatus blobRestoreStatus();
+
/**
* @return the creationTime value.
*/
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java
index 67e8dfb26e37..e658122256a8 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccountExpand.java
@@ -16,7 +16,10 @@
*/
public enum StorageAccountExpand {
/** Enum value geoReplicationStats. */
- GEO_REPLICATION_STATS("geoReplicationStats");
+ GEO_REPLICATION_STATS("geoReplicationStats"),
+
+ /** Enum value blobRestoreStatus. */
+ BLOB_RESTORE_STATUS("blobRestoreStatus");
/** The actual serialized value for a StorageAccountExpand instance. */
private String value;
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java
index c60ca1c8a4ee..886bf0fc5166 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/StorageAccounts.java
@@ -16,6 +16,8 @@
import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
import com.microsoft.azure.arm.collection.SupportsListing;
import rx.Completable;
+import org.joda.time.DateTime;
+import java.util.List;
import com.microsoft.azure.management.storage.v2019_06_01.implementation.StorageAccountsInner;
import com.microsoft.azure.arm.model.HasInner;
@@ -76,6 +78,18 @@ public interface StorageAccounts extends SupportsCreating restoreBlobRangesAsync(String resourceGroupName, String accountName, DateTime timeToRestore, List blobRanges);
+
/**
* Revoke user delegation keys.
*
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusImpl.java
new file mode 100644
index 000000000000..b2c69ef4b581
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusImpl.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01.implementation;
+
+import com.microsoft.azure.management.storage.v2019_06_01.BlobRestoreStatus;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.storage.v2019_06_01.BlobRestoreParameters;
+import com.microsoft.azure.management.storage.v2019_06_01.BlobRestoreProgressStatus;
+
+class BlobRestoreStatusImpl extends WrapperImpl implements BlobRestoreStatus {
+ private final StorageManager manager;
+ BlobRestoreStatusImpl(BlobRestoreStatusInner inner, StorageManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public StorageManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String failureReason() {
+ return this.inner().failureReason();
+ }
+
+ @Override
+ public BlobRestoreParameters parameters() {
+ return this.inner().parameters();
+ }
+
+ @Override
+ public String restoreId() {
+ return this.inner().restoreId();
+ }
+
+ @Override
+ public BlobRestoreProgressStatus status() {
+ return this.inner().status();
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusInner.java
new file mode 100644
index 000000000000..9a6fb7113920
--- /dev/null
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobRestoreStatusInner.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.storage.v2019_06_01.implementation;
+
+import com.microsoft.azure.management.storage.v2019_06_01.BlobRestoreProgressStatus;
+import com.microsoft.azure.management.storage.v2019_06_01.BlobRestoreParameters;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Blob restore status.
+ */
+public class BlobRestoreStatusInner {
+ /**
+ * The status of blob restore progress. Possible values are: - InProgress:
+ * Indicates that blob restore is ongoing. - Complete: Indicates that blob
+ * restore has been completed successfully. - Failed: Indicates that blob
+ * restore is failed. Possible values include: 'InProgress', 'Complete',
+ * 'Failed'.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private BlobRestoreProgressStatus status;
+
+ /**
+ * Failure reason when blob restore is failed.
+ */
+ @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY)
+ private String failureReason;
+
+ /**
+ * Id for tracking blob restore request.
+ */
+ @JsonProperty(value = "restoreId", access = JsonProperty.Access.WRITE_ONLY)
+ private String restoreId;
+
+ /**
+ * Blob restore request parameters.
+ */
+ @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY)
+ private BlobRestoreParameters parameters;
+
+ /**
+ * Get the status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed'.
+ *
+ * @return the status value
+ */
+ public BlobRestoreProgressStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get failure reason when blob restore is failed.
+ *
+ * @return the failureReason value
+ */
+ public String failureReason() {
+ return this.failureReason;
+ }
+
+ /**
+ * Get id for tracking blob restore request.
+ *
+ * @return the restoreId value
+ */
+ public String restoreId() {
+ return this.restoreId;
+ }
+
+ /**
+ * Get blob restore request parameters.
+ *
+ * @return the parameters value
+ */
+ public BlobRestoreParameters parameters() {
+ return this.parameters;
+ }
+
+}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
index 0526306ae443..57884a6967a0 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesImpl.java
@@ -14,6 +14,7 @@
import com.microsoft.azure.management.storage.v2019_06_01.CorsRules;
import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy;
import com.microsoft.azure.management.storage.v2019_06_01.ChangeFeed;
+import com.microsoft.azure.management.storage.v2019_06_01.RestorePolicyProperties;
class BlobServicePropertiesImpl extends CreatableUpdatableImpl implements BlobServiceProperties, BlobServiceProperties.Definition, BlobServiceProperties.Update {
private final StorageManager manager;
@@ -105,6 +106,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public RestorePolicyProperties restorePolicy() {
+ return this.inner().restorePolicy();
+ }
+
@Override
public SkuInner sku() {
return this.inner().sku();
@@ -152,4 +158,10 @@ public BlobServicePropertiesImpl withDeleteRetentionPolicy(DeleteRetentionPolicy
return this;
}
+ @Override
+ public BlobServicePropertiesImpl withRestorePolicy(RestorePolicyProperties restorePolicy) {
+ this.inner().withRestorePolicy(restorePolicy);
+ return this;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
index 44d7a9080569..4a55fb90ecc8 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobServicePropertiesInner.java
@@ -11,6 +11,7 @@
import com.microsoft.azure.management.storage.v2019_06_01.CorsRules;
import com.microsoft.azure.management.storage.v2019_06_01.DeleteRetentionPolicy;
import com.microsoft.azure.management.storage.v2019_06_01.ChangeFeed;
+import com.microsoft.azure.management.storage.v2019_06_01.RestorePolicyProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.ProxyResource;
@@ -55,6 +56,12 @@ public class BlobServicePropertiesInner extends ProxyResource {
@JsonProperty(value = "properties.changeFeed")
private ChangeFeed changeFeed;
+ /**
+ * The blob service properties for blob restore policy.
+ */
+ @JsonProperty(value = "properties.restorePolicy")
+ private RestorePolicyProperties restorePolicy;
+
/**
* Sku name and tier.
*/
@@ -161,6 +168,26 @@ public BlobServicePropertiesInner withChangeFeed(ChangeFeed changeFeed) {
return this;
}
+ /**
+ * Get the blob service properties for blob restore policy.
+ *
+ * @return the restorePolicy value
+ */
+ public RestorePolicyProperties restorePolicy() {
+ return this.restorePolicy;
+ }
+
+ /**
+ * Set the blob service properties for blob restore policy.
+ *
+ * @param restorePolicy the restorePolicy value to set
+ * @return the BlobServicePropertiesInner object itself.
+ */
+ public BlobServicePropertiesInner withRestorePolicy(RestorePolicyProperties restorePolicy) {
+ this.restorePolicy = restorePolicy;
+ return this;
+ }
+
/**
* Get sku name and tier.
*
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java
index ac9641dc378f..c764bc66d2c8 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareImpl.java
@@ -11,18 +11,14 @@
import com.microsoft.azure.management.storage.v2019_06_01.FileShare;
import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
import rx.Observable;
-import java.util.Map;
import org.joda.time.DateTime;
+import java.util.Map;
class FileShareImpl extends CreatableUpdatableImpl implements FileShare, FileShare.Definition, FileShare.Update {
private final StorageManager manager;
private String resourceGroupName;
private String accountName;
private String shareName;
- private Map cmetadata;
- private Integer cshareQuota;
- private Map umetadata;
- private Integer ushareQuota;
FileShareImpl(String name, StorageManager manager) {
super(name, new FileShareInner());
@@ -52,14 +48,14 @@ public StorageManager manager() {
@Override
public Observable createResourceAsync() {
FileSharesInner client = this.manager().inner().fileShares();
- return client.createAsync(this.resourceGroupName, this.accountName, this.shareName, this.cmetadata, this.cshareQuota)
+ return client.createAsync(this.resourceGroupName, this.accountName, this.shareName, this.inner())
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
FileSharesInner client = this.manager().inner().fileShares();
- return client.updateAsync(this.resourceGroupName, this.accountName, this.shareName, this.umetadata, this.ushareQuota)
+ return client.updateAsync(this.resourceGroupName, this.accountName, this.shareName, this.inner())
.map(innerToFluentMap(this));
}
@@ -75,6 +71,16 @@ public boolean isInCreateMode() {
}
+ @Override
+ public Boolean deleted() {
+ return this.inner().deleted();
+ }
+
+ @Override
+ public DateTime deletedTime() {
+ return this.inner().deletedTime();
+ }
+
@Override
public String etag() {
return this.inner().etag();
@@ -100,6 +106,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public Integer remainingRetentionDays() {
+ return this.inner().remainingRetentionDays();
+ }
+
@Override
public Integer shareQuota() {
return this.inner().shareQuota();
@@ -110,6 +121,11 @@ public String type() {
return this.inner().type();
}
+ @Override
+ public String version() {
+ return this.inner().version();
+ }
+
@Override
public FileShareImpl withExistingFileService(String resourceGroupName, String accountName) {
this.resourceGroupName = resourceGroupName;
@@ -119,21 +135,19 @@ public FileShareImpl withExistingFileService(String resourceGroupName, String ac
@Override
public FileShareImpl withMetadata(Map metadata) {
- if (isInCreateMode()) {
- this.cmetadata = metadata;
- } else {
- this.umetadata = metadata;
- }
+ this.inner().withMetadata(metadata);
return this;
}
@Override
public FileShareImpl withShareQuota(Integer shareQuota) {
- if (isInCreateMode()) {
- this.cshareQuota = shareQuota;
- } else {
- this.ushareQuota = shareQuota;
- }
+ this.inner().withShareQuota(shareQuota);
+ return this;
+ }
+
+ @Override
+ public FileShareImpl withVersion(String version) {
+ this.inner().withVersion(version);
return this;
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java
index 731eaabe366e..d2789c15a523 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareInner.java
@@ -40,6 +40,30 @@ public class FileShareInner extends AzureEntityResource {
@JsonProperty(value = "properties.shareQuota")
private Integer shareQuota;
+ /**
+ * The version of the share.
+ */
+ @JsonProperty(value = "properties.version")
+ private String version;
+
+ /**
+ * Indicates whether the share was deleted.
+ */
+ @JsonProperty(value = "properties.deleted", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean deleted;
+
+ /**
+ * The deleted time if the share was deleted.
+ */
+ @JsonProperty(value = "properties.deletedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime deletedTime;
+
+ /**
+ * Remaining retention days for share that was soft deleted.
+ */
+ @JsonProperty(value = "properties.remainingRetentionDays", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer remainingRetentionDays;
+
/**
* Get returns the date and time the share was last modified.
*
@@ -89,4 +113,51 @@ public FileShareInner withShareQuota(Integer shareQuota) {
return this;
}
+ /**
+ * Get the version of the share.
+ *
+ * @return the version value
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version of the share.
+ *
+ * @param version the version value to set
+ * @return the FileShareInner object itself.
+ */
+ public FileShareInner withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get indicates whether the share was deleted.
+ *
+ * @return the deleted value
+ */
+ public Boolean deleted() {
+ return this.deleted;
+ }
+
+ /**
+ * Get the deleted time if the share was deleted.
+ *
+ * @return the deletedTime value
+ */
+ public DateTime deletedTime() {
+ return this.deletedTime;
+ }
+
+ /**
+ * Get remaining retention days for share that was soft deleted.
+ *
+ * @return the remainingRetentionDays value
+ */
+ public Integer remainingRetentionDays() {
+ return this.remainingRetentionDays;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java
index 9f66a7a0b941..a9bce8134d10 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemImpl.java
@@ -25,6 +25,16 @@ public StorageManager manager() {
return this.manager;
}
+ @Override
+ public Boolean deleted() {
+ return this.inner().deleted();
+ }
+
+ @Override
+ public DateTime deletedTime() {
+ return this.inner().deletedTime();
+ }
+
@Override
public String etag() {
return this.inner().etag();
@@ -50,6 +60,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public Integer remainingRetentionDays() {
+ return this.inner().remainingRetentionDays();
+ }
+
@Override
public Integer shareQuota() {
return this.inner().shareQuota();
@@ -60,4 +75,9 @@ public String type() {
return this.inner().type();
}
+ @Override
+ public String version() {
+ return this.inner().version();
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java
index dad24dbe729b..6e2ccc8803bf 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileShareItemInner.java
@@ -39,6 +39,30 @@ public class FileShareItemInner extends AzureEntityResource {
@JsonProperty(value = "properties.shareQuota")
private Integer shareQuota;
+ /**
+ * The version of the share.
+ */
+ @JsonProperty(value = "properties.version")
+ private String version;
+
+ /**
+ * Indicates whether the share was deleted.
+ */
+ @JsonProperty(value = "properties.deleted", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean deleted;
+
+ /**
+ * The deleted time if the share was deleted.
+ */
+ @JsonProperty(value = "properties.deletedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime deletedTime;
+
+ /**
+ * Remaining retention days for share that was soft deleted.
+ */
+ @JsonProperty(value = "properties.remainingRetentionDays", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer remainingRetentionDays;
+
/**
* Get returns the date and time the share was last modified.
*
@@ -88,4 +112,51 @@ public FileShareItemInner withShareQuota(Integer shareQuota) {
return this;
}
+ /**
+ * Get the version of the share.
+ *
+ * @return the version value
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version of the share.
+ *
+ * @param version the version value to set
+ * @return the FileShareItemInner object itself.
+ */
+ public FileShareItemInner withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get indicates whether the share was deleted.
+ *
+ * @return the deleted value
+ */
+ public Boolean deleted() {
+ return this.deleted;
+ }
+
+ /**
+ * Get the deleted time if the share was deleted.
+ *
+ * @return the deletedTime value
+ */
+ public DateTime deletedTime() {
+ return this.deletedTime;
+ }
+
+ /**
+ * Get remaining retention days for share that was soft deleted.
+ *
+ * @return the remainingRetentionDays value
+ */
+ public Integer remainingRetentionDays() {
+ return this.remainingRetentionDays;
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java
index 8c80b4e9bd74..a5e2849c269f 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesImpl.java
@@ -79,4 +79,10 @@ public Completable deleteAsync(String resourceGroupName, String accountName, Str
return client.deleteAsync(resourceGroupName, accountName, shareName).toCompletable();
}
+ @Override
+ public Completable restoreAsync(String resourceGroupName, String accountName, String shareName) {
+ FileSharesInner client = this.inner();
+ return client.restoreAsync(resourceGroupName, accountName, shareName).toCompletable();
+ }
+
}
diff --git a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java
index a81cb4858fc0..a3c00b37eac6 100644
--- a/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java
+++ b/sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/FileSharesInner.java
@@ -13,6 +13,8 @@
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.storage.v2019_06_01.DeletedShare;
+import com.microsoft.azure.management.storage.v2019_06_01.ListSharesExpand;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceCallback;
@@ -21,7 +23,6 @@
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
-import java.util.Map;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
@@ -30,6 +31,7 @@
import retrofit2.http.HTTP;
import retrofit2.http.PATCH;
import retrofit2.http.Path;
+import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.Url;
@@ -65,15 +67,15 @@ public FileSharesInner(Retrofit retrofit, StorageManagementClientImpl client) {
interface FileSharesService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares")
- Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$maxpagesize") String maxpagesize, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$maxpagesize") String maxpagesize, @Query("$filter") String filter, @Query("$expand") ListSharesExpand expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares create" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}")
- Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FileShareInner fileShare, @Header("User-Agent") String userAgent);
+ Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Body FileShareInner fileShare, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}")
- Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body FileShareInner fileShare, @Header("User-Agent") String userAgent);
+ Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Body FileShareInner fileShare, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}")
@@ -83,6 +85,10 @@ interface FileSharesService {
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", method = "DELETE", hasBody = true)
Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares restore" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore")
+ Observable> restore(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("shareName") String shareName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DeletedShare deletedShare, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storage.v2019_06_01.FileShares listNext" })
@GET
Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -193,7 +199,8 @@ public Observable>> listSinglePageAsync
}
final String maxpagesize = null;
final String filter = null;
- return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, this.client.acceptLanguage(), this.client.userAgent())
+ final ListSharesExpand expand = null;
+ return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
@@ -214,13 +221,14 @@ public Observable>> call(Response list(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) {
- ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter).toBlocking().single();
+ public PagedList list(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListSharesExpand expand) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter, expand).toBlocking().single();
return new PagedList(response.body()) {
@Override
public Page nextPage(String nextPageLink) {
@@ -236,13 +244,14 @@ public Page nextPage(String nextPageLink) {
* @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 maxpagesize Optional. Specified maximum number of shares that can be included in the list.
* @param filter Optional. When specified, only share names starting with the filter will be listed.
+ * @param expand Optional, used to expand the properties within share's properties. Possible values include: 'deleted'
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListOperationCallback serviceCallback) {
+ public ServiceFuture> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListSharesExpand expand, final ListOperationCallback serviceCallback) {
return AzureServiceFuture.fromPageResponse(
- listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter),
+ listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter, expand),
new Func1>>>() {
@Override
public Observable>> call(String nextPageLink) {
@@ -259,11 +268,12 @@ public Observable>> call(String nextPag
* @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 maxpagesize Optional. Specified maximum number of shares that can be included in the list.
* @param filter Optional. When specified, only share names starting with the filter will be listed.
+ * @param expand Optional, used to expand the properties within share's properties. Possible values include: 'deleted'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<FileShareItemInner> object
*/
- public Observable> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) {
- return listWithServiceResponseAsync(resourceGroupName, accountName, maxpagesize, filter)
+ public Observable> listAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListSharesExpand expand) {
+ return listWithServiceResponseAsync(resourceGroupName, accountName, maxpagesize, filter, expand)
.map(new Func1>, Page>() {
@Override
public Page call(ServiceResponse> response) {
@@ -279,11 +289,12 @@ public Page call(ServiceResponse> r
* @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 maxpagesize Optional. Specified maximum number of shares that can be included in the list.
* @param filter Optional. When specified, only share names starting with the filter will be listed.
+ * @param expand Optional, used to expand the properties within share's properties. Possible values include: 'deleted'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<FileShareItemInner> object
*/
- public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) {
- return listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter)
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListSharesExpand expand) {
+ return listSinglePageAsync(resourceGroupName, accountName, maxpagesize, filter, expand)
.concatMap(new Func1>, Observable>>>() {
@Override
public Observable>> call(ServiceResponse> page) {
@@ -303,10 +314,11 @@ public Observable>> call(ServiceRespons
ServiceResponse> * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
ServiceResponse> * @param maxpagesize Optional. Specified maximum number of shares that can be included in the list.
ServiceResponse> * @param filter Optional. When specified, only share names starting with the filter will be listed.
+ ServiceResponse> * @param expand Optional, used to expand the properties within share's properties. Possible values include: 'deleted'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<FileShareItemInner> object wrapped in {@link ServiceResponse} if successful.
*/
- public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter) {
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final String accountName, final String maxpagesize, final String filter, final ListSharesExpand expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -319,7 +331,7 @@ public Observable>> listSinglePageAsync
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, this.client.acceptLanguage(), this.client.userAgent())
+ return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), maxpagesize, filter, expand, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>>() {
@Override
public Observable>> call(Response response) {
@@ -346,13 +358,14 @@ private ServiceResponse> listDelegate(Response createAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
+ public ServiceFuture createAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, shareName, fileShare), serviceCallback);
}
/**
@@ -375,11 +389,12 @@ public ServiceFuture createAsync(String resourceGroupName, Strin
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param fileShare Properties of the file share to create.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable createAsync(String resourceGroupName, String accountName, String shareName) {
- return createWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() {
+ public Observable createAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare) {
+ return createWithServiceResponseAsync(resourceGroupName, accountName, shareName, fileShare).map(new Func1, FileShareInner>() {
@Override
public FileShareInner call(ServiceResponse response) {
return response.body();
@@ -393,10 +408,11 @@ public FileShareInner call(ServiceResponse response) {
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param fileShare Properties of the file share to create.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -409,15 +425,14 @@ public Observable> createWithServiceResponseAsyn
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
+ if (fileShare == null) {
+ throw new IllegalArgumentException("Parameter fileShare 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 Map metadata = null;
- final Integer shareQuota = null;
- FileShareInner fileShare = new FileShareInner();
- fileShare.withMetadata(null);
- fileShare.withShareQuota(null);
- return service.create(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent())
+ Validator.validate(fileShare);
+ return service.create(resourceGroupName, accountName, shareName, this.client.subscriptionId(), fileShare, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -431,52 +446,57 @@ public Observable> call(Response r
});
}
+ private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
/**
- * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
+ * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
+ * @param fileShare Properties to update for the file share.
* @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 FileShareInner object if successful.
*/
- public FileShareInner create(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
- return createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).toBlocking().single().body();
+ public FileShareInner update(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare) {
+ return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, fileShare).toBlocking().single().body();
}
/**
- * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
+ * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
+ * @param fileShare Properties to update for the file share.
* @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 createAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota), serviceCallback);
+ public ServiceFuture updateAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, fileShare), serviceCallback);
}
/**
- * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
+ * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
+ * @param fileShare Properties to update for the file share.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable createAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
- return createWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).map(new Func1, FileShareInner>() {
+ public Observable updateAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare) {
+ return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, fileShare).map(new Func1, FileShareInner>() {
@Override
public FileShareInner call(ServiceResponse response) {
return response.body();
@@ -485,17 +505,16 @@ public FileShareInner call(ServiceResponse response) {
}
/**
- * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
+ * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @param shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
+ * @param fileShare Properties to update for the file share.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable> createWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, FileShareInner fileShare) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -508,19 +527,19 @@ public Observable> createWithServiceResponseAsyn
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
+ if (fileShare == null) {
+ throw new IllegalArgumentException("Parameter fileShare is required and cannot be null.");
+ }
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- Validator.validate(metadata);
- FileShareInner fileShare = new FileShareInner();
- fileShare.withMetadata(metadata);
- fileShare.withShareQuota(shareQuota);
- return service.create(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent())
+ Validator.validate(fileShare);
+ return service.update(resourceGroupName, accountName, shareName, this.client.subscriptionId(), fileShare, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = createDelegate(response);
+ ServiceResponse clientResponse = updateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -529,16 +548,15 @@ public Observable> call(Response r
});
}
- private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .register(201, new TypeToken() { }.getType())
.registerError(CloudException.class)
.build(response);
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Gets properties of a specified share.
*
* @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.
@@ -548,12 +566,12 @@ private ServiceResponse createDelegate(Response re
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the FileShareInner object if successful.
*/
- public FileShareInner update(String resourceGroupName, String accountName, String shareName) {
- return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
+ public FileShareInner get(String resourceGroupName, String accountName, String shareName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Gets properties of a specified share.
*
* @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.
@@ -562,12 +580,12 @@ public FileShareInner update(String resourceGroupName, String accountName, Strin
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture updateAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
+ public ServiceFuture getAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Gets properties of a specified share.
*
* @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.
@@ -575,8 +593,8 @@ public ServiceFuture updateAsync(String resourceGroupName, Strin
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable updateAsync(String resourceGroupName, String accountName, String shareName) {
- return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() {
+ public Observable getAsync(String resourceGroupName, String accountName, String shareName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() {
@Override
public FileShareInner call(ServiceResponse response) {
return response.body();
@@ -585,7 +603,7 @@ public FileShareInner call(ServiceResponse response) {
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Gets properties of a specified share.
*
* @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.
@@ -593,7 +611,7 @@ public FileShareInner call(ServiceResponse response) {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the FileShareInner object
*/
- public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -609,17 +627,12 @@ public Observable> updateWithServiceResponseAsyn
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- final Map metadata = null;
- final Integer shareQuota = null;
- FileShareInner fileShare = new FileShareInner();
- fileShare.withMetadata(null);
- fileShare.withShareQuota(null);
- return service.update(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent())
+ return service.get(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = updateDelegate(response);
+ ServiceResponse clientResponse = getDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -628,71 +641,69 @@ public Observable> call(Response r
});
}
+ private ServiceResponse getDelegate(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);
+ }
+
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Deletes specified share under its 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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
* @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 FileShareInner object if successful.
*/
- public FileShareInner update(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
- return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).toBlocking().single().body();
+ public void delete(String resourceGroupName, String accountName, String shareName) {
+ deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Deletes specified share under its 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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
* @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 updateAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota), serviceCallback);
+ public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Deletes specified share under its 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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the FileShareInner object
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable updateAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
- return updateWithServiceResponseAsync(resourceGroupName, accountName, shareName, metadata, shareQuota).map(new Func1, FileShareInner>() {
+ public Observable deleteAsync(String resourceGroupName, String accountName, String shareName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, Void>() {
@Override
- public FileShareInner call(ServiceResponse response) {
+ public Void call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
+ * Deletes specified share under its 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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- * @param metadata A name-value pair to associate with the share as metadata.
- * @param shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the FileShareInner object
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable> updateWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName, Map metadata, Integer shareQuota) {
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -708,16 +719,12 @@ public Observable> updateWithServiceResponseAsyn
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- Validator.validate(metadata);
- FileShareInner fileShare = new FileShareInner();
- fileShare.withMetadata(metadata);
- fileShare.withShareQuota(shareQuota);
- return service.update(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), fileShare, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.delete(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = updateDelegate(response);
+ ServiceResponse clientResponse = deleteDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -726,15 +733,16 @@ public Observable> call(Response r
});
}
- private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
+ private ServiceResponse deleteDelegate(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);
}
/**
- * Gets properties of a specified share.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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.
@@ -742,14 +750,13 @@ private ServiceResponse updateDelegate(Response re
* @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 FileShareInner object if successful.
*/
- public FileShareInner get(String resourceGroupName, String accountName, String shareName) {
- return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
+ public void restore(String resourceGroupName, String accountName, String shareName) {
+ restoreWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
}
/**
- * Gets properties of a specified share.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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.
@@ -758,38 +765,38 @@ public FileShareInner get(String resourceGroupName, String accountName, String s
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture getAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
+ public ServiceFuture restoreAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(restoreWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
}
/**
- * Gets properties of a specified share.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the FileShareInner object
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable getAsync(String resourceGroupName, String accountName, String shareName) {
- return getWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, FileShareInner>() {
+ public Observable restoreAsync(String resourceGroupName, String accountName, String shareName) {
+ return restoreWithServiceResponseAsync(resourceGroupName, accountName, shareName).map(new Func1, Void>() {
@Override
- public FileShareInner call(ServiceResponse response) {
+ public Void call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Gets properties of a specified share.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the FileShareInner object
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
+ public Observable> restoreWithServiceResponseAsync(String resourceGroupName, String accountName, String shareName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
@@ -805,12 +812,17 @@ public Observable> getWithServiceResponseAsync(S
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
- return service.get(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ final String deletedShareName = null;
+ final String deletedShareVersion = null;
+ DeletedShare deletedShare = new DeletedShare();
+ deletedShare.withDeletedShareName(null);
+ deletedShare.withDeletedShareVersion(null);
+ return service.restore(resourceGroupName, accountName, shareName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), deletedShare, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = getDelegate(response);
+ ServiceResponse clientResponse = restoreDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -819,52 +831,51 @@ public Observable> call(Response r
});
}
- private ServiceResponse getDelegate(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 specified share under its account.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param deletedShareName Required. Identify the name of the deleted share that will be restored.
+ * @param deletedShareVersion Required. Identify the version of the deleted share that will be restored.
* @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 delete(String resourceGroupName, String accountName, String shareName) {
- deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName).toBlocking().single().body();
+ public void restore(String resourceGroupName, String accountName, String shareName, String deletedShareName, String deletedShareVersion) {
+ restoreWithServiceResponseAsync(resourceGroupName, accountName, shareName, deletedShareName, deletedShareVersion).toBlocking().single().body();
}
/**
- * Deletes specified share under its account.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param deletedShareName Required. Identify the name of the deleted share that will be restored.
+ * @param deletedShareVersion Required. Identify the version of the deleted share that will be restored.
* @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 deleteAsync(String resourceGroupName, String accountName, String shareName, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, shareName), serviceCallback);
+ public ServiceFuture restoreAsync(String resourceGroupName, String accountName, String shareName, String deletedShareName, String deletedShareVersion, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(restoreWithServiceResponseAsync(resourceGroupName, accountName, shareName, deletedShareName, deletedShareVersion), serviceCallback);
}
/**
- * Deletes specified share under its account.
+ * Restore a file share within a valid retention days if share soft delete is enabled.
*
* @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 shareName The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ * @param deletedShareName Required. Identify the name of the deleted share that will be restored.
+ * @param deletedShareVersion Required. Identify the version of the deleted share that will be restored.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
- public Observable