use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
use objc2_contacts::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(CLPlacemark, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-core-location")]
#[deprecated = "Use MKMapItem's location, address and addressRepresentations properties instead. Use MKAddressRepresentations for formatted address strings for MapKit provided MKMapItems"]
pub struct MKPlacemark;
);
#[cfg(all(feature = "MKAnnotation", feature = "objc2-core-location"))]
extern_conformance!(
unsafe impl MKAnnotation for MKPlacemark {}
);
#[cfg(feature = "objc2-core-location")]
extern_conformance!(
unsafe impl NSCoding for MKPlacemark {}
);
#[cfg(feature = "objc2-core-location")]
extern_conformance!(
unsafe impl NSCopying for MKPlacemark {}
);
#[cfg(feature = "objc2-core-location")]
unsafe impl CopyingHelper for MKPlacemark {
type Result = Self;
}
#[cfg(feature = "objc2-core-location")]
extern_conformance!(
unsafe impl NSObjectProtocol for MKPlacemark {}
);
#[cfg(feature = "objc2-core-location")]
extern_conformance!(
unsafe impl NSSecureCoding for MKPlacemark {}
);
#[cfg(feature = "objc2-core-location")]
impl MKPlacemark {
extern_methods!(
#[unsafe(method(initWithCoordinate:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoordinate(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
) -> Retained<Self>;
#[deprecated = "Use MKMapItem's location, address and addressRepresentations properties instead. Use MKAddressRepresentations for formatted address strings for MapKit provided MKMapItems"]
#[unsafe(method(initWithCoordinate:addressDictionary:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoordinate_addressDictionary(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
address_dictionary: Option<&NSDictionary<NSString, AnyObject>>,
) -> Retained<Self>;
#[cfg(feature = "objc2-contacts")]
#[cfg(not(target_os = "tvos"))]
#[unsafe(method(initWithCoordinate:postalAddress:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoordinate_postalAddress(
this: Allocated<Self>,
coordinate: CLLocationCoordinate2D,
postal_address: &CNPostalAddress,
) -> Retained<Self>;
#[deprecated = "Use MKMapItem's location, address and addressRepresentations properties instead. Use MKAddressRepresentations for formatted address strings for MapKit provided MKMapItems"]
#[unsafe(method(countryCode))]
#[unsafe(method_family = none)]
pub unsafe fn countryCode(&self) -> Option<Retained<NSString>>;
);
}
#[cfg(feature = "objc2-core-location")]
impl MKPlacemark {
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>;
#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
#[unsafe(method(initWithPlacemark:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPlacemark(
this: Allocated<Self>,
placemark: &CLPlacemark,
) -> Retained<Self>;
);
}