package io.github.mkows.playground.api.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo import kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = io.github.mkows.playground.api.v0.models.ItemState.ItemStateUndefined::class ) @JsonSubTypes( JsonSubTypes.Type(value = io.github.mkows.playground.api.v0.models.ItemState.ItemStateProgress::class, name = "item_state_progress"), JsonSubTypes.Type(value = io.github.mkows.playground.api.v0.models.ItemState.ItemStateFailedCause::class, name = "item_state_failed_cause"), JsonSubTypes.Type(value = io.github.mkows.playground.api.v0.models.ItemState.ItemStateUndefined::class) ) sealed class ItemState { @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object ItemStateUndefined : ItemState() companion object { fun parseJson(json: String): ItemState = io.github.mkows.playground.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ItemState::class.java) } }