#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Influx2Locator {
    #[serde(rename = "bucket")]
    bucket: super::BucketName,
    #[serde(rename = "measurement")]
    measurement: super::MeasurementName,
    #[serde(rename = "field")]
    field: super::FieldName,
    #[builder(default, into)]
    #[serde(rename = "valueColumn", skip_serializing_if = "Option::is_none", default)]
    value_column: Option<String>,
    #[builder(default, map(key(type = String, into), value(type = String, into)))]
    #[serde(
        rename = "tags",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    tags: std::collections::BTreeMap<String, String>,
    #[serde(rename = "type")]
    type_: super::InfluxType,
}
impl Influx2Locator {
    #[inline]
    pub fn bucket(&self) -> &super::BucketName {
        &self.bucket
    }
    #[inline]
    pub fn measurement(&self) -> &super::MeasurementName {
        &self.measurement
    }
    #[inline]
    pub fn field(&self) -> &super::FieldName {
        &self.field
    }
    /// If omitted, defaults to `_value`. Can be used to extract tag values.
    #[inline]
    pub fn value_column(&self) -> Option<&str> {
        self.value_column.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
        &self.tags
    }
    #[inline]
    pub fn type_(&self) -> &super::InfluxType {
        &self.type_
    }
}
