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

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

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

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

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

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

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

        #[cfg(all(feature = "INDateComponentsRange", feature = "objc2-core-location"))]
        #[unsafe(method(initWithProvider:busName:busNumber:tripDuration:departureBusStopLocation:departurePlatform:arrivalBusStopLocation:arrivalPlatform:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithProvider_busName_busNumber_tripDuration_departureBusStopLocation_departurePlatform_arrivalBusStopLocation_arrivalPlatform(
            this: Allocated<Self>,
            provider: Option<&NSString>,
            bus_name: Option<&NSString>,
            bus_number: Option<&NSString>,
            trip_duration: &INDateComponentsRange,
            departure_bus_stop_location: &CLPlacemark,
            departure_platform: Option<&NSString>,
            arrival_bus_stop_location: &CLPlacemark,
            arrival_platform: Option<&NSString>,
        ) -> Retained<Self>;

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

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

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

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

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

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

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

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

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