#[non_exhaustive]pub struct TranslationConfigDetails {
pub source_dialect: Option<Dialect>,
pub target_dialect: Option<Dialect>,
pub source_env: Option<SourceEnv>,
pub request_source: String,
pub target_types: Vec<String>,
pub source_location: Option<SourceLocation>,
pub target_location: Option<TargetLocation>,
pub output_name_mapping: Option<OutputNameMapping>,
/* private fields */
}Expand description
The translation config to capture necessary settings for a translation task and subtask.
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.source_dialect: Option<Dialect>The dialect of the input files.
target_dialect: Option<Dialect>The target dialect for the engine to translate the input to.
source_env: Option<SourceEnv>The default source environment values for the translation.
request_source: StringThe indicator to show translation request initiator.
target_types: Vec<String>The types of output to generate, e.g. sql, metadata etc. If not specified, a default set of targets will be generated. Some additional target types may be slower to generate. See the documentation for the set of available target types.
source_location: Option<SourceLocation>The chosen path where the source for input files will be found.
target_location: Option<TargetLocation>The chosen path where the destination for output files will be found.
output_name_mapping: Option<OutputNameMapping>The mapping of full SQL object names from their current state to the desired output.
Implementations§
Source§impl TranslationConfigDetails
impl TranslationConfigDetails
pub fn new() -> Self
Sourcepub fn set_source_dialect<T>(self, v: T) -> Self
pub fn set_source_dialect<T>(self, v: T) -> Self
Sets the value of source_dialect.
§Example
use google_cloud_bigquery_migration_v2::model::Dialect;
let x = TranslationConfigDetails::new().set_source_dialect(Dialect::default()/* use setters */);Sourcepub fn set_or_clear_source_dialect<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_dialect<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_dialect.
§Example
use google_cloud_bigquery_migration_v2::model::Dialect;
let x = TranslationConfigDetails::new().set_or_clear_source_dialect(Some(Dialect::default()/* use setters */));
let x = TranslationConfigDetails::new().set_or_clear_source_dialect(None::<Dialect>);Sourcepub fn set_target_dialect<T>(self, v: T) -> Self
pub fn set_target_dialect<T>(self, v: T) -> Self
Sets the value of target_dialect.
§Example
use google_cloud_bigquery_migration_v2::model::Dialect;
let x = TranslationConfigDetails::new().set_target_dialect(Dialect::default()/* use setters */);Sourcepub fn set_or_clear_target_dialect<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_dialect<T>(self, v: Option<T>) -> Self
Sets or clears the value of target_dialect.
§Example
use google_cloud_bigquery_migration_v2::model::Dialect;
let x = TranslationConfigDetails::new().set_or_clear_target_dialect(Some(Dialect::default()/* use setters */));
let x = TranslationConfigDetails::new().set_or_clear_target_dialect(None::<Dialect>);Sourcepub fn set_source_env<T>(self, v: T) -> Self
pub fn set_source_env<T>(self, v: T) -> Self
Sets the value of source_env.
§Example
use google_cloud_bigquery_migration_v2::model::SourceEnv;
let x = TranslationConfigDetails::new().set_source_env(SourceEnv::default()/* use setters */);Sourcepub fn set_or_clear_source_env<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_env<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_env.
§Example
use google_cloud_bigquery_migration_v2::model::SourceEnv;
let x = TranslationConfigDetails::new().set_or_clear_source_env(Some(SourceEnv::default()/* use setters */));
let x = TranslationConfigDetails::new().set_or_clear_source_env(None::<SourceEnv>);Sourcepub fn set_request_source<T: Into<String>>(self, v: T) -> Self
pub fn set_request_source<T: Into<String>>(self, v: T) -> Self
Sets the value of request_source.
§Example
let x = TranslationConfigDetails::new().set_request_source("example");Sourcepub fn set_target_types<T, V>(self, v: T) -> Self
pub fn set_target_types<T, V>(self, v: T) -> Self
Sets the value of target_types.
§Example
let x = TranslationConfigDetails::new().set_target_types(["a", "b", "c"]);Sourcepub fn set_source_location<T: Into<Option<SourceLocation>>>(self, v: T) -> Self
pub fn set_source_location<T: Into<Option<SourceLocation>>>(self, v: T) -> Self
Sets the value of source_location.
Note that all the setters affecting source_location are mutually
exclusive.
§Example
use google_cloud_bigquery_migration_v2::model::translation_config_details::SourceLocation;
let x = TranslationConfigDetails::new().set_source_location(Some(SourceLocation::GcsSourcePath("example".to_string())));Sourcepub fn gcs_source_path(&self) -> Option<&String>
pub fn gcs_source_path(&self) -> Option<&String>
The value of source_location
if it holds a GcsSourcePath, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_source_path<T: Into<String>>(self, v: T) -> Self
pub fn set_gcs_source_path<T: Into<String>>(self, v: T) -> Self
Sets the value of source_location
to hold a GcsSourcePath.
Note that all the setters affecting source_location are
mutually exclusive.
§Example
let x = TranslationConfigDetails::new().set_gcs_source_path("example");
assert!(x.gcs_source_path().is_some());Sourcepub fn set_target_location<T: Into<Option<TargetLocation>>>(self, v: T) -> Self
pub fn set_target_location<T: Into<Option<TargetLocation>>>(self, v: T) -> Self
Sets the value of target_location.
Note that all the setters affecting target_location are mutually
exclusive.
§Example
use google_cloud_bigquery_migration_v2::model::translation_config_details::TargetLocation;
let x = TranslationConfigDetails::new().set_target_location(Some(TargetLocation::GcsTargetPath("example".to_string())));Sourcepub fn gcs_target_path(&self) -> Option<&String>
pub fn gcs_target_path(&self) -> Option<&String>
The value of target_location
if it holds a GcsTargetPath, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_target_path<T: Into<String>>(self, v: T) -> Self
pub fn set_gcs_target_path<T: Into<String>>(self, v: T) -> Self
Sets the value of target_location
to hold a GcsTargetPath.
Note that all the setters affecting target_location are
mutually exclusive.
§Example
let x = TranslationConfigDetails::new().set_gcs_target_path("example");
assert!(x.gcs_target_path().is_some());Sourcepub fn set_output_name_mapping<T: Into<Option<OutputNameMapping>>>(
self,
v: T,
) -> Self
pub fn set_output_name_mapping<T: Into<Option<OutputNameMapping>>>( self, v: T, ) -> Self
Sets the value of output_name_mapping.
Note that all the setters affecting output_name_mapping are mutually
exclusive.
§Example
use google_cloud_bigquery_migration_v2::model::ObjectNameMappingList;
let x = TranslationConfigDetails::new().set_output_name_mapping(Some(
google_cloud_bigquery_migration_v2::model::translation_config_details::OutputNameMapping::NameMappingList(ObjectNameMappingList::default().into())));Sourcepub fn name_mapping_list(&self) -> Option<&Box<ObjectNameMappingList>>
pub fn name_mapping_list(&self) -> Option<&Box<ObjectNameMappingList>>
The value of output_name_mapping
if it holds a NameMappingList, None if the field is not set or
holds a different branch.
Sourcepub fn set_name_mapping_list<T: Into<Box<ObjectNameMappingList>>>(
self,
v: T,
) -> Self
pub fn set_name_mapping_list<T: Into<Box<ObjectNameMappingList>>>( self, v: T, ) -> Self
Sets the value of output_name_mapping
to hold a NameMappingList.
Note that all the setters affecting output_name_mapping are
mutually exclusive.
§Example
use google_cloud_bigquery_migration_v2::model::ObjectNameMappingList;
let x = TranslationConfigDetails::new().set_name_mapping_list(ObjectNameMappingList::default()/* use setters */);
assert!(x.name_mapping_list().is_some());Trait Implementations§
Source§impl Clone for TranslationConfigDetails
impl Clone for TranslationConfigDetails
Source§fn clone(&self) -> TranslationConfigDetails
fn clone(&self) -> TranslationConfigDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more