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 INSearchForAccountsIntentResponseCode(pub NSInteger);
impl INSearchForAccountsIntentResponseCode {
#[doc(alias = "INSearchForAccountsIntentResponseCodeUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "INSearchForAccountsIntentResponseCodeReady")]
pub const Ready: Self = Self(1);
#[doc(alias = "INSearchForAccountsIntentResponseCodeInProgress")]
pub const InProgress: Self = Self(2);
#[doc(alias = "INSearchForAccountsIntentResponseCodeSuccess")]
pub const Success: Self = Self(3);
#[doc(alias = "INSearchForAccountsIntentResponseCodeFailure")]
pub const Failure: Self = Self(4);
#[doc(alias = "INSearchForAccountsIntentResponseCodeFailureRequiringAppLaunch")]
pub const FailureRequiringAppLaunch: Self = Self(5);
#[doc(alias = "INSearchForAccountsIntentResponseCodeFailureCredentialsUnverified")]
pub const FailureCredentialsUnverified: Self = Self(6);
#[doc(alias = "INSearchForAccountsIntentResponseCodeFailureAccountNotFound")]
pub const FailureAccountNotFound: Self = Self(7);
#[doc(
alias = "INSearchForAccountsIntentResponseCodeFailureTermsAndConditionsAcceptanceRequired"
)]
pub const FailureTermsAndConditionsAcceptanceRequired: Self = Self(8);
#[doc(alias = "INSearchForAccountsIntentResponseCodeFailureNotEligible")]
pub const FailureNotEligible: Self = Self(9);
}
unsafe impl Encode for INSearchForAccountsIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INSearchForAccountsIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INSearchForAccountsIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INSearchForAccountsIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INSearchForAccountsIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INSearchForAccountsIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INSearchForAccountsIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INSearchForAccountsIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INSearchForAccountsIntentResponse {
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: INSearchForAccountsIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INSearchForAccountsIntentResponseCode;
#[cfg(feature = "INPaymentAccount")]
#[unsafe(method(accounts))]
#[unsafe(method_family = none)]
pub unsafe fn accounts(&self) -> Option<Retained<NSArray<INPaymentAccount>>>;
#[cfg(feature = "INPaymentAccount")]
#[unsafe(method(setAccounts:))]
#[unsafe(method_family = none)]
pub unsafe fn setAccounts(&self, accounts: Option<&NSArray<INPaymentAccount>>);
);
}
#[cfg(feature = "INIntentResponse")]
impl INSearchForAccountsIntentResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}