EnumValue

sealed interface EnumValue<out T : Enum<out T>>(source)

The value of a Data Connect enum field: Known when the server's value is one of the Enum constants this code was compiled with, Unknown (carrying the string) when the enum gained a value since. Serialized by com.google.firebase.dataconnect.serializers.EnumValueSerializer.

Inheritors

Types

Link copied to clipboard
class Known<T : Enum<T>>(val value: T) : EnumValue<T>

An enum value that this code knows.

Link copied to clipboard
class Unknown(val stringValue: String) : EnumValue<Nothing>

An enum value that this code does not know.

Properties

Link copied to clipboard
abstract val stringValue: String

The Enum.name of Known.value, or the string the server sent in the case of Unknown.

Link copied to clipboard
abstract val value: T?

Known.value in the case of Known, or null in the case of Unknown.