#[non_exhaustive]pub struct RestoreDatabaseRequest {
pub parent: String,
pub database_id: String,
pub encryption_config: Option<RestoreDatabaseEncryptionConfig>,
pub source: Option<Source>,
/* private fields */
}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: StringRequired. 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: StringRequired. 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
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
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.
§Example
let x = RestoreDatabaseRequest::new().set_database_id("example");Sourcepub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<RestoreDatabaseEncryptionConfig>,
pub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<RestoreDatabaseEncryptionConfig>,
Sets the value of encryption_config.
§Example
use google_cloud_spanner_admin_database_v1::model::RestoreDatabaseEncryptionConfig;
let x = RestoreDatabaseRequest::new().set_encryption_config(RestoreDatabaseEncryptionConfig::default()/* use setters */);Sourcepub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RestoreDatabaseEncryptionConfig>,
pub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RestoreDatabaseEncryptionConfig>,
Sets or clears the value of encryption_config.
§Example
use google_cloud_spanner_admin_database_v1::model::RestoreDatabaseEncryptionConfig;
let x = RestoreDatabaseRequest::new().set_or_clear_encryption_config(Some(RestoreDatabaseEncryptionConfig::default()/* use setters */));
let x = RestoreDatabaseRequest::new().set_or_clear_encryption_config(None::<RestoreDatabaseEncryptionConfig>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sourcepub fn backup(&self) -> Option<&String>
pub fn 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
Trait Implementations§
Source§impl Clone for RestoreDatabaseRequest
impl Clone for RestoreDatabaseRequest
Source§fn clone(&self) -> RestoreDatabaseRequest
fn clone(&self) -> RestoreDatabaseRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestoreDatabaseRequest
impl Debug for RestoreDatabaseRequest
Source§impl Default for RestoreDatabaseRequest
impl Default for RestoreDatabaseRequest
Source§fn default() -> RestoreDatabaseRequest
fn default() -> RestoreDatabaseRequest
Source§impl Message for RestoreDatabaseRequest
impl Message for RestoreDatabaseRequest
Source§impl PartialEq for RestoreDatabaseRequest
impl PartialEq for RestoreDatabaseRequest
Source§fn eq(&self, other: &RestoreDatabaseRequest) -> bool
fn eq(&self, other: &RestoreDatabaseRequest) -> bool
self and other values to be equal, and is used by ==.