#[non_exhaustive]pub struct ExportContext {
pub uri: String,
pub databases: Vec<String>,
pub kind: String,
pub sql_export_options: Option<SqlExportOptions>,
pub csv_export_options: Option<SqlCsvExportOptions>,
pub file_type: SqlFileType,
pub offload: Option<BoolValue>,
pub bak_export_options: Option<SqlBakExportOptions>,
/* private fields */
}Expand description
Database instance export context.
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.uri: StringThe path to the file in Google Cloud Storage where the export will be
stored. The URI is in the form gs://bucketName/fileName. If the file
already exists, the request succeeds, but the operation fails. If
fileType is SQL and the filename ends with .gz,
the contents are compressed.
databases: Vec<String>Databases to be exported.
MySQL instances: If
fileType is SQL and no database is specified, all
databases are exported, except for the mysql system database.
If fileType is CSV, you can specify one database,
either by using this property or by using the
csvExportOptions.selectQuery property, which takes precedence
over this property.
PostgreSQL instances: You must specify
one database to be exported. If fileType is CSV,
this database must match the one specified in the
csvExportOptions.selectQuery property.
SQL Server instances: You must specify one database to be exported, and the
fileType must be BAK.
kind: StringThis is always sql#exportContext.
sql_export_options: Option<SqlExportOptions>Options for exporting data as SQL statements.
csv_export_options: Option<SqlCsvExportOptions>Options for exporting data as CSV. MySQL and PostgreSQL
instances only.
file_type: SqlFileTypeThe file type for the specified uri.
offload: Option<BoolValue>Option for export offload.
bak_export_options: Option<SqlBakExportOptions>Options for exporting data as BAK files.
Implementations§
Source§impl ExportContext
impl ExportContext
pub fn new() -> Self
Sourcepub fn set_databases<T, V>(self, v: T) -> Self
pub fn set_databases<T, V>(self, v: T) -> Self
Sets the value of databases.
Sourcepub fn set_sql_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlExportOptions>,
pub fn set_sql_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlExportOptions>,
Sets the value of sql_export_options.
Sourcepub fn set_or_clear_sql_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlExportOptions>,
pub fn set_or_clear_sql_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlExportOptions>,
Sets or clears the value of sql_export_options.
Sourcepub fn set_csv_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlCsvExportOptions>,
pub fn set_csv_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlCsvExportOptions>,
Sets the value of csv_export_options.
Sourcepub fn set_or_clear_csv_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlCsvExportOptions>,
pub fn set_or_clear_csv_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlCsvExportOptions>,
Sets or clears the value of csv_export_options.
Sourcepub fn set_file_type<T: Into<SqlFileType>>(self, v: T) -> Self
pub fn set_file_type<T: Into<SqlFileType>>(self, v: T) -> Self
Sets the value of file_type.
Sourcepub fn set_offload<T>(self, v: T) -> Self
pub fn set_offload<T>(self, v: T) -> Self
Sets the value of offload.
Sourcepub fn set_or_clear_offload<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_offload<T>(self, v: Option<T>) -> Self
Sets or clears the value of offload.
Sourcepub fn set_bak_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlBakExportOptions>,
pub fn set_bak_export_options<T>(self, v: T) -> Selfwhere
T: Into<SqlBakExportOptions>,
Sets the value of bak_export_options.
Sourcepub fn set_or_clear_bak_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlBakExportOptions>,
pub fn set_or_clear_bak_export_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlBakExportOptions>,
Sets or clears the value of bak_export_options.
Trait Implementations§
Source§impl Clone for ExportContext
impl Clone for ExportContext
Source§fn clone(&self) -> ExportContext
fn clone(&self) -> ExportContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more