#[non_exhaustive]pub struct ImportContext {
pub uri: String,
pub database: String,
pub kind: String,
pub file_type: SqlFileType,
pub csv_import_options: Option<SqlCsvImportOptions>,
pub import_user: String,
pub bak_import_options: Option<SqlBakImportOptions>,
pub sql_import_options: Option<SqlImportOptions>,
/* private fields */
}Expand description
Database instance import 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: StringPath to the import file in Cloud Storage, in the form
gs://bucketName/fileName. Compressed gzip files (.gz) are supported
when fileType is SQL. The instance must have
write permissions to the bucket and read access to the file.
database: StringThe target database for the import. If fileType is SQL, this field
is required only if the import file does not specify a database, and is
overridden by any database specification in the import file. If
fileType is CSV, one database must be specified.
kind: StringThis is always sql#importContext.
file_type: SqlFileTypeThe file type for the specified uri.`SQL: The file contains SQL statements. \CSV`: The file contains CSV data.
csv_import_options: Option<SqlCsvImportOptions>Options for importing data as CSV.
import_user: StringThe PostgreSQL user for this import operation. PostgreSQL instances only.
bak_import_options: Option<SqlBakImportOptions>Import parameters specific to SQL Server .BAK files
sql_import_options: Option<SqlImportOptions>Optional. Options for importing data from SQL statements.
Implementations§
Source§impl ImportContext
impl ImportContext
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
Sets the value of database.
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_csv_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlCsvImportOptions>,
pub fn set_csv_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlCsvImportOptions>,
Sets the value of csv_import_options.
Sourcepub fn set_or_clear_csv_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlCsvImportOptions>,
pub fn set_or_clear_csv_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlCsvImportOptions>,
Sets or clears the value of csv_import_options.
Sourcepub fn set_import_user<T: Into<String>>(self, v: T) -> Self
pub fn set_import_user<T: Into<String>>(self, v: T) -> Self
Sets the value of import_user.
Sourcepub fn set_bak_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlBakImportOptions>,
pub fn set_bak_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlBakImportOptions>,
Sets the value of bak_import_options.
Sourcepub fn set_or_clear_bak_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlBakImportOptions>,
pub fn set_or_clear_bak_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlBakImportOptions>,
Sets or clears the value of bak_import_options.
Sourcepub fn set_sql_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlImportOptions>,
pub fn set_sql_import_options<T>(self, v: T) -> Selfwhere
T: Into<SqlImportOptions>,
Sets the value of sql_import_options.
Sourcepub fn set_or_clear_sql_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlImportOptions>,
pub fn set_or_clear_sql_import_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlImportOptions>,
Sets or clears the value of sql_import_options.
Trait Implementations§
Source§impl Clone for ImportContext
impl Clone for ImportContext
Source§fn clone(&self) -> ImportContext
fn clone(&self) -> ImportContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more