commonMain.aws.sdk.kotlin.services.codebuild.serde.ProjectEnvironmentDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codebuild-jvm Show documentation
Show all versions of codebuild-jvm Show documentation
The AWS SDK for Kotlin client for CodeBuild
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codebuild.serde
import aws.sdk.kotlin.services.codebuild.model.ProjectEnvironment
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
internal fun serializeProjectEnvironmentDocument(serializer: Serializer, input: ProjectEnvironment) {
val CERTIFICATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("certificate"))
val COMPUTETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("computeType"))
val ENVIRONMENTVARIABLES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("environmentVariables"))
val FLEET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("fleet"))
val IMAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("image"))
val IMAGEPULLCREDENTIALSTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("imagePullCredentialsType"))
val PRIVILEGEDMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("privilegedMode"))
val REGISTRYCREDENTIAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("registryCredential"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CERTIFICATE_DESCRIPTOR)
field(COMPUTETYPE_DESCRIPTOR)
field(ENVIRONMENTVARIABLES_DESCRIPTOR)
field(FLEET_DESCRIPTOR)
field(IMAGE_DESCRIPTOR)
field(IMAGEPULLCREDENTIALSTYPE_DESCRIPTOR)
field(PRIVILEGEDMODE_DESCRIPTOR)
field(REGISTRYCREDENTIAL_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(TYPE_DESCRIPTOR, input.type.value)
field(IMAGE_DESCRIPTOR, input.image)
field(COMPUTETYPE_DESCRIPTOR, input.computeType.value)
input.fleet?.let { field(FLEET_DESCRIPTOR, it, ::serializeProjectFleetDocument) }
if (input.environmentVariables != null) {
listField(ENVIRONMENTVARIABLES_DESCRIPTOR) {
for (el0 in input.environmentVariables) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeEnvironmentVariableDocument))
}
}
}
input.privilegedMode?.let { field(PRIVILEGEDMODE_DESCRIPTOR, it) }
input.certificate?.let { field(CERTIFICATE_DESCRIPTOR, it) }
input.registryCredential?.let { field(REGISTRYCREDENTIAL_DESCRIPTOR, it, ::serializeRegistryCredentialDocument) }
input.imagePullCredentialsType?.let { field(IMAGEPULLCREDENTIALSTYPE_DESCRIPTOR, it.value) }
}
}