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 /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * A specification for when a process should be run */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo( use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include ) @JsonSubTypes( JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.ProcessSchedule.CronSchedule::class, name = "cron_schedule"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.ProcessSchedule.ContinuousSchedule::class, name = "continuous_schedule"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.ProcessSchedule.ProcessScheduleUndefined::class) ) sealed class ProcessSchedule { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class ContinuousSchedule( @JsonProperty("buffer_seconds") @get:JsonProperty("buffer_seconds") val bufferSeconds: Int? ) : ProcessSchedule(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): ContinuousSchedule = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, ContinuousSchedule::class.java) } } /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * See http://quartz-scheduler.org/api/2.2.0/org/quartz/CronExpression.html */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class CronSchedule( @JsonProperty("day_of_week") @get:JsonProperty("day_of_week") val dayOfWeek: String, @JsonProperty("month") @get:JsonProperty("month") val month: String, @JsonProperty("day_of_month") @get:JsonProperty("day_of_month") val dayOfMonth: String, @JsonProperty("hours") @get:JsonProperty("hours") val hours: String, @JsonProperty("minutes") @get:JsonProperty("minutes") val minutes: String ) : ProcessSchedule(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): CronSchedule = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, CronSchedule::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object ProcessScheduleUndefined : ProcessSchedule() companion object { fun parseJson(json: String): ProcessSchedule = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, ProcessSchedule::class.java) } }