Struct google_api_proto::google::cloud::sql::v1beta4::ImportContext
source · pub struct ImportContext {
pub uri: String,
pub database: String,
pub kind: String,
pub file_type: i32,
pub csv_import_options: Option<SqlCsvImportOptions>,
pub import_user: String,
pub bak_import_options: Option<SqlBakImportOptions>,
pub sql_import_options: Option<SqlImportOptions>,
}
Expand description
Database instance import context.
Fields§
§uri: String
Path 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: String
The 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: String
This is always sql#importContext
.
file_type: i32
The file type for the specified uri.
SQL
: The file contains SQL statements.CSV
: The file contains CSV data.BAK
: The file contains backup data for a SQL Server instance.
csv_import_options: Option<SqlCsvImportOptions>
Options for importing data as CSV.
import_user: String
The 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
sourcepub fn file_type(&self) -> SqlFileType
pub fn file_type(&self) -> SqlFileType
Returns the enum value of file_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_file_type(&mut self, value: SqlFileType)
pub fn set_file_type(&mut self, value: SqlFileType)
Sets file_type
to the provided enum value.
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 moresource§impl Debug for ImportContext
impl Debug for ImportContext
source§impl Default for ImportContext
impl Default for ImportContext
source§impl Message for ImportContext
impl Message for ImportContext
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ImportContext
impl PartialEq for ImportContext
source§fn eq(&self, other: &ImportContext) -> bool
fn eq(&self, other: &ImportContext) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ImportContext
Auto Trait Implementations§
impl Freeze for ImportContext
impl RefUnwindSafe for ImportContext
impl Send for ImportContext
impl Sync for ImportContext
impl Unpin for ImportContext
impl UnwindSafe for ImportContext
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request