#[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>,
pub suggestion_config: Option<SuggestionConfig>,
/* 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.
suggestion_config: Option<SuggestionConfig>The configuration for the suggestion if requested as a target type.
Implementations§
Source§impl TranslationDetails
impl TranslationDetails
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"]);Sourcepub fn set_suggestion_config<T>(self, v: T) -> Selfwhere
T: Into<SuggestionConfig>,
pub fn set_suggestion_config<T>(self, v: T) -> Selfwhere
T: Into<SuggestionConfig>,
Sets the value of suggestion_config.
§Example
use google_cloud_bigquery_migration_v2::model::SuggestionConfig;
let x = TranslationDetails::new().set_suggestion_config(SuggestionConfig::default()/* use setters */);Sourcepub fn set_or_clear_suggestion_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SuggestionConfig>,
pub fn set_or_clear_suggestion_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SuggestionConfig>,
Sets or clears the value of suggestion_config.
§Example
use google_cloud_bigquery_migration_v2::model::SuggestionConfig;
let x = TranslationDetails::new().set_or_clear_suggestion_config(Some(SuggestionConfig::default()/* use setters */));
let x = TranslationDetails::new().set_or_clear_suggestion_config(None::<SuggestionConfig>);Trait Implementations§
Source§impl Clone for TranslationDetails
impl Clone for TranslationDetails
Source§fn clone(&self) -> TranslationDetails
fn clone(&self) -> TranslationDetails
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TranslationDetails
impl Debug for TranslationDetails
Source§impl Default for TranslationDetails
impl Default for TranslationDetails
Source§fn default() -> TranslationDetails
fn default() -> TranslationDetails
Source§impl Message for TranslationDetails
impl Message for TranslationDetails
Source§impl PartialEq for TranslationDetails
impl PartialEq for TranslationDetails
Source§fn eq(&self, other: &TranslationDetails) -> bool
fn eq(&self, other: &TranslationDetails) -> bool
self and other values to be equal, and is used by ==.