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

commonMain.aws.sdk.kotlin.services.finspace.transform.EnvironmentDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.finspace.transform

import aws.sdk.kotlin.services.finspace.model.Environment
import aws.sdk.kotlin.services.finspace.model.EnvironmentStatus
import aws.sdk.kotlin.services.finspace.model.FederationMode
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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 deserializeEnvironmentDocument(deserializer: Deserializer): Environment {
    val builder = Environment.Builder()
    val AWSACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("awsAccountId"))
    val DEDICATEDSERVICEACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dedicatedServiceAccountId"))
    val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
    val ENVIRONMENTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentArn"))
    val ENVIRONMENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentId"))
    val ENVIRONMENTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentUrl"))
    val FEDERATIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("federationMode"))
    val FEDERATIONPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("federationParameters"))
    val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("kmsKeyId"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
    val SAGEMAKERSTUDIODOMAINURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("sageMakerStudioDomainUrl"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AWSACCOUNTID_DESCRIPTOR)
        field(DEDICATEDSERVICEACCOUNTID_DESCRIPTOR)
        field(DESCRIPTION_DESCRIPTOR)
        field(ENVIRONMENTARN_DESCRIPTOR)
        field(ENVIRONMENTID_DESCRIPTOR)
        field(ENVIRONMENTURL_DESCRIPTOR)
        field(FEDERATIONMODE_DESCRIPTOR)
        field(FEDERATIONPARAMETERS_DESCRIPTOR)
        field(KMSKEYID_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(SAGEMAKERSTUDIODOMAINURL_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AWSACCOUNTID_DESCRIPTOR.index -> builder.awsAccountId = deserializeString()
                DEDICATEDSERVICEACCOUNTID_DESCRIPTOR.index -> builder.dedicatedServiceAccountId = deserializeString()
                DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
                ENVIRONMENTARN_DESCRIPTOR.index -> builder.environmentArn = deserializeString()
                ENVIRONMENTID_DESCRIPTOR.index -> builder.environmentId = deserializeString()
                ENVIRONMENTURL_DESCRIPTOR.index -> builder.environmentUrl = deserializeString()
                FEDERATIONMODE_DESCRIPTOR.index -> builder.federationMode = deserializeString().let { FederationMode.fromValue(it) }
                FEDERATIONPARAMETERS_DESCRIPTOR.index -> builder.federationParameters = deserializeFederationParametersDocument(deserializer)
                KMSKEYID_DESCRIPTOR.index -> builder.kmsKeyId = deserializeString()
                NAME_DESCRIPTOR.index -> builder.name = deserializeString()
                SAGEMAKERSTUDIODOMAINURL_DESCRIPTOR.index -> builder.sageMakerStudioDomainUrl = deserializeString()
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { EnvironmentStatus.fromValue(it) }
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy