Skip to main content

nominal_api/conjure/objects/event/
check_origin_metadata.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 CheckOriginMetadata {
16    #[serde(rename = "checkEvaluationRid")]
17    check_evaluation_rid: super::super::api::rids::AutomaticCheckEvaluationRid,
18    #[serde(rename = "checkRid")]
19    check_rid: super::super::scout::rids::api::CheckRid,
20    #[serde(rename = "checkLineageRid")]
21    check_lineage_rid: super::super::scout::rids::api::CheckLineageRid,
22    #[builder(default, into)]
23    #[serde(
24        rename = "implementationIndex",
25        skip_serializing_if = "Option::is_none",
26        default
27    )]
28    implementation_index: Option<i32>,
29}
30impl CheckOriginMetadata {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(
34        check_evaluation_rid: super::super::api::rids::AutomaticCheckEvaluationRid,
35        check_rid: super::super::scout::rids::api::CheckRid,
36        check_lineage_rid: super::super::scout::rids::api::CheckLineageRid,
37    ) -> Self {
38        Self::builder()
39            .check_evaluation_rid(check_evaluation_rid)
40            .check_rid(check_rid)
41            .check_lineage_rid(check_lineage_rid)
42            .build()
43    }
44    #[inline]
45    pub fn check_evaluation_rid(
46        &self,
47    ) -> &super::super::api::rids::AutomaticCheckEvaluationRid {
48        &self.check_evaluation_rid
49    }
50    #[inline]
51    pub fn check_rid(&self) -> &super::super::scout::rids::api::CheckRid {
52        &self.check_rid
53    }
54    #[inline]
55    pub fn check_lineage_rid(&self) -> &super::super::scout::rids::api::CheckLineageRid {
56        &self.check_lineage_rid
57    }
58    #[inline]
59    pub fn implementation_index(&self) -> Option<i32> {
60        self.implementation_index.as_ref().map(|o| *o)
61    }
62}