/// /// NativeRecognizerConfig.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © Marc Rousavy @ Margelo /// package com.margelo.nitro.clarion.recognizer import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import java.util.Objects /** * Represents the JavaScript object/struct "NativeRecognizerConfig". */ @DoNotStrip @Keep data class NativeRecognizerConfig( @DoNotStrip @Keep val language: String, @DoNotStrip @Keep val emitPartials: Boolean, @DoNotStrip @Keep val emitAudioLevel: Boolean, @DoNotStrip @Keep val audioLevelIntervalMs: Double, @DoNotStrip @Keep val preferOnDevice: Boolean ) { /* primary constructor */ override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is NativeRecognizerConfig) return false return Objects.deepEquals(this.language, other.language) && Objects.deepEquals(this.emitPartials, other.emitPartials) && Objects.deepEquals(this.emitAudioLevel, other.emitAudioLevel) && Objects.deepEquals(this.audioLevelIntervalMs, other.audioLevelIntervalMs) && Objects.deepEquals(this.preferOnDevice, other.preferOnDevice) } override fun hashCode(): Int { return arrayOf( language, emitPartials, emitAudioLevel, audioLevelIntervalMs, preferOnDevice ).contentDeepHashCode() } companion object { /** * Constructor called from C++ */ @DoNotStrip @Keep @Suppress("unused") @JvmStatic private fun fromCpp(language: String, emitPartials: Boolean, emitAudioLevel: Boolean, audioLevelIntervalMs: Double, preferOnDevice: Boolean): NativeRecognizerConfig { return NativeRecognizerConfig(language, emitPartials, emitAudioLevel, audioLevelIntervalMs, preferOnDevice) } } }