objc2_health_kit/generated/
HKCumulativeQuantitySample.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(HKQuantitySample, HKSample, HKObject, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(
16 feature = "HKObject",
17 feature = "HKQuantitySample",
18 feature = "HKSample"
19 ))]
20 pub struct HKCumulativeQuantitySample;
21);
22
23#[cfg(all(
24 feature = "HKObject",
25 feature = "HKQuantitySample",
26 feature = "HKSample"
27))]
28unsafe impl Send for HKCumulativeQuantitySample {}
29
30#[cfg(all(
31 feature = "HKObject",
32 feature = "HKQuantitySample",
33 feature = "HKSample"
34))]
35unsafe impl Sync for HKCumulativeQuantitySample {}
36
37#[cfg(all(
38 feature = "HKObject",
39 feature = "HKQuantitySample",
40 feature = "HKSample"
41))]
42extern_conformance!(
43 unsafe impl NSCoding for HKCumulativeQuantitySample {}
44);
45
46#[cfg(all(
47 feature = "HKObject",
48 feature = "HKQuantitySample",
49 feature = "HKSample"
50))]
51extern_conformance!(
52 unsafe impl NSObjectProtocol for HKCumulativeQuantitySample {}
53);
54
55#[cfg(all(
56 feature = "HKObject",
57 feature = "HKQuantitySample",
58 feature = "HKSample"
59))]
60extern_conformance!(
61 unsafe impl NSSecureCoding for HKCumulativeQuantitySample {}
62);
63
64#[cfg(all(
65 feature = "HKObject",
66 feature = "HKQuantitySample",
67 feature = "HKSample"
68))]
69impl HKCumulativeQuantitySample {
70 extern_methods!(
71 #[cfg(feature = "HKQuantity")]
72 #[unsafe(method(sumQuantity))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn sumQuantity(&self) -> Retained<HKQuantity>;
76 );
77}
78
79#[cfg(all(
81 feature = "HKObject",
82 feature = "HKQuantitySample",
83 feature = "HKSample"
84))]
85impl HKCumulativeQuantitySample {
86 extern_methods!(
87 #[cfg(all(feature = "HKObjectType", feature = "HKQuantity"))]
88 #[unsafe(method(quantitySampleWithType:quantity:startDate:endDate:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn quantitySampleWithType_quantity_startDate_endDate(
95 quantity_type: &HKQuantityType,
96 quantity: &HKQuantity,
97 start_date: &NSDate,
98 end_date: &NSDate,
99 ) -> Retained<Self>;
100
101 #[cfg(all(feature = "HKObjectType", feature = "HKQuantity"))]
102 #[unsafe(method(quantitySampleWithType:quantity:startDate:endDate:metadata:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn quantitySampleWithType_quantity_startDate_endDate_metadata(
113 quantity_type: &HKQuantityType,
114 quantity: &HKQuantity,
115 start_date: &NSDate,
116 end_date: &NSDate,
117 metadata: Option<&NSDictionary<NSString, AnyObject>>,
118 ) -> Retained<Self>;
119
120 #[cfg(all(feature = "HKDevice", feature = "HKObjectType", feature = "HKQuantity"))]
121 #[unsafe(method(quantitySampleWithType:quantity:startDate:endDate:device:metadata:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn quantitySampleWithType_quantity_startDate_endDate_device_metadata(
142 quantity_type: &HKQuantityType,
143 quantity: &HKQuantity,
144 start_date: &NSDate,
145 end_date: &NSDate,
146 device: Option<&HKDevice>,
147 metadata: Option<&NSDictionary<NSString, AnyObject>>,
148 ) -> Retained<Self>;
149 );
150}
151
152#[cfg(all(
154 feature = "HKObject",
155 feature = "HKQuantitySample",
156 feature = "HKSample"
157))]
158impl HKCumulativeQuantitySample {
159 extern_methods!(
160 #[unsafe(method(init))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
163 );
164}
165
166#[cfg(all(
168 feature = "HKObject",
169 feature = "HKQuantitySample",
170 feature = "HKSample"
171))]
172impl HKCumulativeQuantitySample {
173 extern_methods!(
174 #[unsafe(method(new))]
175 #[unsafe(method_family = new)]
176 pub unsafe fn new() -> Retained<Self>;
177 );
178}
179
180extern "C" {
181 pub static HKPredicateKeyPathSum: &'static NSString;
183}