Skip to main content

nominal_api/conjure/objects/scout/internal/search/api/
timestamp_field.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 TimestampField {
16    #[builder(into)]
17    #[serde(rename = "name")]
18    name: String,
19    #[builder(
20        custom(
21            type = super::super::super::super::super::api::Timestamp,
22            convert = Box::new
23        )
24    )]
25    #[serde(rename = "timestamp")]
26    timestamp: Box<super::super::super::super::super::api::Timestamp>,
27    #[serde(rename = "operator")]
28    operator: super::Operator,
29}
30impl TimestampField {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(
34        name: impl Into<String>,
35        timestamp: super::super::super::super::super::api::Timestamp,
36        operator: super::Operator,
37    ) -> Self {
38        Self::builder().name(name).timestamp(timestamp).operator(operator).build()
39    }
40    #[inline]
41    pub fn name(&self) -> &str {
42        &*self.name
43    }
44    #[inline]
45    pub fn timestamp(&self) -> &super::super::super::super::super::api::Timestamp {
46        &*self.timestamp
47    }
48    #[inline]
49    pub fn operator(&self) -> &super::Operator {
50        &self.operator
51    }
52}