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

commonMain.aws.sdk.kotlin.services.xray.serde.SamplingStatisticsDocumentDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.xray.serde

import aws.sdk.kotlin.services.xray.model.SamplingStatisticsDocument
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
import aws.smithy.kotlin.runtime.time.TimestampFormat

internal fun serializeSamplingStatisticsDocumentDocument(serializer: Serializer, input: SamplingStatisticsDocument) {
    val BORROWCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("BorrowCount"))
    val CLIENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ClientID"))
    val REQUESTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RequestCount"))
    val RULENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RuleName"))
    val SAMPLEDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("SampledCount"))
    val TIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("Timestamp"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BORROWCOUNT_DESCRIPTOR)
        field(CLIENTID_DESCRIPTOR)
        field(REQUESTCOUNT_DESCRIPTOR)
        field(RULENAME_DESCRIPTOR)
        field(SAMPLEDCOUNT_DESCRIPTOR)
        field(TIMESTAMP_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(RULENAME_DESCRIPTOR, input.ruleName)
        field(CLIENTID_DESCRIPTOR, input.clientId)
        field(TIMESTAMP_DESCRIPTOR, input.timestamp, TimestampFormat.EPOCH_SECONDS)
        field(REQUESTCOUNT_DESCRIPTOR, input.requestCount)
        field(SAMPLEDCOUNT_DESCRIPTOR, input.sampledCount)
        if (input.borrowCount != 0) field(BORROWCOUNT_DESCRIPTOR, input.borrowCount)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy