commonMain.aws.sdk.kotlin.services.sagemakeredge.serde.DeploymentModelDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sagemakeredge-jvm Show documentation
Show all versions of sagemakeredge-jvm Show documentation
The AWS SDK for Kotlin client for Sagemaker Edge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemakeredge.serde
import aws.sdk.kotlin.services.sagemakeredge.model.DeploymentModel
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 serializeDeploymentModelDocument(serializer: Serializer, input: DeploymentModel) {
val DESIREDSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DesiredState"))
val MODELHANDLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ModelHandle"))
val MODELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ModelName"))
val MODELVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ModelVersion"))
val ROLLBACKFAILUREREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RollbackFailureReason"))
val STATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("State"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val STATUSREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusReason"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DESIREDSTATE_DESCRIPTOR)
field(MODELHANDLE_DESCRIPTOR)
field(MODELNAME_DESCRIPTOR)
field(MODELVERSION_DESCRIPTOR)
field(ROLLBACKFAILUREREASON_DESCRIPTOR)
field(STATE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STATUSREASON_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.modelHandle?.let { field(MODELHANDLE_DESCRIPTOR, it) }
input.modelName?.let { field(MODELNAME_DESCRIPTOR, it) }
input.modelVersion?.let { field(MODELVERSION_DESCRIPTOR, it) }
input.desiredState?.let { field(DESIREDSTATE_DESCRIPTOR, it.value) }
input.state?.let { field(STATE_DESCRIPTOR, it.value) }
input.status?.let { field(STATUS_DESCRIPTOR, it.value) }
input.statusReason?.let { field(STATUSREASON_DESCRIPTOR, it) }
input.rollbackFailureReason?.let { field(ROLLBACKFAILUREREASON_DESCRIPTOR, it) }
}
}