//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::PhotoKit::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PhotoKit_PHCollection")]
    pub struct PHCollection;

    #[cfg(feature = "PhotoKit_PHCollection")]
    unsafe impl ClassType for PHCollection {
        #[inherits(NSObject)]
        type Super = PHObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "PhotoKit_PHCollection")]
unsafe impl NSCopying for PHCollection {}

#[cfg(feature = "PhotoKit_PHCollection")]
unsafe impl NSObjectProtocol for PHCollection {}

extern_methods!(
    #[cfg(feature = "PhotoKit_PHCollection")]
    unsafe impl PHCollection {
        #[method(canContainAssets)]
        pub unsafe fn canContainAssets(&self) -> bool;

        #[method(canContainCollections)]
        pub unsafe fn canContainCollections(&self) -> bool;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other localizedTitle)]
        pub unsafe fn localizedTitle(&self) -> Option<Id<NSString>>;

        #[method(canPerformEditOperation:)]
        pub unsafe fn canPerformEditOperation(
            &self,
            an_operation: PHCollectionEditOperation,
        ) -> bool;

        #[cfg(all(
            feature = "PhotoKit_PHCollectionList",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchCollectionsInCollectionList:options:)]
        pub unsafe fn fetchCollectionsInCollectionList_options(
            collection_list: &PHCollectionList,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollection>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchTopLevelUserCollectionsWithOptions:)]
        pub unsafe fn fetchTopLevelUserCollectionsWithOptions(
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollection>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "PhotoKit_PHCollection")]
    unsafe impl PHCollection {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PhotoKit_PHAssetCollection")]
    pub struct PHAssetCollection;

    #[cfg(feature = "PhotoKit_PHAssetCollection")]
    unsafe impl ClassType for PHAssetCollection {
        #[inherits(PHObject, NSObject)]
        type Super = PHCollection;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "PhotoKit_PHAssetCollection")]
unsafe impl NSCopying for PHAssetCollection {}

#[cfg(feature = "PhotoKit_PHAssetCollection")]
unsafe impl NSObjectProtocol for PHAssetCollection {}

extern_methods!(
    #[cfg(feature = "PhotoKit_PHAssetCollection")]
    unsafe impl PHAssetCollection {
        #[method(assetCollectionType)]
        pub unsafe fn assetCollectionType(&self) -> PHAssetCollectionType;

        #[method(assetCollectionSubtype)]
        pub unsafe fn assetCollectionSubtype(&self) -> PHAssetCollectionSubtype;

        #[method(estimatedAssetCount)]
        pub unsafe fn estimatedAssetCount(&self) -> NSUInteger;

        #[cfg(feature = "Foundation_NSDate")]
        #[method_id(@__retain_semantics Other startDate)]
        pub unsafe fn startDate(&self) -> Option<Id<NSDate>>;

        #[cfg(feature = "Foundation_NSDate")]
        #[method_id(@__retain_semantics Other endDate)]
        pub unsafe fn endDate(&self) -> Option<Id<NSDate>>;

        #[cfg(feature = "CoreLocation_CLLocation")]
        #[method_id(@__retain_semantics Other approximateLocation)]
        pub unsafe fn approximateLocation(&self) -> Option<Id<CLLocation>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other localizedLocationNames)]
        pub unsafe fn localizedLocationNames(&self) -> Id<NSArray<NSString>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchAssetCollectionsWithLocalIdentifiers:options:)]
        pub unsafe fn fetchAssetCollectionsWithLocalIdentifiers_options(
            identifiers: &NSArray<NSString>,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchAssetCollectionsWithType:subtype:options:)]
        pub unsafe fn fetchAssetCollectionsWithType_subtype_options(
            r#type: PHAssetCollectionType,
            subtype: PHAssetCollectionSubtype,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "PhotoKit_PHAsset",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchAssetCollectionsContainingAsset:withType:options:)]
        pub unsafe fn fetchAssetCollectionsContainingAsset_withType_options(
            asset: &PHAsset,
            r#type: PHAssetCollectionType,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSURL",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[deprecated = "Will be removed in a future release"]
        #[method_id(@__retain_semantics Other fetchAssetCollectionsWithALAssetGroupURLs:options:)]
        pub unsafe fn fetchAssetCollectionsWithALAssetGroupURLs_options(
            asset_group_ur_ls: &NSArray<NSURL>,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "PhotoKit_PHCollectionList",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[deprecated = "Will be removed in a future release"]
        #[method_id(@__retain_semantics Other fetchMomentsInMomentList:options:)]
        pub unsafe fn fetchMomentsInMomentList_options(
            moment_list: &PHCollectionList,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[deprecated = "Will be removed in a future release"]
        #[method_id(@__retain_semantics Other fetchMomentsWithOptions:)]
        pub unsafe fn fetchMomentsWithOptions(
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHAssetCollection>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString",
            feature = "PhotoKit_PHAsset"
        ))]
        #[method_id(@__retain_semantics Other transientAssetCollectionWithAssets:title:)]
        pub unsafe fn transientAssetCollectionWithAssets_title(
            assets: &NSArray<PHAsset>,
            title: Option<&NSString>,
        ) -> Id<PHAssetCollection>;

        #[cfg(all(
            feature = "Foundation_NSString",
            feature = "PhotoKit_PHAsset",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other transientAssetCollectionWithAssetFetchResult:title:)]
        pub unsafe fn transientAssetCollectionWithAssetFetchResult_title(
            fetch_result: &PHFetchResult<PHAsset>,
            title: Option<&NSString>,
        ) -> Id<PHAssetCollection>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "PhotoKit_PHAssetCollection")]
    unsafe impl PHAssetCollection {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PhotoKit_PHCollectionList")]
    pub struct PHCollectionList;

    #[cfg(feature = "PhotoKit_PHCollectionList")]
    unsafe impl ClassType for PHCollectionList {
        #[inherits(PHObject, NSObject)]
        type Super = PHCollection;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "PhotoKit_PHCollectionList")]
