#[non_exhaustive]pub struct InstancesRestoreBackupRequest {
pub restore_backup_context: Option<RestoreBackupContext>,
pub backup: String,
pub backupdr_backup: String,
pub restore_instance_settings: Option<DatabaseInstance>,
pub restore_instance_clear_overrides_field_names: Vec<String>,
/* private fields */
}Expand description
Database instance restore backup request.
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.restore_backup_context: Option<RestoreBackupContext>Parameters required to perform the restore backup operation.
backup: StringThe name of the backup that’s used to restore a Cloud SQL instance: Format: projects/{project-id}/backups/{backup-uid}. Only one of restore_backup_context, backup, backupdr_backup can be passed to the input.
backupdr_backup: StringThe name of the backup that’s used to restore a Cloud SQL instance: Format: “projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}”. Only one of restore_backup_context, backup, backupdr_backup can be passed to the input.
restore_instance_settings: Option<DatabaseInstance>Optional. By using this parameter, Cloud SQL overrides any instance settings stored in the backup you are restoring from. You can’t change the instance’s major database version and you can only increase the disk size. You can use this field to restore new instances only. This field is not applicable for restore to existing instances.
restore_instance_clear_overrides_field_names: Vec<String>Optional. This field has the same purpose as restore_instance_settings, changes any instance settings stored in the backup you are restoring from. With the difference that these fields are cleared in the settings.
Implementations§
Source§impl InstancesRestoreBackupRequest
impl InstancesRestoreBackupRequest
pub fn new() -> Self
Sourcepub fn set_restore_backup_context<T>(self, v: T) -> Selfwhere
T: Into<RestoreBackupContext>,
pub fn set_restore_backup_context<T>(self, v: T) -> Selfwhere
T: Into<RestoreBackupContext>,
Sets the value of restore_backup_context.
§Example
use google_cloud_sql_v1::model::RestoreBackupContext;
let x = InstancesRestoreBackupRequest::new().set_restore_backup_context(RestoreBackupContext::default()/* use setters */);Sourcepub fn set_or_clear_restore_backup_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<RestoreBackupContext>,
pub fn set_or_clear_restore_backup_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<RestoreBackupContext>,
Sets or clears the value of restore_backup_context.
§Example
use google_cloud_sql_v1::model::RestoreBackupContext;
let x = InstancesRestoreBackupRequest::new().set_or_clear_restore_backup_context(Some(RestoreBackupContext::default()/* use setters */));
let x = InstancesRestoreBackupRequest::new().set_or_clear_restore_backup_context(None::<RestoreBackupContext>);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_backupdr_backup<T: Into<String>>(self, v: T) -> Self
pub fn set_backupdr_backup<T: Into<String>>(self, v: T) -> Self
Sets the value of backupdr_backup.
§Example
let x = InstancesRestoreBackupRequest::new().set_backupdr_backup("example");Sourcepub fn set_restore_instance_settings<T>(self, v: T) -> Selfwhere
T: Into<DatabaseInstance>,
pub fn set_restore_instance_settings<T>(self, v: T) -> Selfwhere
T: Into<DatabaseInstance>,
Sets the value of restore_instance_settings.
§Example
use google_cloud_sql_v1::model::DatabaseInstance;
let x = InstancesRestoreBackupRequest::new().set_restore_instance_settings(DatabaseInstance::default()/* use setters */);Sourcepub fn set_or_clear_restore_instance_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<DatabaseInstance>,
pub fn set_or_clear_restore_instance_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<DatabaseInstance>,
Sets or clears the value of restore_instance_settings.
§Example
use google_cloud_sql_v1::model::DatabaseInstance;
let x = InstancesRestoreBackupRequest::new().set_or_clear_restore_instance_settings(Some(DatabaseInstance::default()/* use setters */));
let x = InstancesRestoreBackupRequest::new().set_or_clear_restore_instance_settings(None::<DatabaseInstance>);Sourcepub fn set_restore_instance_clear_overrides_field_names<T, V>(
self,
v: T,
) -> Self
pub fn set_restore_instance_clear_overrides_field_names<T, V>( self, v: T, ) -> Self
Sets the value of restore_instance_clear_overrides_field_names.
§Example
let x = InstancesRestoreBackupRequest::new().set_restore_instance_clear_overrides_field_names(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for InstancesRestoreBackupRequest
impl Clone for InstancesRestoreBackupRequest
Source§fn clone(&self) -> InstancesRestoreBackupRequest
fn clone(&self) -> InstancesRestoreBackupRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for InstancesRestoreBackupRequest
impl Default for InstancesRestoreBackupRequest
Source§fn default() -> InstancesRestoreBackupRequest
fn default() -> InstancesRestoreBackupRequest
Source§impl PartialEq for InstancesRestoreBackupRequest
impl PartialEq for InstancesRestoreBackupRequest
Source§fn eq(&self, other: &InstancesRestoreBackupRequest) -> bool
fn eq(&self, other: &InstancesRestoreBackupRequest) -> bool
self and other values to be equal, and is used by ==.