objc2_intents/generated/
INGetAvailableRestaurantReservationBookingsIntentResponse.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 INGetAvailableRestaurantReservationBookingsIntentCode(pub NSInteger);
15impl INGetAvailableRestaurantReservationBookingsIntentCode {
16 #[doc(alias = "INGetAvailableRestaurantReservationBookingsIntentCodeSuccess")]
17 pub const Success: Self = Self(0);
18 #[doc(alias = "INGetAvailableRestaurantReservationBookingsIntentCodeFailure")]
19 pub const Failure: Self = Self(1);
20 #[doc(
21 alias = "INGetAvailableRestaurantReservationBookingsIntentCodeFailureRequestUnsatisfiable"
22 )]
23 pub const FailureRequestUnsatisfiable: Self = Self(2);
24 #[doc(alias = "INGetAvailableRestaurantReservationBookingsIntentCodeFailureRequestUnspecified")]
25 pub const FailureRequestUnspecified: Self = Self(3);
26}
27
28unsafe impl Encode for INGetAvailableRestaurantReservationBookingsIntentCode {
29 const ENCODING: Encoding = NSInteger::ENCODING;
30}
31
32unsafe impl RefEncode for INGetAvailableRestaurantReservationBookingsIntentCode {
33 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
34}
35
36extern_class!(
37 #[unsafe(super(INIntentResponse, NSObject))]
39 #[derive(Debug, PartialEq, Eq, Hash)]
40 #[cfg(feature = "INIntentResponse")]
41 pub struct INGetAvailableRestaurantReservationBookingsIntentResponse;
42);
43
44#[cfg(feature = "INIntentResponse")]
45extern_conformance!(
46 unsafe impl NSCoding for INGetAvailableRestaurantReservationBookingsIntentResponse {}
47);
48
49#[cfg(feature = "INIntentResponse")]
50extern_conformance!(
51 unsafe impl NSCopying for INGetAvailableRestaurantReservationBookingsIntentResponse {}
52);
53
54#[cfg(feature = "INIntentResponse")]
55unsafe impl CopyingHelper for INGetAvailableRestaurantReservationBookingsIntentResponse {
56 type Result = Self;
57}
58
59#[cfg(feature = "INIntentResponse")]
60extern_conformance!(
61 unsafe impl NSObjectProtocol for INGetAvailableRestaurantReservationBookingsIntentResponse {}
62);
63
64#[cfg(feature = "INIntentResponse")]
65extern_conformance!(
66 unsafe impl NSSecureCoding for INGetAvailableRestaurantReservationBookingsIntentResponse {}
67);
68
69#[cfg(feature = "INIntentResponse")]
70impl INGetAvailableRestaurantReservationBookingsIntentResponse {
71 extern_methods!(
72 #[cfg(feature = "INRestaurantReservationBooking")]
73 #[unsafe(method(initWithAvailableBookings:code:userActivity:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithAvailableBookings_code_userActivity(
76 this: Allocated<Self>,
77 available_bookings: &NSArray<INRestaurantReservationBooking>,
78 code: INGetAvailableRestaurantReservationBookingsIntentCode,
79 user_activity: Option<&NSUserActivity>,
80 ) -> Retained<Self>;
81
82 #[unsafe(method(code))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn code(&self) -> INGetAvailableRestaurantReservationBookingsIntentCode;
85
86 #[unsafe(method(localizedRestaurantDescriptionText))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn localizedRestaurantDescriptionText(&self) -> Option<Retained<NSString>>;
89
90 #[unsafe(method(setLocalizedRestaurantDescriptionText:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setLocalizedRestaurantDescriptionText(
96 &self,
97 localized_restaurant_description_text: Option<&NSString>,
98 );
99
100 #[unsafe(method(localizedBookingAdvisementText))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn localizedBookingAdvisementText(&self) -> Option<Retained<NSString>>;
103
104 #[unsafe(method(setLocalizedBookingAdvisementText:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setLocalizedBookingAdvisementText(
110 &self,
111 localized_booking_advisement_text: Option<&NSString>,
112 );
113
114 #[cfg(feature = "INTermsAndConditions")]
115 #[unsafe(method(termsAndConditions))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn termsAndConditions(&self) -> Option<Retained<INTermsAndConditions>>;
118
119 #[cfg(feature = "INTermsAndConditions")]
120 #[unsafe(method(setTermsAndConditions:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setTermsAndConditions(
126 &self,
127 terms_and_conditions: Option<&INTermsAndConditions>,
128 );
129
130 #[cfg(feature = "INRestaurantReservationBooking")]
131 #[unsafe(method(availableBookings))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn availableBookings(&self)
134 -> Retained<NSArray<INRestaurantReservationBooking>>;
135 );
136}
137
138#[cfg(feature = "INIntentResponse")]
140impl INGetAvailableRestaurantReservationBookingsIntentResponse {
141 extern_methods!(
142 #[unsafe(method(init))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
145
146 #[unsafe(method(new))]
147 #[unsafe(method_family = new)]
148 pub unsafe fn new() -> Retained<Self>;
149 );
150}