package de.nccloud.registry.api.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import de.nccloud.registry.api.v0.enums.ServiceState import de.nccloud.registry.api.v0.enums.ServiceType import java.io.Serializable import kotlin.String /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * A single available service. */ @JsonIgnoreProperties(ignoreUnknown=true) data class Service( @JsonProperty("name") @get:JsonProperty("name") val name: String, @JsonProperty("version") @get:JsonProperty("version") val version: String, @JsonProperty("state") @get:JsonProperty("state") val state: ServiceState, @JsonProperty("type") @get:JsonProperty("type") val type: ServiceType, @JsonProperty("uri") @get:JsonProperty("uri") val uri: String, @JsonProperty("title") @get:JsonProperty("title") val title: String?, @JsonProperty("description") @get:JsonProperty("description") val description: String? ) : Serializable { fun toJsonString(): String = de.nccloud.registry.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Service = de.nccloud.registry.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, Service::class.java) } }