Skip to main content

nominal_api/conjure/objects/storage/writer/api/
struct_point.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 StructPoint {
16    #[builder(
17        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
18    )]
19    #[serde(rename = "timestamp")]
20    timestamp: Box<super::super::super::super::api::Timestamp>,
21    #[builder(into)]
22    #[serde(rename = "jsonString")]
23    json_string: String,
24}
25impl StructPoint {
26    /// Constructs a new instance of the type.
27    #[inline]
28    pub fn new(
29        timestamp: super::super::super::super::api::Timestamp,
30        json_string: impl Into<String>,
31    ) -> Self {
32        Self::builder().timestamp(timestamp).json_string(json_string).build()
33    }
34    #[inline]
35    pub fn timestamp(&self) -> &super::super::super::super::api::Timestamp {
36        &*self.timestamp
37    }
38    #[inline]
39    pub fn json_string(&self) -> &str {
40        &*self.json_string
41    }
42}