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::*;
use objc2_foundation::*;

use crate::*;

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

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

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

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

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

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

#[cfg(feature = "INReservation")]
impl INBusReservation {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(
            feature = "INBusTrip",
            feature = "INReservationAction",
            feature = "INReservationStatus",
            feature = "INSeat",
            feature = "INSpeakableString"
        ))]
        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:busTrip:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_URL_reservedSeat_busTrip(
            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>,
            reserved_seat: Option<&INSeat>,
            bus_trip: Option<&INBusTrip>,
        ) -> Retained<Self>;

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

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

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