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

commonMain.aws.sdk.kotlin.services.xray.model.GetSamplingTargetsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.xray.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class GetSamplingTargetsResponse private constructor(builder: Builder) {
    /**
     * The last time a user changed the sampling rule configuration. If the sampling rule configuration changed since the service last retrieved it, the service should call [GetSamplingRules](https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html) to get the latest version.
     */
    public val lastRuleModification: aws.smithy.kotlin.runtime.time.Instant? = builder.lastRuleModification
    /**
     * Updated rules that the service should use to sample requests.
     */
    public val samplingTargetDocuments: List? = builder.samplingTargetDocuments
    /**
     * Information about [SamplingStatisticsDocument](https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html) that X-Ray could not process.
     */
    public val unprocessedStatistics: List? = builder.unprocessedStatistics

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.GetSamplingTargetsResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetSamplingTargetsResponse(")
        append("lastRuleModification=$lastRuleModification,")
        append("samplingTargetDocuments=$samplingTargetDocuments,")
        append("unprocessedStatistics=$unprocessedStatistics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastRuleModification?.hashCode() ?: 0
        result = 31 * result + (samplingTargetDocuments?.hashCode() ?: 0)
        result = 31 * result + (unprocessedStatistics?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as GetSamplingTargetsResponse

        if (lastRuleModification != other.lastRuleModification) return false
        if (samplingTargetDocuments != other.samplingTargetDocuments) return false
        if (unprocessedStatistics != other.unprocessedStatistics) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.GetSamplingTargetsResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The last time a user changed the sampling rule configuration. If the sampling rule configuration changed since the service last retrieved it, the service should call [GetSamplingRules](https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html) to get the latest version.
         */
        public var lastRuleModification: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Updated rules that the service should use to sample requests.
         */
        public var samplingTargetDocuments: List? = null
        /**
         * Information about [SamplingStatisticsDocument](https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html) that X-Ray could not process.
         */
        public var unprocessedStatistics: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.xray.model.GetSamplingTargetsResponse) : this() {
            this.lastRuleModification = x.lastRuleModification
            this.samplingTargetDocuments = x.samplingTargetDocuments
            this.unprocessedStatistics = x.unprocessedStatistics
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.xray.model.GetSamplingTargetsResponse = GetSamplingTargetsResponse(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy