objc2_health_kit/generated/
HKSample.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(HKObject, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "HKObject")]
16 pub struct HKSample;
17);
18
19#[cfg(feature = "HKObject")]
20unsafe impl Send for HKSample {}
21
22#[cfg(feature = "HKObject")]
23unsafe impl Sync for HKSample {}
24
25#[cfg(feature = "HKObject")]
26extern_conformance!(
27 unsafe impl NSCoding for HKSample {}
28);
29
30#[cfg(feature = "HKObject")]
31extern_conformance!(
32 unsafe impl NSObjectProtocol for HKSample {}
33);
34
35#[cfg(feature = "HKObject")]
36extern_conformance!(
37 unsafe impl NSSecureCoding for HKSample {}
38);
39
40#[cfg(feature = "HKObject")]
41impl HKSample {
42 extern_methods!(
43 #[cfg(feature = "HKObjectType")]
44 #[unsafe(method(sampleType))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn sampleType(&self) -> Retained<HKSampleType>;
47
48 #[unsafe(method(startDate))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn startDate(&self) -> Retained<NSDate>;
51
52 #[unsafe(method(endDate))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn endDate(&self) -> Retained<NSDate>;
55
56 #[unsafe(method(hasUndeterminedDuration))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn hasUndeterminedDuration(&self) -> bool;
62 );
63}
64
65#[cfg(feature = "HKObject")]
67impl HKSample {
68 extern_methods!(
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72 );
73}
74
75#[cfg(feature = "HKObject")]
77impl HKSample {
78 extern_methods!(
79 #[unsafe(method(new))]
80 #[unsafe(method_family = new)]
81 pub unsafe fn new() -> Retained<Self>;
82 );
83}
84
85extern "C" {
86 pub static HKSampleSortIdentifierStartDate: &'static NSString;
88}
89
90extern "C" {
91 pub static HKSampleSortIdentifierEndDate: &'static NSString;
93}
94
95extern "C" {
96 pub static HKPredicateKeyPathStartDate: &'static NSString;
98}
99
100extern "C" {
101 pub static HKPredicateKeyPathEndDate: &'static NSString;
103}