objc2_health_kit/generated/
HKCorrelation.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(HKSample, HKObject, NSObject))]
20 #[derive(Debug, PartialEq, Eq, Hash)]
21 #[cfg(all(feature = "HKObject", feature = "HKSample"))]
22 pub struct HKCorrelation;
23);
24
25#[cfg(all(feature = "HKObject", feature = "HKSample"))]
26unsafe impl Send for HKCorrelation {}
27
28#[cfg(all(feature = "HKObject", feature = "HKSample"))]
29unsafe impl Sync for HKCorrelation {}
30
31#[cfg(all(feature = "HKObject", feature = "HKSample"))]
32extern_conformance!(
33 unsafe impl NSCoding for HKCorrelation {}
34);
35
36#[cfg(all(feature = "HKObject", feature = "HKSample"))]
37extern_conformance!(
38 unsafe impl NSObjectProtocol for HKCorrelation {}
39);
40
41#[cfg(all(feature = "HKObject", feature = "HKSample"))]
42extern_conformance!(
43 unsafe impl NSSecureCoding for HKCorrelation {}
44);
45
46#[cfg(all(feature = "HKObject", feature = "HKSample"))]
47impl HKCorrelation {
48 extern_methods!(
49 #[cfg(feature = "HKObjectType")]
50 #[unsafe(method(correlationType))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn correlationType(&self) -> Retained<HKCorrelationType>;
53
54 #[unsafe(method(objects))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn objects(&self) -> Retained<NSSet<HKSample>>;
58
59 #[cfg(feature = "HKObjectType")]
60 #[unsafe(method(correlationWithType:startDate:endDate:objects:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn correlationWithType_startDate_endDate_objects(
66 correlation_type: &HKCorrelationType,
67 start_date: &NSDate,
68 end_date: &NSDate,
69 objects: &NSSet<HKSample>,
70 ) -> Retained<Self>;
71
72 #[cfg(feature = "HKObjectType")]
73 #[unsafe(method(correlationWithType:startDate:endDate:objects:metadata:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn correlationWithType_startDate_endDate_objects_metadata(
83 correlation_type: &HKCorrelationType,
84 start_date: &NSDate,
85 end_date: &NSDate,
86 objects: &NSSet<HKSample>,
87 metadata: Option<&NSDictionary<NSString, AnyObject>>,
88 ) -> Retained<Self>;
89
90 #[cfg(all(feature = "HKDevice", feature = "HKObjectType"))]
91 #[unsafe(method(correlationWithType:startDate:endDate:objects:device:metadata:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn correlationWithType_startDate_endDate_objects_device_metadata(
111 correlation_type: &HKCorrelationType,
112 start_date: &NSDate,
113 end_date: &NSDate,
114 objects: &NSSet<HKSample>,
115 device: Option<&HKDevice>,
116 metadata: Option<&NSDictionary<NSString, AnyObject>>,
117 ) -> Retained<Self>;
118
119 #[cfg(feature = "HKObjectType")]
120 #[unsafe(method(objectsForType:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn objectsForType(
124 &self,
125 object_type: &HKObjectType,
126 ) -> Retained<NSSet<HKSample>>;
127 );
128}
129
130#[cfg(all(feature = "HKObject", feature = "HKSample"))]
132impl HKCorrelation {
133 extern_methods!(
134 #[unsafe(method(init))]
135 #[unsafe(method_family = init)]
136 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
137 );
138}
139
140#[cfg(all(feature = "HKObject", feature = "HKSample"))]
142impl HKCorrelation {
143 extern_methods!(
144 #[unsafe(method(new))]
145 #[unsafe(method_family = new)]
146 pub unsafe fn new() -> Retained<Self>;
147 );
148}