#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct DataReview {
#[serde(rename = "rid")]
rid: super::super::super::rids::api::DataReviewRid,
#[serde(rename = "runRid")]
run_rid: super::super::super::run::api::RunRid,
#[serde(rename = "assetRid")]
asset_rid: super::super::super::rids::api::AssetRid,
#[serde(rename = "createdAt")]
created_at: conjure_object::DateTime<conjure_object::Utc>,
#[serde(rename = "createdBy")]
created_by: super::super::super::rids::api::UserRid,
#[builder(
default,
custom(
type = impl
Into<Option<super::ChecklistEvaluation>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "checklist", skip_serializing_if = "Option::is_none", default)]
checklist: Option<Box<super::ChecklistEvaluation>>,
#[builder(
custom(
type = super::super::super::checks::api::PinnedChecklistRef,
convert = Box::new
)
)]
#[serde(rename = "checklistRef")]
checklist_ref: Box<super::super::super::checks::api::PinnedChecklistRef>,
#[builder(default, set(item(type = super::AutomaticCheckEvaluation)))]
#[serde(
rename = "checkEvaluations",
skip_serializing_if = "std::collections::BTreeSet::is_empty",
default
)]
check_evaluations: std::collections::BTreeSet<super::AutomaticCheckEvaluation>,
#[serde(rename = "archived")]
archived: bool,
}
impl DataReview {
#[inline]
pub fn rid(&self) -> &super::super::super::rids::api::DataReviewRid {
&self.rid
}
#[inline]
pub fn run_rid(&self) -> &super::super::super::run::api::RunRid {
&self.run_rid
}
#[inline]
pub fn asset_rid(&self) -> &super::super::super::rids::api::AssetRid {
&self.asset_rid
}
#[inline]
pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
self.created_at
}
#[inline]
pub fn created_by(&self) -> &super::super::super::rids::api::UserRid {
&self.created_by
}
#[deprecated(
note = "This field is deprecated and will be removed in a future version."
)]
#[inline]
pub fn checklist(&self) -> Option<&super::ChecklistEvaluation> {
self.checklist.as_ref().map(|o| &**o)
}
#[inline]
pub fn checklist_ref(
&self,
) -> &super::super::super::checks::api::PinnedChecklistRef {
&*self.checklist_ref
}
#[inline]
pub fn check_evaluations(
&self,
) -> &std::collections::BTreeSet<super::AutomaticCheckEvaluation> {
&self.check_evaluations
}
#[inline]
pub fn archived(&self) -> bool {
self.archived
}
}