use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(CNContact, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CNContact")]
pub struct CNMutableContact;
);
#[cfg(feature = "CNContact")]
extern_conformance!(
unsafe impl NSCoding for CNMutableContact {}
);
#[cfg(feature = "CNContact")]
extern_conformance!(
unsafe impl NSCopying for CNMutableContact {}
);
#[cfg(feature = "CNContact")]
unsafe impl CopyingHelper for CNMutableContact {
type Result = CNContact;
}
#[cfg(feature = "CNContact")]
extern_conformance!(
unsafe impl NSMutableCopying for CNMutableContact {}
);
#[cfg(feature = "CNContact")]
unsafe impl MutableCopyingHelper for CNMutableContact {
type Result = Self;
}
#[cfg(feature = "CNContact")]
extern_conformance!(
unsafe impl NSObjectProtocol for CNMutableContact {}
);
#[cfg(feature = "CNContact")]
extern_conformance!(
unsafe impl NSSecureCoding for CNMutableContact {}
);
#[cfg(feature = "CNContact")]
impl CNMutableContact {
extern_methods!(
#[unsafe(method(contactType))]
#[unsafe(method_family = none)]
pub unsafe fn contactType(&self) -> CNContactType;
#[unsafe(method(setContactType:))]
#[unsafe(method_family = none)]
pub unsafe fn setContactType(&self, contact_type: CNContactType);
#[unsafe(method(namePrefix))]
#[unsafe(method_family = none)]
pub unsafe fn namePrefix(&self) -> Retained<NSString>;
#[unsafe(method(setNamePrefix:))]
#[unsafe(method_family = none)]
pub unsafe fn setNamePrefix(&self, name_prefix: &NSString);
#[unsafe(method(givenName))]
#[unsafe(method_family = none)]
pub unsafe fn givenName(&self) -> Retained<NSString>;
#[unsafe(method(setGivenName:))]
#[unsafe(method_family = none)]
pub unsafe fn setGivenName(&self, given_name: &NSString);
#[unsafe(method(middleName))]
#[unsafe(method_family = none)]
pub unsafe fn middleName(&self) -> Retained<NSString>;
#[unsafe(method(setMiddleName:))]
#[unsafe(method_family = none)]
pub unsafe fn setMiddleName(&self, middle_name: &NSString);
#[unsafe(method(familyName))]
#[unsafe(method_family = none)]
pub unsafe fn familyName(&self) -> Retained<NSString>;
#[unsafe(method(setFamilyName:))]
#[unsafe(method_family = none)]
pub unsafe fn setFamilyName(&self, family_name: &NSString);
#[unsafe(method(previousFamilyName))]
#[unsafe(method_family = none)]
pub unsafe fn previousFamilyName(&self) -> Retained<NSString>;
#[unsafe(method(setPreviousFamilyName:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreviousFamilyName(&self, previous_family_name: &NSString);
#[unsafe(method(nameSuffix))]
#[unsafe(method_family = none)]
pub unsafe fn nameSuffix(&self) -> Retained<NSString>;
#[unsafe(method(setNameSuffix:))]
#[unsafe(method_family = none)]
pub unsafe fn setNameSuffix(&self, name_suffix: &NSString);
#[unsafe(method(nickname))]
#[unsafe(method_family = none)]
pub unsafe fn nickname(&self) -> Retained<NSString>;
#[unsafe(method(setNickname:))]
#[unsafe(method_family = none)]
pub unsafe fn setNickname(&self, nickname: &NSString);
#[unsafe(method(organizationName))]
#[unsafe(method_family = none)]
pub unsafe fn organizationName(&self) -> Retained<NSString>;
#[unsafe(method(setOrganizationName:))]
#[unsafe(method_family = none)]
pub unsafe fn setOrganizationName(&self, organization_name: &NSString);
#[unsafe(method(departmentName))]
#[unsafe(method_family = none)]
pub unsafe fn departmentName(&self) -> Retained<NSString>;
#[unsafe(method(setDepartmentName:))]
#[unsafe(method_family = none)]
pub unsafe fn setDepartmentName(&self, department_name: &NSString);
#[unsafe(method(jobTitle))]
#[unsafe(method_family = none)]
pub unsafe fn jobTitle(&self) -> Retained<NSString>;
#[unsafe(method(setJobTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setJobTitle(&self, job_title: &NSString);
#[unsafe(method(phoneticGivenName))]
#[unsafe(method_family = none)]
pub unsafe fn phoneticGivenName(&self) -> Retained<NSString>;
#[unsafe(method(setPhoneticGivenName:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneticGivenName(&self, phonetic_given_name: &NSString);
#[unsafe(method(phoneticMiddleName))]
#[unsafe(method_family = none)]
pub unsafe fn phoneticMiddleName(&self) -> Retained<NSString>;
#[unsafe(method(setPhoneticMiddleName:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneticMiddleName(&self, phonetic_middle_name: &NSString);
#[unsafe(method(phoneticFamilyName))]
#[unsafe(method_family = none)]
pub unsafe fn phoneticFamilyName(&self) -> Retained<NSString>;
#[unsafe(method(setPhoneticFamilyName:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneticFamilyName(&self, phonetic_family_name: &NSString);
#[unsafe(method(phoneticOrganizationName))]
#[unsafe(method_family = none)]
pub unsafe fn phoneticOrganizationName(&self) -> Retained<NSString>;
#[unsafe(method(setPhoneticOrganizationName:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneticOrganizationName(&self, phonetic_organization_name: &NSString);
#[unsafe(method(note))]
#[unsafe(method_family = none)]
pub unsafe fn note(&self) -> Retained<NSString>;
#[unsafe(method(setNote:))]
#[unsafe(method_family = none)]
pub unsafe fn setNote(&self, note: &NSString);
#[unsafe(method(imageData))]
#[unsafe(method_family = none)]
pub unsafe fn imageData(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setImageData:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageData(&self, image_data: Option<&NSData>);
#[cfg(all(feature = "CNLabeledValue", feature = "CNPhoneNumber"))]
#[unsafe(method(phoneNumbers))]
#[unsafe(method_family = none)]
pub unsafe fn phoneNumbers(&self) -> Retained<NSArray<CNLabeledValue<CNPhoneNumber>>>;
#[cfg(all(feature = "CNLabeledValue", feature = "CNPhoneNumber"))]
#[unsafe(method(setPhoneNumbers:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneNumbers(
&self,
phone_numbers: &NSArray<CNLabeledValue<CNPhoneNumber>>,
);
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(emailAddresses))]
#[unsafe(method_family = none)]
pub unsafe fn emailAddresses(&self) -> Retained<NSArray<CNLabeledValue<NSString>>>;
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(setEmailAddresses:))]
#[unsafe(method_family = none)]
pub unsafe fn setEmailAddresses(&self, email_addresses: &NSArray<CNLabeledValue<NSString>>);
#[cfg(all(feature = "CNLabeledValue", feature = "CNPostalAddress"))]
#[unsafe(method(postalAddresses))]
#[unsafe(method_family = none)]
pub unsafe fn postalAddresses(&self) -> Retained<NSArray<CNLabeledValue<CNPostalAddress>>>;
#[cfg(all(feature = "CNLabeledValue", feature = "CNPostalAddress"))]
#[unsafe(method(setPostalAddresses:))]
#[unsafe(method_family = none)]
pub unsafe fn setPostalAddresses(
&self,
postal_addresses: &NSArray<CNLabeledValue<CNPostalAddress>>,
);
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(urlAddresses))]
#[unsafe(method_family = none)]
pub unsafe fn urlAddresses(&self) -> Retained<NSArray<CNLabeledValue<NSString>>>;
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(setUrlAddresses:))]
#[unsafe(method_family = none)]
pub unsafe fn setUrlAddresses(&self, url_addresses: &NSArray<CNLabeledValue<NSString>>);
#[cfg(all(feature = "CNContactRelation", feature = "CNLabeledValue"))]
#[unsafe(method(contactRelations))]
#[unsafe(method_family = none)]
pub unsafe fn contactRelations(
&self,
) -> Retained<NSArray<CNLabeledValue<CNContactRelation>>>;
#[cfg(all(feature = "CNContactRelation", feature = "CNLabeledValue"))]
#[unsafe(method(setContactRelations:))]
#[unsafe(method_family = none)]
pub unsafe fn setContactRelations(
&self,
contact_relations: &NSArray<CNLabeledValue<CNContactRelation>>,
);
#[cfg(all(feature = "CNLabeledValue", feature = "CNSocialProfile"))]
#[unsafe(method(socialProfiles))]
#[unsafe(method_family = none)]
pub unsafe fn socialProfiles(&self) -> Retained<NSArray<CNLabeledValue<CNSocialProfile>>>;
#[cfg(all(feature = "CNLabeledValue", feature = "CNSocialProfile"))]
#[unsafe(method(setSocialProfiles:))]
#[unsafe(method_family = none)]
pub unsafe fn setSocialProfiles(
&self,
social_profiles: &NSArray<CNLabeledValue<CNSocialProfile>>,
);
#[cfg(all(feature = "CNInstantMessageAddress", feature = "CNLabeledValue"))]
#[unsafe(method(instantMessageAddresses))]
#[unsafe(method_family = none)]
pub unsafe fn instantMessageAddresses(
&self,
) -> Retained<NSArray<CNLabeledValue<CNInstantMessageAddress>>>;
#[cfg(all(feature = "CNInstantMessageAddress", feature = "CNLabeledValue"))]
#[unsafe(method(setInstantMessageAddresses:))]
#[unsafe(method_family = none)]
pub unsafe fn setInstantMessageAddresses(
&self,
instant_message_addresses: &NSArray<CNLabeledValue<CNInstantMessageAddress>>,
);
#[unsafe(method(birthday))]
#[unsafe(method_family = none)]
pub unsafe fn birthday(&self) -> Option<Retained<NSDateComponents>>;
#[unsafe(method(setBirthday:))]
#[unsafe(method_family = none)]
pub unsafe fn setBirthday(&self, birthday: Option<&NSDateComponents>);
#[unsafe(method(nonGregorianBirthday))]
#[unsafe(method_family = none)]
pub unsafe fn nonGregorianBirthday(&self) -> Option<Retained<NSDateComponents>>;
#[unsafe(method(setNonGregorianBirthday:))]
#[unsafe(method_family = none)]
pub unsafe fn setNonGregorianBirthday(
&self,
non_gregorian_birthday: Option<&NSDateComponents>,
);
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(dates))]
#[unsafe(method_family = none)]
pub unsafe fn dates(&self) -> Retained<NSArray<CNLabeledValue<NSDateComponents>>>;
#[cfg(feature = "CNLabeledValue")]
#[unsafe(method(setDates:))]
#[unsafe(method_family = none)]
pub unsafe fn setDates(&self, dates: &NSArray<CNLabeledValue<NSDateComponents>>);
);
}
#[cfg(feature = "CNContact")]
impl CNMutableContact {
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>;
);
}