//! 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/uikit/uisceneactivationconditions?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UISceneActivationConditions;
);

extern_conformance!(
    unsafe impl NSCoding for UISceneActivationConditions {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for UISceneActivationConditions {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for UISceneActivationConditions {}
);

impl UISceneActivationConditions {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `a_decoder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            a_decoder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[unsafe(method(canActivateForTargetContentIdentifierPredicate))]
        #[unsafe(method_family = none)]
        pub fn canActivateForTargetContentIdentifierPredicate(&self) -> Retained<NSPredicate>;

        /// Setter for [`canActivateForTargetContentIdentifierPredicate`][Self::canActivateForTargetContentIdentifierPredicate].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCanActivateForTargetContentIdentifierPredicate:))]
        #[unsafe(method_family = none)]
        pub fn setCanActivateForTargetContentIdentifierPredicate(
            &self,
            can_activate_for_target_content_identifier_predicate: &NSPredicate,
        );

        #[unsafe(method(prefersToActivateForTargetContentIdentifierPredicate))]
        #[unsafe(method_family = none)]
        pub fn prefersToActivateForTargetContentIdentifierPredicate(&self)
            -> Retained<NSPredicate>;

        /// Setter for [`prefersToActivateForTargetContentIdentifierPredicate`][Self::prefersToActivateForTargetContentIdentifierPredicate].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPrefersToActivateForTargetContentIdentifierPredicate:))]
        #[unsafe(method_family = none)]
        pub fn setPrefersToActivateForTargetContentIdentifierPredicate(
            &self,
            prefers_to_activate_for_target_content_identifier_predicate: &NSPredicate,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl UISceneActivationConditions {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}

mod private_NSUserActivityUISceneActivationConditions {
    pub trait Sealed {}
}

/// Category "UISceneActivationConditions" on [`NSUserActivity`].
#[doc(alias = "UISceneActivationConditions")]
pub unsafe trait NSUserActivityUISceneActivationConditions:
    ClassType + Sized + private_NSUserActivityUISceneActivationConditions::Sealed
{
    extern_methods!(
        #[unsafe(method(targetContentIdentifier))]
        #[unsafe(method_family = none)]
        fn targetContentIdentifier(&self) -> Option<Retained<NSString>>;

        /// Setter for [`targetContentIdentifier`][Self::targetContentIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTargetContentIdentifier:))]
        #[unsafe(method_family = none)]
        fn setTargetContentIdentifier(&self, target_content_identifier: Option<&NSString>);
    );
}

impl private_NSUserActivityUISceneActivationConditions::Sealed for NSUserActivity {}
unsafe impl NSUserActivityUISceneActivationConditions for NSUserActivity {}
