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