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

commonMain.aws.sdk.kotlin.services.mwaa.serde.EnvironmentDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mwaa.serde

import aws.sdk.kotlin.services.mwaa.model.EndpointManagement
import aws.sdk.kotlin.services.mwaa.model.Environment
import aws.sdk.kotlin.services.mwaa.model.EnvironmentStatus
import aws.sdk.kotlin.services.mwaa.model.WebserverAccessMode
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
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableMapOf

internal fun deserializeEnvironmentDocument(deserializer: Deserializer): Environment {
    val builder = Environment.Builder()
    val AIRFLOWCONFIGURATIONOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("AirflowConfigurationOptions"))
    val AIRFLOWVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AirflowVersion"))
    val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
    val CELERYEXECUTORQUEUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CeleryExecutorQueue"))
    val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreatedAt"))
    val DAGS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DagS3Path"))
    val DATABASEVPCENDPOINTSERVICE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseVpcEndpointService"))
    val ENDPOINTMANAGEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointManagement"))
    val ENVIRONMENTCLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EnvironmentClass"))
    val EXECUTIONROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExecutionRoleArn"))
    val KMSKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKey"))
    val LASTUPDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LastUpdate"))
    val LOGGINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LoggingConfiguration"))
    val MAXWEBSERVERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxWebservers"))
    val MAXWORKERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxWorkers"))
    val MINWEBSERVERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinWebservers"))
    val MINWORKERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinWorkers"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
    val NETWORKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NetworkConfiguration"))
    val PLUGINSS3OBJECTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PluginsS3ObjectVersion"))
    val PLUGINSS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PluginsS3Path"))
    val REQUIREMENTSS3OBJECTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RequirementsS3ObjectVersion"))
    val REQUIREMENTSS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RequirementsS3Path"))
    val SCHEDULERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Schedulers"))
    val SERVICEROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServiceRoleArn"))
    val SOURCEBUCKETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceBucketArn"))
    val STARTUPSCRIPTS3OBJECTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StartupScriptS3ObjectVersion"))
    val STARTUPSCRIPTS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StartupScriptS3Path"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
    val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Tags"))
    val WEBSERVERACCESSMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WebserverAccessMode"))
    val WEBSERVERURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WebserverUrl"))
    val WEBSERVERVPCENDPOINTSERVICE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WebserverVpcEndpointService"))
    val WEEKLYMAINTENANCEWINDOWSTART_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WeeklyMaintenanceWindowStart"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AIRFLOWCONFIGURATIONOPTIONS_DESCRIPTOR)
        field(AIRFLOWVERSION_DESCRIPTOR)
        field(ARN_DESCRIPTOR)
        field(CELERYEXECUTORQUEUE_DESCRIPTOR)
        field(CREATEDAT_DESCRIPTOR)
        field(DAGS3PATH_DESCRIPTOR)
        field(DATABASEVPCENDPOINTSERVICE_DESCRIPTOR)
        field(ENDPOINTMANAGEMENT_DESCRIPTOR)
        field(ENVIRONMENTCLASS_DESCRIPTOR)
        field(EXECUTIONROLEARN_DESCRIPTOR)
        field(KMSKEY_DESCRIPTOR)
        field(LASTUPDATE_DESCRIPTOR)
        field(LOGGINGCONFIGURATION_DESCRIPTOR)
        field(MAXWEBSERVERS_DESCRIPTOR)
        field(MAXWORKERS_DESCRIPTOR)
        field(MINWEBSERVERS_DESCRIPTOR)
        field(MINWORKERS_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(NETWORKCONFIGURATION_DESCRIPTOR)
        field(PLUGINSS3OBJECTVERSION_DESCRIPTOR)
        field(PLUGINSS3PATH_DESCRIPTOR)
        field(REQUIREMENTSS3OBJECTVERSION_DESCRIPTOR)
        field(REQUIREMENTSS3PATH_DESCRIPTOR)
        field(SCHEDULERS_DESCRIPTOR)
        field(SERVICEROLEARN_DESCRIPTOR)
        field(SOURCEBUCKETARN_DESCRIPTOR)
        field(STARTUPSCRIPTS3OBJECTVERSION_DESCRIPTOR)
        field(STARTUPSCRIPTS3PATH_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
        field(TAGS_DESCRIPTOR)
        field(WEBSERVERACCESSMODE_DESCRIPTOR)
        field(WEBSERVERURL_DESCRIPTOR)
        field(WEBSERVERVPCENDPOINTSERVICE_DESCRIPTOR)
        field(WEEKLYMAINTENANCEWINDOWSTART_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AIRFLOWCONFIGURATIONOPTIONS_DESCRIPTOR.index -> builder.airflowConfigurationOptions =
                    deserializer.deserializeMap(AIRFLOWCONFIGURATIONOPTIONS_DESCRIPTOR) {
                        val map0 = mutableMapOf()
                        while (hasNextEntry()) {
                            val k0 = key()
                            val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
                            map0[k0] = v0
                        }
                        map0
                    }
                AIRFLOWVERSION_DESCRIPTOR.index -> builder.airflowVersion = deserializeString()
                ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
                CELERYEXECUTORQUEUE_DESCRIPTOR.index -> builder.celeryExecutorQueue = deserializeString()
                CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                DAGS3PATH_DESCRIPTOR.index -> builder.dagS3Path = deserializeString()
                DATABASEVPCENDPOINTSERVICE_DESCRIPTOR.index -> builder.databaseVpcEndpointService = deserializeString()
                ENDPOINTMANAGEMENT_DESCRIPTOR.index -> builder.endpointManagement = deserializeString().let { EndpointManagement.fromValue(it) }
                ENVIRONMENTCLASS_DESCRIPTOR.index -> builder.environmentClass = deserializeString()
                EXECUTIONROLEARN_DESCRIPTOR.index -> builder.executionRoleArn = deserializeString()
                KMSKEY_DESCRIPTOR.index -> builder.kmsKey = deserializeString()
                LASTUPDATE_DESCRIPTOR.index -> builder.lastUpdate = deserializeLastUpdateDocument(deserializer)
                LOGGINGCONFIGURATION_DESCRIPTOR.index -> builder.loggingConfiguration = deserializeLoggingConfigurationDocument(deserializer)
                MAXWEBSERVERS_DESCRIPTOR.index -> builder.maxWebservers = deserializeInt()
                MAXWORKERS_DESCRIPTOR.index -> builder.maxWorkers = deserializeInt()
                MINWEBSERVERS_DESCRIPTOR.index -> builder.minWebservers = deserializeInt()
                MINWORKERS_DESCRIPTOR.index -> builder.minWorkers = deserializeInt()
                NAME_DESCRIPTOR.index -> builder.name = deserializeString()
                NETWORKCONFIGURATION_DESCRIPTOR.index -> builder.networkConfiguration = deserializeNetworkConfigurationDocument(deserializer)
                PLUGINSS3OBJECTVERSION_DESCRIPTOR.index -> builder.pluginsS3ObjectVersion = deserializeString()
                PLUGINSS3PATH_DESCRIPTOR.index -> builder.pluginsS3Path = deserializeString()
                REQUIREMENTSS3OBJECTVERSION_DESCRIPTOR.index -> builder.requirementsS3ObjectVersion = deserializeString()
                REQUIREMENTSS3PATH_DESCRIPTOR.index -> builder.requirementsS3Path = deserializeString()
                SCHEDULERS_DESCRIPTOR.index -> builder.schedulers = deserializeInt()
                SERVICEROLEARN_DESCRIPTOR.index -> builder.serviceRoleArn = deserializeString()
                SOURCEBUCKETARN_DESCRIPTOR.index -> builder.sourceBucketArn = deserializeString()
                STARTUPSCRIPTS3OBJECTVERSION_DESCRIPTOR.index -> builder.startupScriptS3ObjectVersion = deserializeString()
                STARTUPSCRIPTS3PATH_DESCRIPTOR.index -> builder.startupScriptS3Path = deserializeString()
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { EnvironmentStatus.fromValue(it) }
                TAGS_DESCRIPTOR.index -> builder.tags =
                    deserializer.deserializeMap(TAGS_DESCRIPTOR) {
                        val map0 = mutableMapOf()
                        while (hasNextEntry()) {
                            val k0 = key()
                            val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
                            map0[k0] = v0
                        }
                        map0
                    }
                WEBSERVERACCESSMODE_DESCRIPTOR.index -> builder.webserverAccessMode = deserializeString().let { WebserverAccessMode.fromValue(it) }
                WEBSERVERURL_DESCRIPTOR.index -> builder.webserverUrl = deserializeString()
                WEBSERVERVPCENDPOINTSERVICE_DESCRIPTOR.index -> builder.webserverVpcEndpointService = deserializeString()
                WEEKLYMAINTENANCEWINDOWSTART_DESCRIPTOR.index -> builder.weeklyMaintenanceWindowStart = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy