use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INRequestRideIntentResponseCode(pub NSInteger);
impl INRequestRideIntentResponseCode {
#[doc(alias = "INRequestRideIntentResponseCodeUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "INRequestRideIntentResponseCodeReady")]
pub const Ready: Self = Self(1);
#[doc(alias = "INRequestRideIntentResponseCodeInProgress")]
#[deprecated = "INRequestRideIntentResponseCodeInProgress is deprecated."]
pub const InProgress: Self = Self(2);
#[doc(alias = "INRequestRideIntentResponseCodeSuccess")]
pub const Success: Self = Self(3);
#[doc(alias = "INRequestRideIntentResponseCodeFailure")]
pub const Failure: Self = Self(4);
#[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunch")]
pub const FailureRequiringAppLaunch: Self = Self(5);
#[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchMustVerifyCredentials")]
pub const FailureRequiringAppLaunchMustVerifyCredentials: Self = Self(6);
#[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchNoServiceInArea")]
pub const FailureRequiringAppLaunchNoServiceInArea: Self = Self(7);
#[doc(
alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchServiceTemporarilyUnavailable"
)]
pub const FailureRequiringAppLaunchServiceTemporarilyUnavailable: Self = Self(8);
#[doc(
alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchPreviousRideNeedsCompletion"
)]
pub const FailureRequiringAppLaunchPreviousRideNeedsCompletion: Self = Self(9);
#[doc(alias = "INRequestRideIntentResponseCodeFailureRequiringAppLaunchRideScheduledTooFar")]
pub const FailureRequiringAppLaunchRideScheduledTooFar: Self = Self(10);
}
unsafe impl Encode for INRequestRideIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INRequestRideIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INRequestRideIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INRequestRideIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INRequestRideIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INRequestRideIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INRequestRideIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INRequestRideIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INRequestRideIntentResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCode:userActivity:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCode_userActivity(
this: Allocated<Self>,
code: INRequestRideIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INRequestRideIntentResponseCode;
#[cfg(feature = "INRideStatus")]
#[unsafe(method(rideStatus))]
#[unsafe(method_family = none)]
pub unsafe fn rideStatus(&self) -> Option<Retained<INRideStatus>>;
#[cfg(feature = "INRideStatus")]
#[unsafe(method(setRideStatus:))]
#[unsafe(method_family = none)]
pub unsafe fn setRideStatus(&self, ride_status: Option<&INRideStatus>);
);
}
#[cfg(feature = "INIntentResponse")]
impl INRequestRideIntentResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}