commonMain.aws.sdk.kotlin.services.sagemakeredge.serde.DeploymentResultDocumentSerializer.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.DeploymentResult
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
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun serializeDeploymentResultDocument(serializer: Serializer, input: DeploymentResult) {
val DEPLOYMENTENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("DeploymentEndTime"))
val DEPLOYMENTMODELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("DeploymentModels"))
val DEPLOYMENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DeploymentName"))
val DEPLOYMENTSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("DeploymentStartTime"))
val DEPLOYMENTSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DeploymentStatus"))
val DEPLOYMENTSTATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DeploymentStatusMessage"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DEPLOYMENTENDTIME_DESCRIPTOR)
field(DEPLOYMENTMODELS_DESCRIPTOR)
field(DEPLOYMENTNAME_DESCRIPTOR)
field(DEPLOYMENTSTARTTIME_DESCRIPTOR)
field(DEPLOYMENTSTATUS_DESCRIPTOR)
field(DEPLOYMENTSTATUSMESSAGE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.deploymentName?.let { field(DEPLOYMENTNAME_DESCRIPTOR, it) }
input.deploymentStatus?.let { field(DEPLOYMENTSTATUS_DESCRIPTOR, it) }
input.deploymentStatusMessage?.let { field(DEPLOYMENTSTATUSMESSAGE_DESCRIPTOR, it) }
input.deploymentStartTime?.let { field(DEPLOYMENTSTARTTIME_DESCRIPTOR, it, TimestampFormat.EPOCH_SECONDS) }
input.deploymentEndTime?.let { field(DEPLOYMENTENDTIME_DESCRIPTOR, it, TimestampFormat.EPOCH_SECONDS) }
if (input.deploymentModels != null) {
listField(DEPLOYMENTMODELS_DESCRIPTOR) {
for (el0 in input.deploymentModels) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeDeploymentModelDocument))
}
}
}
}
}