Skip to main content

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