nominal_api/conjure/objects/ingest/api/
no_timestamp_manifest.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct NoTimestampManifest {
13 #[builder(custom(type = super::UtcTimestamp, convert = Box::new))]
14 #[serde(rename = "startingTimestamp")]
15 starting_timestamp: Box<super::UtcTimestamp>,
16 #[builder(
17 default,
18 custom(
19 type = impl
20 Into<Option<super::ScaleParameter>>,
21 convert = |v|v.into().map(Box::new)
22 )
23 )]
24 #[serde(rename = "scaleParameter", skip_serializing_if = "Option::is_none", default)]
25 scale_parameter: Option<Box<super::ScaleParameter>>,
26}
27impl NoTimestampManifest {
28 #[inline]
30 pub fn new(starting_timestamp: super::UtcTimestamp) -> Self {
31 Self::builder().starting_timestamp(starting_timestamp).build()
32 }
33 #[inline]
34 pub fn starting_timestamp(&self) -> &super::UtcTimestamp {
35 &*self.starting_timestamp
36 }
37 #[inline]
39 pub fn scale_parameter(&self) -> Option<&super::ScaleParameter> {
40 self.scale_parameter.as_ref().map(|o| &**o)
41 }
42}