objc2-core-ml 0.3.2

Bindings to the CoreML framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// A class to specify list of supported model update parameters.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlparameterkey?language=objc)
    #[unsafe(super(MLKey, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLKey")]
    pub struct MLParameterKey;
);

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

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

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

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

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

#[cfg(feature = "MLKey")]
impl MLParameterKey {
    extern_methods!(
        #[unsafe(method(learningRate))]
        #[unsafe(method_family = none)]
        pub unsafe fn learningRate() -> Retained<MLParameterKey>;

        #[unsafe(method(momentum))]
        #[unsafe(method_family = none)]
        pub unsafe fn momentum() -> Retained<MLParameterKey>;

        #[unsafe(method(miniBatchSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn miniBatchSize() -> Retained<MLParameterKey>;

        #[unsafe(method(beta1))]
        #[unsafe(method_family = none)]
        pub unsafe fn beta1() -> Retained<MLParameterKey>;

        #[unsafe(method(beta2))]
        #[unsafe(method_family = none)]
        pub unsafe fn beta2() -> Retained<MLParameterKey>;

        #[unsafe(method(eps))]
        #[unsafe(method_family = none)]
        pub unsafe fn eps() -> Retained<MLParameterKey>;

        #[unsafe(method(epochs))]
        #[unsafe(method_family = none)]
        pub unsafe fn epochs() -> Retained<MLParameterKey>;

        #[unsafe(method(shuffle))]
        #[unsafe(method_family = none)]
        pub unsafe fn shuffle() -> Retained<MLParameterKey>;

        #[unsafe(method(seed))]
        #[unsafe(method_family = none)]
        pub unsafe fn seed() -> Retained<MLParameterKey>;

        #[unsafe(method(numberOfNeighbors))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfNeighbors() -> Retained<MLParameterKey>;

        #[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>;
    );
}

/// MLLinkedModelParameters.
#[cfg(feature = "MLKey")]
impl MLParameterKey {
    extern_methods!(
        #[unsafe(method(linkedModelFileName))]
        #[unsafe(method_family = none)]
        pub unsafe fn linkedModelFileName() -> Retained<MLParameterKey>;

        #[unsafe(method(linkedModelSearchPath))]
        #[unsafe(method_family = none)]
        pub unsafe fn linkedModelSearchPath() -> Retained<MLParameterKey>;
    );
}

/// MLNeuralNetworkParameters.
#[cfg(feature = "MLKey")]
impl MLParameterKey {
    extern_methods!(
        #[unsafe(method(weights))]
        #[unsafe(method_family = none)]
        pub unsafe fn weights() -> Retained<MLParameterKey>;

        #[unsafe(method(biases))]
        #[unsafe(method_family = none)]
        pub unsafe fn biases() -> Retained<MLParameterKey>;
    );
}

/// MLScopedParameters.
#[cfg(feature = "MLKey")]
impl MLParameterKey {
    extern_methods!(
        #[unsafe(method(scopedTo:))]
        #[unsafe(method_family = none)]
        pub unsafe fn scopedTo(&self, scope: &NSString) -> Retained<MLParameterKey>;
    );
}