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 role to use on the EC2 instances */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include ) @JsonSubTypes( JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrJobFlowRole.DefaultEmrJobFlowRole::class, name = "default_emr_job_flow_role"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrJobFlowRole.CustomEmrJobFlowRole::class, name = "custom_emr_job_flow_role"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrJobFlowRole.EmrJobFlowRoleUndefined::class) ) sealed class EmrJobFlowRole { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Custom, preconfigured, EMR EC2 instance role */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class CustomEmrJobFlowRole( @JsonProperty("role_name") @get:JsonProperty("role_name") val roleName: String ) : EmrJobFlowRole(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): CustomEmrJobFlowRole = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, CustomEmrJobFlowRole::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object EmrJobFlowRoleUndefined : EmrJobFlowRole() companion object { fun parseJson(json: String): EmrJobFlowRole = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, EmrJobFlowRole::class.java) } }