package io.flow.github.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import io.flow.github.v0.enums.HookEvent import java.io.Serializable import kotlin.Boolean import kotlin.Long import kotlin.String import kotlin.collections.List import org.threeten.bp.Instant /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * See https://developer.github.com/v3/repos/hooks/#create-a-hook */ @JsonIgnoreProperties(ignoreUnknown=true) data class Hook( @JsonProperty("id") @get:JsonProperty("id") val id: Long, @JsonProperty("url") @get:JsonProperty("url") val url: String, @JsonProperty("test_url") @get:JsonProperty("test_url") val testUrl: String, @JsonProperty("ping_url") @get:JsonProperty("ping_url") val pingUrl: String, @JsonProperty("name") @get:JsonProperty("name") val name: String, @JsonProperty("events") @get:JsonProperty("events") val events: List, @JsonProperty("active") @get:JsonProperty("active") val active: Boolean, @JsonProperty("config") @get:JsonProperty("config") val config: HookConfig, @JsonProperty("updated_at") @get:JsonProperty("updated_at") val updatedAt: Instant, @JsonProperty("created_at") @get:JsonProperty("created_at") val createdAt: Instant ) : Serializable { fun toJsonString(): String = io.flow.github.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Hook = io.flow.github.v0.models.JacksonObjectMapperFactory.create().readValue( json, Hook::class.java) } }