
commonMain.aws.sdk.kotlin.services.xray.model.RequestImpactStatistics.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
/**
* Statistics that describe how the incident has impacted a service.
*/
public class RequestImpactStatistics private constructor(builder: Builder) {
/**
* The number of requests that have resulted in a fault,
*/
public val faultCount: kotlin.Long? = builder.faultCount
/**
* The number of successful requests.
*/
public val okCount: kotlin.Long? = builder.okCount
/**
* The total number of requests to the service.
*/
public val totalCount: kotlin.Long? = builder.totalCount
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.RequestImpactStatistics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RequestImpactStatistics(")
append("faultCount=$faultCount,")
append("okCount=$okCount,")
append("totalCount=$totalCount")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = faultCount?.hashCode() ?: 0
result = 31 * result + (okCount?.hashCode() ?: 0)
result = 31 * result + (totalCount?.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 RequestImpactStatistics
if (faultCount != other.faultCount) return false
if (okCount != other.okCount) return false
if (totalCount != other.totalCount) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.RequestImpactStatistics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of requests that have resulted in a fault,
*/
public var faultCount: kotlin.Long? = null
/**
* The number of successful requests.
*/
public var okCount: kotlin.Long? = null
/**
* The total number of requests to the service.
*/
public var totalCount: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.RequestImpactStatistics) : this() {
this.faultCount = x.faultCount
this.okCount = x.okCount
this.totalCount = x.totalCount
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.RequestImpactStatistics = RequestImpactStatistics(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy