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

commonMain.aws.sdk.kotlin.services.glue.serde.KinesisStreamingSourceOptionsDocumentDeserializer.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.glue.serde

import aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions
import aws.sdk.kotlin.services.glue.model.StartingPosition
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

internal fun deserializeKinesisStreamingSourceOptionsDocument(deserializer: Deserializer): KinesisStreamingSourceOptions {
    val builder = KinesisStreamingSourceOptions.Builder()
    val ADDIDLETIMEBETWEENREADS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AddIdleTimeBetweenReads"))
    val ADDRECORDTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AddRecordTimestamp"))
    val AVOIDEMPTYBATCHES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AvoidEmptyBatches"))
    val CLASSIFICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Classification"))
    val DELIMITER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Delimiter"))
    val DESCRIBESHARDINTERVAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("DescribeShardInterval"))
    val EMITCONSUMERLAGMETRICS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EmitConsumerLagMetrics"))
    val ENDPOINTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointUrl"))
    val IDLETIMEBETWEENREADSINMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("IdleTimeBetweenReadsInMs"))
    val MAXFETCHRECORDSPERSHARD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("MaxFetchRecordsPerShard"))
    val MAXFETCHTIMEINMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("MaxFetchTimeInMs"))
    val MAXRECORDPERREAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("MaxRecordPerRead"))
    val MAXRETRYINTERVALMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("MaxRetryIntervalMs"))
    val NUMRETRIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumRetries"))
    val RETRYINTERVALMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("RetryIntervalMs"))
    val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
    val ROLESESSIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleSessionName"))
    val STARTINGPOSITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("StartingPosition"))
    val STARTINGTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartingTimestamp"))
    val STREAMARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StreamArn"))
    val STREAMNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StreamName"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADDIDLETIMEBETWEENREADS_DESCRIPTOR)
        field(ADDRECORDTIMESTAMP_DESCRIPTOR)
        field(AVOIDEMPTYBATCHES_DESCRIPTOR)
        field(CLASSIFICATION_DESCRIPTOR)
        field(DELIMITER_DESCRIPTOR)
        field(DESCRIBESHARDINTERVAL_DESCRIPTOR)
        field(EMITCONSUMERLAGMETRICS_DESCRIPTOR)
        field(ENDPOINTURL_DESCRIPTOR)
        field(IDLETIMEBETWEENREADSINMS_DESCRIPTOR)
        field(MAXFETCHRECORDSPERSHARD_DESCRIPTOR)
        field(MAXFETCHTIMEINMS_DESCRIPTOR)
        field(MAXRECORDPERREAD_DESCRIPTOR)
        field(MAXRETRYINTERVALMS_DESCRIPTOR)
        field(NUMRETRIES_DESCRIPTOR)
        field(RETRYINTERVALMS_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(ROLESESSIONNAME_DESCRIPTOR)
        field(STARTINGPOSITION_DESCRIPTOR)
        field(STARTINGTIMESTAMP_DESCRIPTOR)
        field(STREAMARN_DESCRIPTOR)
        field(STREAMNAME_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ADDIDLETIMEBETWEENREADS_DESCRIPTOR.index -> builder.addIdleTimeBetweenReads = deserializeBoolean()
                ADDRECORDTIMESTAMP_DESCRIPTOR.index -> builder.addRecordTimestamp = deserializeString()
                AVOIDEMPTYBATCHES_DESCRIPTOR.index -> builder.avoidEmptyBatches = deserializeBoolean()
                CLASSIFICATION_DESCRIPTOR.index -> builder.classification = deserializeString()
                DELIMITER_DESCRIPTOR.index -> builder.delimiter = deserializeString()
                DESCRIBESHARDINTERVAL_DESCRIPTOR.index -> builder.describeShardInterval = deserializeLong()
                EMITCONSUMERLAGMETRICS_DESCRIPTOR.index -> builder.emitConsumerLagMetrics = deserializeString()
                ENDPOINTURL_DESCRIPTOR.index -> builder.endpointUrl = deserializeString()
                IDLETIMEBETWEENREADSINMS_DESCRIPTOR.index -> builder.idleTimeBetweenReadsInMs = deserializeLong()
                MAXFETCHRECORDSPERSHARD_DESCRIPTOR.index -> builder.maxFetchRecordsPerShard = deserializeLong()
                MAXFETCHTIMEINMS_DESCRIPTOR.index -> builder.maxFetchTimeInMs = deserializeLong()
                MAXRECORDPERREAD_DESCRIPTOR.index -> builder.maxRecordPerRead = deserializeLong()
                MAXRETRYINTERVALMS_DESCRIPTOR.index -> builder.maxRetryIntervalMs = deserializeLong()
                NUMRETRIES_DESCRIPTOR.index -> builder.numRetries = deserializeInt()
                RETRYINTERVALMS_DESCRIPTOR.index -> builder.retryIntervalMs = deserializeLong()
                ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
                ROLESESSIONNAME_DESCRIPTOR.index -> builder.roleSessionName = deserializeString()
                STARTINGPOSITION_DESCRIPTOR.index -> builder.startingPosition = deserializeString().let { StartingPosition.fromValue(it) }
                STARTINGTIMESTAMP_DESCRIPTOR.index -> builder.startingTimestamp = deserializeInstant(TimestampFormat.ISO_8601)
                STREAMARN_DESCRIPTOR.index -> builder.streamArn = deserializeString()
                STREAMNAME_DESCRIPTOR.index -> builder.streamName = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy