use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPersonNameComponents;
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSCoding for NSPersonNameComponents {}
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSCopying for NSPersonNameComponents {}
);
#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSPersonNameComponents {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSPersonNameComponents {}
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSSecureCoding for NSPersonNameComponents {}
);
impl NSPersonNameComponents {
extern_methods!(
#[cfg(feature = "NSString")]
#[unsafe(method(namePrefix))]
#[unsafe(method_family = none)]
pub fn namePrefix(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setNamePrefix:))]
#[unsafe(method_family = none)]
pub fn setNamePrefix(&self, name_prefix: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(givenName))]
#[unsafe(method_family = none)]
pub fn givenName(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setGivenName:))]
#[unsafe(method_family = none)]
pub fn setGivenName(&self, given_name: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(middleName))]
#[unsafe(method_family = none)]
pub fn middleName(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setMiddleName:))]
#[unsafe(method_family = none)]
pub fn setMiddleName(&self, middle_name: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(familyName))]
#[unsafe(method_family = none)]
pub fn familyName(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setFamilyName:))]
#[unsafe(method_family = none)]
pub fn setFamilyName(&self, family_name: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(nameSuffix))]
#[unsafe(method_family = none)]
pub fn nameSuffix(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setNameSuffix:))]
#[unsafe(method_family = none)]
pub fn setNameSuffix(&self, name_suffix: Option<&NSString>);
#[cfg(feature = "NSString")]
#[unsafe(method(nickname))]
#[unsafe(method_family = none)]
pub fn nickname(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(setNickname:))]
#[unsafe(method_family = none)]
pub fn setNickname(&self, nickname: Option<&NSString>);
#[unsafe(method(phoneticRepresentation))]
#[unsafe(method_family = none)]
pub fn phoneticRepresentation(&self) -> Option<Retained<NSPersonNameComponents>>;
#[unsafe(method(setPhoneticRepresentation:))]
#[unsafe(method_family = none)]
pub fn setPhoneticRepresentation(
&self,
phonetic_representation: Option<&NSPersonNameComponents>,
);
);
}
impl NSPersonNameComponents {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSPersonNameComponents {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}