#[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 SearchFrame {
#[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 SearchFrame {
#[inline]
pub fn new(target: super::SearchTarget) -> Self {
Self::builder().target(target).build()
}
#[inline]
pub fn target(&self) -> &super::SearchTarget {
&*self.target
}
#[inline]
pub fn max_results(&self) -> Option<i32> {
self.max_results.as_ref().map(|o| *o)
}
}