nominal_api/conjure/objects/timeseries/logicalseries/api/
context.rs1#[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 Context {
16 #[builder(
17 default,
18 map(key(type = String, into), value(type = super::ContextProperty))
19 )]
20 #[serde(
21 rename = "properties",
22 skip_serializing_if = "std::collections::BTreeMap::is_empty",
23 default
24 )]
25 properties: std::collections::BTreeMap<String, super::ContextProperty>,
26}
27impl Context {
28 #[inline]
30 pub fn new() -> Self {
31 Self::builder().build()
32 }
33 #[inline]
34 pub fn properties(
35 &self,
36 ) -> &std::collections::BTreeMap<String, super::ContextProperty> {
37 &self.properties
38 }
39}