nominal-api-conjure 0.1452.0

Conjure HTTP API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct UpdateDatasetMetadata {
    #[builder(default, into)]
    #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
    name: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none", default)]
    labels: Option<std::collections::BTreeSet<super::super::super::api::Label>>,
    #[builder(default, into)]
    #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
    properties: Option<
        std::collections::BTreeMap<
            super::super::super::api::PropertyName,
            super::super::super::api::PropertyValue,
        >,
    >,
    #[builder(default, into)]
    #[serde(
        rename = "typedProperties",
        skip_serializing_if = "Option::is_none",
        default
    )]
    typed_properties: Option<
        std::collections::BTreeMap<
            super::super::super::api::PropertyName,
            super::super::super::api::TypedPropertyValue,
        >,
    >,
    #[builder(default, into)]
    #[serde(
        rename = "channelSearchSplitTagKeys",
        skip_serializing_if = "Option::is_none",
        default
    )]
    channel_search_split_tag_keys: Option<
        std::collections::BTreeSet<super::super::super::api::TagName>,
    >,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DefaultGroupByAndAggregationConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "defaultGroupByAndAggregationConfig",
        skip_serializing_if = "Option::is_none",
        default
    )]
    default_group_by_and_aggregation_config: Option<
        Box<super::DefaultGroupByAndAggregationConfig>,
    >,
}
impl UpdateDatasetMetadata {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn name(&self) -> Option<&str> {
        self.name.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn labels(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::super::super::api::Label>> {
        self.labels.as_ref().map(|o| &*o)
    }
    /// User-defined dataset properties. When supplied, the UTF-8 JSON serialization must not exceed 2,000
    /// bytes.
    #[deprecated(note = "use typedProperties")]
    #[inline]
    pub fn properties(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            super::super::super::api::PropertyName,
            super::super::super::api::PropertyValue,
        >,
    > {
        self.properties.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn typed_properties(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            super::super::super::api::PropertyName,
            super::super::super::api::TypedPropertyValue,
        >,
    > {
        self.typed_properties.as_ref().map(|o| &*o)
    }
    /// Tag keys whose distinct values channel search surfaces as separate series. Absent leaves the current
    /// keys unchanged; an empty set clears them. Every key must be produced by the dataset's
    /// `derivedDefinition`.
    #[inline]
    pub fn channel_search_split_tag_keys(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::super::super::api::TagName>> {
        self.channel_search_split_tag_keys.as_ref().map(|o| &*o)
    }
    /// If set, replaces the dataset's default group-by and aggregation config in full.
    #[inline]
    pub fn default_group_by_and_aggregation_config(
        &self,
    ) -> Option<&super::DefaultGroupByAndAggregationConfig> {
        self.default_group_by_and_aggregation_config.as_ref().map(|o| &**o)
    }
}