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/inreservation?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INReservation;
);

extern_conformance!(
    unsafe impl NSCoding for INReservation {}
);

extern_conformance!(
    unsafe impl NSCopying for INReservation {}
);

unsafe impl CopyingHelper for INReservation {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INReservation {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INReservation {}
);

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

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

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

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

        #[cfg(feature = "INReservationStatus")]
        #[unsafe(method(reservationStatus))]
        #[unsafe(method_family = none)]
        pub unsafe fn reservationStatus(&self) -> INReservationStatus;

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

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

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

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