objc2_intents/generated/
INGetRideStatusIntentResponse.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/ingetridestatusintentresponsecode?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INGetRideStatusIntentResponseCode(pub NSInteger);
15impl INGetRideStatusIntentResponseCode {
16    #[doc(alias = "INGetRideStatusIntentResponseCodeUnspecified")]
17    pub const Unspecified: Self = Self(0);
18    #[doc(alias = "INGetRideStatusIntentResponseCodeReady")]
19    pub const Ready: Self = Self(1);
20    #[doc(alias = "INGetRideStatusIntentResponseCodeInProgress")]
21    #[deprecated = "INGetRideStatusIntentResponseCodeInProgress is deprecated."]
22    pub const InProgress: Self = Self(2);
23    #[doc(alias = "INGetRideStatusIntentResponseCodeSuccess")]
24    pub const Success: Self = Self(3);
25    #[doc(alias = "INGetRideStatusIntentResponseCodeFailure")]
26    pub const Failure: Self = Self(4);
27    #[doc(alias = "INGetRideStatusIntentResponseCodeFailureRequiringAppLaunch")]
28    pub const FailureRequiringAppLaunch: Self = Self(5);
29    #[doc(
30        alias = "INGetRideStatusIntentResponseCodeFailureRequiringAppLaunchMustVerifyCredentials"
31    )]
32    pub const FailureRequiringAppLaunchMustVerifyCredentials: Self = Self(6);
33    #[doc(
34        alias = "INGetRideStatusIntentResponseCodeFailureRequiringAppLaunchServiceTemporarilyUnavailable"
35    )]
36    pub const FailureRequiringAppLaunchServiceTemporarilyUnavailable: Self = Self(7);
37}
38
39unsafe impl Encode for INGetRideStatusIntentResponseCode {
40    const ENCODING: Encoding = NSInteger::ENCODING;
41}
42
43unsafe impl RefEncode for INGetRideStatusIntentResponseCode {
44    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
45}
46
47extern_class!(
48    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetridestatusintentresponse?language=objc)
49    #[unsafe(super(INIntentResponse, NSObject))]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    #[cfg(feature = "INIntentResponse")]
52    pub struct INGetRideStatusIntentResponse;
53);
54
55#[cfg(feature = "INIntentResponse")]
56extern_conformance!(
57    unsafe impl NSCoding for INGetRideStatusIntentResponse {}
58);
59
60#[cfg(feature = "INIntentResponse")]
61extern_conformance!(
62    unsafe impl NSCopying for INGetRideStatusIntentResponse {}
63);
64
65#[cfg(feature = "INIntentResponse")]
66unsafe impl CopyingHelper for INGetRideStatusIntentResponse {
67    type Result = Self;
68}
69
70#[cfg(feature = "INIntentResponse")]
71extern_conformance!(
72    unsafe impl NSObjectProtocol for INGetRideStatusIntentResponse {}
73);
74
75#[cfg(feature = "INIntentResponse")]
76extern_conformance!(
77    unsafe impl NSSecureCoding for INGetRideStatusIntentResponse {}
78);
79
80#[cfg(feature = "INIntentResponse")]
81impl INGetRideStatusIntentResponse {
82    extern_methods!(
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        #[unsafe(method(initWithCode:userActivity:))]
88        #[unsafe(method_family = init)]
89        pub unsafe fn initWithCode_userActivity(
90            this: Allocated<Self>,
91            code: INGetRideStatusIntentResponseCode,
92            user_activity: Option<&NSUserActivity>,
93        ) -> Retained<Self>;
94
95        #[unsafe(method(code))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn code(&self) -> INGetRideStatusIntentResponseCode;
98
99        #[cfg(feature = "INRideStatus")]
100        #[unsafe(method(rideStatus))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn rideStatus(&self) -> Option<Retained<INRideStatus>>;
103
104        #[cfg(feature = "INRideStatus")]
105        /// Setter for [`rideStatus`][Self::rideStatus].
106        ///
107        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
108        #[unsafe(method(setRideStatus:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setRideStatus(&self, ride_status: Option<&INRideStatus>);
111    );
112}
113
114/// Methods declared on superclass `NSObject`.
115#[cfg(feature = "INIntentResponse")]
116impl INGetRideStatusIntentResponse {
117    extern_methods!(
118        #[unsafe(method(new))]
119        #[unsafe(method_family = new)]
120        pub unsafe fn new() -> Retained<Self>;
121    );
122}