//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::HealthKit::*;
use crate::UniformTypeIdentifiers::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "HealthKit_HKUnit")]
    pub struct HKUnit;

    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl ClassType for HKUnit {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "HealthKit_HKUnit")]
unsafe impl NSCoding for HKUnit {}

#[cfg(feature = "HealthKit_HKUnit")]
unsafe impl NSCopying for HKUnit {}

#[cfg(feature = "HealthKit_HKUnit")]
unsafe impl NSObjectProtocol for HKUnit {}

#[cfg(feature = "HealthKit_HKUnit")]
unsafe impl NSSecureCoding for HKUnit {}

extern_methods!(
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other unitString)]
        pub unsafe fn unitString(&self) -> Id<NSString>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other unitFromString:)]
        pub unsafe fn unitFromString(string: &NSString) -> Id<Self>;

        #[method_id(@__retain_semantics Other unitFromMassFormatterUnit:)]
        pub unsafe fn unitFromMassFormatterUnit(
            mass_formatter_unit: NSMassFormatterUnit,
        ) -> Id<Self>;

        #[method(massFormatterUnitFromUnit:)]
        pub unsafe fn massFormatterUnitFromUnit(unit: &HKUnit) -> NSMassFormatterUnit;

        #[method_id(@__retain_semantics Other unitFromLengthFormatterUnit:)]
        pub unsafe fn unitFromLengthFormatterUnit(
            length_formatter_unit: NSLengthFormatterUnit,
        ) -> Id<Self>;

        #[method(lengthFormatterUnitFromUnit:)]
        pub unsafe fn lengthFormatterUnitFromUnit(unit: &HKUnit) -> NSLengthFormatterUnit;

        #[method_id(@__retain_semantics Other unitFromEnergyFormatterUnit:)]
        pub unsafe fn unitFromEnergyFormatterUnit(
            energy_formatter_unit: NSEnergyFormatterUnit,
        ) -> Id<Self>;

        #[method(energyFormatterUnitFromUnit:)]
        pub unsafe fn energyFormatterUnitFromUnit(unit: &HKUnit) -> NSEnergyFormatterUnit;

        #[method(isNull)]
        pub unsafe fn isNull(&self) -> bool;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

ns_enum!(
    #[underlying(NSInteger)]
    pub enum HKMetricPrefix {
        HKMetricPrefixNone = 0,
        HKMetricPrefixFemto = 13,
        HKMetricPrefixPico = 1,
        HKMetricPrefixNano = 2,
        HKMetricPrefixMicro = 3,
        HKMetricPrefixMilli = 4,
        HKMetricPrefixCenti = 5,
        HKMetricPrefixDeci = 6,
        HKMetricPrefixDeca = 7,
        HKMetricPrefixHecto = 8,
        HKMetricPrefixKilo = 9,
        HKMetricPrefixMega = 10,
        HKMetricPrefixGiga = 11,
        HKMetricPrefixTera = 12,
    }
);

extern_methods!(
    /// Mass
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other gramUnitWithMetricPrefix:)]
        pub unsafe fn gramUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other gramUnit)]
        pub unsafe fn gramUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other ounceUnit)]
        pub unsafe fn ounceUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other poundUnit)]
        pub unsafe fn poundUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other stoneUnit)]
        pub unsafe fn stoneUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other moleUnitWithMetricPrefix:molarMass:)]
        pub unsafe fn moleUnitWithMetricPrefix_molarMass(
            prefix: HKMetricPrefix,
            grams_per_mole: c_double,
        ) -> Id<Self>;

        #[method_id(@__retain_semantics Other moleUnitWithMolarMass:)]
        pub unsafe fn moleUnitWithMolarMass(grams_per_mole: c_double) -> Id<Self>;
    }
);

