#[non_exhaustive]pub struct RestoreFromCloudSQLRequest {
pub parent: String,
pub cluster_id: String,
pub cluster: Option<Cluster>,
pub source: Option<Source>,
/* private fields */
}Expand description
Message for registering Restoring from CloudSQL resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The location of the new cluster. For the required format, see the comment on Cluster.name field.
cluster_id: StringRequired. ID of the requesting object.
cluster: Option<Cluster>Required. The resource being created
source: Option<Source>The source CloudSQL resource to restore from.
Implementations§
Source§impl RestoreFromCloudSQLRequest
impl RestoreFromCloudSQLRequest
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_cluster_id<T: Into<String>>(self, v: T) -> Self
pub fn set_cluster_id<T: Into<String>>(self, v: T) -> Self
Sets the value of cluster_id.
§Example
ⓘ
let x = RestoreFromCloudSQLRequest::new().set_cluster_id("example");Sourcepub fn set_cluster<T>(self, v: T) -> Self
pub fn set_cluster<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_cluster<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cluster<T>(self, v: Option<T>) -> Self
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.
Note that all the setters affecting source are mutually
exclusive.
§Example
ⓘ
use google_cloud_alloydb_v1::model::CloudSQLBackupRunSource;
let x = RestoreFromCloudSQLRequest::new().set_source(Some(
google_cloud_alloydb_v1::model::restore_from_cloud_sql_request::Source::CloudsqlBackupRunSource(CloudSQLBackupRunSource::default().into())));Sourcepub fn cloudsql_backup_run_source(
&self,
) -> Option<&Box<CloudSQLBackupRunSource>>
pub fn cloudsql_backup_run_source( &self, ) -> Option<&Box<CloudSQLBackupRunSource>>
The value of source
if it holds a CloudsqlBackupRunSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_cloudsql_backup_run_source<T: Into<Box<CloudSQLBackupRunSource>>>(
self,
v: T,
) -> Self
pub fn set_cloudsql_backup_run_source<T: Into<Box<CloudSQLBackupRunSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a CloudsqlBackupRunSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_alloydb_v1::model::CloudSQLBackupRunSource;
let x = RestoreFromCloudSQLRequest::new().set_cloudsql_backup_run_source(CloudSQLBackupRunSource::default()/* use setters */);
assert!(x.cloudsql_backup_run_source().is_some());Trait Implementations§
Source§impl Clone for RestoreFromCloudSQLRequest
impl Clone for RestoreFromCloudSQLRequest
Source§fn clone(&self) -> RestoreFromCloudSQLRequest
fn clone(&self) -> RestoreFromCloudSQLRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RestoreFromCloudSQLRequest
impl Debug for RestoreFromCloudSQLRequest
Source§impl Default for RestoreFromCloudSQLRequest
impl Default for RestoreFromCloudSQLRequest
Source§fn default() -> RestoreFromCloudSQLRequest
fn default() -> RestoreFromCloudSQLRequest
Returns the “default value” for a type. Read more
Source§impl Message for RestoreFromCloudSQLRequest
impl Message for RestoreFromCloudSQLRequest
impl StructuralPartialEq for RestoreFromCloudSQLRequest
Auto Trait Implementations§
impl Freeze for RestoreFromCloudSQLRequest
impl RefUnwindSafe for RestoreFromCloudSQLRequest
impl Send for RestoreFromCloudSQLRequest
impl Sync for RestoreFromCloudSQLRequest
impl Unpin for RestoreFromCloudSQLRequest
impl UnsafeUnpin for RestoreFromCloudSQLRequest
impl UnwindSafe for RestoreFromCloudSQLRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more