commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.CertificateDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.serde
import aws.sdk.kotlin.services.databasemigrationservice.model.Certificate
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
internal fun deserializeCertificateDocument(deserializer: Deserializer): Certificate {
val builder = Certificate.Builder()
val CERTIFICATEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CertificateArn"))
val CERTIFICATECREATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CertificateCreationDate"))
val CERTIFICATEIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CertificateIdentifier"))
val CERTIFICATEOWNER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CertificateOwner"))
val CERTIFICATEPEM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CertificatePem"))
val CERTIFICATEWALLET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Blob, JsonSerialName("CertificateWallet"))
val KEYLENGTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("KeyLength"))
val SIGNINGALGORITHM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SigningAlgorithm"))
val VALIDFROMDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ValidFromDate"))
val VALIDTODATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ValidToDate"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CERTIFICATEARN_DESCRIPTOR)
field(CERTIFICATECREATIONDATE_DESCRIPTOR)
field(CERTIFICATEIDENTIFIER_DESCRIPTOR)
field(CERTIFICATEOWNER_DESCRIPTOR)
field(CERTIFICATEPEM_DESCRIPTOR)
field(CERTIFICATEWALLET_DESCRIPTOR)
field(KEYLENGTH_DESCRIPTOR)
field(SIGNINGALGORITHM_DESCRIPTOR)
field(VALIDFROMDATE_DESCRIPTOR)
field(VALIDTODATE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CERTIFICATEARN_DESCRIPTOR.index -> builder.certificateArn = deserializeString()
CERTIFICATECREATIONDATE_DESCRIPTOR.index -> builder.certificateCreationDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CERTIFICATEIDENTIFIER_DESCRIPTOR.index -> builder.certificateIdentifier = deserializeString()
CERTIFICATEOWNER_DESCRIPTOR.index -> builder.certificateOwner = deserializeString()
CERTIFICATEPEM_DESCRIPTOR.index -> builder.certificatePem = deserializeString()
CERTIFICATEWALLET_DESCRIPTOR.index -> builder.certificateWallet = deserializeByteArray()
KEYLENGTH_DESCRIPTOR.index -> builder.keyLength = deserializeInt()
SIGNINGALGORITHM_DESCRIPTOR.index -> builder.signingAlgorithm = deserializeString()
VALIDFROMDATE_DESCRIPTOR.index -> builder.validFromDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
VALIDTODATE_DESCRIPTOR.index -> builder.validToDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy