//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckuseridentitylookupinfo?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CKUserIdentityLookupInfo;
);

extern_conformance!(
    unsafe impl NSCoding for CKUserIdentityLookupInfo {}
);

extern_conformance!(
    unsafe impl NSCopying for CKUserIdentityLookupInfo {}
);

unsafe impl CopyingHelper for CKUserIdentityLookupInfo {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CKUserIdentityLookupInfo {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CKUserIdentityLookupInfo {}
);

impl CKUserIdentityLookupInfo {
    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>;

        #[unsafe(method(initWithEmailAddress:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithEmailAddress(
            this: Allocated<Self>,
            email_address: &NSString,
        ) -> Retained<Self>;

        #[unsafe(method(initWithPhoneNumber:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPhoneNumber(
            this: Allocated<Self>,
            phone_number: &NSString,
        ) -> Retained<Self>;

        #[cfg(feature = "CKRecordID")]
        #[unsafe(method(initWithUserRecordID:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithUserRecordID(
            this: Allocated<Self>,
            user_record_id: &CKRecordID,
        ) -> Retained<Self>;

        #[unsafe(method(lookupInfosWithEmails:))]
        #[unsafe(method_family = none)]
        pub unsafe fn lookupInfosWithEmails(
            emails: &NSArray<NSString>,
        ) -> Retained<NSArray<CKUserIdentityLookupInfo>>;

        #[unsafe(method(lookupInfosWithPhoneNumbers:))]
        #[unsafe(method_family = none)]
        pub unsafe fn lookupInfosWithPhoneNumbers(
            phone_numbers: &NSArray<NSString>,
        ) -> Retained<NSArray<CKUserIdentityLookupInfo>>;

        #[cfg(feature = "CKRecordID")]
        #[unsafe(method(lookupInfosWithRecordIDs:))]
        #[unsafe(method_family = none)]
        pub unsafe fn lookupInfosWithRecordIDs(
            record_i_ds: &NSArray<CKRecordID>,
        ) -> Retained<NSArray<CKUserIdentityLookupInfo>>;

        #[unsafe(method(emailAddress))]
        #[unsafe(method_family = none)]
        pub unsafe fn emailAddress(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(phoneNumber))]
        #[unsafe(method_family = none)]
        pub unsafe fn phoneNumber(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "CKRecordID")]
        #[unsafe(method(userRecordID))]
        #[unsafe(method_family = none)]
        pub unsafe fn userRecordID(&self) -> Option<Retained<CKRecordID>>;
    );
}
