package com.edsancha.medallia.api.v0.models import com.edsancha.medallia.api.v0.enums.RatingViewType 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.Boolean import kotlin.Int import kotlin.String import kotlin.collections.List /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents the question or fields to be filled by the user */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, property = "component", defaultImpl = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentUnionUndefined::class ) @JsonSubTypes( JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentLabel::class, name = "label"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentImage::class, name = "image"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentNps::class, name = "nps"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentTextArea::class, name = "textArea"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentTextInput::class, name = "textInput"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentRadioSelector::class, name = "radio"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentCheckbox::class, name = "checkbox"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentDropdown::class, name = "select"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentGrading::class, name = "grading"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentGrading0to10::class, name = "grading0to10"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentGrading1to10::class, name = "grading1to10"), JsonSubTypes.Type(value = com.edsancha.medallia.api.v0.models.ComponentUnion.ComponentUnionUndefined::class) ) sealed class ComponentUnion { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentCheckbox( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("options") @get:JsonProperty("options") val options: List, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentCheckbox = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentCheckbox::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentDropdown( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("placeholder") @get:JsonProperty("placeholder") val placeholder: String, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("options") @get:JsonProperty("options") val options: List, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentDropdown = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentDropdown::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentGrading( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("ratingViewType") @get:JsonProperty("ratingViewType") val ratingViewType: RatingViewType, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentGrading = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentGrading::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentGrading0to10( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("ratingViewType") @get:JsonProperty("ratingViewType") val ratingViewType: RatingViewType, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentGrading0to10 = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentGrading0to10::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentGrading1to10( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("ratingViewType") @get:JsonProperty("ratingViewType") val ratingViewType: RatingViewType, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentGrading1to10 = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentGrading1to10::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentImage( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("imageObject") @get:JsonProperty("imageObject") val imageObject: Image?, @JsonProperty("uploadedResource") @get:JsonProperty("uploadedResource") val uploadedResource: Image? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentImage = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentImage::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentLabel( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("labelContent") @get:JsonProperty("labelContent") val labelContent: String?, @JsonProperty("num_of_lines") @get:JsonProperty("num_of_lines") val numOfLines: Int ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentLabel = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentLabel::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentNps( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("description") @get:JsonProperty("description") val description: String?, @JsonProperty("ratingViewType") @get:JsonProperty("ratingViewType") val ratingViewType: RatingViewType ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentNps = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentNps::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentRadioSelector( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("options") @get:JsonProperty("options") val options: List, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentRadioSelector = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentRadioSelector::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentTextArea( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("placeholder") @get:JsonProperty("placeholder") val placeholder: String, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("num_of_lines") @get:JsonProperty("num_of_lines") val numOfLines: Int, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentTextArea = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentTextArea::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ComponentTextInput( @JsonProperty("index") @get:JsonProperty("index") val index: Int, @JsonProperty("id") @get:JsonProperty("id") val id: Int, @JsonProperty("unique_name") @get:JsonProperty("unique_name") val uniqueName: String, @JsonProperty("required") @get:JsonProperty("required") val required: Boolean, @JsonProperty("placeholder") @get:JsonProperty("placeholder") val placeholder: String, @JsonProperty("label") @get:JsonProperty("label") val label: String, @JsonProperty("max_chars") @get:JsonProperty("max_chars") val maxChars: Int, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : ComponentUnion(), Serializable { fun toJsonString(): String = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ComponentTextInput = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentTextInput::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object ComponentUnionUndefined : ComponentUnion() companion object { fun parseJson(json: String): ComponentUnion = com.edsancha.medallia.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, ComponentUnion::class.java) } }