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

aws.sdk.kotlin.services.sagemaker.transform.HyperParameterSpecificationDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sagemaker.transform

import aws.sdk.kotlin.services.sagemaker.model.HyperParameterSpecification
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 serializeHyperParameterSpecificationDocument(serializer: Serializer, input: HyperParameterSpecification) {
    val DEFAULTVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DefaultValue"))
    val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
    val ISREQUIRED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IsRequired"))
    val ISTUNABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IsTunable"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
    val RANGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Range"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Type"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DEFAULTVALUE_DESCRIPTOR)
        field(DESCRIPTION_DESCRIPTOR)
        field(ISREQUIRED_DESCRIPTOR)
        field(ISTUNABLE_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(RANGE_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.name?.let { field(NAME_DESCRIPTOR, it) }
        input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
        input.type?.let { field(TYPE_DESCRIPTOR, it.value) }
        input.range?.let { field(RANGE_DESCRIPTOR, it, ::serializeParameterRangeDocument) }
        if (input.isTunable != false) field(ISTUNABLE_DESCRIPTOR, input.isTunable)
        if (input.isRequired != false) field(ISREQUIRED_DESCRIPTOR, input.isRequired)
        input.defaultValue?.let { field(DEFAULTVALUE_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy