objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inrestaurantreservation?language=objc)
    #[unsafe(super(INReservation, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INReservation")]
    pub struct INRestaurantReservation;
);

#[cfg(feature = "INReservation")]
extern_conformance!(
    unsafe impl NSCoding for INRestaurantReservation {}
);

#[cfg(feature = "INReservation")]
extern_conformance!(
    unsafe impl NSCopying for INRestaurantReservation {}
);

#[cfg(feature = "INReservation")]
unsafe impl CopyingHelper for INRestaurantReservation {
    type Result = Self;
}

#[cfg(feature = "INReservation")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INRestaurantReservation {}
);

#[cfg(feature = "INReservation")]
extern_conformance!(
    unsafe impl NSSecureCoding for INRestaurantReservation {}
);

#[cfg(feature = "INReservation")]
impl INRestaurantReservation {
    extern_methods!(
        #[cfg(all(
            feature = "INDateComponentsRange",
            feature = "INReservationAction",
            feature = "INReservationStatus",
            feature = "INSpeakableString",
            feature = "objc2-core-location"
        ))]
        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservationDuration:partySize:restaurantLocation:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_URL_reservationDuration_partySize_restaurantLocation(
            this: Allocated<Self>,
            item_reference: &INSpeakableString,
            reservation_number: Option<&NSString>,
            booking_time: Option<&NSDate>,
            reservation_status: INReservationStatus,
            reservation_holder_name: Option<&NSString>,
            actions: Option<&NSArray<INReservationAction>>,
            url: Option<&NSURL>,
            reservation_duration: &INDateComponentsRange,
            party_size: Option<&NSNumber>,
            restaurant_location: &CLPlacemark,
        ) -> Retained<Self>;

        #[cfg(all(
            feature = "INDateComponentsRange",
            feature = "INReservationAction",
            feature = "INReservationStatus",
            feature = "INSpeakableString",
            feature = "objc2-core-location"
        ))]
        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservationDuration:partySize:restaurantLocation:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_reservationDuration_partySize_restaurantLocation(
            this: Allocated<Self>,
            item_reference: &INSpeakableString,
            reservation_number: Option<&NSString>,
            booking_time: Option<&NSDate>,
            reservation_status: INReservationStatus,
            reservation_holder_name: Option<&NSString>,
            actions: Option<&NSArray<INReservationAction>>,
            reservation_duration: &INDateComponentsRange,
            party_size: Option<&NSNumber>,
            restaurant_location: &CLPlacemark,
        ) -> Retained<Self>;

        #[cfg(feature = "INDateComponentsRange")]
        #[unsafe(method(reservationDuration))]
        #[unsafe(method_family = none)]
        pub unsafe fn reservationDuration(&self) -> Retained<INDateComponentsRange>;

        #[unsafe(method(partySize))]
        #[unsafe(method_family = none)]
        pub unsafe fn partySize(&self) -> Option<Retained<NSNumber>>;

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(restaurantLocation))]
        #[unsafe(method_family = none)]
        pub unsafe fn restaurantLocation(&self) -> Retained<CLPlacemark>;
    );
}

/// Methods declared on superclass `INReservation`.
#[cfg(feature = "INReservation")]
impl INRestaurantReservation {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "INReservation")]
impl INRestaurantReservation {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}