use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentCloudKitContainerEventType(pub NSInteger);
impl NSPersistentCloudKitContainerEventType {
#[doc(alias = "NSPersistentCloudKitContainerEventTypeSetup")]
pub const Setup: Self = Self(0);
#[doc(alias = "NSPersistentCloudKitContainerEventTypeImport")]
pub const Import: Self = Self(1);
#[doc(alias = "NSPersistentCloudKitContainerEventTypeExport")]
pub const Export: Self = Self(2);
}
unsafe impl Encode for NSPersistentCloudKitContainerEventType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSPersistentCloudKitContainerEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName;
}
extern "C" {
pub static NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString;
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersistentCloudKitContainerEvent;
);
extern_conformance!(
unsafe impl NSCopying for NSPersistentCloudKitContainerEvent {}
);
unsafe impl CopyingHelper for NSPersistentCloudKitContainerEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerEvent {}
);
impl NSPersistentCloudKitContainerEvent {
extern_methods!(
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSUUID>;
#[unsafe(method(storeIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn storeIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> NSPersistentCloudKitContainerEventType;
#[unsafe(method(startDate))]
#[unsafe(method_family = none)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[unsafe(method(endDate))]
#[unsafe(method_family = none)]
pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(succeeded))]
#[unsafe(method_family = none)]
pub unsafe fn succeeded(&self) -> bool;
#[unsafe(method(error))]
#[unsafe(method_family = none)]
pub unsafe fn error(&self) -> Option<Retained<NSError>>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}