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::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/intents/instartcallcallrecordtocallbackunsupportedreason?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INStartCallCallRecordToCallBackUnsupportedReason(pub NSInteger);
impl INStartCallCallRecordToCallBackUnsupportedReason {
    #[doc(alias = "INStartCallCallRecordToCallBackUnsupportedReasonNoMatchingCall")]
    pub const NoMatchingCall: Self = Self(1);
}

unsafe impl Encode for INStartCallCallRecordToCallBackUnsupportedReason {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for INStartCallCallRecordToCallBackUnsupportedReason {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/instartcallcallrecordtocallbackresolutionresult?language=objc)
    #[unsafe(super(INCallRecordResolutionResult, INIntentResolutionResult, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(
        feature = "INCallRecordResolutionResult",
        feature = "INIntentResolutionResult"
    ))]
    pub struct INStartCallCallRecordToCallBackResolutionResult;
);

#[cfg(all(
    feature = "INCallRecordResolutionResult",
    feature = "INIntentResolutionResult"
))]
extern_conformance!(
    unsafe impl NSObjectProtocol for INStartCallCallRecordToCallBackResolutionResult {}
);

#[cfg(all(
    feature = "INCallRecordResolutionResult",
    feature = "INIntentResolutionResult"
))]
impl INStartCallCallRecordToCallBackResolutionResult {
    extern_methods!(
        #[unsafe(method(unsupportedForReason:))]
        #[unsafe(method_family = none)]
        pub unsafe fn unsupportedForReason(
            reason: INStartCallCallRecordToCallBackUnsupportedReason,
        ) -> Retained<Self>;

        #[unsafe(method(initWithCallRecordResolutionResult:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCallRecordResolutionResult(
            this: Allocated<Self>,
            call_record_resolution_result: &INCallRecordResolutionResult,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `INCallRecordResolutionResult`.
#[cfg(all(
    feature = "INCallRecordResolutionResult",
    feature = "INIntentResolutionResult"
))]
impl INStartCallCallRecordToCallBackResolutionResult {
    extern_methods!(
        #[cfg(feature = "INCallRecord")]
        #[unsafe(method(successWithResolvedCallRecord:))]
        #[unsafe(method_family = none)]
        pub unsafe fn successWithResolvedCallRecord(
            resolved_call_record: &INCallRecord,
        ) -> Retained<Self>;

        #[cfg(feature = "INCallRecord")]
        #[unsafe(method(disambiguationWithCallRecordsToDisambiguate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn disambiguationWithCallRecordsToDisambiguate(
            call_records_to_disambiguate: &NSArray<INCallRecord>,
        ) -> Retained<Self>;

        #[cfg(feature = "INCallRecord")]
        #[unsafe(method(confirmationRequiredWithCallRecordToConfirm:))]
        #[unsafe(method_family = none)]
        pub unsafe fn confirmationRequiredWithCallRecordToConfirm(
            call_record_to_confirm: Option<&INCallRecord>,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `INIntentResolutionResult`.
#[cfg(all(
    feature = "INCallRecordResolutionResult",
    feature = "INIntentResolutionResult"
))]
impl INStartCallCallRecordToCallBackResolutionResult {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(needsValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn needsValue() -> Retained<Self>;

        #[unsafe(method(notRequired))]
        #[unsafe(method_family = none)]
        pub unsafe fn notRequired() -> Retained<Self>;

        #[unsafe(method(unsupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn unsupported() -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(
    feature = "INCallRecordResolutionResult",
    feature = "INIntentResolutionResult"
))]
impl INStartCallCallRecordToCallBackResolutionResult {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}