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

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

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

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

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

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

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

#[cfg(feature = "INPerson")]
impl INRideDriver {
    extern_methods!(
        #[unsafe(method(rating))]
        #[unsafe(method_family = none)]
        pub unsafe fn rating(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(phoneNumber))]
        #[unsafe(method_family = none)]
        pub unsafe fn phoneNumber(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "INImage")]
        #[unsafe(method(initWithPhoneNumber:nameComponents:displayName:image:rating:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPhoneNumber_nameComponents_displayName_image_rating(
            this: Allocated<Self>,
            phone_number: &NSString,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            rating: Option<&NSString>,
        ) -> Retained<Self>;
    );
}

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

        #[cfg(all(feature = "INImage", feature = "INPersonHandle"))]
        #[unsafe(method(initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPersonHandle_nameComponents_displayName_image_contactIdentifier_customIdentifier(
            this: Allocated<Self>,
            person_handle: &INPersonHandle,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            contact_identifier: Option<&NSString>,
            custom_identifier: Option<&NSString>,
        ) -> Retained<Self>;

        #[cfg(all(
            feature = "INImage",
            feature = "INPersonHandle",
            feature = "INPersonRelationship"
        ))]
        #[unsafe(method(initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:relationship:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPersonHandle_nameComponents_displayName_image_contactIdentifier_customIdentifier_relationship(
            this: Allocated<Self>,
            person_handle: &INPersonHandle,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            contact_identifier: Option<&NSString>,
            custom_identifier: Option<&NSString>,
            relationship: Option<&INPersonRelationship>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "INImage", feature = "INPersonHandle"))]
        #[unsafe(method(initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPersonHandle_nameComponents_displayName_image_contactIdentifier_customIdentifier_isMe(
            this: Allocated<Self>,
            person_handle: &INPersonHandle,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            contact_identifier: Option<&NSString>,
            custom_identifier: Option<&NSString>,
            is_me: bool,
        ) -> Retained<Self>;

        #[cfg(all(feature = "INImage", feature = "INPersonHandle"))]
        #[unsafe(method(initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:suggestionType:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPersonHandle_nameComponents_displayName_image_contactIdentifier_customIdentifier_isMe_suggestionType(
            this: Allocated<Self>,
            person_handle: &INPersonHandle,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            contact_identifier: Option<&NSString>,
            custom_identifier: Option<&NSString>,
            is_me: bool,
            suggestion_type: INPersonSuggestionType,
        ) -> Retained<Self>;

        #[cfg(all(feature = "INImage", feature = "INPersonHandle"))]
        #[unsafe(method(initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isContactSuggestion:suggestionType:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPersonHandle_nameComponents_displayName_image_contactIdentifier_customIdentifier_isContactSuggestion_suggestionType(
            this: Allocated<Self>,
            person_handle: &INPersonHandle,
            name_components: Option<&NSPersonNameComponents>,
            display_name: Option<&NSString>,
            image: Option<&INImage>,
            contact_identifier: Option<&NSString>,
            custom_identifier: Option<&NSString>,
            is_contact_suggestion: bool,
            suggestion_type: INPersonSuggestionType,
        ) -> Retained<Self>;
    );
}

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