use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait PKIdentityDocumentDescriptor: NSObjectProtocol {
#[cfg(feature = "PKIdentityElement")]
#[unsafe(method(elements))]
#[unsafe(method_family = none)]
unsafe fn elements(&self) -> Retained<NSArray<PKIdentityElement>>;
#[cfg(all(feature = "PKIdentityElement", feature = "PKIdentityIntentToStore"))]
#[unsafe(method(intentToStoreForElement:))]
#[unsafe(method_family = none)]
unsafe fn intentToStoreForElement(
&self,
element: &PKIdentityElement,
) -> Option<Retained<PKIdentityIntentToStore>>;
#[cfg(all(feature = "PKIdentityElement", feature = "PKIdentityIntentToStore"))]
#[unsafe(method(addElements:withIntentToStore:))]
#[unsafe(method_family = none)]
unsafe fn addElements_withIntentToStore(
&self,
elements: &NSArray<PKIdentityElement>,
intent_to_store: &PKIdentityIntentToStore,
);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKIdentityDriversLicenseDescriptor;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKIdentityDriversLicenseDescriptor {}
);
extern_conformance!(
unsafe impl PKIdentityDocumentDescriptor for PKIdentityDriversLicenseDescriptor {}
);
impl PKIdentityDriversLicenseDescriptor {
extern_methods!();
}
impl PKIdentityDriversLicenseDescriptor {
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>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKIdentityNationalIDCardDescriptor;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKIdentityNationalIDCardDescriptor {}
);
extern_conformance!(
unsafe impl PKIdentityDocumentDescriptor for PKIdentityNationalIDCardDescriptor {}
);
impl PKIdentityNationalIDCardDescriptor {
extern_methods!(
#[unsafe(method(regionCode))]
#[unsafe(method_family = none)]
pub unsafe fn regionCode(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setRegionCode:))]
#[unsafe(method_family = none)]
pub unsafe fn setRegionCode(&self, region_code: Option<&NSString>);
);
}
impl PKIdentityNationalIDCardDescriptor {
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>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKIdentityPhotoIDDescriptor;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKIdentityPhotoIDDescriptor {}
);
extern_conformance!(
unsafe impl PKIdentityDocumentDescriptor for PKIdentityPhotoIDDescriptor {}
);
impl PKIdentityPhotoIDDescriptor {
extern_methods!();
}
impl PKIdentityPhotoIDDescriptor {
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>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKIdentityAnyOfDescriptor;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKIdentityAnyOfDescriptor {}
);
extern_conformance!(
unsafe impl PKIdentityDocumentDescriptor for PKIdentityAnyOfDescriptor {}
);
impl PKIdentityAnyOfDescriptor {
extern_methods!(
#[unsafe(method(descriptors))]
#[unsafe(method_family = none)]
pub unsafe fn descriptors(
&self,
) -> Retained<NSArray<ProtocolObject<dyn PKIdentityDocumentDescriptor>>>;
#[unsafe(method(initWithDescriptors:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDescriptors(
this: Allocated<Self>,
descriptors: &NSArray<ProtocolObject<dyn PKIdentityDocumentDescriptor>>,
) -> Retained<Self>;
#[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>;
);
}