#[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 BatchEditNotebookMetadataRequest {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::SearchNotebooksQuery>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "notebookSearchQuery",
        skip_serializing_if = "Option::is_none",
        default
    )]
    notebook_search_query: Option<Box<super::SearchNotebooksQuery>>,
    #[builder(
        custom(type = super::super::super::metadata::MetadataChange, convert = Box::new)
    )]
    #[serde(rename = "operation")]
    operation: Box<super::super::super::metadata::MetadataChange>,
}
impl BatchEditNotebookMetadataRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(operation: super::super::super::metadata::MetadataChange) -> Self {
        Self::builder().operation(operation).build()
    }
    /// Additional search query to filter which workbooks are targeted by the edit.
    /// Source labels/properties from the operation are automatically included as filters.
    #[inline]
    pub fn notebook_search_query(&self) -> Option<&super::SearchNotebooksQuery> {
        self.notebook_search_query.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn operation(&self) -> &super::super::super::metadata::MetadataChange {
        &*self.operation
    }
}
