/// /// NetworkState.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.one import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import java.util.Objects /** * Represents the JavaScript object/struct "NetworkState". */ @DoNotStrip @Keep data class NetworkState( @DoNotStrip @Keep val type: NetworkStateType, @DoNotStrip @Keep val isConnected: Boolean, @DoNotStrip @Keep val isInternetReachable: Boolean ) { /* primary constructor */ override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is NetworkState) return false return Objects.deepEquals(this.type, other.type) && Objects.deepEquals(this.isConnected, other.isConnected) && Objects.deepEquals(this.isInternetReachable, other.isInternetReachable) } override fun hashCode(): Int { return arrayOf( type, isConnected, isInternetReachable ).contentDeepHashCode() } companion object { /** * Constructor called from C++ */ @DoNotStrip @Keep @Suppress("unused") @JvmStatic private fun fromCpp(type: NetworkStateType, isConnected: Boolean, isInternetReachable: Boolean): NetworkState { return NetworkState(type, isConnected, isInternetReachable) } } }