objc2_intents/generated/
INBookRestaurantReservationIntentResponse.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 INBookRestaurantReservationIntentCode(pub NSInteger);
15impl INBookRestaurantReservationIntentCode {
16 #[doc(alias = "INBookRestaurantReservationIntentCodeSuccess")]
17 pub const Success: Self = Self(0);
18 #[doc(alias = "INBookRestaurantReservationIntentCodeDenied")]
19 pub const Denied: Self = Self(1);
20 #[doc(alias = "INBookRestaurantReservationIntentCodeFailure")]
21 pub const Failure: Self = Self(2);
22 #[doc(alias = "INBookRestaurantReservationIntentCodeFailureRequiringAppLaunch")]
23 pub const FailureRequiringAppLaunch: Self = Self(3);
24 #[doc(
25 alias = "INBookRestaurantReservationIntentCodeFailureRequiringAppLaunchMustVerifyCredentials"
26 )]
27 pub const FailureRequiringAppLaunchMustVerifyCredentials: Self = Self(4);
28 #[doc(
29 alias = "INBookRestaurantReservationIntentCodeFailureRequiringAppLaunchServiceTemporarilyUnavailable"
30 )]
31 pub const FailureRequiringAppLaunchServiceTemporarilyUnavailable: Self = Self(5);
32}
33
34unsafe impl Encode for INBookRestaurantReservationIntentCode {
35 const ENCODING: Encoding = NSInteger::ENCODING;
36}
37
38unsafe impl RefEncode for INBookRestaurantReservationIntentCode {
39 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
40}
41
42extern_class!(
43 #[unsafe(super(INIntentResponse, NSObject))]
45 #[derive(Debug, PartialEq, Eq, Hash)]
46 #[cfg(feature = "INIntentResponse")]
47 pub struct INBookRestaurantReservationIntentResponse;
48);
49
50#[cfg(feature = "INIntentResponse")]
51extern_conformance!(
52 unsafe impl NSCoding for INBookRestaurantReservationIntentResponse {}
53);
54
55#[cfg(feature = "INIntentResponse")]
56extern_conformance!(
57 unsafe impl NSCopying for INBookRestaurantReservationIntentResponse {}
58);
59
60#[cfg(feature = "INIntentResponse")]
61unsafe impl CopyingHelper for INBookRestaurantReservationIntentResponse {
62 type Result = Self;
63}
64
65#[cfg(feature = "INIntentResponse")]
66extern_conformance!(
67 unsafe impl NSObjectProtocol for INBookRestaurantReservationIntentResponse {}
68);
69
70#[cfg(feature = "INIntentResponse")]
71extern_conformance!(
72 unsafe impl NSSecureCoding for INBookRestaurantReservationIntentResponse {}
73);
74
75#[cfg(feature = "INIntentResponse")]
76impl INBookRestaurantReservationIntentResponse {
77 extern_methods!(
78 #[unsafe(method(initWithCode:userActivity:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithCode_userActivity(
81 this: Allocated<Self>,
82 code: INBookRestaurantReservationIntentCode,
83 user_activity: Option<&NSUserActivity>,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(code))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn code(&self) -> INBookRestaurantReservationIntentCode;
89
90 #[cfg(all(
91 feature = "INRestaurantReservationBooking",
92 feature = "INRestaurantReservationUserBooking"
93 ))]
94 #[unsafe(method(userBooking))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn userBooking(&self) -> Option<Retained<INRestaurantReservationUserBooking>>;
97
98 #[cfg(all(
99 feature = "INRestaurantReservationBooking",
100 feature = "INRestaurantReservationUserBooking"
101 ))]
102 #[unsafe(method(setUserBooking:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setUserBooking(
108 &self,
109 user_booking: Option<&INRestaurantReservationUserBooking>,
110 );
111 );
112}
113
114#[cfg(feature = "INIntentResponse")]
116impl INBookRestaurantReservationIntentResponse {
117 extern_methods!(
118 #[unsafe(method(init))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
121
122 #[unsafe(method(new))]
123 #[unsafe(method_family = new)]
124 pub unsafe fn new() -> Retained<Self>;
125 );
126}