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 INStartCallContactUnsupportedReason(pub NSInteger);
impl INStartCallContactUnsupportedReason {
#[doc(alias = "INStartCallContactUnsupportedReasonNoContactFound")]
pub const NoContactFound: Self = Self(1);
#[doc(alias = "INStartCallContactUnsupportedReasonMultipleContactsUnsupported")]
pub const MultipleContactsUnsupported: Self = Self(2);
#[doc(alias = "INStartCallContactUnsupportedReasonNoHandleForLabel")]
pub const NoHandleForLabel: Self = Self(3);
#[doc(alias = "INStartCallContactUnsupportedReasonInvalidHandle")]
pub const InvalidHandle: Self = Self(4);
#[doc(alias = "INStartCallContactUnsupportedReasonUnsupportedMmiUssd")]
pub const UnsupportedMmiUssd: Self = Self(5);
#[doc(alias = "INStartCallContactUnsupportedReasonNoCallHistoryForRedial")]
#[deprecated]
pub const NoCallHistoryForRedial: Self = Self(6);
#[doc(alias = "INStartCallContactUnsupportedReasonNoUsableHandleForRedial")]
pub const NoUsableHandleForRedial: Self = Self(7);
#[doc(alias = "INStartCallContactUnsupportedReasonRequiringInAppAuthentication")]
pub const RequiringInAppAuthentication: Self = Self(8);
}
unsafe impl Encode for INStartCallContactUnsupportedReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INStartCallContactUnsupportedReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INPersonResolutionResult, INIntentResolutionResult, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
pub struct INStartCallContactResolutionResult;
);
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for INStartCallContactResolutionResult {}
);
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
impl INStartCallContactResolutionResult {
extern_methods!(
#[unsafe(method(unsupportedForReason:))]
#[unsafe(method_family = none)]
pub unsafe fn unsupportedForReason(
reason: INStartCallContactUnsupportedReason,
) -> Retained<Self>;
#[unsafe(method(initWithPersonResolutionResult:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPersonResolutionResult(
this: Allocated<Self>,
person_resolution_result: &INPersonResolutionResult,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
impl INStartCallContactResolutionResult {
extern_methods!(
#[cfg(feature = "INPerson")]
#[unsafe(method(successWithResolvedPerson:))]
#[unsafe(method_family = none)]
pub unsafe fn successWithResolvedPerson(resolved_person: &INPerson) -> Retained<Self>;
#[cfg(feature = "INPerson")]
#[unsafe(method(disambiguationWithPeopleToDisambiguate:))]
#[unsafe(method_family = none)]
pub unsafe fn disambiguationWithPeopleToDisambiguate(
people_to_disambiguate: &NSArray<INPerson>,
) -> Retained<Self>;
#[cfg(feature = "INPerson")]
#[unsafe(method(confirmationRequiredWithPersonToConfirm:))]
#[unsafe(method_family = none)]
pub unsafe fn confirmationRequiredWithPersonToConfirm(
person_to_confirm: Option<&INPerson>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
impl INStartCallContactResolutionResult {
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>;
);
}
#[cfg(all(
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult"
))]
impl INStartCallContactResolutionResult {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}