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::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

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

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

extern_conformance!(
    unsafe impl NSCopying for INTicketedEvent {}
);

unsafe impl CopyingHelper for INTicketedEvent {
    type Result = Self;
}

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

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

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

        #[cfg(all(
            feature = "INDateComponentsRange",
            feature = "INTicketedEventCategory",
            feature = "objc2-core-location"
        ))]
        #[unsafe(method(initWithCategory:name:eventDuration:location:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCategory_name_eventDuration_location(
            this: Allocated<Self>,
            category: INTicketedEventCategory,
            name: &NSString,
            event_duration: &INDateComponentsRange,
            location: Option<&CLPlacemark>,
        ) -> Retained<Self>;

        #[cfg(feature = "INTicketedEventCategory")]
        #[unsafe(method(category))]
        #[unsafe(method_family = none)]
        pub unsafe fn category(&self) -> INTicketedEventCategory;

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

        #[cfg(feature = "INDateComponentsRange")]
        #[unsafe(method(eventDuration))]
        #[unsafe(method_family = none)]
        pub unsafe fn eventDuration(&self) -> Retained<INDateComponentsRange>;

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(location))]
        #[unsafe(method_family = none)]
        pub unsafe fn location(&self) -> Option<Retained<CLPlacemark>>;
    );
}

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