use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INCreateNoteIntentResponseCode(pub NSInteger);
impl INCreateNoteIntentResponseCode {
#[doc(alias = "INCreateNoteIntentResponseCodeUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "INCreateNoteIntentResponseCodeReady")]
pub const Ready: Self = Self(1);
#[doc(alias = "INCreateNoteIntentResponseCodeInProgress")]
pub const InProgress: Self = Self(2);
#[doc(alias = "INCreateNoteIntentResponseCodeSuccess")]
pub const Success: Self = Self(3);
#[doc(alias = "INCreateNoteIntentResponseCodeFailure")]
pub const Failure: Self = Self(4);
#[doc(alias = "INCreateNoteIntentResponseCodeFailureRequiringAppLaunch")]
pub const FailureRequiringAppLaunch: Self = Self(5);
}
unsafe impl Encode for INCreateNoteIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INCreateNoteIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INCreateNoteIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INCreateNoteIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INCreateNoteIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INCreateNoteIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INCreateNoteIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INCreateNoteIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INCreateNoteIntentResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCode:userActivity:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCode_userActivity(
this: Allocated<Self>,
code: INCreateNoteIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INCreateNoteIntentResponseCode;
#[cfg(feature = "INNote")]
#[unsafe(method(createdNote))]
#[unsafe(method_family = none)]
pub unsafe fn createdNote(&self) -> Option<Retained<INNote>>;
#[cfg(feature = "INNote")]
#[unsafe(method(setCreatedNote:))]
#[unsafe(method_family = none)]
pub unsafe fn setCreatedNote(&self, created_note: Option<&INNote>);
);
}
#[cfg(feature = "INIntentResponse")]
impl INCreateNoteIntentResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}