commonMain.aws.sdk.kotlin.services.bedrock.serde.ModelCopyJobSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrock-jvm Show documentation
Show all versions of bedrock-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrock.serde
import aws.sdk.kotlin.services.bedrock.model.ModelCopyJobStatus
import aws.sdk.kotlin.services.bedrock.model.ModelCopyJobSummary
import aws.sdk.kotlin.services.bedrock.model.Tag
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
internal fun deserializeModelCopyJobSummaryDocument(deserializer: Deserializer): ModelCopyJobSummary {
val builder = ModelCopyJobSummary.Builder()
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("creationTime"))
val FAILUREMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("failureMessage"))
val JOBARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("jobArn"))
val SOURCEACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("sourceAccountId"))
val SOURCEMODELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("sourceModelArn"))
val SOURCEMODELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("sourceModelName"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val TARGETMODELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("targetModelArn"))
val TARGETMODELKMSKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("targetModelKmsKeyArn"))
val TARGETMODELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("targetModelName"))
val TARGETMODELTAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("targetModelTags"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATIONTIME_DESCRIPTOR)
field(FAILUREMESSAGE_DESCRIPTOR)
field(JOBARN_DESCRIPTOR)
field(SOURCEACCOUNTID_DESCRIPTOR)
field(SOURCEMODELARN_DESCRIPTOR)
field(SOURCEMODELNAME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TARGETMODELARN_DESCRIPTOR)
field(TARGETMODELKMSKEYARN_DESCRIPTOR)
field(TARGETMODELNAME_DESCRIPTOR)
field(TARGETMODELTAGS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeInstant(TimestampFormat.ISO_8601)
FAILUREMESSAGE_DESCRIPTOR.index -> builder.failureMessage = deserializeString()
JOBARN_DESCRIPTOR.index -> builder.jobArn = deserializeString()
SOURCEACCOUNTID_DESCRIPTOR.index -> builder.sourceAccountId = deserializeString()
SOURCEMODELARN_DESCRIPTOR.index -> builder.sourceModelArn = deserializeString()
SOURCEMODELNAME_DESCRIPTOR.index -> builder.sourceModelName = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ModelCopyJobStatus.fromValue(it) }
TARGETMODELARN_DESCRIPTOR.index -> builder.targetModelArn = deserializeString()
TARGETMODELKMSKEYARN_DESCRIPTOR.index -> builder.targetModelKmsKeyArn = deserializeString()
TARGETMODELNAME_DESCRIPTOR.index -> builder.targetModelName = deserializeString()
TARGETMODELTAGS_DESCRIPTOR.index -> builder.targetModelTags =
deserializer.deserializeList(TARGETMODELTAGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTagDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy