objc2_intents/generated/
INSendRideFeedbackIntentResponse.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
9/// [Apple's documentation](https://developer.apple.com/documentation/intents/insendridefeedbackintentresponsecode?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INSendRideFeedbackIntentResponseCode(pub NSInteger);
14impl INSendRideFeedbackIntentResponseCode {
15    #[doc(alias = "INSendRideFeedbackIntentResponseCodeUnspecified")]
16    pub const Unspecified: Self = Self(0);
17    #[doc(alias = "INSendRideFeedbackIntentResponseCodeReady")]
18    pub const Ready: Self = Self(1);
19    #[doc(alias = "INSendRideFeedbackIntentResponseCodeSuccess")]
20    pub const Success: Self = Self(2);
21    #[doc(alias = "INSendRideFeedbackIntentResponseCodeFailure")]
22    pub const Failure: Self = Self(3);
23}
24
25unsafe impl Encode for INSendRideFeedbackIntentResponseCode {
26    const ENCODING: Encoding = NSInteger::ENCODING;
27}
28
29unsafe impl RefEncode for INSendRideFeedbackIntentResponseCode {
30    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
31}
32
33extern_class!(
34    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insendridefeedbackintentresponse?language=objc)
35    #[unsafe(super(INIntentResponse, NSObject))]
36    #[derive(Debug, PartialEq, Eq, Hash)]
37    #[cfg(feature = "INIntentResponse")]
38    pub struct INSendRideFeedbackIntentResponse;
39);
40
41#[cfg(feature = "INIntentResponse")]
42extern_conformance!(
43    unsafe impl NSCoding for INSendRideFeedbackIntentResponse {}
44);
45
46#[cfg(feature = "INIntentResponse")]
47extern_conformance!(
48    unsafe impl NSCopying for INSendRideFeedbackIntentResponse {}
49);
50
51#[cfg(feature = "INIntentResponse")]
52unsafe impl CopyingHelper for INSendRideFeedbackIntentResponse {
53    type Result = Self;
54}
55
56#[cfg(feature = "INIntentResponse")]
57extern_conformance!(
58    unsafe impl NSObjectProtocol for INSendRideFeedbackIntentResponse {}
59);
60
61#[cfg(feature = "INIntentResponse")]
62extern_conformance!(
63    unsafe impl NSSecureCoding for INSendRideFeedbackIntentResponse {}
64);
65
66#[cfg(feature = "INIntentResponse")]
67impl INSendRideFeedbackIntentResponse {
68    extern_methods!(
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(initWithCode:userActivity:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithCode_userActivity(
76            this: Allocated<Self>,
77            code: INSendRideFeedbackIntentResponseCode,
78            user_activity: Option<&NSUserActivity>,
79        ) -> Retained<Self>;
80
81        #[unsafe(method(code))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn code(&self) -> INSendRideFeedbackIntentResponseCode;
84    );
85}
86
87/// Methods declared on superclass `NSObject`.
88#[cfg(feature = "INIntentResponse")]
89impl INSendRideFeedbackIntentResponse {
90    extern_methods!(
91        #[unsafe(method(new))]
92        #[unsafe(method_family = new)]
93        pub unsafe fn new() -> Retained<Self>;
94    );
95}