extern_methods!(
    /// Length
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other meterUnitWithMetricPrefix:)]
        pub unsafe fn meterUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other meterUnit)]
        pub unsafe fn meterUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other inchUnit)]
        pub unsafe fn inchUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other footUnit)]
        pub unsafe fn footUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other yardUnit)]
        pub unsafe fn yardUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other mileUnit)]
        pub unsafe fn mileUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Volume
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other literUnitWithMetricPrefix:)]
        pub unsafe fn literUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other literUnit)]
        pub unsafe fn literUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other fluidOunceUSUnit)]
        pub unsafe fn fluidOunceUSUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other fluidOunceImperialUnit)]
        pub unsafe fn fluidOunceImperialUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other pintUSUnit)]
        pub unsafe fn pintUSUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other pintImperialUnit)]
        pub unsafe fn pintImperialUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other cupUSUnit)]
        pub unsafe fn cupUSUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other cupImperialUnit)]
        pub unsafe fn cupImperialUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Pressure
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other pascalUnitWithMetricPrefix:)]
        pub unsafe fn pascalUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other pascalUnit)]
        pub unsafe fn pascalUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other millimeterOfMercuryUnit)]
        pub unsafe fn millimeterOfMercuryUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other centimeterOfWaterUnit)]
        pub unsafe fn centimeterOfWaterUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other atmosphereUnit)]
        pub unsafe fn atmosphereUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other decibelAWeightedSoundPressureLevelUnit)]
        pub unsafe fn decibelAWeightedSoundPressureLevelUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other inchesOfMercuryUnit)]
        pub unsafe fn inchesOfMercuryUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Time
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other secondUnitWithMetricPrefix:)]
        pub unsafe fn secondUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other secondUnit)]
        pub unsafe fn secondUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other minuteUnit)]
        pub unsafe fn minuteUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other hourUnit)]
        pub unsafe fn hourUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other dayUnit)]
        pub unsafe fn dayUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Energy
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other jouleUnitWithMetricPrefix:)]
        pub unsafe fn jouleUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other jouleUnit)]
        pub unsafe fn jouleUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other kilocalorieUnit)]
        pub unsafe fn kilocalorieUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other smallCalorieUnit)]
        pub unsafe fn smallCalorieUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other largeCalorieUnit)]
        pub unsafe fn largeCalorieUnit() -> Id<Self>;

        #[deprecated = "Use smallCalorieUnit or largeCalorieUnit, depending on which you mean"]
        #[method_id(@__retain_semantics Other calorieUnit)]
        pub unsafe fn calorieUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Temperature
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other degreeCelsiusUnit)]
        pub unsafe fn degreeCelsiusUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other degreeFahrenheitUnit)]
        pub unsafe fn degreeFahrenheitUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other kelvinUnit)]
        pub unsafe fn kelvinUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Conductance
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other siemenUnitWithMetricPrefix:)]
        pub unsafe fn siemenUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other siemenUnit)]
        pub unsafe fn siemenUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Pharmacology
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other internationalUnit)]
        pub unsafe fn internationalUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Scalar
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other countUnit)]
        pub unsafe fn countUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other percentUnit)]
        pub unsafe fn percentUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// HearingSensitivity
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other decibelHearingLevelUnit)]
        pub unsafe fn decibelHearingLevelUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Math
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other unitMultipliedByUnit:)]
        pub unsafe fn unitMultipliedByUnit(&self, unit: &HKUnit) -> Id<HKUnit>;

        #[method_id(@__retain_semantics Other unitDividedByUnit:)]
        pub unsafe fn unitDividedByUnit(&self, unit: &HKUnit) -> Id<HKUnit>;

        #[method_id(@__retain_semantics Other unitRaisedToPower:)]
        pub unsafe fn unitRaisedToPower(&self, power: NSInteger) -> Id<HKUnit>;

        #[method_id(@__retain_semantics Other reciprocalUnit)]
        pub unsafe fn reciprocalUnit(&self) -> Id<HKUnit>;
    }
);

extern_methods!(
    /// Frequency
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other hertzUnitWithMetricPrefix:)]
        pub unsafe fn hertzUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other hertzUnit)]
        pub unsafe fn hertzUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// ElectricPotentialDifference
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other voltUnitWithMetricPrefix:)]
        pub unsafe fn voltUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other voltUnit)]
        pub unsafe fn voltUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Power
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other wattUnitWithMetricPrefix:)]
        pub unsafe fn wattUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other wattUnit)]
        pub unsafe fn wattUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// OpticalPower
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other diopterUnit)]
        pub unsafe fn diopterUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other prismDiopterUnit)]
        pub unsafe fn prismDiopterUnit() -> Id<Self>;
    }
);

extern_methods!(
    /// Angle
    #[cfg(feature = "HealthKit_HKUnit")]
    unsafe impl HKUnit {
        #[method_id(@__retain_semantics Other radianAngleUnitWithMetricPrefix:)]
        pub unsafe fn radianAngleUnitWithMetricPrefix(prefix: HKMetricPrefix) -> Id<Self>;

        #[method_id(@__retain_semantics Other radianAngleUnit)]
        pub unsafe fn radianAngleUnit() -> Id<Self>;

        #[method_id(@__retain_semantics Other degreeAngleUnit)]
        pub unsafe fn degreeAngleUnit() -> Id<Self>;
    }
);
