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 java.math.BigDecimal import kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * The EC2 market of 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.AwsMarket.OnDemand::class, name = "on_demand"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.AwsMarket.Spot::class, name = "spot"), JsonSubTypes.Type(value = com.hbc.svc.sundial.v2.models.AwsMarket.AwsMarketUndefined::class) ) sealed class AwsMarket { /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * the maximum spot bid price */ @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) data class Spot( @JsonProperty("bid_price") @get:JsonProperty("bid_price") val bidPrice: BigDecimal ) : AwsMarket(), Serializable { fun toJsonString(): String = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Spot = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, Spot::class.java) } } @JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NONE) object AwsMarketUndefined : AwsMarket() companion object { fun parseJson(json: String): AwsMarket = com.hbc.svc.sundial.v2.models.JacksonObjectMapperFactory.create().readValue( json, AwsMarket::class.java) } }