#[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 BatchEditChecklistMetadataRequest {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ChecklistSearchQuery>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "checklistSearchQuery",
        skip_serializing_if = "Option::is_none",
        default
    )]
    checklist_search_query: Option<Box<super::ChecklistSearchQuery>>,
    #[builder(
        custom(type = super::super::super::metadata::MetadataChange, convert = Box::new)
    )]
    #[serde(rename = "operation")]
    operation: Box<super::super::super::metadata::MetadataChange>,
}
impl BatchEditChecklistMetadataRequest {
    /// 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 checklists are targeted by the edit.
    /// Source labels/properties from the operation are automatically included as filters.
    #[inline]
    pub fn checklist_search_query(&self) -> Option<&super::ChecklistSearchQuery> {
        self.checklist_search_query.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn operation(&self) -> &super::super::super::metadata::MetadataChange {
        &*self.operation
    }
}
