All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.vpclattice.serde.HealthCheckConfigDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.vpclattice.serde

import aws.sdk.kotlin.services.vpclattice.model.HealthCheckConfig
import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.Serializer
import aws.smithy.kotlin.runtime.serde.asSdkSerializable
import aws.smithy.kotlin.runtime.serde.deserializeList
import aws.smithy.kotlin.runtime.serde.deserializeMap
import aws.smithy.kotlin.runtime.serde.deserializeStruct
import aws.smithy.kotlin.runtime.serde.field
import aws.smithy.kotlin.runtime.serde.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct

internal fun serializeHealthCheckConfigDocument(serializer: Serializer, input: HealthCheckConfig) {
    val ENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("enabled"))
    val HEALTHCHECKINTERVALSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("healthCheckIntervalSeconds"))
    val HEALTHCHECKTIMEOUTSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("healthCheckTimeoutSeconds"))
    val HEALTHYTHRESHOLDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("healthyThresholdCount"))
    val MATCHER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("matcher"))
    val PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("path"))
    val PORT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("port"))
    val PROTOCOL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("protocol"))
    val PROTOCOLVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("protocolVersion"))
    val UNHEALTHYTHRESHOLDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("unhealthyThresholdCount"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ENABLED_DESCRIPTOR)
        field(HEALTHCHECKINTERVALSECONDS_DESCRIPTOR)
        field(HEALTHCHECKTIMEOUTSECONDS_DESCRIPTOR)
        field(HEALTHYTHRESHOLDCOUNT_DESCRIPTOR)
        field(MATCHER_DESCRIPTOR)
        field(PATH_DESCRIPTOR)
        field(PORT_DESCRIPTOR)
        field(PROTOCOL_DESCRIPTOR)
        field(PROTOCOLVERSION_DESCRIPTOR)
        field(UNHEALTHYTHRESHOLDCOUNT_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.enabled?.let { field(ENABLED_DESCRIPTOR, it) }
        input.protocol?.let { field(PROTOCOL_DESCRIPTOR, it.value) }
        input.protocolVersion?.let { field(PROTOCOLVERSION_DESCRIPTOR, it.value) }
        input.port?.let { field(PORT_DESCRIPTOR, it) }
        input.path?.let { field(PATH_DESCRIPTOR, it) }
        input.healthCheckIntervalSeconds?.let { field(HEALTHCHECKINTERVALSECONDS_DESCRIPTOR, it) }
        input.healthCheckTimeoutSeconds?.let { field(HEALTHCHECKTIMEOUTSECONDS_DESCRIPTOR, it) }
        input.healthyThresholdCount?.let { field(HEALTHYTHRESHOLDCOUNT_DESCRIPTOR, it) }
        input.unhealthyThresholdCount?.let { field(UNHEALTHYTHRESHOLDCOUNT_DESCRIPTOR, it) }
        input.matcher?.let { field(MATCHER_DESCRIPTOR, it, ::serializeMatcherDocument) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy