Skip to main content

nominal_api/conjure/objects/datasource/api/
get_data_scope_bounds_response.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 GetDataScopeBoundsResponse {
16    #[builder(
17        default,
18        custom(
19            type = impl
20            Into<Option<super::super::super::api::Timestamp>>,
21            convert = |v|v.into().map(Box::new)
22        )
23    )]
24    #[serde(rename = "endTime", skip_serializing_if = "Option::is_none", default)]
25    end_time: Option<Box<super::super::super::api::Timestamp>>,
26}
27impl GetDataScopeBoundsResponse {
28    /// Constructs a new instance of the type.
29    #[inline]
30    pub fn new() -> Self {
31        Self::builder().build()
32    }
33    /// If missing, the end bound is not known definitively. This can happen if the
34    /// data scope corresponds to an external database or its data was not updated in the last month.
35    #[inline]
36    pub fn end_time(&self) -> Option<&super::super::super::api::Timestamp> {
37        self.end_time.as_ref().map(|o| &**o)
38    }
39}