nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 TimestreamScrapingConfig {
    #[builder(default, list(item(type = super::TimestreamScrapingFilter)))]
    #[serde(rename = "filter", skip_serializing_if = "Vec::is_empty", default)]
    filter: Vec<super::TimestreamScrapingFilter>,
    #[builder(default, list(item(type = super::TimestreamChannelNameComponent)))]
    #[serde(
        rename = "channelNameComponents",
        skip_serializing_if = "Vec::is_empty",
        default
    )]
    channel_name_components: Vec<super::TimestreamChannelNameComponent>,
    #[builder(into)]
    #[serde(rename = "separator")]
    separator: String,
    #[builder(default, into)]
    #[serde(
        rename = "maxLookBackPeriodHours",
        skip_serializing_if = "Option::is_none",
        default
    )]
    max_look_back_period_hours: Option<i32>,
}
impl TimestreamScrapingConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(separator: impl Into<String>) -> Self {
        Self::builder().separator(separator).build()
    }
    /// In order for data to be picked up by the scraper, it must match all
    /// filters in this list.
    #[inline]
    pub fn filter(&self) -> &[super::TimestreamScrapingFilter] {
        &*self.filter
    }
    /// channelNameComponents will be combined, together with separator, to form
    /// a fully qualified channel name.
    #[inline]
    pub fn channel_name_components(&self) -> &[super::TimestreamChannelNameComponent] {
        &*self.channel_name_components
    }
    #[inline]
    pub fn separator(&self) -> &str {
        &*self.separator
    }
    /// The maximum time in hours to look back over series data to find unique measure and tag combinations.
    /// If not specified, the default look back period will be used.
    #[inline]
    pub fn max_look_back_period_hours(&self) -> Option<i32> {
        self.max_look_back_period_hours.as_ref().map(|o| *o)
    }
}