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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetcarpowerlevelstatusintentresponsecode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INGetCarPowerLevelStatusIntentResponseCode(pub NSInteger);
impl INGetCarPowerLevelStatusIntentResponseCode {
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeUnspecified")]
    pub const Unspecified: Self = Self(0);
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeReady")]
    pub const Ready: Self = Self(1);
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeInProgress")]
    pub const InProgress: Self = Self(2);
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeSuccess")]
    pub const Success: Self = Self(3);
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeFailure")]
    pub const Failure: Self = Self(4);
    #[doc(alias = "INGetCarPowerLevelStatusIntentResponseCodeFailureRequiringAppLaunch")]
    pub const FailureRequiringAppLaunch: Self = Self(5);
}

unsafe impl Encode for INGetCarPowerLevelStatusIntentResponseCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for INGetCarPowerLevelStatusIntentResponseCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetcarpowerlevelstatusintentresponse?language=objc)
    #[unsafe(super(INIntentResponse, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntentResponse")]
    pub struct INGetCarPowerLevelStatusIntentResponse;
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCoding for INGetCarPowerLevelStatusIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSCopying for INGetCarPowerLevelStatusIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INGetCarPowerLevelStatusIntentResponse {
    type Result = Self;
}

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INGetCarPowerLevelStatusIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
extern_conformance!(
    unsafe impl NSSecureCoding for INGetCarPowerLevelStatusIntentResponse {}
);

#[cfg(feature = "INIntentResponse")]
impl INGetCarPowerLevelStatusIntentResponse {
    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: INGetCarPowerLevelStatusIntentResponseCode,
            user_activity: Option<&NSUserActivity>,
        ) -> Retained<Self>;

        #[unsafe(method(code))]
        #[unsafe(method_family = none)]
        pub unsafe fn code(&self) -> INGetCarPowerLevelStatusIntentResponseCode;

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

        /// Setter for [`carIdentifier`][Self::carIdentifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCarIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCarIdentifier(&self, car_identifier: Option<&NSString>);

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

        /// Setter for [`fuelPercentRemaining`][Self::fuelPercentRemaining].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFuelPercentRemaining:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFuelPercentRemaining(&self, fuel_percent_remaining: Option<&NSNumber>);

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

        /// Setter for [`chargePercentRemaining`][Self::chargePercentRemaining].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setChargePercentRemaining:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setChargePercentRemaining(&self, charge_percent_remaining: Option<&NSNumber>);

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

        /// Setter for [`distanceRemaining`][Self::distanceRemaining].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDistanceRemaining:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDistanceRemaining(
            &self,
            distance_remaining: Option<&NSMeasurement<NSUnitLength>>,
        );

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

        /// Setter for [`charging`][Self::charging].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCharging:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCharging(&self, charging: Option<&NSNumber>);

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

        /// Setter for [`minutesToFull`][Self::minutesToFull].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMinutesToFull:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMinutesToFull(&self, minutes_to_full: Option<&NSNumber>);

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

        /// Setter for [`maximumDistance`][Self::maximumDistance].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMaximumDistance:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumDistance(
            &self,
            maximum_distance: Option<&NSMeasurement<NSUnitLength>>,
        );

        #[unsafe(method(distanceRemainingElectric))]
        #[unsafe(method_family = none)]
        pub unsafe fn distanceRemainingElectric(
            &self,
        ) -> Option<Retained<NSMeasurement<NSUnitLength>>>;

        /// Setter for [`distanceRemainingElectric`][Self::distanceRemainingElectric].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDistanceRemainingElectric:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDistanceRemainingElectric(
            &self,
            distance_remaining_electric: Option<&NSMeasurement<NSUnitLength>>,
        );

        #[unsafe(method(maximumDistanceElectric))]
        #[unsafe(method_family = none)]
        pub unsafe fn maximumDistanceElectric(
            &self,
        ) -> Option<Retained<NSMeasurement<NSUnitLength>>>;

        /// Setter for [`maximumDistanceElectric`][Self::maximumDistanceElectric].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMaximumDistanceElectric:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumDistanceElectric(
            &self,
            maximum_distance_electric: Option<&NSMeasurement<NSUnitLength>>,
        );

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

        /// Setter for [`distanceRemainingFuel`][Self::distanceRemainingFuel].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDistanceRemainingFuel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDistanceRemainingFuel(
            &self,
            distance_remaining_fuel: Option<&NSMeasurement<NSUnitLength>>,
        );

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

        /// Setter for [`maximumDistanceFuel`][Self::maximumDistanceFuel].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMaximumDistanceFuel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumDistanceFuel(
            &self,
            maximum_distance_fuel: Option<&NSMeasurement<NSUnitLength>>,
        );

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

        /// Setter for [`consumptionFormulaArguments`][Self::consumptionFormulaArguments].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `consumption_formula_arguments` generic should be of the correct type.
        #[unsafe(method(setConsumptionFormulaArguments:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConsumptionFormulaArguments(
            &self,
            consumption_formula_arguments: Option<&NSDictionary<NSString, AnyObject>>,
        );

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

        /// Setter for [`chargingFormulaArguments`][Self::chargingFormulaArguments].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `charging_formula_arguments` generic should be of the correct type.
        #[unsafe(method(setChargingFormulaArguments:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setChargingFormulaArguments(
            &self,
            charging_formula_arguments: Option<&NSDictionary<NSString, AnyObject>>,
        );

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

        /// Setter for [`dateOfLastStateUpdate`][Self::dateOfLastStateUpdate].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setDateOfLastStateUpdate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDateOfLastStateUpdate(
            &self,
            date_of_last_state_update: Option<&NSDateComponents>,
        );

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

        #[cfg(feature = "INCarChargingConnectorType")]
        /// Setter for [`activeConnector`][Self::activeConnector].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setActiveConnector:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setActiveConnector(
            &self,
            active_connector: Option<&INCarChargingConnectorType>,
        );

        #[unsafe(method(maximumBatteryCapacity))]
        #[unsafe(method_family = none)]
        pub unsafe fn maximumBatteryCapacity(
            &self,
        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;

        /// Setter for [`maximumBatteryCapacity`][Self::maximumBatteryCapacity].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMaximumBatteryCapacity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumBatteryCapacity(
            &self,
            maximum_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
        );

        #[unsafe(method(currentBatteryCapacity))]
        #[unsafe(method_family = none)]
        pub unsafe fn currentBatteryCapacity(
            &self,
        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;

        /// Setter for [`currentBatteryCapacity`][Self::currentBatteryCapacity].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCurrentBatteryCapacity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCurrentBatteryCapacity(
            &self,
            current_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
        );

        #[unsafe(method(minimumBatteryCapacity))]
        #[unsafe(method_family = none)]
        pub unsafe fn minimumBatteryCapacity(
            &self,
        ) -> Option<Retained<NSMeasurement<NSUnitEnergy>>>;

        /// Setter for [`minimumBatteryCapacity`][Self::minimumBatteryCapacity].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMinimumBatteryCapacity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMinimumBatteryCapacity(
            &self,
            minimum_battery_capacity: Option<&NSMeasurement<NSUnitEnergy>>,
        );
    );
}

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