objc2_intents/generated/
INRestaurantReservation.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::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inrestaurantreservation?language=objc)
13    #[unsafe(super(INReservation, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "INReservation")]
16    pub struct INRestaurantReservation;
17);
18
19#[cfg(feature = "INReservation")]
20extern_conformance!(
21    unsafe impl NSCoding for INRestaurantReservation {}
22);
23
24#[cfg(feature = "INReservation")]
25extern_conformance!(
26    unsafe impl NSCopying for INRestaurantReservation {}
27);
28
29#[cfg(feature = "INReservation")]
30unsafe impl CopyingHelper for INRestaurantReservation {
31    type Result = Self;
32}
33
34#[cfg(feature = "INReservation")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INRestaurantReservation {}
37);
38
39#[cfg(feature = "INReservation")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INRestaurantReservation {}
42);
43
44#[cfg(feature = "INReservation")]
45impl INRestaurantReservation {
46    extern_methods!(
47        #[cfg(all(
48            feature = "INDateComponentsRange",
49            feature = "INReservationAction",
50            feature = "INReservationStatus",
51            feature = "INSpeakableString",
52            feature = "objc2-core-location"
53        ))]
54        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservationDuration:partySize:restaurantLocation:))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_URL_reservationDuration_partySize_restaurantLocation(
57            this: Allocated<Self>,
58            item_reference: &INSpeakableString,
59            reservation_number: Option<&NSString>,
60            booking_time: Option<&NSDate>,
61            reservation_status: INReservationStatus,
62            reservation_holder_name: Option<&NSString>,
63            actions: Option<&NSArray<INReservationAction>>,
64            url: Option<&NSURL>,
65            reservation_duration: &INDateComponentsRange,
66            party_size: Option<&NSNumber>,
67            restaurant_location: &CLPlacemark,
68        ) -> Retained<Self>;
69
70        #[cfg(all(
71            feature = "INDateComponentsRange",
72            feature = "INReservationAction",
73            feature = "INReservationStatus",
74            feature = "INSpeakableString",
75            feature = "objc2-core-location"
76        ))]
77        #[unsafe(method(initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:reservationDuration:partySize:restaurantLocation:))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn initWithItemReference_reservationNumber_bookingTime_reservationStatus_reservationHolderName_actions_reservationDuration_partySize_restaurantLocation(
80            this: Allocated<Self>,
81            item_reference: &INSpeakableString,
82            reservation_number: Option<&NSString>,
83            booking_time: Option<&NSDate>,
84            reservation_status: INReservationStatus,
85            reservation_holder_name: Option<&NSString>,
86            actions: Option<&NSArray<INReservationAction>>,
87            reservation_duration: &INDateComponentsRange,
88            party_size: Option<&NSNumber>,
89            restaurant_location: &CLPlacemark,
90        ) -> Retained<Self>;
91
92        #[cfg(feature = "INDateComponentsRange")]
93        #[unsafe(method(reservationDuration))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn reservationDuration(&self) -> Retained<INDateComponentsRange>;
96
97        #[unsafe(method(partySize))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn partySize(&self) -> Option<Retained<NSNumber>>;
100
101        #[cfg(feature = "objc2-core-location")]
102        #[unsafe(method(restaurantLocation))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn restaurantLocation(&self) -> Retained<CLPlacemark>;
105    );
106}
107
108/// Methods declared on superclass `INReservation`.
109#[cfg(feature = "INReservation")]
110impl INRestaurantReservation {
111    extern_methods!(
112        #[unsafe(method(init))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
115    );
116}
117
118/// Methods declared on superclass `NSObject`.
119#[cfg(feature = "INReservation")]
120impl INRestaurantReservation {
121    extern_methods!(
122        #[unsafe(method(new))]
123        #[unsafe(method_family = new)]
124        pub unsafe fn new() -> Retained<Self>;
125    );
126}