use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-uniform-type-identifiers")]
use objc2_uniform_type_identifiers::*;
use crate::*;
extern_class!(
#[unsafe(super(PHObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PHObject")]
pub struct PHAsset;
);
#[cfg(feature = "PHObject")]
unsafe impl Send for PHAsset {}
#[cfg(feature = "PHObject")]
unsafe impl Sync for PHAsset {}
#[cfg(feature = "PHObject")]
extern_conformance!(
unsafe impl NSCopying for PHAsset {}
);
#[cfg(feature = "PHObject")]
unsafe impl CopyingHelper for PHAsset {
type Result = Self;
}
#[cfg(feature = "PHObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for PHAsset {}
);
#[cfg(feature = "PHObject")]
impl PHAsset {
extern_methods!(
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(playbackStyle))]
#[unsafe(method_family = none)]
pub unsafe fn playbackStyle(&self) -> PHAssetPlaybackStyle;
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(mediaType))]
#[unsafe(method_family = none)]
pub unsafe fn mediaType(&self) -> PHAssetMediaType;
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(mediaSubtypes))]
#[unsafe(method_family = none)]
pub unsafe fn mediaSubtypes(&self) -> PHAssetMediaSubtype;
#[cfg(feature = "objc2-uniform-type-identifiers")]
#[unsafe(method(contentType))]
#[unsafe(method_family = none)]
pub unsafe fn contentType(&self) -> Retained<UTType>;
#[unsafe(method(pixelWidth))]
#[unsafe(method_family = none)]
pub unsafe fn pixelWidth(&self) -> NSUInteger;
#[unsafe(method(pixelHeight))]
#[unsafe(method_family = none)]
pub unsafe fn pixelHeight(&self) -> NSUInteger;
#[unsafe(method(creationDate))]
#[unsafe(method_family = none)]
pub unsafe fn creationDate(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(modificationDate))]
#[unsafe(method_family = none)]
pub unsafe fn modificationDate(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(addedDate))]
#[unsafe(method_family = none)]
pub unsafe fn addedDate(&self) -> Retained<NSDate>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(location))]
#[unsafe(method_family = none)]
pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(isHidden))]
#[unsafe(method_family = none)]
pub unsafe fn isHidden(&self) -> bool;
#[unsafe(method(isFavorite))]
#[unsafe(method_family = none)]
pub unsafe fn isFavorite(&self) -> bool;
#[deprecated = "No longer supported"]
#[unsafe(method(isSyncFailureHidden))]
#[unsafe(method_family = none)]
pub unsafe fn isSyncFailureHidden(&self) -> bool;
#[unsafe(method(burstIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn burstIdentifier(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(burstSelectionTypes))]
#[unsafe(method_family = none)]
pub unsafe fn burstSelectionTypes(&self) -> PHAssetBurstSelectionType;
#[unsafe(method(representsBurst))]
#[unsafe(method_family = none)]
pub unsafe fn representsBurst(&self) -> bool;
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(sourceType))]
#[unsafe(method_family = none)]
pub unsafe fn sourceType(&self) -> PHAssetSourceType;
#[unsafe(method(hasAdjustments))]
#[unsafe(method_family = none)]
pub unsafe fn hasAdjustments(&self) -> bool;
#[unsafe(method(adjustmentFormatIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn adjustmentFormatIdentifier(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "PhotosTypes")]
#[unsafe(method(canPerformEditOperation:))]
#[unsafe(method_family = none)]
pub unsafe fn canPerformEditOperation(&self, edit_operation: PHAssetEditOperation) -> bool;
#[cfg(all(
feature = "PHCollection",
feature = "PHFetchOptions",
feature = "PHFetchResult"
))]
#[unsafe(method(fetchAssetsInAssetCollection:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsInAssetCollection_options(
asset_collection: &PHAssetCollection,
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
#[cfg(all(feature = "PHFetchOptions", feature = "PHFetchResult"))]
#[unsafe(method(fetchAssetsWithLocalIdentifiers:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsWithLocalIdentifiers_options(
identifiers: &NSArray<NSString>,
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
#[cfg(all(
feature = "PHCollection",
feature = "PHFetchOptions",
feature = "PHFetchResult"
))]
#[unsafe(method(fetchKeyAssetsInAssetCollection:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchKeyAssetsInAssetCollection_options(
asset_collection: &PHAssetCollection,
options: Option<&PHFetchOptions>,
) -> Option<Retained<PHFetchResult<PHAsset>>>;
#[cfg(all(feature = "PHFetchOptions", feature = "PHFetchResult"))]
#[unsafe(method(fetchAssetsWithBurstIdentifier:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsWithBurstIdentifier_options(
burst_identifier: &NSString,
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
#[cfg(all(feature = "PHFetchOptions", feature = "PHFetchResult"))]
#[unsafe(method(fetchAssetsWithOptions:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsWithOptions(
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
#[cfg(all(
feature = "PHFetchOptions",
feature = "PHFetchResult",
feature = "PhotosTypes"
))]
#[unsafe(method(fetchAssetsWithMediaType:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsWithMediaType_options(
media_type: PHAssetMediaType,
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
#[cfg(all(feature = "PHFetchOptions", feature = "PHFetchResult"))]
#[deprecated = "Will be removed in a future release"]
#[unsafe(method(fetchAssetsWithALAssetURLs:options:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAssetsWithALAssetURLs_options(
asset_ur_ls: &NSArray<NSURL>,
options: Option<&PHFetchOptions>,
) -> Retained<PHFetchResult<PHAsset>>;
);
}
#[cfg(feature = "PHObject")]
impl PHAsset {
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>;
);
}