nominal_api/conjure/objects/timeseries/logicalseries/api/
influx2_locator.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 Influx2Locator {
16 #[serde(rename = "bucket")]
17 bucket: super::BucketName,
18 #[serde(rename = "measurement")]
19 measurement: super::MeasurementName,
20 #[serde(rename = "field")]
21 field: super::FieldName,
22 #[builder(default, into)]
23 #[serde(rename = "valueColumn", skip_serializing_if = "Option::is_none", default)]
24 value_column: Option<String>,
25 #[builder(default, map(key(type = String, into), value(type = String, into)))]
26 #[serde(
27 rename = "tags",
28 skip_serializing_if = "std::collections::BTreeMap::is_empty",
29 default
30 )]
31 tags: std::collections::BTreeMap<String, String>,
32 #[serde(rename = "type")]
33 type_: super::InfluxType,
34}
35impl Influx2Locator {
36 #[inline]
37 pub fn bucket(&self) -> &super::BucketName {
38 &self.bucket
39 }
40 #[inline]
41 pub fn measurement(&self) -> &super::MeasurementName {
42 &self.measurement
43 }
44 #[inline]
45 pub fn field(&self) -> &super::FieldName {
46 &self.field
47 }
48 #[inline]
50 pub fn value_column(&self) -> Option<&str> {
51 self.value_column.as_ref().map(|o| &**o)
52 }
53 #[inline]
54 pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
55 &self.tags
56 }
57 #[inline]
58 pub fn type_(&self) -> &super::InfluxType {
59 &self.type_
60 }
61}