use crate::common::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::HealthKit::*;
use crate::UniformTypeIdentifiers::*;
ns_enum!(
#[underlying(NSUInteger)]
pub enum HKVisionPrescriptionType {
HKVisionPrescriptionTypeGlasses = 1,
HKVisionPrescriptionTypeContacts = 2,
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HealthKit_HKVisionPrescription")]
pub struct HKVisionPrescription;
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl ClassType for HKVisionPrescription {
#[inherits(HKObject, NSObject)]
type Super = HKSample;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl NSCoding for HKVisionPrescription {}
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl NSCopying for HKVisionPrescription {}
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl NSObjectProtocol for HKVisionPrescription {}
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl NSSecureCoding for HKVisionPrescription {}
extern_methods!(
#[cfg(feature = "HealthKit_HKVisionPrescription")]
unsafe impl HKVisionPrescription {
#[method(prescriptionType)]
pub unsafe fn prescriptionType(&self) -> HKVisionPrescriptionType;
#[cfg(feature = "Foundation_NSDate")]
#[method_id(@__retain_semantics Other dateIssued)]
pub unsafe fn dateIssued(&self) -> Id<NSDate>;
#[cfg(feature = "Foundation_NSDate")]
#[method_id(@__retain_semantics Other expirationDate)]
pub unsafe fn expirationDate(&self) -> Option<Id<NSDate>>;
#[cfg(all(
feature = "Foundation_NSDate",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString",
feature = "HealthKit_HKDevice"
))]
#[method_id(@__retain_semantics Other prescriptionWithType:dateIssued:expirationDate:device:metadata:)]
pub unsafe fn prescriptionWithType_dateIssued_expirationDate_device_metadata(
r#type: HKVisionPrescriptionType,
date_issued: &NSDate,
expiration_date: Option<&NSDate>,
device: Option<&HKDevice>,
metadata: Option<&NSDictionary<NSString, AnyObject>>,
) -> Id<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);