use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(INIntent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntent")]
pub struct INBookRestaurantReservationIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INBookRestaurantReservationIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INBookRestaurantReservationIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INBookRestaurantReservationIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INBookRestaurantReservationIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INBookRestaurantReservationIntent {}
);
#[cfg(feature = "INIntent")]
impl INBookRestaurantReservationIntent {
extern_methods!(
#[cfg(all(
feature = "INPerson",
feature = "INRestaurant",
feature = "INRestaurantGuest",
feature = "INRestaurantOffer"
))]
#[unsafe(method(initWithRestaurant:bookingDateComponents:partySize:bookingIdentifier:guest:selectedOffer:guestProvidedSpecialRequestText:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRestaurant_bookingDateComponents_partySize_bookingIdentifier_guest_selectedOffer_guestProvidedSpecialRequestText(
this: Allocated<Self>,
restaurant: &INRestaurant,
booking_date_components: &NSDateComponents,
party_size: NSUInteger,
booking_identifier: Option<&NSString>,
guest: Option<&INRestaurantGuest>,
selected_offer: Option<&INRestaurantOffer>,
guest_provided_special_request_text: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "INRestaurant")]
#[unsafe(method(restaurant))]
#[unsafe(method_family = none)]
pub unsafe fn restaurant(&self) -> Retained<INRestaurant>;
#[cfg(feature = "INRestaurant")]
#[unsafe(method(setRestaurant:))]
#[unsafe(method_family = none)]
pub unsafe fn setRestaurant(&self, restaurant: &INRestaurant);
#[unsafe(method(bookingDateComponents))]
#[unsafe(method_family = none)]
pub unsafe fn bookingDateComponents(&self) -> Retained<NSDateComponents>;
#[unsafe(method(setBookingDateComponents:))]
#[unsafe(method_family = none)]
pub unsafe fn setBookingDateComponents(&self, booking_date_components: &NSDateComponents);
#[unsafe(method(partySize))]
#[unsafe(method_family = none)]
pub unsafe fn partySize(&self) -> NSUInteger;
#[unsafe(method(setPartySize:))]
#[unsafe(method_family = none)]
pub unsafe fn setPartySize(&self, party_size: NSUInteger);
#[unsafe(method(bookingIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn bookingIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setBookingIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setBookingIdentifier(&self, booking_identifier: Option<&NSString>);
#[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 = "INRestaurantOffer")]
#[unsafe(method(selectedOffer))]
#[unsafe(method_family = none)]
pub unsafe fn selectedOffer(&self) -> Option<Retained<INRestaurantOffer>>;
#[cfg(feature = "INRestaurantOffer")]
#[unsafe(method(setSelectedOffer:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelectedOffer(&self, selected_offer: Option<&INRestaurantOffer>);
#[unsafe(method(guestProvidedSpecialRequestText))]
#[unsafe(method_family = none)]
pub unsafe fn guestProvidedSpecialRequestText(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setGuestProvidedSpecialRequestText:))]
#[unsafe(method_family = none)]
pub unsafe fn setGuestProvidedSpecialRequestText(
&self,
guest_provided_special_request_text: Option<&NSString>,
);
);
}
#[cfg(feature = "INIntent")]
impl INBookRestaurantReservationIntent {
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>;
);
}
extern_protocol!(
pub unsafe trait INBookRestaurantReservationIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INBookRestaurantReservationIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleBookRestaurantReservation:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleBookRestaurantReservation_completion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INBookRestaurantReservationIntentResponse>),
>,
);
#[cfg(all(
feature = "INBookRestaurantReservationIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmBookRestaurantReservation:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmBookRestaurantReservation_completion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INBookRestaurantReservationIntentResponse>),
>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INRestaurantResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveRestaurantForBookRestaurantReservation:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveRestaurantForBookRestaurantReservation_withCompletion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
);
#[cfg(all(
feature = "INDateComponentsResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveBookingDateComponentsForBookRestaurantReservation:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveBookingDateComponentsForBookRestaurantReservation_withCompletion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsResolutionResult>)>,
);
#[cfg(all(
feature = "INIntegerResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePartySizeForBookRestaurantReservation:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePartySizeForBookRestaurantReservation_withCompletion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INRestaurantGuestResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveGuestForBookRestaurantReservation:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveGuestForBookRestaurantReservation_withCompletion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantGuestResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveGuestProvidedSpecialRequestTextForBookRestaurantReservation:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveGuestProvidedSpecialRequestTextForBookRestaurantReservation_withCompletion(
&self,
intent: &INBookRestaurantReservationIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
);
}
);