package io.apibuilder.spec.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import java.io.Serializable import kotlin.Boolean import kotlin.String import kotlin.collections.List /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Metadata about one of the types that is part of a union type */ @JsonIgnoreProperties(ignoreUnknown=true) data class UnionType( @JsonProperty("type") @get:JsonProperty("type") val type: String, @JsonProperty("description") @get:JsonProperty("description") val description: String?, @JsonProperty("deprecation") @get:JsonProperty("deprecation") val deprecation: Deprecation?, @JsonProperty("attributes") @get:JsonProperty("attributes") val attributes: List, @JsonProperty("default") @get:JsonProperty("default") val default: Boolean?, @JsonProperty("discriminator_value") @get:JsonProperty("discriminator_value") val discriminatorValue: String? ) : Serializable { fun toJsonString(): String = io.apibuilder.spec.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): UnionType = io.apibuilder.spec.v0.models.JacksonObjectMapperFactory.create().readValue( json, UnionType::class.java) } }