package com.hbc.svc.sundial.v2.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import com.hbc.svc.sundial.v2.enums.TaskStatus import java.io.Serializable import java.util.UUID import kotlin.Int import kotlin.String import kotlin.collections.List import org.threeten.bp.Instant /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) data class Task( @JsonProperty("task_id") @get:JsonProperty("task_id") val taskId: UUID, @JsonProperty("process_id") @get:JsonProperty("process_id") val processId: UUID, @JsonProperty("process_definition_name") @get:JsonProperty("process_definition_name") val processDefinitionName: String, @JsonProperty("task_definition_name") @get:JsonProperty("task_definition_name") val taskDefinitionName: String, @JsonProperty("start_time") @get:JsonProperty("start_time") val startTime: Instant, @JsonProperty("end_time") @get:JsonProperty("end_time") val endTime: Instant?, @JsonProperty("previous_attempt_count") @get:JsonProperty("previous_attempt_count") val previousAttemptCount: Int, @JsonProperty("log_entries") @get:JsonProperty("log_entries") val logEntries: List, @JsonProperty("metadata_entries") @get:JsonProperty("metadata_entries") val metadataEntries: List, @JsonProperty("execution_state") @get:JsonProperty("execution_state") val executionState: List?, @JsonProperty("status") @get:JsonProperty("status") val status: TaskStatus ) : Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Task = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, Task::class.java) } }