#[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
impl StructuralPartialEq for TemplateReference
Auto Trait Implementations§
impl Freeze for TemplateReference
impl RefUnwindSafe for TemplateReference
impl Send for TemplateReference
impl Sync for TemplateReference
impl Unpin for TemplateReference
impl UnsafeUnpin for TemplateReference
impl UnwindSafe for TemplateReference
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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