nominal_api/conjure/objects/scout/datareview/api/
data_review.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct DataReview {
16 #[serde(rename = "rid")]
17 rid: super::super::super::rids::api::DataReviewRid,
18 #[serde(rename = "runRid")]
19 run_rid: super::super::super::run::api::RunRid,
20 #[serde(rename = "assetRid")]
21 asset_rid: super::super::super::rids::api::AssetRid,
22 #[serde(rename = "createdAt")]
23 created_at: conjure_object::DateTime<conjure_object::Utc>,
24 #[serde(rename = "createdBy")]
25 created_by: super::super::super::rids::api::UserRid,
26 #[builder(
27 default,
28 custom(
29 type = impl
30 Into<Option<super::ChecklistEvaluation>>,
31 convert = |v|v.into().map(Box::new)
32 )
33 )]
34 #[serde(rename = "checklist", skip_serializing_if = "Option::is_none", default)]
35 checklist: Option<Box<super::ChecklistEvaluation>>,
36 #[builder(
37 custom(
38 type = super::super::super::checks::api::PinnedChecklistRef,
39 convert = Box::new
40 )
41 )]
42 #[serde(rename = "checklistRef")]
43 checklist_ref: Box<super::super::super::checks::api::PinnedChecklistRef>,
44 #[builder(default, set(item(type = super::AutomaticCheckEvaluation)))]
45 #[serde(
46 rename = "checkEvaluations",
47 skip_serializing_if = "std::collections::BTreeSet::is_empty",
48 default
49 )]
50 check_evaluations: std::collections::BTreeSet<super::AutomaticCheckEvaluation>,
51 #[serde(rename = "archived")]
52 archived: bool,
53}
54impl DataReview {
55 #[inline]
56 pub fn rid(&self) -> &super::super::super::rids::api::DataReviewRid {
57 &self.rid
58 }
59 #[inline]
60 pub fn run_rid(&self) -> &super::super::super::run::api::RunRid {
61 &self.run_rid
62 }
63 #[inline]
64 pub fn asset_rid(&self) -> &super::super::super::rids::api::AssetRid {
65 &self.asset_rid
66 }
67 #[inline]
68 pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
69 self.created_at
70 }
71 #[inline]
72 pub fn created_by(&self) -> &super::super::super::rids::api::UserRid {
73 &self.created_by
74 }
75 #[deprecated(
76 note = "This field is deprecated and will be removed in a future version."
77 )]
78 #[inline]
79 pub fn checklist(&self) -> Option<&super::ChecklistEvaluation> {
80 self.checklist.as_ref().map(|o| &**o)
81 }
82 #[inline]
83 pub fn checklist_ref(
84 &self,
85 ) -> &super::super::super::checks::api::PinnedChecklistRef {
86 &*self.checklist_ref
87 }
88 #[inline]
89 pub fn check_evaluations(
90 &self,
91 ) -> &std::collections::BTreeSet<super::AutomaticCheckEvaluation> {
92 &self.check_evaluations
93 }
94 #[inline]
95 pub fn archived(&self) -> bool {
96 self.archived
97 }
98}