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::*;

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

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

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

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

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

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

#[cfg(feature = "INIntent")]
impl INSearchForBillsIntent {
    extern_methods!(
        #[cfg(all(
            feature = "INBillPayee",
            feature = "INBillType",
            feature = "INDateComponentsRange",
            feature = "INPaymentStatus"
        ))]
        #[deprecated = "INSearchForBillsIntent is deprecated. There is no replacement."]
        #[unsafe(method(initWithBillPayee:paymentDateRange:billType:status:dueDateRange:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithBillPayee_paymentDateRange_billType_status_dueDateRange(
            this: Allocated<Self>,
            bill_payee: Option<&INBillPayee>,
            payment_date_range: Option<&INDateComponentsRange>,
            bill_type: INBillType,
            status: INPaymentStatus,
            due_date_range: Option<&INDateComponentsRange>,
        ) -> Retained<Self>;

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

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

        #[cfg(feature = "INBillType")]
        #[deprecated = "INSearchForBillsIntent is deprecated. There is no replacement."]
        #[unsafe(method(billType))]
        #[unsafe(method_family = none)]
        pub unsafe fn billType(&self) -> INBillType;

        #[cfg(feature = "INPaymentStatus")]
        #[deprecated = "INSearchForBillsIntent is deprecated. There is no replacement."]
        #[unsafe(method(status))]
        #[unsafe(method_family = none)]
        pub unsafe fn status(&self) -> INPaymentStatus;

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

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "INIntent")]
impl INSearchForBillsIntent {
    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!(
    /// Protocol to declare support for handling an INSearchForBillsIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
    ///
    /// The minimum requirement for an implementing class is that it should be able to handle the intent. The resolution and confirmation methods are optional. The handling method is always called last, after resolving and confirming the intent.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insearchforbillsintenthandling?language=objc)
    #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
    pub unsafe trait INSearchForBillsIntentHandling: NSObjectProtocol {
        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "INSearchForBillsIntentResponse",
            feature = "block2"
        ))]
        /// Handling method - Execute the task represented by the INSearchForBillsIntent that's passed in
        ///
        /// Called to actually execute the intent. The app must return a response for this intent.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response handling block takes a INSearchForBillsIntentResponse containing the details of the result of having executed the intent
        ///
        ///
        /// See: INSearchForBillsIntentResponse
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[unsafe(method(handleSearchForBills:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn handleSearchForBills_completion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForBillsIntentResponse>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "INSearchForBillsIntentResponse",
            feature = "block2"
        ))]
        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
        ///
        /// Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response block contains an INSearchForBillsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
        ///
        ///
        /// See: INSearchForBillsIntentResponse
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(confirmSearchForBills:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn confirmSearchForBills_completion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForBillsIntentResponse>)>,
        );

        #[cfg(all(
            feature = "INBillPayeeResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
        ///
        /// Called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
        ///
        ///
        /// See: INIntentResolutionResult
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveBillPayeeForSearchForBills:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveBillPayeeForSearchForBills_withCompletion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBillPayeeResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INDateComponentsRangeResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolvePaymentDateRangeForSearchForBills:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolvePaymentDateRangeForSearchForBills_withCompletion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INBillTypeResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveBillTypeForSearchForBills:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveBillTypeForSearchForBills_withCompletion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INBillTypeResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "INPaymentStatusResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveStatusForSearchForBills:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveStatusForSearchForBills_withCompletion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INPaymentStatusResolutionResult>)>,
        );

        #[cfg(all(
            feature = "INDateComponentsRangeResolutionResult",
            feature = "INIntent",
            feature = "INIntentResolutionResult",
            feature = "block2"
        ))]
        #[deprecated = "INSearchForBillsIntentHandling is deprecated. There is no replacement."]
        #[optional]
        #[unsafe(method(resolveDueDateRangeForSearchForBills:withCompletion:))]
        #[unsafe(method_family = none)]
        unsafe fn resolveDueDateRangeForSearchForBills_withCompletion(
            &self,
            intent: &INSearchForBillsIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
        );
    }
);