use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(PHChangeRequest, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PHChangeRequest")]
pub struct PHCollectionListChangeRequest;
);
#[cfg(feature = "PHChangeRequest")]
extern_conformance!(
unsafe impl NSObjectProtocol for PHCollectionListChangeRequest {}
);
#[cfg(feature = "PHChangeRequest")]
impl PHCollectionListChangeRequest {
extern_methods!(
#[unsafe(method(creationRequestForCollectionListWithTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn creationRequestForCollectionListWithTitle(title: &NSString)
-> Retained<Self>;
#[cfg(feature = "PHObject")]
#[unsafe(method(placeholderForCreatedCollectionList))]
#[unsafe(method_family = none)]
pub unsafe fn placeholderForCreatedCollectionList(&self) -> Retained<PHObjectPlaceholder>;
#[unsafe(method(deleteCollectionLists:))]
#[unsafe(method_family = none)]
pub unsafe fn deleteCollectionLists(
collection_lists: &ProtocolObject<dyn NSFastEnumeration>,
);
#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
#[unsafe(method(changeRequestForCollectionList:))]
#[unsafe(method_family = none)]
pub unsafe fn changeRequestForCollectionList(
collection_list: &PHCollectionList,
) -> Option<Retained<Self>>;
#[cfg(all(
feature = "PHCollection",
feature = "PHFetchResult",
feature = "PHObject"
))]
#[unsafe(method(changeRequestForCollectionList:childCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn changeRequestForCollectionList_childCollections(
collection_list: &PHCollectionList,
child_collections: &PHFetchResult<PHCollection>,
) -> Option<Retained<Self>>;
#[cfg(all(
feature = "PHCollection",
feature = "PHFetchResult",
feature = "PHObject"
))]
#[unsafe(method(changeRequestForTopLevelCollectionListUserCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn changeRequestForTopLevelCollectionListUserCollections(
child_collections: &PHFetchResult<PHCollection>,
) -> Option<Retained<Self>>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitle(&self, title: &NSString);
#[unsafe(method(addChildCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn addChildCollections(
&self,
collections: &ProtocolObject<dyn NSFastEnumeration>,
);
#[unsafe(method(insertChildCollections:atIndexes:))]
#[unsafe(method_family = none)]
pub unsafe fn insertChildCollections_atIndexes(
&self,
collections: &ProtocolObject<dyn NSFastEnumeration>,
indexes: &NSIndexSet,
);
#[unsafe(method(removeChildCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn removeChildCollections(
&self,
collections: &ProtocolObject<dyn NSFastEnumeration>,
);
#[unsafe(method(removeChildCollectionsAtIndexes:))]
#[unsafe(method_family = none)]
pub unsafe fn removeChildCollectionsAtIndexes(&self, indexes: &NSIndexSet);
#[unsafe(method(replaceChildCollectionsAtIndexes:withChildCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceChildCollectionsAtIndexes_withChildCollections(
&self,
indexes: &NSIndexSet,
collections: &ProtocolObject<dyn NSFastEnumeration>,
);
#[unsafe(method(moveChildCollectionsAtIndexes:toIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn moveChildCollectionsAtIndexes_toIndex(
&self,
indexes: &NSIndexSet,
to_index: NSUInteger,
);
);
}
#[cfg(feature = "PHChangeRequest")]
impl PHCollectionListChangeRequest {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}