use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(HKObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HKObject")]
pub struct HKSample;
);
#[cfg(feature = "HKObject")]
unsafe impl Send for HKSample {}
#[cfg(feature = "HKObject")]
unsafe impl Sync for HKSample {}
#[cfg(feature = "HKObject")]
extern_conformance!(
unsafe impl NSCoding for HKSample {}
);
#[cfg(feature = "HKObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for HKSample {}
);
#[cfg(feature = "HKObject")]
extern_conformance!(
unsafe impl NSSecureCoding for HKSample {}
);
#[cfg(feature = "HKObject")]
impl HKSample {
extern_methods!(
#[cfg(feature = "HKObjectType")]
#[unsafe(method(sampleType))]
#[unsafe(method_family = none)]
pub unsafe fn sampleType(&self) -> Retained<HKSampleType>;
#[unsafe(method(startDate))]
#[unsafe(method_family = none)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[unsafe(method(endDate))]
#[unsafe(method_family = none)]
pub unsafe fn endDate(&self) -> Retained<NSDate>;
#[unsafe(method(hasUndeterminedDuration))]
#[unsafe(method_family = none)]
pub unsafe fn hasUndeterminedDuration(&self) -> bool;
);
}
#[cfg(feature = "HKObject")]
impl HKSample {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "HKObject")]
impl HKSample {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern "C" {
pub static HKSampleSortIdentifierStartDate: &'static NSString;
}
extern "C" {
pub static HKSampleSortIdentifierEndDate: &'static NSString;
}
extern "C" {
pub static HKPredicateKeyPathStartDate: &'static NSString;
}
extern "C" {
pub static HKPredicateKeyPathEndDate: &'static NSString;
}