package com.afrosoft.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 kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents a single diff in an application */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = com.afrosoft.apibuilder.api.v0.models.Diff.DiffUndefined::class ) @JsonSubTypes( JsonSubTypes.Type(value = com.afrosoft.apibuilder.api.v0.models.Diff.DiffBreaking::class, name = "diff_breaking"), JsonSubTypes.Type(value = com.afrosoft.apibuilder.api.v0.models.Diff.DiffNonBreaking::class, name = "diff_non_breaking"), JsonSubTypes.Type(value = com.afrosoft.apibuilder.api.v0.models.Diff.DiffUndefined::class) ) sealed class Diff { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents a single breaking diff of an application version. A breaking diff indicates that it * is possible for an existing client to now experience an error or invalid data due to the diff. */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class DiffBreaking( @JsonProperty("description") @get:JsonProperty("description") val description: String ) : Diff(), Serializable { fun toJsonString(): String = com.afrosoft.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): DiffBreaking = com.afrosoft.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, DiffBreaking::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents a single NON breaking diff of an application version. */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class DiffNonBreaking( @JsonProperty("description") @get:JsonProperty("description") val description: String ) : Diff(), Serializable { fun toJsonString(): String = com.afrosoft.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): DiffNonBreaking = com.afrosoft.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, DiffNonBreaking::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object DiffUndefined : Diff() companion object { fun parseJson(json: String): Diff = com.afrosoft.apibuilder.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, Diff::class.java) } }