Skip to main content

nominal_api/conjure/objects/scout/datareview/api/
automatic_check_evaluation.rs

1#[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 AutomaticCheckEvaluation {
16    #[serde(rename = "rid")]
17    rid: super::super::super::super::api::rids::AutomaticCheckEvaluationRid,
18    #[serde(rename = "checkRid")]
19    check_rid: super::super::super::rids::api::CheckRid,
20    #[builder(default, into)]
21    #[serde(
22        rename = "checkImplementationIndex",
23        skip_serializing_if = "Option::is_none",
24        default
25    )]
26    check_implementation_index: Option<i32>,
27    #[serde(rename = "dataReviewRid")]
28    data_review_rid: super::super::super::rids::api::DataReviewRid,
29    #[builder(custom(type = super::AutomaticCheckEvaluationState, convert = Box::new))]
30    #[serde(rename = "state")]
31    state: Box<super::AutomaticCheckEvaluationState>,
32}
33impl AutomaticCheckEvaluation {
34    #[inline]
35    pub fn rid(
36        &self,
37    ) -> &super::super::super::super::api::rids::AutomaticCheckEvaluationRid {
38        &self.rid
39    }
40    #[inline]
41    pub fn check_rid(&self) -> &super::super::super::rids::api::CheckRid {
42        &self.check_rid
43    }
44    /// Checks can define a single range computation which can evaluate over multiple implementations of a context.
45    /// The check implementation index will correspond to the implementation index of the check condition.
46    #[inline]
47    pub fn check_implementation_index(&self) -> Option<i32> {
48        self.check_implementation_index.as_ref().map(|o| *o)
49    }
50    #[inline]
51    pub fn data_review_rid(&self) -> &super::super::super::rids::api::DataReviewRid {
52        &self.data_review_rid
53    }
54    #[inline]
55    pub fn state(&self) -> &super::AutomaticCheckEvaluationState {
56        &*self.state
57    }
58}