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

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

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

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

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

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

impl INTrainTrip {
    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:trainName:trainNumber:tripDuration:departureStationLocation:departurePlatform:arrivalStationLocation:arrivalPlatform:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithProvider_trainName_trainNumber_tripDuration_departureStationLocation_departurePlatform_arrivalStationLocation_arrivalPlatform(
            this: Allocated<Self>,
            provider: Option<&NSString>,
            train_name: Option<&NSString>,
            train_number: Option<&NSString>,
            trip_duration: &INDateComponentsRange,
            departure_station_location: &CLPlacemark,
            departure_platform: Option<&NSString>,
            arrival_station_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(trainName))]
        #[unsafe(method_family = none)]
        pub unsafe fn trainName(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(trainNumber))]
        #[unsafe(method_family = none)]
        pub unsafe fn trainNumber(&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(departureStationLocation))]
        #[unsafe(method_family = none)]
        pub unsafe fn departureStationLocation(&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(arrivalStationLocation))]
        #[unsafe(method_family = none)]
        pub unsafe fn arrivalStationLocation(&self) -> Retained<CLPlacemark>;

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

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