commonMain.aws.sdk.kotlin.services.codepipeline.transform.WebhookDefinitionDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline Show documentation
Show all versions of codepipeline Show documentation
The AWS Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.transform
import aws.sdk.kotlin.services.codepipeline.model.WebhookDefinition
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 serializeWebhookDefinitionDocument(serializer: Serializer, input: WebhookDefinition) {
val AUTHENTICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("authentication"))
val AUTHENTICATIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("authenticationConfiguration"))
val FILTERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("filters"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val TARGETACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("targetAction"))
val TARGETPIPELINE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("targetPipeline"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AUTHENTICATION_DESCRIPTOR)
field(AUTHENTICATIONCONFIGURATION_DESCRIPTOR)
field(FILTERS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(TARGETACTION_DESCRIPTOR)
field(TARGETPIPELINE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.name?.let { field(NAME_DESCRIPTOR, it) }
input.targetPipeline?.let { field(TARGETPIPELINE_DESCRIPTOR, it) }
input.targetAction?.let { field(TARGETACTION_DESCRIPTOR, it) }
if (input.filters != null) {
listField(FILTERS_DESCRIPTOR) {
for (el0 in input.filters) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeWebhookFilterRuleDocument))
}
}
}
input.authentication?.let { field(AUTHENTICATION_DESCRIPTOR, it.value) }
input.authenticationConfiguration?.let { field(AUTHENTICATIONCONFIGURATION_DESCRIPTOR, it, ::serializeWebhookAuthConfigurationDocument) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy