objc2_intents/generated/
INBusReservation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inbusreservation?language=objc)
11    #[unsafe(super(INReservation, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "INReservation")]
14    pub struct INBusReservation;
15);
16
17#[cfg(feature = "INReservation")]
18extern_conformance!(
19    unsafe impl NSCoding for INBusReservation {}
20);
21
22#[cfg(feature = "INReservation")]
23extern_conformance!(
24    unsafe impl NSCopying for INBusReservation {}
25);
26
27#[cfg(feature = "INReservation")]
28unsafe impl CopyingHelper for INBusReservation {
29    type Result = Self;
30}
31
32#[cfg(feature = "INReservation")]
33extern_conformance!(
34    unsafe impl NSObjectProtocol for INBusReservation {}
35);
36
37#[cfg(feature = "INReservation")]
38extern_conformance!(
39    unsafe impl NSSecureCoding for INBusReservation {}
40);
41
42#[cfg(feature = "INReservation")]
43impl INBusReservation {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[cfg(all(
50            feature = "INBusTrip",
51            feature = "INReservationAction",
52            feature = "INReservationStatus",
53            feature = "INSeat",
54            feature = "INSpeakableString"
55        ))]
56        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:busTrip:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_URL_reservedSeat_busTrip(
59            this: Allocated<Self>,
60            item_reference: &INSpeakableString,
61            reservation_number: Option<&NSString>,
62            booking_time: Option<&NSDate>,
63            reservation_status: INReservationStatus,
64            reservation_holder_name: Option<&NSString>,
65            actions: Option<&NSArray<INReservationAction>>,
66            url: Option<&NSURL>,
67            reserved_seat: Option<&INSeat>,
68            bus_trip: Option<&INBusTrip>,
69        ) -> Retained<Self>;
70
71        #[cfg(feature = "INSeat")]
72        #[unsafe(method(reservedSeat))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn reservedSeat(&self) -> Option<Retained<INSeat>>;
75
76        #[cfg(feature = "INBusTrip")]
77        #[unsafe(method(busTrip))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn busTrip(&self) -> Retained<INBusTrip>;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84#[cfg(feature = "INReservation")]
85impl INBusReservation {
86    extern_methods!(
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90    );
91}