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

commonMain.aws.sdk.kotlin.services.kendra.serde.ServiceNowConfigurationDocumentSerializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kendra.serde

import aws.sdk.kotlin.services.kendra.model.ServiceNowConfiguration
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 serializeServiceNowConfigurationDocument(serializer: Serializer, input: ServiceNowConfiguration) {
    val AUTHENTICATIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("AuthenticationType"))
    val HOSTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("HostUrl"))
    val KNOWLEDGEARTICLECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KnowledgeArticleConfiguration"))
    val SECRETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecretArn"))
    val SERVICECATALOGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ServiceCatalogConfiguration"))
    val SERVICENOWBUILDVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ServiceNowBuildVersion"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AUTHENTICATIONTYPE_DESCRIPTOR)
        field(HOSTURL_DESCRIPTOR)
        field(KNOWLEDGEARTICLECONFIGURATION_DESCRIPTOR)
        field(SECRETARN_DESCRIPTOR)
        field(SERVICECATALOGCONFIGURATION_DESCRIPTOR)
        field(SERVICENOWBUILDVERSION_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(HOSTURL_DESCRIPTOR, input.hostUrl)
        field(SECRETARN_DESCRIPTOR, input.secretArn)
        field(SERVICENOWBUILDVERSION_DESCRIPTOR, input.serviceNowBuildVersion.value)
        input.knowledgeArticleConfiguration?.let { field(KNOWLEDGEARTICLECONFIGURATION_DESCRIPTOR, it, ::serializeServiceNowKnowledgeArticleConfigurationDocument) }
        input.serviceCatalogConfiguration?.let { field(SERVICECATALOGCONFIGURATION_DESCRIPTOR, it, ::serializeServiceNowServiceCatalogConfigurationDocument) }
        input.authenticationType?.let { field(AUTHENTICATIONTYPE_DESCRIPTOR, it.value) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy