package com.hbc.svc.sundial.v2.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] * The EMR service role to use */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include ) @JsonSubTypes( JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrServiceRole.DefaultEmrServiceRole::class, name = "default_emr_service_role"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrServiceRole.CustomEmrServiceRole::class, name = "custom_emr_service_role"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrServiceRole.EmrServiceRoleUndefined::class) ) sealed class EmrServiceRole { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Custom, preconfigured, EMR Service role */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class CustomEmrServiceRole( @JsonProperty("role_name") @get:JsonProperty("role_name") val roleName: String ) : EmrServiceRole(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): CustomEmrServiceRole = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, CustomEmrServiceRole::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object EmrServiceRoleUndefined : EmrServiceRole() companion object { fun parseJson(json: String): EmrServiceRole = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, EmrServiceRole::class.java) } }