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 PHAssetCollectionChangeRequest;
);
#[cfg(feature = "PHChangeRequest")]
extern_conformance!(
unsafe impl NSObjectProtocol for PHAssetCollectionChangeRequest {}
);
#[cfg(feature = "PHChangeRequest")]
impl PHAssetCollectionChangeRequest {
extern_methods!(
#[unsafe(method(creationRequestForAssetCollectionWithTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn creationRequestForAssetCollectionWithTitle(
title: &NSString,
) -> Retained<Self>;
#[cfg(feature = "PHObject")]
#[unsafe(method(placeholderForCreatedAssetCollection))]
#[unsafe(method_family = none)]
pub unsafe fn placeholderForCreatedAssetCollection(&self) -> Retained<PHObjectPlaceholder>;
#[unsafe(method(deleteAssetCollections:))]
#[unsafe(method_family = none)]
pub unsafe fn deleteAssetCollections(
asset_collections: &ProtocolObject<dyn NSFastEnumeration>,
);
#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
#[unsafe(method(changeRequestForAssetCollection:))]
#[unsafe(method_family = none)]
pub unsafe fn changeRequestForAssetCollection(
asset_collection: &PHAssetCollection,
) -> Option<Retained<Self>>;
#[cfg(all(
feature = "PHAsset",
feature = "PHCollection",
feature = "PHFetchResult",
feature = "PHObject"
))]
#[unsafe(method(changeRequestForAssetCollection:assets:))]
#[unsafe(method_family = none)]
pub unsafe fn changeRequestForAssetCollection_assets(
asset_collection: &PHAssetCollection,
assets: Option<&PHFetchResult<PHAsset>>,
) -> 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(addAssets:))]
#[unsafe(method_family = none)]
pub unsafe fn addAssets(&self, assets: &ProtocolObject<dyn NSFastEnumeration>);
#[unsafe(method(insertAssets:atIndexes:))]
#[unsafe(method_family = none)]
pub unsafe fn insertAssets_atIndexes(
&self,
assets: &ProtocolObject<dyn NSFastEnumeration>,
indexes: &NSIndexSet,
);
#[unsafe(method(removeAssets:))]
#[unsafe(method_family = none)]
pub unsafe fn removeAssets(&self, assets: &ProtocolObject<dyn NSFastEnumeration>);
#[unsafe(method(removeAssetsAtIndexes:))]
#[unsafe(method_family = none)]
pub unsafe fn removeAssetsAtIndexes(&self, indexes: &NSIndexSet);
#[unsafe(method(replaceAssetsAtIndexes:withAssets:))]
#[unsafe(method_family = none)]
pub unsafe fn replaceAssetsAtIndexes_withAssets(
&self,
indexes: &NSIndexSet,
assets: &ProtocolObject<dyn NSFastEnumeration>,
);
#[unsafe(method(moveAssetsAtIndexes:toIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn moveAssetsAtIndexes_toIndex(
&self,
from_indexes: &NSIndexSet,
to_index: NSUInteger,
);
);
}
#[cfg(feature = "PHChangeRequest")]
impl PHAssetCollectionChangeRequest {
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>;
);
}