#[non_exhaustive]pub struct TranslationDetails {
pub source_target_mapping: Vec<SourceTargetMapping>,
pub target_base_uri: String,
pub source_environment: Option<SourceEnvironment>,
pub target_return_literals: Vec<String>,
pub target_types: Vec<String>,
/* private fields */
}Expand description
The translation details to capture the necessary settings for a translation job.
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_target_mapping: Vec<SourceTargetMapping>The mapping from source to target SQL.
target_base_uri: StringThe base URI for all writes to persistent storage.
source_environment: Option<SourceEnvironment>The default source environment values for the translation.
target_return_literals: Vec<String>The list of literal targets that will be directly returned to the response. Each entry consists of the constructed path, EXCLUDING the base path. Not providing a target_base_uri will prevent writing to persistent storage.
target_types: Vec<String>The types of output to generate, e.g. sql, metadata, lineage_from_sql_scripts, 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.
Implementations§
Source§impl TranslationDetails
impl TranslationDetails
pub fn new() -> Self
Sourcepub fn set_source_target_mapping<T, V>(self, v: T) -> Self
pub fn set_source_target_mapping<T, V>(self, v: T) -> Self
Sets the value of source_target_mapping.
§Example
use google_cloud_bigquery_migration_v2::model::SourceTargetMapping;
let x = TranslationDetails::new()
.set_source_target_mapping([
SourceTargetMapping::default()/* use setters */,
SourceTargetMapping::default()/* use (different) setters */,
]);Sourcepub fn set_target_base_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_target_base_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of target_base_uri.
§Example
let x = TranslationDetails::new().set_target_base_uri("example");Sourcepub fn set_source_environment<T>(self, v: T) -> Selfwhere
T: Into<SourceEnvironment>,
pub fn set_source_environment<T>(self, v: T) -> Selfwhere
T: Into<SourceEnvironment>,
Sets the value of source_environment.
§Example
use google_cloud_bigquery_migration_v2::model::SourceEnvironment;
let x = TranslationDetails::new().set_source_environment(SourceEnvironment::default()/* use setters */);Sourcepub fn set_or_clear_source_environment<T>(self, v: Option<T>) -> Selfwhere
T: Into<SourceEnvironment>,
pub fn set_or_clear_source_environment<T>(self, v: Option<T>) -> Selfwhere
T: Into<SourceEnvironment>,
Sets or clears the value of source_environment.
§Example
use google_cloud_bigquery_migration_v2::model::SourceEnvironment;
let x = TranslationDetails::new().set_or_clear_source_environment(Some(SourceEnvironment::default()/* use setters */));
let x = TranslationDetails::new().set_or_clear_source_environment(None::<SourceEnvironment>);Sourcepub fn set_target_return_literals<T, V>(self, v: T) -> Self
pub fn set_target_return_literals<T, V>(self, v: T) -> Self
Sets the value of target_return_literals.
§Example
let x = TranslationDetails::new().set_target_return_literals(["a", "b", "c"]);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 = TranslationDetails::new().set_target_types(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for TranslationDetails
impl Clone for TranslationDetails
Source§fn clone(&self) -> TranslationDetails
fn clone(&self) -> TranslationDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more