objc2_health_kit/generated/
HKCategorySample.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(HKSample, HKObject, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(all(feature = "HKObject", feature = "HKSample"))]
18 pub struct HKCategorySample;
19);
20
21#[cfg(all(feature = "HKObject", feature = "HKSample"))]
22unsafe impl Send for HKCategorySample {}
23
24#[cfg(all(feature = "HKObject", feature = "HKSample"))]
25unsafe impl Sync for HKCategorySample {}
26
27#[cfg(all(feature = "HKObject", feature = "HKSample"))]
28extern_conformance!(
29 unsafe impl NSCoding for HKCategorySample {}
30);
31
32#[cfg(all(feature = "HKObject", feature = "HKSample"))]
33extern_conformance!(
34 unsafe impl NSObjectProtocol for HKCategorySample {}
35);
36
37#[cfg(all(feature = "HKObject", feature = "HKSample"))]
38extern_conformance!(
39 unsafe impl NSSecureCoding for HKCategorySample {}
40);
41
42#[cfg(all(feature = "HKObject", feature = "HKSample"))]
43impl HKCategorySample {
44 extern_methods!(
45 #[cfg(feature = "HKObjectType")]
46 #[unsafe(method(categoryType))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn categoryType(&self) -> Retained<HKCategoryType>;
49
50 #[unsafe(method(value))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn value(&self) -> NSInteger;
54
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59 #[cfg(feature = "HKObjectType")]
60 #[unsafe(method(categorySampleWithType:value:startDate:endDate:metadata:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn categorySampleWithType_value_startDate_endDate_metadata(
79 r#type: &HKCategoryType,
80 value: NSInteger,
81 start_date: &NSDate,
82 end_date: &NSDate,
83 metadata: Option<&NSDictionary<NSString, AnyObject>>,
84 ) -> Retained<Self>;
85
86 #[cfg(feature = "HKObjectType")]
87 #[unsafe(method(categorySampleWithType:value:startDate:endDate:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn categorySampleWithType_value_startDate_endDate(
100 r#type: &HKCategoryType,
101 value: NSInteger,
102 start_date: &NSDate,
103 end_date: &NSDate,
104 ) -> Retained<Self>;
105
106 #[cfg(all(feature = "HKDevice", feature = "HKObjectType"))]
107 #[unsafe(method(categorySampleWithType:value:startDate:endDate:device:metadata:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn categorySampleWithType_value_startDate_endDate_device_metadata(
128 r#type: &HKCategoryType,
129 value: NSInteger,
130 start_date: &NSDate,
131 end_date: &NSDate,
132 device: Option<&HKDevice>,
133 metadata: Option<&NSDictionary<NSString, AnyObject>>,
134 ) -> Retained<Self>;
135 );
136}
137
138#[cfg(all(feature = "HKObject", feature = "HKSample"))]
140impl HKCategorySample {
141 extern_methods!(
142 #[unsafe(method(new))]
143 #[unsafe(method_family = new)]
144 pub unsafe fn new() -> Retained<Self>;
145 );
146}
147
148extern "C" {
149 pub static HKPredicateKeyPathCategoryValue: &'static NSString;
151}