objc2_intents/generated/
INGetAvailableRestaurantReservationBookingDefaultsIntentResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetavailablerestaurantreservationbookingdefaultsintentresponsecode?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode(pub NSInteger);
15impl INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode {
16    #[doc(alias = "INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCodeSuccess")]
17    pub const Success: Self = Self(0);
18    #[doc(alias = "INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCodeFailure")]
19    pub const Failure: Self = Self(1);
20    #[doc(
21        alias = "INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCodeUnspecified"
22    )]
23    pub const Unspecified: Self = Self(2);
24}
25
26unsafe impl Encode for INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode {
27    const ENCODING: Encoding = NSInteger::ENCODING;
28}
29
30unsafe impl RefEncode for INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode {
31    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34extern_class!(
35    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetavailablerestaurantreservationbookingdefaultsintentresponse?language=objc)
36    #[unsafe(super(INIntentResponse, NSObject))]
37    #[derive(Debug, PartialEq, Eq, Hash)]
38    #[cfg(feature = "INIntentResponse")]
39    pub struct INGetAvailableRestaurantReservationBookingDefaultsIntentResponse;
40);
41
42#[cfg(feature = "INIntentResponse")]
43extern_conformance!(
44    unsafe impl NSCoding for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {}
45);
46
47#[cfg(feature = "INIntentResponse")]
48extern_conformance!(
49    unsafe impl NSCopying for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {}
50);
51
52#[cfg(feature = "INIntentResponse")]
53unsafe impl CopyingHelper for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {
54    type Result = Self;
55}
56
57#[cfg(feature = "INIntentResponse")]
58extern_conformance!(
59    unsafe impl NSObjectProtocol for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {}
60);
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64    unsafe impl NSSecureCoding for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68impl INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {
69    extern_methods!(
70        #[unsafe(method(defaultPartySize))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn defaultPartySize(&self) -> NSUInteger;
73
74        #[unsafe(method(defaultBookingDate))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn defaultBookingDate(&self) -> Retained<NSDate>;
77
78        #[unsafe(method(maximumPartySize))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn maximumPartySize(&self) -> Option<Retained<NSNumber>>;
81
82        /// Setter for [`maximumPartySize`][Self::maximumPartySize].
83        ///
84        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
85        #[unsafe(method(setMaximumPartySize:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setMaximumPartySize(&self, maximum_party_size: Option<&NSNumber>);
88
89        #[unsafe(method(minimumPartySize))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn minimumPartySize(&self) -> Option<Retained<NSNumber>>;
92
93        /// Setter for [`minimumPartySize`][Self::minimumPartySize].
94        ///
95        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
96        #[unsafe(method(setMinimumPartySize:))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn setMinimumPartySize(&self, minimum_party_size: Option<&NSNumber>);
99
100        #[cfg(feature = "INImage")]
101        #[unsafe(method(providerImage))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn providerImage(&self) -> Retained<INImage>;
104
105        #[cfg(feature = "INImage")]
106        /// Setter for [`providerImage`][Self::providerImage].
107        ///
108        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
109        #[unsafe(method(setProviderImage:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn setProviderImage(&self, provider_image: &INImage);
112
113        #[unsafe(method(initWithDefaultPartySize:defaultBookingDate:code:userActivity:))]
114        #[unsafe(method_family = init)]
115        pub unsafe fn initWithDefaultPartySize_defaultBookingDate_code_userActivity(
116            this: Allocated<Self>,
117            default_party_size: NSUInteger,
118            default_booking_date: &NSDate,
119            code: INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode,
120            user_activity: Option<&NSUserActivity>,
121        ) -> Retained<Self>;
122
123        #[unsafe(method(code))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn code(
126            &self,
127        ) -> INGetAvailableRestaurantReservationBookingDefaultsIntentResponseCode;
128    );
129}
130
131/// Methods declared on superclass `NSObject`.
132#[cfg(feature = "INIntentResponse")]
133impl INGetAvailableRestaurantReservationBookingDefaultsIntentResponse {
134    extern_methods!(
135        #[unsafe(method(init))]
136        #[unsafe(method_family = init)]
137        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139        #[unsafe(method(new))]
140        #[unsafe(method_family = new)]
141        pub unsafe fn new() -> Retained<Self>;
142    );
143}