nominal-api-conjure 0.1431.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 SearchChannelsRequest {
    #[builder(
        custom(type = super::super::super::compute::api::Dataset, convert = Box::new)
    )]
    #[serde(rename = "scope")]
    scope: Box<super::super::super::compute::api::Dataset>,
    #[builder(custom(type = super::ChannelSearchQuery, convert = Box::new))]
    #[serde(rename = "query")]
    query: Box<super::ChannelSearchQuery>,
    #[builder(
        custom(type = super::super::super::compute::api::Context, convert = Box::new)
    )]
    #[serde(rename = "context")]
    context: Box<super::super::super::compute::api::Context>,
    #[builder(custom(type = super::super::super::super::api::Range, convert = Box::new))]
    #[serde(rename = "timeRange")]
    time_range: Box<super::super::super::super::api::Range>,
    #[builder(default, into)]
    #[serde(
        rename = "maxResultChannels",
        skip_serializing_if = "Option::is_none",
        default
    )]
    max_result_channels: Option<i32>,
    #[builder(
        default,
        set(item(type = super::super::super::super::api::SeriesDataType))
    )]
    #[serde(
        rename = "allowedDataTypes",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    allowed_data_types: std::collections::BTreeSet<
        super::super::super::super::api::SeriesDataType,
    >,
    #[builder(default, into)]
    #[serde(
        rename = "includeProperties",
        skip_serializing_if = "Option::is_none",
        default
    )]
    include_properties: Option<bool>,
}
impl SearchChannelsRequest {
    #[inline]
    pub fn scope(&self) -> &super::super::super::compute::api::Dataset {
        &*self.scope
    }
    #[inline]
    pub fn query(&self) -> &super::ChannelSearchQuery {
        &*self.query
    }
    #[inline]
    pub fn context(&self) -> &super::super::super::compute::api::Context {
        &*self.context
    }
    /// Time filter applied to the search. Only channels with data within this time range will be returned.
    /// A shorter time range will improve performance!
    #[inline]
    pub fn time_range(&self) -> &super::super::super::super::api::Range {
        &*self.time_range
    }
    /// Max number of distinct channels to return. Defaults to 200. Capped at 200.
    #[inline]
    pub fn max_result_channels(&self) -> Option<i32> {
        self.max_result_channels.as_ref().map(|o| *o)
    }
    /// Filter to only channels with these data types, applied before the result cap so a large scope of
    /// other-typed channels cannot crowd the requested types out of the response. An empty set means no
    /// filtering (all data types included). Matching follows API presentation: a DOUBLE filter also matches
    /// channels stored as INT or UINT, which are returned with dataType=DOUBLE.
    #[inline]
    pub fn allowed_data_types(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::super::api::SeriesDataType> {
        &self.allowed_data_types
    }
    /// When true, asset and run properties from resolved branches are included in the ranked results
    /// as Kind.PROPERTY rows. Defaults to false so existing clients keep seeing only channels.
    #[inline]
    pub fn include_properties(&self) -> Option<bool> {
        self.include_properties.as_ref().map(|o| *o)
    }
}