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 com.hbc.svc.sundial.v2.enums.EmrApplication import com.hbc.svc.sundial.v2.enums.EmrReleaseLabel import java.io.Serializable import kotlin.Boolean import kotlin.String import kotlin.collections.List /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Whether or not to create a new EMR cluster or re-use a pre-existing one */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include ) @JsonSubTypes( JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrCluster.NewEmrCluster::class, name = "new_emr_cluster"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrCluster.ExistingEmrCluster::class, name = "existing_emr_cluster"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.EmrCluster.EmrClusterUndefined::class) ) sealed class EmrCluster { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Existing EMR cluster configuration object */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ExistingEmrCluster( @JsonProperty("cluster_id") @get:JsonProperty("cluster_id") val clusterId: String ) : EmrCluster(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ExistingEmrCluster = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, ExistingEmrCluster::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * New EMR cluster configuration object */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class NewEmrCluster( @JsonProperty("name") @get:JsonProperty("name") val name: String, @JsonProperty("release_label") @get:JsonProperty("release_label") val releaseLabel: EmrReleaseLabel, @JsonProperty("applications") @get:JsonProperty("applications") val applications: List, @JsonProperty("s3_log_uri") @get:JsonProperty("s3_log_uri") val s3LogUri: String, @JsonProperty("master_instance") @get:JsonProperty("master_instance") val masterInstance: EmrInstanceGroupDetails, @JsonProperty("core_instance") @get:JsonProperty("core_instance") val coreInstance: EmrInstanceGroupDetails?, @JsonProperty("task_instance") @get:JsonProperty("task_instance") val taskInstance: EmrInstanceGroupDetails?, @JsonProperty("ec2_subnet") @get:JsonProperty("ec2_subnet") val ec2Subnet: String?, @JsonProperty("emr_service_role") @get:JsonProperty("emr_service_role") val emrServiceRole: EmrServiceRole, @JsonProperty("emr_job_flow_role") @get:JsonProperty("emr_job_flow_role") val emrJobFlowRole: EmrJobFlowRole, @JsonProperty("visible_to_all_users") @get:JsonProperty("visible_to_all_users") val visibleToAllUsers: Boolean, @JsonProperty("configurations") @get:JsonProperty("configurations") val configurations: List?, @JsonProperty("security_configuration") @get:JsonProperty("security_configuration") val securityConfiguration: String? ) : EmrCluster(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): NewEmrCluster = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, NewEmrCluster::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object EmrClusterUndefined : EmrCluster() companion object { fun parseJson(json: String): EmrCluster = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, EmrCluster::class.java) } }