use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(INIntent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntent")]
pub struct INSearchForAccountsIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INSearchForAccountsIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INSearchForAccountsIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INSearchForAccountsIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INSearchForAccountsIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INSearchForAccountsIntent {}
);
#[cfg(feature = "INIntent")]
impl INSearchForAccountsIntent {
extern_methods!(
#[cfg(all(
feature = "INAccountType",
feature = "INBalanceType",
feature = "INSpeakableString"
))]
#[unsafe(method(initWithAccountNickname:accountType:organizationName:requestedBalanceType:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAccountNickname_accountType_organizationName_requestedBalanceType(
this: Allocated<Self>,
account_nickname: Option<&INSpeakableString>,
account_type: INAccountType,
organization_name: Option<&INSpeakableString>,
requested_balance_type: INBalanceType,
) -> Retained<Self>;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(accountNickname))]
#[unsafe(method_family = none)]
pub unsafe fn accountNickname(&self) -> Option<Retained<INSpeakableString>>;
#[cfg(feature = "INAccountType")]
#[unsafe(method(accountType))]
#[unsafe(method_family = none)]
pub unsafe fn accountType(&self) -> INAccountType;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(organizationName))]
#[unsafe(method_family = none)]
pub unsafe fn organizationName(&self) -> Option<Retained<INSpeakableString>>;
#[cfg(feature = "INBalanceType")]
#[unsafe(method(requestedBalanceType))]
#[unsafe(method_family = none)]
pub unsafe fn requestedBalanceType(&self) -> INBalanceType;
);
}
#[cfg(feature = "INIntent")]
impl INSearchForAccountsIntent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait INSearchForAccountsIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INSearchForAccountsIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleSearchForAccounts:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleSearchForAccounts_completion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForAccountsIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INSearchForAccountsIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmSearchForAccounts:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmSearchForAccounts_completion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForAccountsIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveAccountNicknameForSearchForAccounts:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveAccountNicknameForSearchForAccounts_withCompletion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
);
#[cfg(all(
feature = "INAccountTypeResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveAccountTypeForSearchForAccounts:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveAccountTypeForSearchForAccounts_withCompletion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INAccountTypeResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveOrganizationNameForSearchForAccounts:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveOrganizationNameForSearchForAccounts_withCompletion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
);
#[cfg(all(
feature = "INBalanceTypeResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveRequestedBalanceTypeForSearchForAccounts:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveRequestedBalanceTypeForSearchForAccounts_withCompletion(
&self,
intent: &INSearchForAccountsIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INBalanceTypeResolutionResult>)>,
);
}
);