Skip to main content

nominal_api/conjure/objects/timeseries/logicalseries/api/
influx1_locator.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 Influx1Locator {
16    #[serde(rename = "database")]
17    database: super::DatabaseName,
18    #[serde(rename = "measurement")]
19    measurement: super::MeasurementName,
20    #[serde(rename = "field")]
21    field: super::FieldName,
22    #[builder(default, map(key(type = String, into), value(type = String, into)))]
23    #[serde(
24        rename = "tags",
25        skip_serializing_if = "std::collections::BTreeMap::is_empty",
26        default
27    )]
28    tags: std::collections::BTreeMap<String, String>,
29    #[serde(rename = "type")]
30    type_: super::InfluxType,
31}
32impl Influx1Locator {
33    #[inline]
34    pub fn database(&self) -> &super::DatabaseName {
35        &self.database
36    }
37    #[inline]
38    pub fn measurement(&self) -> &super::MeasurementName {
39        &self.measurement
40    }
41    #[inline]
42    pub fn field(&self) -> &super::FieldName {
43        &self.field
44    }
45    #[inline]
46    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
47        &self.tags
48    }
49    #[inline]
50    pub fn type_(&self) -> &super::InfluxType {
51        &self.type_
52    }
53}