Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ public interface ManagedDatabase extends HasInner<ManagedDatabaseInner>, Indexab
*/
String name();

/**
* @return the recoverableDatabaseId value.
*/
String recoverableDatabaseId();

/**
* @return the restorableDroppedDatabaseId value.
*/
String restorableDroppedDatabaseId();

/**
* @return the restorePointInTime value.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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<ManagedDatabase>, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags {
interface WithCreate extends Creatable<ManagedDatabase>, 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<ManagedDatabase>, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags {
interface Update extends Appliable<ManagedDatabase>, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags {
}

/**
Expand Down Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public final class ManagedDatabaseCreateMode extends ExpandableStringEnum<Manage
/** Static value PointInTimeRestore for ManagedDatabaseCreateMode. */
public static final ManagedDatabaseCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore");

/** Static value Recovery for ManagedDatabaseCreateMode. */
public static final ManagedDatabaseCreateMode RECOVERY = fromString("Recovery");

/**
* Creates or finds a ManagedDatabaseCreateMode from its string representation.
* @param name a name to look for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public final class ManagedDatabaseStatus extends ExpandableStringEnum<ManagedDat
/** Static value Inaccessible for ManagedDatabaseStatus. */
public static final ManagedDatabaseStatus INACCESSIBLE = fromString("Inaccessible");

/** Static value Updating for ManagedDatabaseStatus. */
public static final ManagedDatabaseStatus UPDATING = fromString("Updating");

/**
* Creates or finds a ManagedDatabaseStatus from its string representation.
* @param name a name to look for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public class ManagedDatabaseUpdate {
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;
Expand Down Expand Up @@ -70,8 +70,11 @@ public class ManagedDatabaseUpdate {
* 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;
Expand All @@ -91,6 +94,13 @@ public class ManagedDatabaseUpdate {
@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.
Expand All @@ -105,6 +115,13 @@ public class ManagedDatabaseUpdate {
@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;

/**
* Resource tags.
*/
Expand Down Expand Up @@ -132,7 +149,7 @@ public ManagedDatabaseUpdate 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
*/
Expand Down Expand Up @@ -208,7 +225,7 @@ public ManagedDatabaseUpdate withCatalogCollation(CatalogCollationType catalogCo
}

/**
* 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
*/
Expand All @@ -217,7 +234,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 ManagedDatabaseUpdate object itself.
Expand Down Expand Up @@ -267,6 +284,26 @@ public ManagedDatabaseUpdate 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 ManagedDatabaseUpdate object itself.
*/
public ManagedDatabaseUpdate withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) {
this.restorableDroppedDatabaseId = restorableDroppedDatabaseId;
return this;
}

/**
* Get conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
*
Expand Down Expand Up @@ -296,6 +333,26 @@ 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 ManagedDatabaseUpdate object itself.
*/
public ManagedDatabaseUpdate withRecoverableDatabaseId(String recoverableDatabaseId) {
this.recoverableDatabaseId = recoverableDatabaseId;
return this;
}

/**
* Get resource tags.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface ManagedDatabases {
Observable<ManagedDatabase> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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()) {
Expand Down
Loading