objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/intents/increatetasklistintentresponsecode?language=objc)
// NS_ENUM
#[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INCreateTaskListIntentResponseCode(pub NSInteger);
impl INCreateTaskListIntentResponseCode {
    #[doc(alias = "INCreateTaskListIntentResponseCodeUnspecified")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const Unspecified: Self = Self(0);
    #[doc(alias = "INCreateTaskListIntentResponseCodeReady")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const Ready: Self = Self(1);
    #[doc(alias = "INCreateTaskListIntentResponseCodeInProgress")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const InProgress: Self = Self(2);
    #[doc(alias = "INCreateTaskListIntentResponseCodeSuccess")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const Success: Self = Self(3);
    #[doc(alias = "INCreateTaskListIntentResponseCodeFailure")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const Failure: Self = Self(4);
    #[doc(alias = "INCreateTaskListIntentResponseCodeFailureRequiringAppLaunch")]
    #[deprecated = "INCreateTaskListIntentResponseCode is deprecated. There is no replacement."]
    pub const FailureRequiringAppLaunch: Self = Self(5);
}

unsafe impl Encode for INCreateTaskListIntentResponseCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for INCreateTaskListIntentResponseCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/increatetasklistintentresponse?language=objc)
    #[unsafe(super(INIntentResponse, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntentResponse")]
    #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
    pub struct INCreateTaskListIntentResponse;
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCoding for INCreateTaskListIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCopying for INCreateTaskListIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INCreateTaskListIntentResponse {
    type Result = Self;
}

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INCreateTaskListIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSSecureCoding for INCreateTaskListIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
impl INCreateTaskListIntentResponse {
    extern_methods!(
        #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(initWithCode:userActivity:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCode_userActivity(
            this: Allocated<Self>,
            code: INCreateTaskListIntentResponseCode,
            user_activity: Option<&NSUserActivity>,
        ) -> Retained<Self>;

        #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(code))]
        #[unsafe(method_family = none)]
        pub unsafe fn code(&self) -> INCreateTaskListIntentResponseCode;

        #[cfg(feature = "INTaskList")]
        #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(createdTaskList))]
        #[unsafe(method_family = none)]
        pub unsafe fn createdTaskList(&self) -> Option<Retained<INTaskList>>;

        #[cfg(feature = "INTaskList")]
        /// Setter for [`createdTaskList`][Self::createdTaskList].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "INCreateTaskListIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(setCreatedTaskList:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCreatedTaskList(&self, created_task_list: Option<&INTaskList>);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "INIntentResponse")]
impl INCreateTaskListIntentResponse {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}