use crate::common::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::HealthKit::*;
use crate::UniformTypeIdentifiers::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HealthKit_HKQuantitySample")]
pub struct HKQuantitySample;
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl ClassType for HKQuantitySample {
#[inherits(HKObject, NSObject)]
type Super = HKSample;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl NSCoding for HKQuantitySample {}
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl NSObjectProtocol for HKQuantitySample {}
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl NSSecureCoding for HKQuantitySample {}
extern_methods!(
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl HKQuantitySample {
#[cfg(feature = "HealthKit_HKQuantityType")]
#[method_id(@__retain_semantics Other quantityType)]
pub unsafe fn quantityType(&self) -> Id<HKQuantityType>;
#[cfg(feature = "HealthKit_HKQuantity")]
#[method_id(@__retain_semantics Other quantity)]
pub unsafe fn quantity(&self) -> Id<HKQuantity>;
#[method(count)]
pub unsafe fn count(&self) -> NSInteger;
#[cfg(all(
feature = "Foundation_NSDate",
feature = "HealthKit_HKQuantity",
feature = "HealthKit_HKQuantityType"
))]
#[method_id(@__retain_semantics Other quantitySampleWithType:quantity:startDate:endDate:)]
pub unsafe fn quantitySampleWithType_quantity_startDate_endDate(
quantity_type: &HKQuantityType,
quantity: &HKQuantity,
start_date: &NSDate,
end_date: &NSDate,
) -> Id<Self>;
#[cfg(all(
feature = "Foundation_NSDate",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString",
feature = "HealthKit_HKQuantity",
feature = "HealthKit_HKQuantityType"
))]
#[method_id(@__retain_semantics Other quantitySampleWithType:quantity:startDate:endDate:metadata:)]
pub unsafe fn quantitySampleWithType_quantity_startDate_endDate_metadata(
quantity_type: &HKQuantityType,
quantity: &HKQuantity,
start_date: &NSDate,
end_date: &NSDate,
metadata: Option<&NSDictionary<NSString, AnyObject>>,
) -> Id<Self>;
#[cfg(all(
feature = "Foundation_NSDate",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString",
feature = "HealthKit_HKDevice",
feature = "HealthKit_HKQuantity",
feature = "HealthKit_HKQuantityType"
))]
#[method_id(@__retain_semantics Other quantitySampleWithType:quantity:startDate:endDate:device:metadata:)]
pub unsafe fn quantitySampleWithType_quantity_startDate_endDate_device_metadata(
quantity_type: &HKQuantityType,
quantity: &HKQuantity,
start_date: &NSDate,
end_date: &NSDate,
device: Option<&HKDevice>,
metadata: Option<&NSDictionary<NSString, AnyObject>>,
) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl HKQuantitySample {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "HealthKit_HKQuantitySample")]
unsafe impl HKQuantitySample {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_static!(HKPredicateKeyPathQuantity: &'static NSString);
extern_static!(HKPredicateKeyPathCount: &'static NSString);