#[non_exhaustive]pub struct RestoreDatabaseMetadata {
pub name: String,
pub source_type: RestoreSourceType,
pub progress: Option<OperationProgress>,
pub cancel_time: Option<Timestamp>,
pub optimize_database_operation_name: String,
pub source_info: Option<SourceInfo>,
/* private fields */
}
Expand description
Metadata type for the long-running operation returned by RestoreDatabase.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
Name of the database being created and restored to.
source_type: RestoreSourceType
The type of the restore source.
progress: Option<OperationProgress>
The progress of the RestoreDatabase operation.
cancel_time: Option<Timestamp>
The time at which cancellation of this operation was received.
[Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not guaranteed.
Clients can use
[Operations.GetOperation][google.longrunning.Operations.GetOperation] or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a
google.rpc.Status.code of 1, corresponding to
Code.CANCELLED
.
optimize_database_operation_name: String
If exists, the name of the long-running operation that will be used to
track the post-restore optimization process to optimize the performance of
the restored database, and remove the dependency on the restore source.
The name is of the form
projects/<project>/instances/<instance>/databases/<database>/operations/<operation>
where the <database> is the name of database being created and restored to.
The metadata type of the long-running operation is
OptimizeRestoredDatabaseMetadata.
This long-running operation will be automatically created by the system
after the RestoreDatabase long-running operation completes successfully.
This operation will not be created if the restore was not successful.
source_info: Option<SourceInfo>
Information about the source used to restore the database, as specified by
source
in
RestoreDatabaseRequest.
Implementations§
Source§impl RestoreDatabaseMetadata
impl RestoreDatabaseMetadata
pub fn new() -> Self
Sourcepub fn set_source_type<T: Into<RestoreSourceType>>(self, v: T) -> Self
pub fn set_source_type<T: Into<RestoreSourceType>>(self, v: T) -> Self
Sets the value of source_type.
Sourcepub fn set_progress<T>(self, v: T) -> Selfwhere
T: Into<OperationProgress>,
pub fn set_progress<T>(self, v: T) -> Selfwhere
T: Into<OperationProgress>,
Sets the value of progress.
Sourcepub fn set_or_clear_progress<T>(self, v: Option<T>) -> Selfwhere
T: Into<OperationProgress>,
pub fn set_or_clear_progress<T>(self, v: Option<T>) -> Selfwhere
T: Into<OperationProgress>,
Sets or clears the value of progress.
Sourcepub fn set_cancel_time<T>(self, v: T) -> Self
pub fn set_cancel_time<T>(self, v: T) -> Self
Sets the value of cancel_time.
Sourcepub fn set_or_clear_cancel_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cancel_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of cancel_time.
Sourcepub fn set_optimize_database_operation_name<T: Into<String>>(self, v: T) -> Self
pub fn set_optimize_database_operation_name<T: Into<String>>(self, v: T) -> Self
Sets the value of optimize_database_operation_name.
Sourcepub fn set_source_info<T: Into<Option<SourceInfo>>>(self, v: T) -> Self
pub fn set_source_info<T: Into<Option<SourceInfo>>>(self, v: T) -> Self
Sets the value of source_info.
Note that all the setters affecting source_info
are mutually
exclusive.
Sourcepub fn backup_info(&self) -> Option<&Box<BackupInfo>>
pub fn backup_info(&self) -> Option<&Box<BackupInfo>>
The value of source_info
if it holds a BackupInfo
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_backup_info<T: Into<Box<BackupInfo>>>(self, v: T) -> Self
pub fn set_backup_info<T: Into<Box<BackupInfo>>>(self, v: T) -> Self
Sets the value of source_info
to hold a BackupInfo
.
Note that all the setters affecting source_info
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for RestoreDatabaseMetadata
impl Clone for RestoreDatabaseMetadata
Source§fn clone(&self) -> RestoreDatabaseMetadata
fn clone(&self) -> RestoreDatabaseMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more