/// /// Variant_String_Double_Boolean.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © 2025 Marc Rousavy @ Margelo /// package com.margelo.nitro.acousticconnectrn import com.facebook.proguard.annotations.DoNotStrip /** * Represents the TypeScript variant "String|Double|Boolean". */ @Suppress("ClassName") @DoNotStrip sealed class Variant_String_Double_Boolean { @DoNotStrip data class First(@DoNotStrip val value: String): Variant_String_Double_Boolean() @DoNotStrip data class Second(@DoNotStrip val value: Double): Variant_String_Double_Boolean() @DoNotStrip data class Third(@DoNotStrip val value: Boolean): Variant_String_Double_Boolean() inline fun getAs(): T? = when (this) { is First -> value as? T is Second -> value as? T is Third -> value as? T } val isFirst: Boolean get() = this is First val isSecond: Boolean get() = this is Second val isThird: Boolean get() = this is Third companion object { @JvmStatic @DoNotStrip fun create(value: String): Variant_String_Double_Boolean = First(value) @JvmStatic @DoNotStrip fun create(value: Double): Variant_String_Double_Boolean = Second(value) @JvmStatic @DoNotStrip fun create(value: Boolean): Variant_String_Double_Boolean = Third(value) } }