objc2_intents/generated/
INGetCarPowerLevelStatusIntentResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetcarpowerlevelstatusintentresponsecode?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INGetCarPowerLevelStatusIntentResponseCode(pub NSInteger);
15impl INGetCarPowerLevelStatusIntentResponseCode {
16    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeUnspecified")]
17    pub const Unspecified: Self = Self(0);
18    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeReady")]
19    pub const Ready: Self = Self(1);
20    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeInProgress")]
21    pub const InProgress: Self = Self(2);
22    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeSuccess")]
23    pub const Success: Self = Self(3);
24    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeFailure")]
25    pub const Failure: Self = Self(4);
26    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeFailureRequiringAppLaunch")]
27    pub const FailureRequiringAppLaunch: Self = Self(5);
28}
29
30unsafe impl Encode for INGetCarPowerLevelStatusIntentResponseCode {
31    const ENCODING: Encoding = NSInteger::ENCODING;
32}
33
34unsafe impl RefEncode for INGetCarPowerLevelStatusIntentResponseCode {
35    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
36}
37
38extern_class!(
39    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetcarpowerlevelstatusintentresponse?language=objc)
40    #[unsafe(super(INIntentResponse, NSObject))]
41    #[derive(Debug, PartialEq, Eq, Hash)]
42    #[cfg(feature = "INIntentResponse")]
43    pub struct INGetCarPowerLevelStatusIntentResponse;
44);
45
46#[cfg(feature = "INIntentResponse")]
47extern_conformance!(
48    unsafe impl NSCoding for INGetCarPowerLevelStatusIntentResponse {}
49);
50
51#[cfg(feature = "INIntentResponse")]
52extern_conformance!(
53    unsafe impl NSCopying for INGetCarPowerLevelStatusIntentResponse {}
54);
55
56#[cfg(feature = "INIntentResponse")]
57unsafe impl CopyingHelper for INGetCarPowerLevelStatusIntentResponse {
58    type Result = Self;
59}
60
61#[cfg(feature = "INIntentResponse")]
62extern_conformance!(
63    unsafe impl NSObjectProtocol for INGetCarPowerLevelStatusIntentResponse {}
64);
65
66#[cfg(feature = "INIntentResponse")]
67extern_conformance!(
68    unsafe impl NSSecureCoding for INGetCarPowerLevelStatusIntentResponse {}
69);
70
71#[cfg(feature = "INIntentResponse")]
72impl INGetCarPowerLevelStatusIntentResponse {
73    extern_methods!(
74        #[unsafe(method(init))]
75        #[unsafe(method_family = init)]
76        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
77
78        #[unsafe(method(initWithCode:userActivity:))]
79        #[unsafe(method_family = init)]
80        pub unsafe fn initWithCode_userActivity(
81            this: Allocated<Self>,
82            code: INGetCarPowerLevelStatusIntentResponseCode,
83            user_activity: Option<&NSUserActivity>,
84        ) -> Retained<Self>;
85
86        #[unsafe(method(code))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn code(&self) -> INGetCarPowerLevelStatusIntentResponseCode;
89
90        #[unsafe(method(carIdentifier))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn carIdentifier(&self) -> Option<Retained<NSString>>;
93
94        /// Setter for [`carIdentifier`][Self::carIdentifier].
95        ///
96        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
97        #[unsafe(method(setCarIdentifier:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setCarIdentifier(&self, car_identifier: Option<&NSString>);
100
101        #[unsafe(method(fuelPercentRemaining))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn fuelPercentRemaining(&self) -> Option<Retained<NSNumber>>;
104
105        /// Setter for [`fuelPercentRemaining`][Self::fuelPercentRemaining].
106        ///
107        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
108        #[unsafe(method(setFuelPercentRemaining:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setFuelPercentRemaining(&self, fuel_percent_remaining: Option<&NSNumber>);
111
112        #[unsafe(method(chargePercentRemaining))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn chargePercentRemaining(&self) -> Option<Retained<NSNumber>>;
115
116        /// Setter for [`chargePercentRemaining`][Self::chargePercentRemaining].
117        ///
118        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
119        #[unsafe(method(setChargePercentRemaining:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn setChargePercentRemaining(&self, charge_percent_remaining: Option<&NSNumber>);
122
123        #[unsafe(method(distanceRemaining))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn distanceRemaining(&self) -> Option<Retained<NSMeasurement<NSUnitLength>>>;
126
127        /// Setter for [`distanceRemaining`][Self::distanceRemaining].
128        ///
129        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
130        #[unsafe(method(setDistanceRemaining:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn setDistanceRemaining(
133            &self,
134            distance_remaining: Option<&NSMeasurement<NSUnitLength>>,
135        );
136
137        #[unsafe(method(charging))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn charging(&self) -> Option<Retained<NSNumber>>;
140
141        /// Setter for [`charging`][Self::charging].
142        ///
143        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
144        #[unsafe(method(setCharging:))]
145        #[unsafe(method_family = none)]
146        pub unsafe fn setCharging(&self, charging: Option<&NSNumber>);
147
148        #[unsafe(method(minutesToFull))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn minutesToFull(&self) -> Option<Retained<NSNumber>>;
151
152        /// Setter for [`minutesToFull`][Self::minutesToFull].
153        ///
154        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
155        #[unsafe(method(setMinutesToFull:))]
156        #[unsafe(method_family = none)]
157        pub unsafe fn setMinutesToFull(&self, minutes_to_full: Option<&NSNumber>);
158
159        #[unsafe(method(maximumDistance))]
160        #[unsafe(method_family = none)]
161        pub unsafe fn maximumDistance(&self) -> Option<Retained<NSMeasurement<NSUnitLength>>>;
162
163        /// Setter for [`maximumDistance`][Self::maximumDistance].
164        ///
165        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
166        #[unsafe(method(setMaximumDistance:))]
167        #[unsafe(method_family = none)]
168        pub unsafe fn setMaximumDistance(
169            &self,
170            maximum_distance: Option<&NSMeasurement<NSUnitLength>>,
171        );
172
173        #[unsafe(method(distanceRemainingElectric))]
174        #[unsafe(method_family = none)]
175        pub unsafe fn distanceRemainingElectric(
176            &self,
177        ) -> Option<Retained<NSMeasurement<NSUnitLength>>>;
178
179        /// Setter for [`distanceRemainingElectric`][Self::distanceRemainingElectric].
180        ///
181        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
182        #[unsafe(method(setDistanceRemainingElectric:))]
183        #[unsafe(method_family = none)]
184        pub unsafe fn setDistanceRemainingElectric(
185            &self,
186            distance_remaining_electric: Option<&NSMeasurement<NSUnitLength>>,
187        );
188
189        #[unsafe(method(maximumDistanceElectric))]
190        #[unsafe(method_family = none)]
191        pub unsafe fn maximumDistanceElectric(
192            &self,
193        ) -> Option<Retained<NSMeasurement<NSUnitLength>>>;
194
195        /// Setter for [`maximumDistanceElectric`][Self::maximumDistanceElectric].
196        ///
197        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
198        #[unsafe(method(setMaximumDistanceElectric:))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn setMaximumDistanceElectric(
201            &self,
202            maximum_distance_electric: Option<&NSMeasurement<NSUnitLength>>,
203        );
204
205        #[unsafe(method(distanceRemainingFuel))]
206        #[unsafe(method_family = none)]
207        pub unsafe fn distanceRemainingFuel(&self)
208            -> Option<Retained<NSMeasurement<NSUnitLength>>>;
209
210        /// Setter for [`distanceRemainingFuel`][Self::distanceRemainingFuel].
211        ///
212        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
213        #[unsafe(method(setDistanceRemainingFuel:))]
214        #[unsafe(method_family = none)]
215        pub unsafe fn setDistanceRemainingFuel(
216            &self,
217            distance_remaining_fuel: Option<&NSMeasurement<NSUnitLength>>,
218        );
219
220        #[unsafe(method(maximumDistanceFuel))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn maximumDistanceFuel(&self) -> Option<Retained<NSMeasurement<NSUnitLength>>>;
223
224        /// Setter for [`maximumDistanceFuel`][Self::maximumDistanceFuel].
225        ///
226        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
227        #[unsafe(method(setMaximumDistanceFuel:))]
228        #[unsafe(method_family = none)]
229        pub unsafe fn setMaximumDistanceFuel(
230            &self,
231            maximum_distance_fuel: Option<&NSMeasurement<NSUnitLength>>,
232        );
233
234        #[unsafe(method(consumptionFormulaArguments))]
235        #[unsafe(method_family = none)]
236        pub unsafe fn consumptionFormulaArguments(
237            &self,
238        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
239
240        /// Setter for [`consumptionFormulaArguments`][Self::consumptionFormulaArguments].
241        ///
242        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
243        ///
244        /// # Safety
245        ///
246        /// `consumption_formula_arguments` generic should be of the correct type.
247        #[unsafe(method(setConsumptionFormulaArguments:))]
248        #[unsafe(method_family = none)]
249        pub unsafe fn setConsumptionFormulaArguments(
250            &self,
251            consumption_formula_arguments: Option<&NSDictionary<NSString, AnyObject>>,
252        );
253
254        #[unsafe(method(chargingFormulaArguments))]
255        #[unsafe(method_family = none)]
256        pub unsafe fn chargingFormulaArguments(
257            &self,
258        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
259
260        /// Setter for [`chargingFormulaArguments`][Self::chargingFormulaArguments].
261        ///
262        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
263        ///
264        /// # Safety
265        ///
266        /// `charging_formula_arguments` generic should be of the correct type.
267        #[unsafe(method(setChargingFormulaArguments:))]
268        #[unsafe(method_family = none)]
269        pub unsafe fn setChargingFormulaArguments(
270            &self,
271            charging_formula_arguments: Option<&NSDictionary<NSString, AnyObject>>,
272        );
273
274        #[unsafe(method(dateOfLastStateUpdate))]
275        #[unsafe(method_family = none)]
276        pub unsafe fn dateOfLastStateUpdate(&self) -> Option<Retained<NSDateComponents>>;
277
278        /// Setter for [`dateOfLastStateUpdate`][Self::dateOfLastStateUpdate].
279        ///
280        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
281        #[unsafe(method(setDateOfLastStateUpdate:))]
282        #[unsafe(method_family = none)]
283        pub unsafe fn setDateOfLastStateUpdate(
284            &self,
285            date_of_last_state_update: Option<&NSDateComponents>,
286        );
287
288        #[cfg(feature = "INCarChargingConnectorType")]
289        #[unsafe(method(activeConnector))]
290        #[unsafe(method_family = none)]
291        pub unsafe fn activeConnector(&self) -> Option<Retained<INCarChargingConnectorType>>;
292
293        #[cfg(feature = "INCarChargingConnectorType")]
294        /// Setter for [`activeConnector`][Self::activeConnector].
295        ///
296        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
297        #[unsafe(method(setActiveConnector:))]
298        #[unsafe(method_family = none)]
299        pub unsafe fn setActiveConnector(
300            &self,
301            active_connector: Option<&INCarChargingConnectorType>,
302        );
303
304        #[unsafe(method(maximumBatteryCapacity))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn maximumBatteryCapacity(
307            &self,
308        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;
309
310        /// Setter for [`maximumBatteryCapacity`][Self::maximumBatteryCapacity].
311        ///
312        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
313        #[unsafe(method(setMaximumBatteryCapacity:))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn setMaximumBatteryCapacity(
316            &self,
317            maximum_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
318        );
319
320        #[unsafe(method(currentBatteryCapacity))]
321        #[unsafe(method_family = none)]
322        pub unsafe fn currentBatteryCapacity(
323            &self,
324        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;
325
326        /// Setter for [`currentBatteryCapacity`][Self::currentBatteryCapacity].
327        ///
328        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
329        #[unsafe(method(setCurrentBatteryCapacity:))]
330        #[unsafe(method_family = none)]
331        pub unsafe fn setCurrentBatteryCapacity(
332            &self,
333            current_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
334        );
335
336        #[unsafe(method(minimumBatteryCapacity))]
337        #[unsafe(method_family = none)]
338        pub unsafe fn minimumBatteryCapacity(
339            &self,
340        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;
341
342        /// Setter for [`minimumBatteryCapacity`][Self::minimumBatteryCapacity].
343        ///
344        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
345        #[unsafe(method(setMinimumBatteryCapacity:))]
346        #[unsafe(method_family = none)]
347        pub unsafe fn setMinimumBatteryCapacity(
348            &self,
349            minimum_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
350        );
351    );
352}
353
354/// Methods declared on superclass `NSObject`.
355#[cfg(feature = "INIntentResponse")]
356impl INGetCarPowerLevelStatusIntentResponse {
357    extern_methods!(
358        #[unsafe(method(new))]
359        #[unsafe(method_family = new)]
360        pub unsafe fn new() -> Retained<Self>;
361    );
362}