commonMain.aws.sdk.kotlin.services.codestarconnections.serde.HostDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codestarconnections-jvm Show documentation
Show all versions of codestarconnections-jvm Show documentation
The AWS SDK for Kotlin client for CodeStar connections
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codestarconnections.serde
import aws.sdk.kotlin.services.codestarconnections.model.Host
import aws.sdk.kotlin.services.codestarconnections.model.ProviderType
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
internal fun deserializeHostDocument(deserializer: Deserializer): Host {
val builder = Host.Builder()
val HOSTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("HostArn"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val PROVIDERENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ProviderEndpoint"))
val PROVIDERTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ProviderType"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val STATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusMessage"))
val VPCCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfiguration"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(HOSTARN_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PROVIDERENDPOINT_DESCRIPTOR)
field(PROVIDERTYPE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STATUSMESSAGE_DESCRIPTOR)
field(VPCCONFIGURATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
HOSTARN_DESCRIPTOR.index -> builder.hostArn = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
PROVIDERENDPOINT_DESCRIPTOR.index -> builder.providerEndpoint = deserializeString()
PROVIDERTYPE_DESCRIPTOR.index -> builder.providerType = deserializeString().let { ProviderType.fromValue(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
STATUSMESSAGE_DESCRIPTOR.index -> builder.statusMessage = deserializeString()
VPCCONFIGURATION_DESCRIPTOR.index -> builder.vpcConfiguration = deserializeVpcConfigurationDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy