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