From f1c5800a64612b43fc3c3df0a69be1d7d6fac4bd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 13 Dec 2018 17:55:27 +0000 Subject: [PATCH] Generated from 9d8ee581a6a578917bf10678c5d69d7e08d57c7f Updating managed database swagger --- .../v2017_03_01_preview/ManagedDatabase.java | 54 +++++++++++++- .../ManagedDatabaseCreateMode.java | 3 + .../ManagedDatabaseStatus.java | 3 + .../ManagedDatabaseUpdate.java | 71 +++++++++++++++++-- .../v2017_03_01_preview/ManagedDatabases.java | 2 +- .../implementation/ManagedDatabaseImpl.java | 30 ++++++++ .../implementation/ManagedDatabaseInner.java | 71 +++++++++++++++++-- .../implementation/ManagedDatabasesInner.java | 16 ++--- 8 files changed, 225 insertions(+), 25 deletions(-) diff --git a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java index 16b255adeb70..4c92e14b53fd 100644 --- a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java +++ b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java @@ -74,6 +74,16 @@ public interface ManagedDatabase extends HasInner, Indexab */ String name(); + /** + * @return the recoverableDatabaseId value. + */ + String recoverableDatabaseId(); + + /** + * @return the restorableDroppedDatabaseId value. + */ + String restorableDroppedDatabaseId(); + /** * @return the restorePointInTime value. */ @@ -175,6 +185,26 @@ interface WithCreateMode { WithCreate withCreateMode(ManagedDatabaseCreateMode createMode); } + /** + * The stage of the manageddatabase definition allowing to specify RecoverableDatabaseId. + */ + interface WithRecoverableDatabaseId { + /** + * Specifies recoverableDatabaseId. + */ + WithCreate withRecoverableDatabaseId(String recoverableDatabaseId); + } + + /** + * The stage of the manageddatabase definition allowing to specify RestorableDroppedDatabaseId. + */ + interface WithRestorableDroppedDatabaseId { + /** + * Specifies restorableDroppedDatabaseId. + */ + WithCreate withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId); + } + /** * The stage of the manageddatabase definition allowing to specify RestorePointInTime. */ @@ -230,13 +260,13 @@ interface WithTags { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags { + interface WithCreate extends Creatable, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags { } } /** * The template for a ManagedDatabase update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags { + interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags { } /** @@ -273,6 +303,26 @@ interface WithCreateMode { Update withCreateMode(ManagedDatabaseCreateMode createMode); } + /** + * The stage of the manageddatabase update allowing to specify RecoverableDatabaseId. + */ + interface WithRecoverableDatabaseId { + /** + * Specifies recoverableDatabaseId. + */ + Update withRecoverableDatabaseId(String recoverableDatabaseId); + } + + /** + * The stage of the manageddatabase update allowing to specify RestorableDroppedDatabaseId. + */ + interface WithRestorableDroppedDatabaseId { + /** + * Specifies restorableDroppedDatabaseId. + */ + Update withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId); + } + /** * The stage of the manageddatabase update allowing to specify RestorePointInTime. */ diff --git a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java index 401fce50ffa2..f54d0ace4220 100644 --- a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java +++ b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java @@ -25,6 +25,9 @@ public final class ManagedDatabaseCreateMode extends ExpandableStringEnum listByInstanceAsync(final String resourceGroupName, final String managedInstanceName); /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. diff --git a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java index 19696f74c306..07ca0dfe8d74 100644 --- a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java +++ b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java @@ -146,6 +146,16 @@ public String name() { return this.inner().name(); } + @Override + public String recoverableDatabaseId() { + return this.inner().recoverableDatabaseId(); + } + + @Override + public String restorableDroppedDatabaseId() { + return this.inner().restorableDroppedDatabaseId(); + } + @Override public DateTime restorePointInTime() { return this.inner().restorePointInTime(); @@ -224,6 +234,26 @@ public ManagedDatabaseImpl withCreateMode(ManagedDatabaseCreateMode createMode) return this; } + @Override + public ManagedDatabaseImpl withRecoverableDatabaseId(String recoverableDatabaseId) { + if (isInCreateMode()) { + this.inner().withRecoverableDatabaseId(recoverableDatabaseId); + } else { + this.updateParameter.withRecoverableDatabaseId(recoverableDatabaseId); + } + return this; + } + + @Override + public ManagedDatabaseImpl withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) { + if (isInCreateMode()) { + this.inner().withRestorableDroppedDatabaseId(restorableDroppedDatabaseId); + } else { + this.updateParameter.withRestorableDroppedDatabaseId(restorableDroppedDatabaseId); + } + return this; + } + @Override public ManagedDatabaseImpl withRestorePointInTime(DateTime restorePointInTime) { if (isInCreateMode()) { diff --git a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java index 9f704415711c..d02e6a1de06e 100644 --- a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java +++ b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java @@ -28,8 +28,8 @@ public class ManagedDatabaseInner extends Resource { private String collation; /** - * Status for the database. Possible values include: 'Online', 'Offline', - * 'Shutdown', 'Creating', 'Inaccessible'. + * Status of the database. Possible values include: 'Online', 'Offline', + * 'Shutdown', 'Creating', 'Inaccessible', 'Updating'. */ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) private ManagedDatabaseStatus status; @@ -73,8 +73,11 @@ public class ManagedDatabaseInner extends Resource { * SourceDatabaseName, SourceManagedInstanceName and PointInTime must be * specified. RestoreExternalBackup: Create a database by restoring from * external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore'. + * StorageContainerSasToken must be specified. Recovery: Creates a database + * by restoring a geo-replicated backup. RecoverableDatabaseId must be + * specified as the recoverable database resource ID to restore. Possible + * values include: 'Default', 'RestoreExternalBackup', + * 'PointInTimeRestore', 'Recovery'. */ @JsonProperty(value = "properties.createMode") private ManagedDatabaseCreateMode createMode; @@ -94,6 +97,13 @@ public class ManagedDatabaseInner extends Resource { @JsonProperty(value = "properties.sourceDatabaseId") private String sourceDatabaseId; + /** + * The restorable dropped database resource id to restore when creating + * this database. + */ + @JsonProperty(value = "properties.restorableDroppedDatabaseId") + private String restorableDroppedDatabaseId; + /** * Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. @@ -108,6 +118,13 @@ public class ManagedDatabaseInner extends Resource { @JsonProperty(value = "properties.failoverGroupId", access = JsonProperty.Access.WRITE_ONLY) private String failoverGroupId; + /** + * The resource identifier of the recoverable database associated with + * create operation of this database. + */ + @JsonProperty(value = "properties.recoverableDatabaseId") + private String recoverableDatabaseId; + /** * Get collation of the managed database. * @@ -129,7 +146,7 @@ public ManagedDatabaseInner withCollation(String collation) { } /** - * Get status for the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible'. + * Get status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'. * * @return the status value */ @@ -205,7 +222,7 @@ public ManagedDatabaseInner withCatalogCollation(CatalogCollationType catalogCol } /** - * Get managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore'. + * Get managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'. * * @return the createMode value */ @@ -214,7 +231,7 @@ public ManagedDatabaseCreateMode createMode() { } /** - * Set managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore'. + * Set managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'. * * @param createMode the createMode value to set * @return the ManagedDatabaseInner object itself. @@ -264,6 +281,26 @@ public ManagedDatabaseInner withSourceDatabaseId(String sourceDatabaseId) { return this; } + /** + * Get the restorable dropped database resource id to restore when creating this database. + * + * @return the restorableDroppedDatabaseId value + */ + public String restorableDroppedDatabaseId() { + return this.restorableDroppedDatabaseId; + } + + /** + * Set the restorable dropped database resource id to restore when creating this database. + * + * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set + * @return the ManagedDatabaseInner object itself. + */ + public ManagedDatabaseInner withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) { + this.restorableDroppedDatabaseId = restorableDroppedDatabaseId; + return this; + } + /** * Get conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. * @@ -293,4 +330,24 @@ public String failoverGroupId() { return this.failoverGroupId; } + /** + * Get the resource identifier of the recoverable database associated with create operation of this database. + * + * @return the recoverableDatabaseId value + */ + public String recoverableDatabaseId() { + return this.recoverableDatabaseId; + } + + /** + * Set the resource identifier of the recoverable database associated with create operation of this database. + * + * @param recoverableDatabaseId the recoverableDatabaseId value to set + * @return the ManagedDatabaseInner object itself. + */ + public ManagedDatabaseInner withRecoverableDatabaseId(String recoverableDatabaseId) { + this.recoverableDatabaseId = recoverableDatabaseId; + return this; + } + } diff --git a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java index 978f15b2b56c..db23e9b7f3ba 100644 --- a/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java +++ b/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java @@ -688,7 +688,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respon } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -702,7 +702,7 @@ public void delete(String resourceGroupName, String managedInstanceName, String } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -716,7 +716,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String managedI } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -734,7 +734,7 @@ public Void call(ServiceResponse response) { } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -763,7 +763,7 @@ public Observable> deleteWithServiceResponseAsync(String r } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -777,7 +777,7 @@ public void beginDelete(String resourceGroupName, String managedInstanceName, St } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -791,7 +791,7 @@ public ServiceFuture beginDeleteAsync(String resourceGroupName, String man } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. @@ -809,7 +809,7 @@ public Void call(ServiceResponse response) { } /** - * Deletes the managed database. + * Deletes a managed database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance.