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

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

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

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

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

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

impl INRideFareLineItem {
    extern_methods!(
        /// # Safety
        ///
        /// - `title` might not allow `None`.
        /// - `price` might not allow `None`.
        /// - `currency_code` might not allow `None`.
        #[unsafe(method(initWithTitle:price:currencyCode:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTitle_price_currencyCode(
            this: Allocated<Self>,
            title: Option<&NSString>,
            price: Option<&NSDecimalNumber>,
            currency_code: Option<&NSString>,
        ) -> Option<Retained<Self>>;

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

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

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

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

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