package io.apibuilder.api.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo import java.io.Serializable import java.util.UUID import kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Identifies the specific type of item that was indexed by search */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = io.apibuilder.api.v0.models.ItemDetail.ItemDetailUndefined::class ) @JsonSubTypes( JsonSubTypes.Type(value = io.apibuilder.api.v0.models.ItemDetail.ApplicationSummary::class, name = "application_summary"), JsonSubTypes.Type(value = io.apibuilder.api.v0.models.ItemDetail.ItemDetailUndefined::class) ) sealed class ItemDetail { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Summary of an application sufficient for display and links */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ApplicationSummary( @JsonProperty("guid") @get:JsonProperty("guid") val guid: UUID, @JsonProperty("organization") @get:JsonProperty("organization") val organization: io.apibuilder.common.v0.models.Reference, @JsonProperty("key") @get:JsonProperty("key") val key: String ) : ItemDetail(), Serializable { fun toJsonString(): String = io.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ApplicationSummary = io.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ApplicationSummary::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object ItemDetailUndefined : ItemDetail() companion object { fun parseJson(json: String): ItemDetail = io.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ItemDetail::class.java) } }