Skip to main content

nominal_api/conjure/objects/timeseries/logicalseries/api/
resolve_series_request.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 ResolveSeriesRequest {
16    #[builder(into)]
17    #[serde(rename = "name")]
18    name: String,
19    #[serde(rename = "datasource")]
20    datasource: conjure_object::ResourceIdentifier,
21    #[builder(default, map(key(type = String, into), value(type = String, into)))]
22    #[serde(
23        rename = "tags",
24        skip_serializing_if = "std::collections::BTreeMap::is_empty",
25        default
26    )]
27    tags: std::collections::BTreeMap<String, String>,
28}
29impl ResolveSeriesRequest {
30    /// Constructs a new instance of the type.
31    #[inline]
32    pub fn new(
33        name: impl Into<String>,
34        datasource: conjure_object::ResourceIdentifier,
35    ) -> Self {
36        Self::builder().name(name).datasource(datasource).build()
37    }
38    #[inline]
39    pub fn name(&self) -> &str {
40        &*self.name
41    }
42    #[inline]
43    pub fn datasource(&self) -> &conjure_object::ResourceIdentifier {
44        &self.datasource
45    }
46    #[inline]
47    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
48        &self.tags
49    }
50}