objc2_intents/generated/
INBusTrip.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inbustrip?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct INBusTrip;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for INBusTrip {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for INBusTrip {}
24);
25
26unsafe impl CopyingHelper for INBusTrip {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for INBusTrip {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for INBusTrip {}
36);
37
38impl INBusTrip {
39    extern_methods!(
40        #[unsafe(method(init))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44        #[cfg(all(feature = "INDateComponentsRange", feature = "objc2-core-location"))]
45        #[unsafe(method(initWithProvider:busName:busNumber:tripDuration:departureBusStopLocation:departurePlatform:arrivalBusStopLocation:arrivalPlatform:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithProvider_busName_busNumber_tripDuration_departureBusStopLocation_departurePlatform_arrivalBusStopLocation_arrivalPlatform(
48            this: Allocated<Self>,
49            provider: Option<&NSString>,
50            bus_name: Option<&NSString>,
51            bus_number: Option<&NSString>,
52            trip_duration: &INDateComponentsRange,
53            departure_bus_stop_location: &CLPlacemark,
54            departure_platform: Option<&NSString>,
55            arrival_bus_stop_location: &CLPlacemark,
56            arrival_platform: Option<&NSString>,
57        ) -> Retained<Self>;
58
59        #[unsafe(method(provider))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn provider(&self) -> Option<Retained<NSString>>;
62
63        #[unsafe(method(busName))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn busName(&self) -> Option<Retained<NSString>>;
66
67        #[unsafe(method(busNumber))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn busNumber(&self) -> Option<Retained<NSString>>;
70
71        #[cfg(feature = "INDateComponentsRange")]
72        #[unsafe(method(tripDuration))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn tripDuration(&self) -> Retained<INDateComponentsRange>;
75
76        #[cfg(feature = "objc2-core-location")]
77        #[unsafe(method(departureBusStopLocation))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn departureBusStopLocation(&self) -> Retained<CLPlacemark>;
80
81        #[unsafe(method(departurePlatform))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn departurePlatform(&self) -> Option<Retained<NSString>>;
84
85        #[cfg(feature = "objc2-core-location")]
86        #[unsafe(method(arrivalBusStopLocation))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn arrivalBusStopLocation(&self) -> Retained<CLPlacemark>;
89
90        #[unsafe(method(arrivalPlatform))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn arrivalPlatform(&self) -> Option<Retained<NSString>>;
93    );
94}
95
96/// Methods declared on superclass `NSObject`.
97impl INBusTrip {
98    extern_methods!(
99        #[unsafe(method(new))]
100        #[unsafe(method_family = new)]
101        pub unsafe fn new() -> Retained<Self>;
102    );
103}