#[non_exhaustive]pub struct RestoreDatabaseRequest {
pub parent: String,
pub database_id: String,
pub encryption_config: Option<RestoreDatabaseEncryptionConfig>,
pub source: Option<Source>,
}
Expand description
The request for 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.parent: String
Required. The name of the instance in which to create the
restored database. This instance must be in the same project and
have the same instance configuration as the instance containing
the source backup. Values are of the form
projects/<project>/instances/<instance>
.
database_id: String
Required. The id of the database to create and restore to. This
database must not already exist. The database_id
appended to
parent
forms the full database name of the form
projects/<project>/instances/<instance>/databases/<database_id>
.
encryption_config: Option<RestoreDatabaseEncryptionConfig>
Optional. An encryption configuration describing the encryption type and
key resources in Cloud KMS used to encrypt/decrypt the database to restore
to. If this field is not specified, the restored database will use the same
encryption configuration as the backup by default, namely
encryption_type
= USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION
.
source: Option<Source>
Required. The source from which to restore.
Implementations§
Source§impl RestoreDatabaseRequest
impl RestoreDatabaseRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_database_id<T: Into<String>>(self, v: T) -> Self
pub fn set_database_id<T: Into<String>>(self, v: T) -> Self
Sets the value of database_id.
Sourcepub fn set_encryption_config<T: Into<Option<RestoreDatabaseEncryptionConfig>>>(
self,
v: T,
) -> Self
pub fn set_encryption_config<T: Into<Option<RestoreDatabaseEncryptionConfig>>>( self, v: T, ) -> Self
Sets the value of encryption_config.
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source
.
Sourcepub fn get_backup(&self) -> Option<&String>
pub fn get_backup(&self) -> Option<&String>
The value of source
if it holds a Backup
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_backup<T: Into<String>>(self, v: T) -> Self
pub fn set_backup<T: Into<String>>(self, v: T) -> Self
Sets the value of source
to hold a Backup
.
Note that all the setters affecting source
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for RestoreDatabaseRequest
impl Clone for RestoreDatabaseRequest
Source§fn clone(&self) -> RestoreDatabaseRequest
fn clone(&self) -> RestoreDatabaseRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more