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!(
#[unsafe(super(INIntent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntent")]
pub struct INRequestRideIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INRequestRideIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INRequestRideIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INRequestRideIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INRequestRideIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INRequestRideIntent {}
);
#[cfg(feature = "INIntent")]
impl INRequestRideIntent {
extern_methods!(
#[cfg(all(
feature = "INDateComponentsRange",
feature = "INPaymentMethod",
feature = "INSpeakableString",
feature = "objc2-core-location"
))]
#[unsafe(method(initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:scheduledPickupTime:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPickupLocation_dropOffLocation_rideOptionName_partySize_paymentMethod_scheduledPickupTime(
this: Allocated<Self>,
pickup_location: Option<&CLPlacemark>,
drop_off_location: Option<&CLPlacemark>,
ride_option_name: Option<&INSpeakableString>,
party_size: Option<&NSNumber>,
payment_method: Option<&INPaymentMethod>,
scheduled_pickup_time: Option<&INDateComponentsRange>,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(pickupLocation))]
#[unsafe(method_family = none)]
pub unsafe fn pickupLocation(&self) -> Option<Retained<CLPlacemark>>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(dropOffLocation))]
#[unsafe(method_family = none)]
pub unsafe fn dropOffLocation(&self) -> Option<Retained<CLPlacemark>>;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(rideOptionName))]
#[unsafe(method_family = none)]
pub unsafe fn rideOptionName(&self) -> Option<Retained<INSpeakableString>>;
#[unsafe(method(partySize))]
#[unsafe(method_family = none)]
pub unsafe fn partySize(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "INPaymentMethod")]
#[unsafe(method(paymentMethod))]
#[unsafe(method_family = none)]
pub unsafe fn paymentMethod(&self) -> Option<Retained<INPaymentMethod>>;
#[cfg(feature = "INDateComponentsRange")]
#[unsafe(method(scheduledPickupTime))]
#[unsafe(method_family = none)]
pub unsafe fn scheduledPickupTime(&self) -> Option<Retained<INDateComponentsRange>>;
);
}
#[cfg(feature = "INIntent")]
impl INRequestRideIntent {
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>;
);
}
extern_protocol!(
pub unsafe trait INRequestRideIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INRequestRideIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleRequestRide:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleRequestRide_completion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INRequestRideIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INRequestRideIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmRequestRide:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmRequestRide_completion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INRequestRideIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INPlacemarkResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePickupLocationForRequestRide:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePickupLocationForRequestRide_withCompletion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INPlacemarkResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveDropOffLocationForRequestRide:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveDropOffLocationForRequestRide_withCompletion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveRideOptionNameForRequestRide:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveRideOptionNameForRequestRide_withCompletion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
);
#[cfg(all(
feature = "INIntegerResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePartySizeForRequestRide:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePartySizeForRequestRide_withCompletion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
);
#[cfg(all(
feature = "INDateComponentsRangeResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveScheduledPickupTimeForRequestRide:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveScheduledPickupTimeForRequestRide_withCompletion(
&self,
intent: &INRequestRideIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
);
}
);