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

commonMain.aws.sdk.kotlin.services.nimble.serde.StreamConfigurationCreateDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.nimble.serde

import aws.sdk.kotlin.services.nimble.model.StreamConfigurationCreate
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 serializeStreamConfigurationCreateDocument(serializer: Serializer, input: StreamConfigurationCreate) {
    val AUTOMATICTERMINATIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("automaticTerminationMode"))
    val CLIPBOARDMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("clipboardMode"))
    val EC2INSTANCETYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ec2InstanceTypes"))
    val MAXSESSIONLENGTHINMINUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("maxSessionLengthInMinutes"))
    val MAXSTOPPEDSESSIONLENGTHINMINUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("maxStoppedSessionLengthInMinutes"))
    val SESSIONBACKUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("sessionBackup"))
    val SESSIONPERSISTENCEMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("sessionPersistenceMode"))
    val SESSIONSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("sessionStorage"))
    val STREAMINGIMAGEIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("streamingImageIds"))
    val VOLUMECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("volumeConfiguration"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AUTOMATICTERMINATIONMODE_DESCRIPTOR)
        field(CLIPBOARDMODE_DESCRIPTOR)
        field(EC2INSTANCETYPES_DESCRIPTOR)
        field(MAXSESSIONLENGTHINMINUTES_DESCRIPTOR)
        field(MAXSTOPPEDSESSIONLENGTHINMINUTES_DESCRIPTOR)
        field(SESSIONBACKUP_DESCRIPTOR)
        field(SESSIONPERSISTENCEMODE_DESCRIPTOR)
        field(SESSIONSTORAGE_DESCRIPTOR)
        field(STREAMINGIMAGEIDS_DESCRIPTOR)
        field(VOLUMECONFIGURATION_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(CLIPBOARDMODE_DESCRIPTOR, input.clipboardMode.value)
        listField(EC2INSTANCETYPES_DESCRIPTOR) {
            for (el0 in input.ec2InstanceTypes) {
                serializeString(el0.value)
            }
        }
        if (input.maxSessionLengthInMinutes != 690) field(MAXSESSIONLENGTHINMINUTES_DESCRIPTOR, input.maxSessionLengthInMinutes)
        listField(STREAMINGIMAGEIDS_DESCRIPTOR) {
            for (el0 in input.streamingImageIds) {
                serializeString(el0)
            }
        }
        if (input.maxStoppedSessionLengthInMinutes != 0) field(MAXSTOPPEDSESSIONLENGTHINMINUTES_DESCRIPTOR, input.maxStoppedSessionLengthInMinutes)
        input.sessionStorage?.let { field(SESSIONSTORAGE_DESCRIPTOR, it, ::serializeStreamConfigurationSessionStorageDocument) }
        input.sessionBackup?.let { field(SESSIONBACKUP_DESCRIPTOR, it, ::serializeStreamConfigurationSessionBackupDocument) }
        input.sessionPersistenceMode?.let { field(SESSIONPERSISTENCEMODE_DESCRIPTOR, it.value) }
        input.volumeConfiguration?.let { field(VOLUMECONFIGURATION_DESCRIPTOR, it, ::serializeVolumeConfigurationDocument) }
        input.automaticTerminationMode?.let { field(AUTOMATICTERMINATIONMODE_DESCRIPTOR, it.value) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy