//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CLMonitor;

    unsafe impl ClassType for CLMonitor {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl Send for CLMonitor {}

unsafe impl Sync for CLMonitor {}

unsafe impl NSObjectProtocol for CLMonitor {}

extern_methods!(
    unsafe impl CLMonitor {
        #[cfg(all(feature = "CLMonitorConfiguration", feature = "block2"))]
        #[method(requestMonitorWithConfiguration:completion:)]
        pub unsafe fn requestMonitorWithConfiguration_completion(
            config: &CLMonitorConfiguration,
            completion_handler: &block2::Block<dyn Fn(NonNull<CLMonitor>)>,
        );

        #[method_id(@__retain_semantics Other name)]
        pub unsafe fn name(&self) -> Retained<NSString>;

        #[method_id(@__retain_semantics Other monitoredIdentifiers)]
        pub unsafe fn monitoredIdentifiers(&self) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "CLCondition")]
        #[method(addConditionForMonitoring:identifier:)]
        pub unsafe fn addConditionForMonitoring_identifier(
            &self,
            condition: &CLCondition,
            identifier: &NSString,
        );

        #[cfg(all(feature = "CLCondition", feature = "CLMonitoringEvent"))]
        #[method(addConditionForMonitoring:identifier:assumedState:)]
        pub unsafe fn addConditionForMonitoring_identifier_assumedState(
            &self,
            condition: &CLCondition,
            identifier: &NSString,
            state: CLMonitoringState,
        );

        #[method(removeConditionFromMonitoringWithIdentifier:)]
        pub unsafe fn removeConditionFromMonitoringWithIdentifier(&self, identifier: &NSString);

        #[cfg(feature = "CLMonitoringRecord")]
        #[method_id(@__retain_semantics Other monitoringRecordForIdentifier:)]
        pub unsafe fn monitoringRecordForIdentifier(
            &self,
            identifier: &NSString,
        ) -> Option<Retained<CLMonitoringRecord>>;

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

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);
