objc2_intents/generated/
INGetAvailableRestaurantReservationBookingDefaultsIntent.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetavailablerestaurantreservationbookingdefaultsintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INGetAvailableRestaurantReservationBookingDefaultsIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INGetAvailableRestaurantReservationBookingDefaultsIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INGetAvailableRestaurantReservationBookingDefaultsIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INGetAvailableRestaurantReservationBookingDefaultsIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INGetAvailableRestaurantReservationBookingDefaultsIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INGetAvailableRestaurantReservationBookingDefaultsIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INGetAvailableRestaurantReservationBookingDefaultsIntent {
45    extern_methods!(
46        #[cfg(feature = "INRestaurant")]
47        #[unsafe(method(initWithRestaurant:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithRestaurant(
50            this: Allocated<Self>,
51            restaurant: Option<&INRestaurant>,
52        ) -> Retained<Self>;
53
54        #[cfg(feature = "INRestaurant")]
55        #[unsafe(method(restaurant))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn restaurant(&self) -> Option<Retained<INRestaurant>>;
58
59        #[cfg(feature = "INRestaurant")]
60        /// Setter for [`restaurant`][Self::restaurant].
61        ///
62        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
63        #[unsafe(method(setRestaurant:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setRestaurant(&self, restaurant: Option<&INRestaurant>);
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(feature = "INIntent")]
71impl INGetAvailableRestaurantReservationBookingDefaultsIntent {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}
82
83extern_protocol!(
84    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetavailablerestaurantreservationbookingdefaultsintenthandling?language=objc)
85    pub unsafe trait INGetAvailableRestaurantReservationBookingDefaultsIntentHandling:
86        NSObjectProtocol
87    {
88        #[cfg(all(
89            feature = "INGetAvailableRestaurantReservationBookingDefaultsIntentResponse",
90            feature = "INIntent",
91            feature = "INIntentResponse",
92            feature = "block2"
93        ))]
94        /// Handling method - Execute the task represented by the INGetAvailableRestaurantReservationBookingDefaultsIntent that's passed in
95        ///
96        /// This method is called to actually execute the intent, the app must return a response for this intent and an NSUserActivity capturing the state that the app must be restored to at the end of handling this intent
97        ///
98        ///
99        /// Parameter `intent`: The input intent
100        ///
101        /// Parameter `completion`: The response handling block to invoke with the response to handling the intent.
102        ///
103        ///
104        /// See: INGetAvailableRestaurantReservationBookingDefaultsIntentResponse
105        #[unsafe(method(handleGetAvailableRestaurantReservationBookingDefaults:completion:))]
106        #[unsafe(method_family = none)]
107        unsafe fn handleGetAvailableRestaurantReservationBookingDefaults_completion(
108            &self,
109            intent: &INGetAvailableRestaurantReservationBookingDefaultsIntent,
110            completion: &block2::DynBlock<
111                dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingDefaultsIntentResponse>),
112            >,
113        );
114
115        #[cfg(all(
116            feature = "INGetAvailableRestaurantReservationBookingDefaultsIntentResponse",
117            feature = "INIntent",
118            feature = "INIntentResponse",
119            feature = "block2"
120        ))]
121        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
122        ///
123        /// These methods are called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
124        ///
125        ///
126        /// Parameter `intent`: The input intent
127        ///
128        /// Parameter `completion`: The response block contains an INGetAvailableRestaurantReservationBookingDefaultsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
129        ///
130        ///
131        /// See: INGetAvailableRestaurantReservationBookingDefaultsIntentResponse
132        #[optional]
133        #[unsafe(method(confirmGetAvailableRestaurantReservationBookingDefaults:completion:))]
134        #[unsafe(method_family = none)]
135        unsafe fn confirmGetAvailableRestaurantReservationBookingDefaults_completion(
136            &self,
137            intent: &INGetAvailableRestaurantReservationBookingDefaultsIntent,
138            completion: &block2::DynBlock<
139                dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingDefaultsIntentResponse>),
140            >,
141        );
142
143        #[cfg(all(
144            feature = "INIntent",
145            feature = "INIntentResolutionResult",
146            feature = "INRestaurantResolutionResult",
147            feature = "block2"
148        ))]
149        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
150        ///
151        /// These methods are called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
152        ///
153        ///
154        /// Parameter `intent`: The input intent
155        ///
156        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
157        ///
158        ///
159        /// See: INGetAvailableRestaurantReservationBookingDefaultsIntentResponse
160        #[optional]
161        #[unsafe(method(resolveRestaurantForGetAvailableRestaurantReservationBookingDefaults:withCompletion:))]
162        #[unsafe(method_family = none)]
163        unsafe fn resolveRestaurantForGetAvailableRestaurantReservationBookingDefaults_withCompletion(
164            &self,
165            intent: &INGetAvailableRestaurantReservationBookingDefaultsIntent,
166            completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
167        );
168    }
169);