commonMain.aws.sdk.kotlin.services.codestarconnections.serde.RepositoryLinkInfoDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codestarconnections.serde
import aws.sdk.kotlin.services.codestarconnections.model.ProviderType
import aws.sdk.kotlin.services.codestarconnections.model.RepositoryLinkInfo
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 deserializeRepositoryLinkInfoDocument(deserializer: Deserializer): RepositoryLinkInfo {
val builder = RepositoryLinkInfo.Builder()
val CONNECTIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConnectionArn"))
val ENCRYPTIONKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EncryptionKeyArn"))
val OWNERID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OwnerId"))
val PROVIDERTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ProviderType"))
val REPOSITORYLINKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RepositoryLinkArn"))
val REPOSITORYLINKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RepositoryLinkId"))
val REPOSITORYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RepositoryName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONNECTIONARN_DESCRIPTOR)
field(ENCRYPTIONKEYARN_DESCRIPTOR)
field(OWNERID_DESCRIPTOR)
field(PROVIDERTYPE_DESCRIPTOR)
field(REPOSITORYLINKARN_DESCRIPTOR)
field(REPOSITORYLINKID_DESCRIPTOR)
field(REPOSITORYNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONNECTIONARN_DESCRIPTOR.index -> builder.connectionArn = deserializeString()
ENCRYPTIONKEYARN_DESCRIPTOR.index -> builder.encryptionKeyArn = deserializeString()
OWNERID_DESCRIPTOR.index -> builder.ownerId = deserializeString()
PROVIDERTYPE_DESCRIPTOR.index -> builder.providerType = deserializeString().let { ProviderType.fromValue(it) }
REPOSITORYLINKARN_DESCRIPTOR.index -> builder.repositoryLinkArn = deserializeString()
REPOSITORYLINKID_DESCRIPTOR.index -> builder.repositoryLinkId = deserializeString()
REPOSITORYNAME_DESCRIPTOR.index -> builder.repositoryName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy