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

commonMain.aws.sdk.kotlin.services.datazone.serde.PolicyGrantDetailDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.datazone.serde

import aws.sdk.kotlin.services.datazone.model.PolicyGrantDetail
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.SerializationException
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 serializePolicyGrantDetailDocument(serializer: Serializer, input: PolicyGrantDetail) {
    val ADDTOPROJECTMEMBERPOOL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("addToProjectMemberPool"))
    val CREATEASSETTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createAssetType"))
    val CREATEDOMAINUNIT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createDomainUnit"))
    val CREATEENVIRONMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createEnvironment"))
    val CREATEENVIRONMENTPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createEnvironmentProfile"))
    val CREATEFORMTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createFormType"))
    val CREATEGLOSSARY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createGlossary"))
    val CREATEPROJECT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("createProject"))
    val DELEGATECREATEENVIRONMENTPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("delegateCreateEnvironmentProfile"))
    val OVERRIDEDOMAINUNITOWNERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("overrideDomainUnitOwners"))
    val OVERRIDEPROJECTOWNERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("overrideProjectOwners"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADDTOPROJECTMEMBERPOOL_DESCRIPTOR)
        field(CREATEASSETTYPE_DESCRIPTOR)
        field(CREATEDOMAINUNIT_DESCRIPTOR)
        field(CREATEENVIRONMENT_DESCRIPTOR)
        field(CREATEENVIRONMENTPROFILE_DESCRIPTOR)
        field(CREATEFORMTYPE_DESCRIPTOR)
        field(CREATEGLOSSARY_DESCRIPTOR)
        field(CREATEPROJECT_DESCRIPTOR)
        field(DELEGATECREATEENVIRONMENTPROFILE_DESCRIPTOR)
        field(OVERRIDEDOMAINUNITOWNERS_DESCRIPTOR)
        field(OVERRIDEPROJECTOWNERS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        when (input) {
            is PolicyGrantDetail.CreateDomainUnit -> field(CREATEDOMAINUNIT_DESCRIPTOR, input.value, ::serializeCreateDomainUnitPolicyGrantDetailDocument)
            is PolicyGrantDetail.OverrideDomainUnitOwners -> field(OVERRIDEDOMAINUNITOWNERS_DESCRIPTOR, input.value, ::serializeOverrideDomainUnitOwnersPolicyGrantDetailDocument)
            is PolicyGrantDetail.AddToProjectMemberPool -> field(ADDTOPROJECTMEMBERPOOL_DESCRIPTOR, input.value, ::serializeAddToProjectMemberPoolPolicyGrantDetailDocument)
            is PolicyGrantDetail.OverrideProjectOwners -> field(OVERRIDEPROJECTOWNERS_DESCRIPTOR, input.value, ::serializeOverrideProjectOwnersPolicyGrantDetailDocument)
            is PolicyGrantDetail.CreateGlossary -> field(CREATEGLOSSARY_DESCRIPTOR, input.value, ::serializeCreateGlossaryPolicyGrantDetailDocument)
            is PolicyGrantDetail.CreateFormType -> field(CREATEFORMTYPE_DESCRIPTOR, input.value, ::serializeCreateFormTypePolicyGrantDetailDocument)
            is PolicyGrantDetail.CreateAssetType -> field(CREATEASSETTYPE_DESCRIPTOR, input.value, ::serializeCreateAssetTypePolicyGrantDetailDocument)
            is PolicyGrantDetail.CreateProject -> field(CREATEPROJECT_DESCRIPTOR, input.value, ::serializeCreateProjectPolicyGrantDetailDocument)
            is PolicyGrantDetail.CreateEnvironmentProfile -> field(CREATEENVIRONMENTPROFILE_DESCRIPTOR, input.value, ::serializeCreateEnvironmentProfilePolicyGrantDetailDocument)
            is PolicyGrantDetail.DelegateCreateEnvironmentProfile -> field(DELEGATECREATEENVIRONMENTPROFILE_DESCRIPTOR, input.value, ::serializeDataZoneUnitDocument)
            is PolicyGrantDetail.CreateEnvironment -> field(CREATEENVIRONMENT_DESCRIPTOR, input.value, ::serializeDataZoneUnitDocument)
            is PolicyGrantDetail.SdkUnknown -> throw SerializationException("Cannot serialize SdkUnknown")
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy