commonMain.aws.sdk.kotlin.services.xray.model.SamplingStatisticSummary.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
/**
* Aggregated request sampling data for a sampling rule across all services for a 10-second window.
*/
public class SamplingStatisticSummary private constructor(builder: Builder) {
/**
* The number of requests recorded with borrowed reservoir quota.
*/
public val borrowCount: kotlin.Int = builder.borrowCount
/**
* The number of requests that matched the rule.
*/
public val requestCount: kotlin.Int = builder.requestCount
/**
* The name of the sampling rule.
*/
public val ruleName: kotlin.String? = builder.ruleName
/**
* The number of requests recorded.
*/
public val sampledCount: kotlin.Int = builder.sampledCount
/**
* The start time of the reporting window.
*/
public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.SamplingStatisticSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SamplingStatisticSummary(")
append("borrowCount=$borrowCount,")
append("requestCount=$requestCount,")
append("ruleName=$ruleName,")
append("sampledCount=$sampledCount,")
append("timestamp=$timestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = borrowCount
result = 31 * result + (requestCount)
result = 31 * result + (ruleName?.hashCode() ?: 0)
result = 31 * result + (sampledCount)
result = 31 * result + (timestamp?.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 SamplingStatisticSummary
if (borrowCount != other.borrowCount) return false
if (requestCount != other.requestCount) return false
if (ruleName != other.ruleName) return false
if (sampledCount != other.sampledCount) return false
if (timestamp != other.timestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.SamplingStatisticSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of requests recorded with borrowed reservoir quota.
*/
public var borrowCount: kotlin.Int = 0
/**
* The number of requests that matched the rule.
*/
public var requestCount: kotlin.Int = 0
/**
* The name of the sampling rule.
*/
public var ruleName: kotlin.String? = null
/**
* The number of requests recorded.
*/
public var sampledCount: kotlin.Int = 0
/**
* The start time of the reporting window.
*/
public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.SamplingStatisticSummary) : this() {
this.borrowCount = x.borrowCount
this.requestCount = x.requestCount
this.ruleName = x.ruleName
this.sampledCount = x.sampledCount
this.timestamp = x.timestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.SamplingStatisticSummary = SamplingStatisticSummary(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy