#[non_exhaustive]pub struct TemplateReference {
pub name: String,
pub values: HashMap<String, ParameterValue>,
pub resolved_sql: String,
pub rule_template: Option<DataQualityRuleTemplate>,
/* private fields */
}Expand description
A rule that constructs a SQL statement to evaluate using a rule template and parameter values. If the constructed statement returns any rows, this rule fails
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.name: StringRequired. The template entry name. Entry must be of EntryType
projects/dataplex-types/locations/global/entryTypes/data-quality-rule-template
and contains top-level aspect of AspectType
projects/dataplex-types/locations/global/aspectTypes/data-quality-rule-template.
The format is:
projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}
values: HashMap<String, ParameterValue>Optional. Provides the map of parameter name and value. The maximum size of the field is 120KB (encoded as UTF-8).
resolved_sql: StringOutput only. The resolved SQL statement generated from the template with parameters substituted. It is only populated in the result.
rule_template: Option<DataQualityRuleTemplate>Output only. The rule template used to resolve the rule. It is only populated in the result.
Implementations§
Source§impl TemplateReference
impl TemplateReference
Sourcepub fn set_values<T, K, V>(self, v: T) -> Self
pub fn set_values<T, K, V>(self, v: T) -> Self
Sourcepub fn set_resolved_sql<T: Into<String>>(self, v: T) -> Self
pub fn set_resolved_sql<T: Into<String>>(self, v: T) -> Self
Sets the value of resolved_sql.
§Example
let x = TemplateReference::new().set_resolved_sql("example");Sourcepub fn set_rule_template<T>(self, v: T) -> Selfwhere
T: Into<DataQualityRuleTemplate>,
pub fn set_rule_template<T>(self, v: T) -> Selfwhere
T: Into<DataQualityRuleTemplate>,
Sets the value of rule_template.
§Example
use google_cloud_dataplex_v1::model::DataQualityRuleTemplate;
let x = TemplateReference::new().set_rule_template(DataQualityRuleTemplate::default()/* use setters */);Sourcepub fn set_or_clear_rule_template<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataQualityRuleTemplate>,
pub fn set_or_clear_rule_template<T>(self, v: Option<T>) -> Selfwhere
T: Into<DataQualityRuleTemplate>,
Sets or clears the value of rule_template.
§Example
use google_cloud_dataplex_v1::model::DataQualityRuleTemplate;
let x = TemplateReference::new().set_or_clear_rule_template(Some(DataQualityRuleTemplate::default()/* use setters */));
let x = TemplateReference::new().set_or_clear_rule_template(None::<DataQualityRuleTemplate>);Trait Implementations§
Source§impl Clone for TemplateReference
impl Clone for TemplateReference
Source§fn clone(&self) -> TemplateReference
fn clone(&self) -> TemplateReference
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 TemplateReference
impl Debug for TemplateReference
Source§impl Default for TemplateReference
impl Default for TemplateReference
Source§fn default() -> TemplateReference
fn default() -> TemplateReference
Source§impl Message for TemplateReference
impl Message for TemplateReference
Source§impl PartialEq for TemplateReference
impl PartialEq for TemplateReference
Source§fn eq(&self, other: &TemplateReference) -> bool
fn eq(&self, other: &TemplateReference) -> bool
self and other values to be equal, and is used by ==.