use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INGetRestaurantGuestIntentResponseCode(pub NSInteger);
impl INGetRestaurantGuestIntentResponseCode {
#[doc(alias = "INGetRestaurantGuestIntentResponseCodeSuccess")]
pub const Success: Self = Self(0);
#[doc(alias = "INGetRestaurantGuestIntentResponseCodeFailure")]
pub const Failure: Self = Self(1);
}
unsafe impl Encode for INGetRestaurantGuestIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INGetRestaurantGuestIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INGetRestaurantGuestIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INGetRestaurantGuestIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INGetRestaurantGuestIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INGetRestaurantGuestIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INGetRestaurantGuestIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INGetRestaurantGuestIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INGetRestaurantGuestIntentResponse {
extern_methods!(
#[unsafe(method(initWithCode:userActivity:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCode_userActivity(
this: Allocated<Self>,
code: INGetRestaurantGuestIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[cfg(all(feature = "INPerson", feature = "INRestaurantGuest"))]
#[unsafe(method(guest))]
#[unsafe(method_family = none)]
pub unsafe fn guest(&self) -> Option<Retained<INRestaurantGuest>>;
#[cfg(all(feature = "INPerson", feature = "INRestaurantGuest"))]
#[unsafe(method(setGuest:))]
#[unsafe(method_family = none)]
pub unsafe fn setGuest(&self, guest: Option<&INRestaurantGuest>);
#[cfg(feature = "INRestaurantGuestDisplayPreferences")]
#[unsafe(method(guestDisplayPreferences))]
#[unsafe(method_family = none)]
pub unsafe fn guestDisplayPreferences(
&self,
) -> Option<Retained<INRestaurantGuestDisplayPreferences>>;
#[cfg(feature = "INRestaurantGuestDisplayPreferences")]
#[unsafe(method(setGuestDisplayPreferences:))]
#[unsafe(method_family = none)]
pub unsafe fn setGuestDisplayPreferences(
&self,
guest_display_preferences: Option<&INRestaurantGuestDisplayPreferences>,
);
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INGetRestaurantGuestIntentResponseCode;
);
}
#[cfg(feature = "INIntentResponse")]
impl INGetRestaurantGuestIntentResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}