commonMain.aws.sdk.kotlin.services.firehose.serde.SplunkDestinationDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.serde
import aws.sdk.kotlin.services.firehose.model.HecEndpointType
import aws.sdk.kotlin.services.firehose.model.SplunkDestinationDescription
import aws.sdk.kotlin.services.firehose.model.SplunkS3BackupMode
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 deserializeSplunkDestinationDescriptionDocument(deserializer: Deserializer): SplunkDestinationDescription {
val builder = SplunkDestinationDescription.Builder()
val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
val HECACKNOWLEDGMENTTIMEOUTINSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("HECAcknowledgmentTimeoutInSeconds"))
val HECENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("HECEndpoint"))
val HECENDPOINTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("HECEndpointType"))
val HECTOKEN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("HECToken"))
val PROCESSINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ProcessingConfiguration"))
val RETRYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RetryOptions"))
val S3BACKUPMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("S3BackupMode"))
val S3DESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3DestinationDescription"))
val SECRETSMANAGERCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SecretsManagerConfiguration"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BUFFERINGHINTS_DESCRIPTOR)
field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
field(HECACKNOWLEDGMENTTIMEOUTINSECONDS_DESCRIPTOR)
field(HECENDPOINT_DESCRIPTOR)
field(HECENDPOINTTYPE_DESCRIPTOR)
field(HECTOKEN_DESCRIPTOR)
field(PROCESSINGCONFIGURATION_DESCRIPTOR)
field(RETRYOPTIONS_DESCRIPTOR)
field(S3BACKUPMODE_DESCRIPTOR)
field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
field(SECRETSMANAGERCONFIGURATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeSplunkBufferingHintsDocument(deserializer)
CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
HECACKNOWLEDGMENTTIMEOUTINSECONDS_DESCRIPTOR.index -> builder.hecAcknowledgmentTimeoutInSeconds = deserializeInt()
HECENDPOINT_DESCRIPTOR.index -> builder.hecEndpoint = deserializeString()
HECENDPOINTTYPE_DESCRIPTOR.index -> builder.hecEndpointType = deserializeString().let { HecEndpointType.fromValue(it) }
HECTOKEN_DESCRIPTOR.index -> builder.hecToken = deserializeString()
PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeSplunkRetryOptionsDocument(deserializer)
S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { SplunkS3BackupMode.fromValue(it) }
S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
SECRETSMANAGERCONFIGURATION_DESCRIPTOR.index -> builder.secretsManagerConfiguration = deserializeSecretsManagerConfigurationDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}