use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MLFeatureDescription;
);
extern_conformance!(
unsafe impl NSCoding for MLFeatureDescription {}
);
extern_conformance!(
unsafe impl NSCopying for MLFeatureDescription {}
);
unsafe impl CopyingHelper for MLFeatureDescription {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MLFeatureDescription {}
);
extern_conformance!(
unsafe impl NSSecureCoding for MLFeatureDescription {}
);
impl MLFeatureDescription {
extern_methods!(
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(feature = "MLFeatureType")]
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> MLFeatureType;
#[unsafe(method(isOptional))]
#[unsafe(method_family = none)]
pub unsafe fn isOptional(&self) -> bool;
#[cfg(feature = "MLFeatureValue")]
#[unsafe(method(isAllowedValue:))]
#[unsafe(method_family = none)]
pub unsafe fn isAllowedValue(&self, value: &MLFeatureValue) -> bool;
);
}
impl MLFeatureDescription {
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>;
);
}
impl MLFeatureDescription {
extern_methods!(
#[cfg(feature = "MLMultiArrayConstraint")]
#[unsafe(method(multiArrayConstraint))]
#[unsafe(method_family = none)]
pub unsafe fn multiArrayConstraint(&self) -> Option<Retained<MLMultiArrayConstraint>>;
#[cfg(feature = "MLImageConstraint")]
#[unsafe(method(imageConstraint))]
#[unsafe(method_family = none)]
pub unsafe fn imageConstraint(&self) -> Option<Retained<MLImageConstraint>>;
#[cfg(feature = "MLDictionaryConstraint")]
#[unsafe(method(dictionaryConstraint))]
#[unsafe(method_family = none)]
pub unsafe fn dictionaryConstraint(&self) -> Option<Retained<MLDictionaryConstraint>>;
#[cfg(feature = "MLSequenceConstraint")]
#[unsafe(method(sequenceConstraint))]
#[unsafe(method_family = none)]
pub unsafe fn sequenceConstraint(&self) -> Option<Retained<MLSequenceConstraint>>;
#[cfg(feature = "MLStateConstraint")]
#[unsafe(method(stateConstraint))]
#[unsafe(method_family = none)]
pub unsafe fn stateConstraint(&self) -> Option<Retained<MLStateConstraint>>;
);
}