#[non_exhaustive]pub struct RestoreDatabaseRequest {
pub parent: String,
pub database_id: String,
pub backup: String,
pub encryption_config: Option<EncryptionConfig>,
pub tags: HashMap<String, String>,
/* private fields */
}Expand description
The request message for FirestoreAdmin.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 project to restore the database in. Format is
projects/{project_id}.
database_id: StringRequired. The ID to use for the database, which will become the final component of the database’s resource name. This database ID must not be associated with an existing database.
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
“(default)” database ID is also valid.
backup: StringRequired. Backup to restore from. Must be from the same project as the parent.
The restored database will be created in the same location as the source backup.
Format is: projects/{project_id}/locations/{location}/backups/{backup}
encryption_config: Option<EncryptionConfig>Optional. Encryption configuration for the restored database.
If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.
Optional. Immutable. Tags to be bound to the restored database.
The tags should be provided in the format of
tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.
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
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_backup<T: Into<String>>(self, v: T) -> Self
pub fn set_backup<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
Sets the value of encryption_config.
§Example
use google_cloud_firestore_admin_v1::model::database::EncryptionConfig;
let x = RestoreDatabaseRequest::new().set_encryption_config(EncryptionConfig::default()/* use setters */);Sourcepub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
Sets or clears the value of encryption_config.
§Example
use google_cloud_firestore_admin_v1::model::database::EncryptionConfig;
let x = RestoreDatabaseRequest::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
let x = RestoreDatabaseRequest::new().set_or_clear_encryption_config(None::<EncryptionConfig>);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