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::ffi::*;
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/inrestaurant?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INRestaurant;
);

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

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

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

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

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

impl INRestaurant {
    extern_methods!(
        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(initWithLocation:name:vendorIdentifier:restaurantIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithLocation_name_vendorIdentifier_restaurantIdentifier(
            this: Allocated<Self>,
            location: &CLLocation,
            name: &NSString,
            vendor_identifier: &NSString,
            restaurant_identifier: &NSString,
        ) -> Retained<Self>;

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

        #[cfg(feature = "objc2-core-location")]
        /// Setter for [`location`][Self::location].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLocation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLocation(&self, location: &CLLocation);

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

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

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

        /// Setter for [`vendorIdentifier`][Self::vendorIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVendorIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVendorIdentifier(&self, vendor_identifier: &NSString);

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

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

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

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