#[non_exhaustive]pub struct ExportClusterRequest {
pub name: String,
pub database: String,
pub destination: Option<Destination>,
pub export_options: Option<ExportOptions>,
/* private fields */
}Expand description
Export cluster 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.name: StringRequired. The resource name of the cluster.
database: StringRequired. Name of the database where the export command will be executed.
Note - Value provided should be the same as expected from
SELECT current_database(); and NOT as a resource reference.
destination: Option<Destination>Oneof field to support other destinations in future.
export_options: Option<ExportOptions>Required field to specify export file type and options.
Implementations§
Source§impl ExportClusterRequest
impl ExportClusterRequest
pub fn new() -> Self
Sourcepub fn set_database<T: Into<String>>(self, v: T) -> Self
pub fn set_database<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
pub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
Sets the value of destination.
Note that all the setters affecting destination are mutually
exclusive.
§Example
use google_cloud_alloydb_v1::model::GcsDestination;
let x = ExportClusterRequest::new().set_destination(Some(
google_cloud_alloydb_v1::model::export_cluster_request::Destination::GcsDestination(GcsDestination::default().into())));Sourcepub fn gcs_destination(&self) -> Option<&Box<GcsDestination>>
pub fn gcs_destination(&self) -> Option<&Box<GcsDestination>>
The value of destination
if it holds a GcsDestination, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_destination<T: Into<Box<GcsDestination>>>(self, v: T) -> Self
pub fn set_gcs_destination<T: Into<Box<GcsDestination>>>(self, v: T) -> Self
Sets the value of destination
to hold a GcsDestination.
Note that all the setters affecting destination are
mutually exclusive.
§Example
use google_cloud_alloydb_v1::model::GcsDestination;
let x = ExportClusterRequest::new().set_gcs_destination(GcsDestination::default()/* use setters */);
assert!(x.gcs_destination().is_some());Sourcepub fn set_export_options<T: Into<Option<ExportOptions>>>(self, v: T) -> Self
pub fn set_export_options<T: Into<Option<ExportOptions>>>(self, v: T) -> Self
Sets the value of export_options.
Note that all the setters affecting export_options are mutually
exclusive.
§Example
use google_cloud_alloydb_v1::model::export_cluster_request::CsvExportOptions;
let x = ExportClusterRequest::new().set_export_options(Some(
google_cloud_alloydb_v1::model::export_cluster_request::ExportOptions::CsvExportOptions(CsvExportOptions::default().into())));Sourcepub fn csv_export_options(&self) -> Option<&Box<CsvExportOptions>>
pub fn csv_export_options(&self) -> Option<&Box<CsvExportOptions>>
The value of export_options
if it holds a CsvExportOptions, None if the field is not set or
holds a different branch.
Sourcepub fn set_csv_export_options<T: Into<Box<CsvExportOptions>>>(
self,
v: T,
) -> Self
pub fn set_csv_export_options<T: Into<Box<CsvExportOptions>>>( self, v: T, ) -> Self
Sets the value of export_options
to hold a CsvExportOptions.
Note that all the setters affecting export_options are
mutually exclusive.
§Example
use google_cloud_alloydb_v1::model::export_cluster_request::CsvExportOptions;
let x = ExportClusterRequest::new().set_csv_export_options(CsvExportOptions::default()/* use setters */);
assert!(x.csv_export_options().is_some());
assert!(x.sql_export_options().is_none());Sourcepub fn sql_export_options(&self) -> Option<&Box<SqlExportOptions>>
pub fn sql_export_options(&self) -> Option<&Box<SqlExportOptions>>
The value of export_options
if it holds a SqlExportOptions, None if the field is not set or
holds a different branch.
Sourcepub fn set_sql_export_options<T: Into<Box<SqlExportOptions>>>(
self,
v: T,
) -> Self
pub fn set_sql_export_options<T: Into<Box<SqlExportOptions>>>( self, v: T, ) -> Self
Sets the value of export_options
to hold a SqlExportOptions.
Note that all the setters affecting export_options are
mutually exclusive.
§Example
use google_cloud_alloydb_v1::model::export_cluster_request::SqlExportOptions;
let x = ExportClusterRequest::new().set_sql_export_options(SqlExportOptions::default()/* use setters */);
assert!(x.sql_export_options().is_some());
assert!(x.csv_export_options().is_none());Trait Implementations§
Source§impl Clone for ExportClusterRequest
impl Clone for ExportClusterRequest
Source§fn clone(&self) -> ExportClusterRequest
fn clone(&self) -> ExportClusterRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more