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 INGetAvailableRestaurantReservationBookingsIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INGetAvailableRestaurantReservationBookingsIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INGetAvailableRestaurantReservationBookingsIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INGetAvailableRestaurantReservationBookingsIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INGetAvailableRestaurantReservationBookingsIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INGetAvailableRestaurantReservationBookingsIntent {}
);
#[cfg(feature = "INIntent")]
impl INGetAvailableRestaurantReservationBookingsIntent {
extern_methods!(
#[cfg(feature = "INRestaurant")]
#[unsafe(method(initWithRestaurant:partySize:preferredBookingDateComponents:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRestaurant_partySize_preferredBookingDateComponents_maximumNumberOfResults_earliestBookingDateForResults_latestBookingDateForResults(
this: Allocated<Self>,
restaurant: &INRestaurant,
party_size: NSUInteger,
preferred_booking_date_components: Option<&NSDateComponents>,
maximum_number_of_results: Option<&NSNumber>,
earliest_booking_date_for_results: Option<&NSDate>,
latest_booking_date_for_results: Option<&NSDate>,
) -> 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(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(preferredBookingDateComponents))]
#[unsafe(method_family = none)]
pub unsafe fn preferredBookingDateComponents(&self) -> Option<Retained<NSDateComponents>>;
#[unsafe(method(setPreferredBookingDateComponents:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreferredBookingDateComponents(
&self,
preferred_booking_date_components: Option<&NSDateComponents>,
);
#[unsafe(method(maximumNumberOfResults))]
#[unsafe(method_family = none)]
pub unsafe fn maximumNumberOfResults(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(setMaximumNumberOfResults:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaximumNumberOfResults(
&self,
maximum_number_of_results: Option<&NSNumber>,
);
#[unsafe(method(earliestBookingDateForResults))]
#[unsafe(method_family = none)]
pub unsafe fn earliestBookingDateForResults(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(setEarliestBookingDateForResults:))]
#[unsafe(method_family = none)]
pub unsafe fn setEarliestBookingDateForResults(
&self,
earliest_booking_date_for_results: Option<&NSDate>,
);
#[unsafe(method(latestBookingDateForResults))]
#[unsafe(method_family = none)]
pub unsafe fn latestBookingDateForResults(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(setLatestBookingDateForResults:))]
#[unsafe(method_family = none)]
pub unsafe fn setLatestBookingDateForResults(
&self,
latest_booking_date_for_results: Option<&NSDate>,
);
);
}
#[cfg(feature = "INIntent")]
impl INGetAvailableRestaurantReservationBookingsIntent {
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 INGetAvailableRestaurantReservationBookingsIntentHandling:
NSObjectProtocol
{
#[cfg(all(
feature = "INGetAvailableRestaurantReservationBookingsIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleGetAvailableRestaurantReservationBookings:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleGetAvailableRestaurantReservationBookings_completion(
&self,
intent: &INGetAvailableRestaurantReservationBookingsIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingsIntentResponse>),
>,
);
#[cfg(all(
feature = "INGetAvailableRestaurantReservationBookingsIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmGetAvailableRestaurantReservationBookings:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmGetAvailableRestaurantReservationBookings_completion(
&self,
intent: &INGetAvailableRestaurantReservationBookingsIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingsIntentResponse>),
>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INRestaurantResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveRestaurantForGetAvailableRestaurantReservationBookings:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveRestaurantForGetAvailableRestaurantReservationBookings_withCompletion(
&self,
intent: &INGetAvailableRestaurantReservationBookingsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
);
#[cfg(all(
feature = "INIntegerResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePartySizeForGetAvailableRestaurantReservationBookings:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePartySizeForGetAvailableRestaurantReservationBookings_withCompletion(
&self,
intent: &INGetAvailableRestaurantReservationBookingsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
);
#[cfg(all(
feature = "INDateComponentsResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePreferredBookingDateComponentsForGetAvailableRestaurantReservationBookings:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePreferredBookingDateComponentsForGetAvailableRestaurantReservationBookings_withCompletion(
&self,
intent: &INGetAvailableRestaurantReservationBookingsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsResolutionResult>)>,
);
}
);