All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codepipeline.serde.WebhookDefinitionDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codepipeline.serde

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) {
        field(NAME_DESCRIPTOR, input.name)
        field(TARGETPIPELINE_DESCRIPTOR, input.targetPipeline)
        field(TARGETACTION_DESCRIPTOR, input.targetAction)
        listField(FILTERS_DESCRIPTOR) {
            for (el0 in input.filters) {
                serializeSdkSerializable(asSdkSerializable(el0, ::serializeWebhookFilterRuleDocument))
            }
        }
        field(AUTHENTICATION_DESCRIPTOR, input.authentication.value)
        input.authenticationConfiguration?.let { field(AUTHENTICATIONCONFIGURATION_DESCRIPTOR, it, ::serializeWebhookAuthConfigurationDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy