/// /// BarcodeScannerOutputOptions.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.camera.barcodescanner import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import java.util.Objects /** * Represents the JavaScript object/struct "BarcodeScannerOutputOptions". */ @DoNotStrip @Keep data class BarcodeScannerOutputOptions( @DoNotStrip @Keep val barcodeFormats: Array, @DoNotStrip @Keep val outputResolution: BarcodeScannerOutputResolution?, @DoNotStrip @Keep val onBarcodeScanned: Func_void_std__vector_std__shared_ptr_HybridBarcodeSpec__, @DoNotStrip @Keep val onError: Func_void_std__exception_ptr ) { /** * Create a new instance of BarcodeScannerOutputOptions from Kotlin */ constructor(barcodeFormats: Array, outputResolution: BarcodeScannerOutputResolution?, onBarcodeScanned: (barcodes: Array) -> Unit, onError: (error: Throwable) -> Unit): this(barcodeFormats, outputResolution, Func_void_std__vector_std__shared_ptr_HybridBarcodeSpec___java(onBarcodeScanned), Func_void_std__exception_ptr_java(onError)) override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is BarcodeScannerOutputOptions) return false return Objects.deepEquals(this.barcodeFormats, other.barcodeFormats) && Objects.deepEquals(this.outputResolution, other.outputResolution) && Objects.deepEquals(this.onBarcodeScanned, other.onBarcodeScanned) && Objects.deepEquals(this.onError, other.onError) } override fun hashCode(): Int { return arrayOf( barcodeFormats, outputResolution, onBarcodeScanned, onError ).contentDeepHashCode() } companion object { /** * Constructor called from C++ */ @DoNotStrip @Keep @Suppress("unused") @JvmStatic private fun fromCpp(barcodeFormats: Array, outputResolution: BarcodeScannerOutputResolution?, onBarcodeScanned: Func_void_std__vector_std__shared_ptr_HybridBarcodeSpec__, onError: Func_void_std__exception_ptr): BarcodeScannerOutputOptions { return BarcodeScannerOutputOptions(barcodeFormats, outputResolution, onBarcodeScanned, onError) } } }