Skip to main content

nominal_api/conjure/objects/timeseries/logicalseries/api/
big_query_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 BigQueryLocator {
16    #[serde(rename = "valueColumn")]
17    value_column: super::ColumnName,
18    #[serde(rename = "timeColumn")]
19    time_column: super::ColumnName,
20    #[builder(default, map(key(type = String, into), value(type = String, into)))]
21    #[serde(
22        rename = "tagValues",
23        skip_serializing_if = "std::collections::BTreeMap::is_empty",
24        default
25    )]
26    tag_values: std::collections::BTreeMap<String, String>,
27    #[serde(rename = "type")]
28    type_: super::BigQueryType,
29}
30impl BigQueryLocator {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(
34        value_column: super::ColumnName,
35        time_column: super::ColumnName,
36        type_: super::BigQueryType,
37    ) -> Self {
38        Self::builder()
39            .value_column(value_column)
40            .time_column(time_column)
41            .type_(type_)
42            .build()
43    }
44    /// The name of the column which has the values for this series
45    #[inline]
46    pub fn value_column(&self) -> &super::ColumnName {
47        &self.value_column
48    }
49    /// The name of the column which has the timestamps for this series
50    #[inline]
51    pub fn time_column(&self) -> &super::ColumnName {
52        &self.time_column
53    }
54    /// The mapping of columns to column values to filter on
55    #[inline]
56    pub fn tag_values(&self) -> &std::collections::BTreeMap<String, String> {
57        &self.tag_values
58    }
59    #[inline]
60    pub fn type_(&self) -> &super::BigQueryType {
61        &self.type_
62    }
63}