objc2_intents/generated/
INGetCarPowerLevelStatusIntentResponse.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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#[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}