#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DataQualityRuleResult {
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub evaluation_message: ::std::option::Option<::std::string::String>,
pub result: ::std::option::Option<crate::types::DataQualityRuleResultStatus>,
pub evaluated_metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>,
}
impl DataQualityRuleResult {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn evaluation_message(&self) -> ::std::option::Option<&str> {
self.evaluation_message.as_deref()
}
pub fn result(&self) -> ::std::option::Option<&crate::types::DataQualityRuleResultStatus> {
self.result.as_ref()
}
pub fn evaluated_metrics(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, f64>> {
self.evaluated_metrics.as_ref()
}
}
impl DataQualityRuleResult {
pub fn builder() -> crate::types::builders::DataQualityRuleResultBuilder {
crate::types::builders::DataQualityRuleResultBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DataQualityRuleResultBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) evaluation_message: ::std::option::Option<::std::string::String>,
pub(crate) result: ::std::option::Option<crate::types::DataQualityRuleResultStatus>,
pub(crate) evaluated_metrics: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>,
}
impl DataQualityRuleResultBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn evaluation_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.evaluation_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_evaluation_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.evaluation_message = input;
self
}
pub fn get_evaluation_message(&self) -> &::std::option::Option<::std::string::String> {
&self.evaluation_message
}
pub fn result(mut self, input: crate::types::DataQualityRuleResultStatus) -> Self {
self.result = ::std::option::Option::Some(input);
self
}
pub fn set_result(mut self, input: ::std::option::Option<crate::types::DataQualityRuleResultStatus>) -> Self {
self.result = input;
self
}
pub fn get_result(&self) -> &::std::option::Option<crate::types::DataQualityRuleResultStatus> {
&self.result
}
pub fn evaluated_metrics(mut self, k: impl ::std::convert::Into<::std::string::String>, v: f64) -> Self {
let mut hash_map = self.evaluated_metrics.unwrap_or_default();
hash_map.insert(k.into(), v);
self.evaluated_metrics = ::std::option::Option::Some(hash_map);
self
}
pub fn set_evaluated_metrics(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, f64>>) -> Self {
self.evaluated_metrics = input;
self
}
pub fn get_evaluated_metrics(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, f64>> {
&self.evaluated_metrics
}
pub fn build(self) -> crate::types::DataQualityRuleResult {
crate::types::DataQualityRuleResult {
name: self.name,
description: self.description,
evaluation_message: self.evaluation_message,
result: self.result,
evaluated_metrics: self.evaluated_metrics,
}
}
}