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 INSearchForMessagesIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INSearchForMessagesIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INSearchForMessagesIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INSearchForMessagesIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INSearchForMessagesIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INSearchForMessagesIntent {}
);
#[cfg(feature = "INIntent")]
impl INSearchForMessagesIntent {
extern_methods!(
#[cfg(all(
feature = "INDateComponentsRange",
feature = "INMessageAttributeOptions",
feature = "INPerson",
feature = "INSpeakableString"
))]
#[unsafe(method(initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:conversationIdentifiers:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRecipients_senders_searchTerms_attributes_dateTimeRange_identifiers_notificationIdentifiers_speakableGroupNames_conversationIdentifiers(
this: Allocated<Self>,
recipients: Option<&NSArray<INPerson>>,
senders: Option<&NSArray<INPerson>>,
search_terms: Option<&NSArray<NSString>>,
attributes: INMessageAttributeOptions,
date_time_range: Option<&INDateComponentsRange>,
identifiers: Option<&NSArray<NSString>>,
notification_identifiers: Option<&NSArray<NSString>>,
speakable_group_names: Option<&NSArray<INSpeakableString>>,
conversation_identifiers: Option<&NSArray<NSString>>,
) -> Retained<Self>;
#[cfg(feature = "INPerson")]
#[unsafe(method(recipients))]
#[unsafe(method_family = none)]
pub unsafe fn recipients(&self) -> Option<Retained<NSArray<INPerson>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(recipientsOperator))]
#[unsafe(method_family = none)]
pub unsafe fn recipientsOperator(&self) -> INConditionalOperator;
#[cfg(feature = "INPerson")]
#[unsafe(method(senders))]
#[unsafe(method_family = none)]
pub unsafe fn senders(&self) -> Option<Retained<NSArray<INPerson>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(sendersOperator))]
#[unsafe(method_family = none)]
pub unsafe fn sendersOperator(&self) -> INConditionalOperator;
#[unsafe(method(searchTerms))]
#[unsafe(method_family = none)]
pub unsafe fn searchTerms(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(searchTermsOperator))]
#[unsafe(method_family = none)]
pub unsafe fn searchTermsOperator(&self) -> INConditionalOperator;
#[cfg(feature = "INMessageAttributeOptions")]
#[unsafe(method(attributes))]
#[unsafe(method_family = none)]
pub unsafe fn attributes(&self) -> INMessageAttributeOptions;
#[cfg(feature = "INDateComponentsRange")]
#[unsafe(method(dateTimeRange))]
#[unsafe(method_family = none)]
pub unsafe fn dateTimeRange(&self) -> Option<Retained<INDateComponentsRange>>;
#[unsafe(method(identifiers))]
#[unsafe(method_family = none)]
pub unsafe fn identifiers(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(identifiersOperator))]
#[unsafe(method_family = none)]
pub unsafe fn identifiersOperator(&self) -> INConditionalOperator;
#[unsafe(method(notificationIdentifiers))]
#[unsafe(method_family = none)]
pub unsafe fn notificationIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(notificationIdentifiersOperator))]
#[unsafe(method_family = none)]
pub unsafe fn notificationIdentifiersOperator(&self) -> INConditionalOperator;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(speakableGroupNames))]
#[unsafe(method_family = none)]
pub unsafe fn speakableGroupNames(&self) -> Option<Retained<NSArray<INSpeakableString>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(speakableGroupNamesOperator))]
#[unsafe(method_family = none)]
pub unsafe fn speakableGroupNamesOperator(&self) -> INConditionalOperator;
#[unsafe(method(conversationIdentifiers))]
#[unsafe(method_family = none)]
pub unsafe fn conversationIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "INConditionalOperator")]
#[unsafe(method(conversationIdentifiersOperator))]
#[unsafe(method_family = none)]
pub unsafe fn conversationIdentifiersOperator(&self) -> INConditionalOperator;
);
}
#[cfg(feature = "INIntent")]
impl INSearchForMessagesIntent {
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 INSearchForMessagesIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INSearchForMessagesIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleSearchForMessages:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleSearchForMessages_completion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForMessagesIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INSearchForMessagesIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmSearchForMessages:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmSearchForMessages_completion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForMessagesIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveRecipientsForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveRecipientsForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveSendersForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveSendersForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INPersonResolutionResult>>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INMessageAttributeOptionsResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveAttributesForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveAttributesForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INMessageAttributeOptionsResolutionResult>),
>,
);
#[cfg(all(
feature = "INDateComponentsRangeResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveDateTimeRangeForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveDateTimeRangeForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INStringResolutionResult",
feature = "block2"
))]
#[deprecated = "resolveGroupNamesForSearchForMessages:withCompletion: is deprecated. Use resolveSpeakableGroupNamesForSearchForMessages:withCompletion: instead"]
#[optional]
#[unsafe(method(resolveGroupNamesForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveGroupNamesForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<NSArray<INStringResolutionResult>>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveSpeakableGroupNamesForSearchForMessages:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveSpeakableGroupNamesForSearchForMessages_withCompletion(
&self,
intent: &INSearchForMessagesIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<NSArray<INSpeakableStringResolutionResult>>),
>,
);
}
);