/// Resolves matching assets or runs from search, creating a combined dataset tagged by source rid and data scope.
#[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 SearchDataset {
    #[builder(custom(type = super::SearchTarget, convert = Box::new))]
    #[serde(rename = "target")]
    target: Box<super::SearchTarget>,
    #[builder(default, into)]
    #[serde(rename = "maxResults", skip_serializing_if = "Option::is_none", default)]
    max_results: Option<i32>,
}
impl SearchDataset {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(target: super::SearchTarget) -> Self {
        Self::builder().target(target).build()
    }
    /// Whether to search assets or runs and with which query.
    #[inline]
    pub fn target(&self) -> &super::SearchTarget {
        &*self.target
    }
    /// Maximum number of assets or runs returned from search. Defaults to 100 when omitted.
    #[inline]
    pub fn max_results(&self) -> Option<i32> {
        self.max_results.as_ref().map(|o| *o)
    }
}
