package io.apibuilder.spec.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import java.io.Serializable import kotlin.Any import kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents an additional attribute that is attached to one of the objects in apibuilder. The main * use case is to capture additional metadata that doesn't necessarily define the API but aids in code * generation. Examples would be hints for certain code generators about classes to extend, interfaces * to implement, annotations to add, names to assign to certain methods, etc. The specific attributes * will be applicable only in the context of the specific code generators usings them. */ @JsonIgnoreProperties(ignoreUnknown=true) data class Attribute( @JsonProperty("name") @get:JsonProperty("name") val name: String, @JsonProperty("value") @get:JsonProperty("value") val value: Any, @JsonProperty("description") @get:JsonProperty("description") val description: String?, @JsonProperty("deprecation") @get:JsonProperty("deprecation") val deprecation: Deprecation? ) : Serializable { fun toJsonString(): String = io.apibuilder.spec.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Attribute = io.apibuilder.spec.v0.models.JacksonObjectMapperFactory.create().readValue( json, Attribute::class.java) } }