unsafe impl NSCopying for PHCollectionList {}

#[cfg(feature = "PhotoKit_PHCollectionList")]
unsafe impl NSObjectProtocol for PHCollectionList {}

extern_methods!(
    #[cfg(feature = "PhotoKit_PHCollectionList")]
    unsafe impl PHCollectionList {
        #[method(collectionListType)]
        pub unsafe fn collectionListType(&self) -> PHCollectionListType;

        #[method(collectionListSubtype)]
        pub unsafe fn collectionListSubtype(&self) -> PHCollectionListSubtype;

        #[cfg(feature = "Foundation_NSDate")]
        #[method_id(@__retain_semantics Other startDate)]
        pub unsafe fn startDate(&self) -> Option<Id<NSDate>>;

        #[cfg(feature = "Foundation_NSDate")]
        #[method_id(@__retain_semantics Other endDate)]
        pub unsafe fn endDate(&self) -> Option<Id<NSDate>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other localizedLocationNames)]
        pub unsafe fn localizedLocationNames(&self) -> Id<NSArray<NSString>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchCollectionListsContainingCollection:options:)]
        pub unsafe fn fetchCollectionListsContainingCollection_options(
            collection: &PHCollection,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollectionList>>;

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSString",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchCollectionListsWithLocalIdentifiers:options:)]
        pub unsafe fn fetchCollectionListsWithLocalIdentifiers_options(
            identifiers: &NSArray<NSString>,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollectionList>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[method_id(@__retain_semantics Other fetchCollectionListsWithType:subtype:options:)]
        pub unsafe fn fetchCollectionListsWithType_subtype_options(
            collection_list_type: PHCollectionListType,
            subtype: PHCollectionListSubtype,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollectionList>>;

        #[cfg(all(
            feature = "PhotoKit_PHAssetCollection",
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[deprecated = "Will be removed in a future release"]
        #[method_id(@__retain_semantics Other fetchMomentListsWithSubtype:containingMoment:options:)]
        pub unsafe fn fetchMomentListsWithSubtype_containingMoment_options(
            moment_list_subtype: PHCollectionListSubtype,
            moment: &PHAssetCollection,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollectionList>>;

        #[cfg(all(
            feature = "PhotoKit_PHFetchOptions",
            feature = "PhotoKit_PHFetchResult"
        ))]
        #[deprecated = "Will be removed in a future release"]
        #[method_id(@__retain_semantics Other fetchMomentListsWithSubtype:options:)]
        pub unsafe fn fetchMomentListsWithSubtype_options(
            moment_list_subtype: PHCollectionListSubtype,
            options: Option<&PHFetchOptions>,
        ) -> Id<PHFetchResult<PHCollectionList>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other transientCollectionListWithCollections:title:)]
        pub unsafe fn transientCollectionListWithCollections_title(
            collections: &NSArray<PHCollection>,
            title: Option<&NSString>,
        ) -> Id<PHCollectionList>;

        #[cfg(all(feature = "Foundation_NSString", feature = "PhotoKit_PHFetchResult"))]
        #[method_id(@__retain_semantics Other transientCollectionListWithCollectionsFetchResult:title:)]
        pub unsafe fn transientCollectionListWithCollectionsFetchResult_title(
            fetch_result: &PHFetchResult<PHCollection>,
            title: Option<&NSString>,
        ) -> Id<PHCollectionList>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "PhotoKit_PHCollectionList")]
    unsafe impl PHCollectionList {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);
