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.Int import kotlin.String import kotlin.collections.List /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include ) @JsonSubTypes( JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.TaskExecutable.ShellScriptCommand::class, name = "shell_script_command"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.TaskExecutable.BatchImageCommand::class, name = "batch_image_command"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.TaskExecutable.EmrCommand::class, name = "emr_command"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.TaskExecutable.TaskExecutableUndefined::class) ) sealed class TaskExecutable { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class BatchImageCommand( @JsonProperty("image") @get:JsonProperty("image") val image: String, @JsonProperty("tag") @get:JsonProperty("tag") val tag: String, @JsonProperty("command") @get:JsonProperty("command") val command: List, @JsonProperty("memory") @get:JsonProperty("memory") val memory: Int, @JsonProperty("vCpus") @get:JsonProperty("vCpus") val vCpus: Int, @JsonProperty("job_role_arn") @get:JsonProperty("job_role_arn") val jobRoleArn: String?, @JsonProperty("environment_variables") @get:JsonProperty("environment_variables") val environmentVariables: List, @JsonProperty("job_queue") @get:JsonProperty("job_queue") val jobQueue: String? ) : TaskExecutable(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): BatchImageCommand = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, BatchImageCommand::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 EmrCommand( @JsonProperty("emr_cluster") @get:JsonProperty("emr_cluster") val emrCluster: EmrCluster, @JsonProperty("job_name") @get:JsonProperty("job_name") val jobName: String, @JsonProperty("region") @get:JsonProperty("region") val region: String, @JsonProperty("class") @get:JsonProperty("class") val class_: String, @JsonProperty("s3_jar_path") @get:JsonProperty("s3_jar_path") val s3JarPath: String, @JsonProperty("spark_conf") @get:JsonProperty("spark_conf") val sparkConf: List, @JsonProperty("spark_packages") @get:JsonProperty("spark_packages") val sparkPackages: List, @JsonProperty("args") @get:JsonProperty("args") val args: List, @JsonProperty("s3_log_details") @get:JsonProperty("s3_log_details") val s3LogDetails: S3LogDetails?, @JsonProperty("load_data") @get:JsonProperty("load_data") val loadData: List?, @JsonProperty("save_results") @get:JsonProperty("save_results") val saveResults: List? ) : TaskExecutable(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): EmrCommand = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, EmrCommand::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 ShellScriptCommand( @JsonProperty("script") @get:JsonProperty("script") val script: String, @JsonProperty("environment_variables") @get:JsonProperty("environment_variables") val environmentVariables: List? ) : TaskExecutable(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ShellScriptCommand = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, ShellScriptCommand::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object TaskExecutableUndefined : TaskExecutable() companion object { fun parseJson(json: String): TaskExecutable = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, TaskExecutable::class.java) } }