use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNPostalAddress;
);
extern_conformance!(
unsafe impl NSCoding for CNPostalAddress {}
);
extern_conformance!(
unsafe impl NSCopying for CNPostalAddress {}
);
unsafe impl CopyingHelper for CNPostalAddress {
type Result = Self;
}
extern_conformance!(
unsafe impl NSMutableCopying for CNPostalAddress {}
);
#[cfg(feature = "CNMutablePostalAddress")]
unsafe impl MutableCopyingHelper for CNPostalAddress {
type Result = CNMutablePostalAddress;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CNPostalAddress {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CNPostalAddress {}
);
impl CNPostalAddress {
extern_methods!(
#[unsafe(method(street))]
#[unsafe(method_family = none)]
pub unsafe fn street(&self) -> Retained<NSString>;
#[unsafe(method(subLocality))]
#[unsafe(method_family = none)]
pub unsafe fn subLocality(&self) -> Retained<NSString>;
#[unsafe(method(city))]
#[unsafe(method_family = none)]
pub unsafe fn city(&self) -> Retained<NSString>;
#[unsafe(method(subAdministrativeArea))]
#[unsafe(method_family = none)]
pub unsafe fn subAdministrativeArea(&self) -> Retained<NSString>;
#[unsafe(method(state))]
#[unsafe(method_family = none)]
pub unsafe fn state(&self) -> Retained<NSString>;
#[unsafe(method(postalCode))]
#[unsafe(method_family = none)]
pub unsafe fn postalCode(&self) -> Retained<NSString>;
#[unsafe(method(country))]
#[unsafe(method_family = none)]
pub unsafe fn country(&self) -> Retained<NSString>;
#[unsafe(method(ISOCountryCode))]
#[unsafe(method_family = none)]
pub unsafe fn ISOCountryCode(&self) -> Retained<NSString>;
#[unsafe(method(localizedStringForKey:))]
#[unsafe(method_family = none)]
pub unsafe fn localizedStringForKey(key: &NSString) -> Retained<NSString>;
);
}
impl CNPostalAddress {
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 "C" {
pub static CNPostalAddressStreetKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressSubLocalityKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressCityKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressSubAdministrativeAreaKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressStateKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressPostalCodeKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressCountryKey: &'static NSString;
}
extern "C" {
pub static CNPostalAddressISOCountryCodeKey: &'static NSString;
}