commonMain.aws.sdk.kotlin.services.xray.model.ErrorStatistics.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
/**
* Information about requests that failed with a 4xx Client Error status code.
*/
public class ErrorStatistics private constructor(builder: Builder) {
/**
* The number of requests that failed with untracked 4xx Client Error status codes.
*/
public val otherCount: kotlin.Long? = builder.otherCount
/**
* The number of requests that failed with a 419 throttling status code.
*/
public val throttleCount: kotlin.Long? = builder.throttleCount
/**
* The total number of requests that failed with a 4xx Client Error status code.
*/
public val totalCount: kotlin.Long? = builder.totalCount
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.ErrorStatistics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ErrorStatistics(")
append("otherCount=$otherCount,")
append("throttleCount=$throttleCount,")
append("totalCount=$totalCount")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = otherCount?.hashCode() ?: 0
result = 31 * result + (throttleCount?.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 ErrorStatistics
if (otherCount != other.otherCount) return false
if (throttleCount != other.throttleCount) return false
if (totalCount != other.totalCount) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.ErrorStatistics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of requests that failed with untracked 4xx Client Error status codes.
*/
public var otherCount: kotlin.Long? = null
/**
* The number of requests that failed with a 419 throttling status code.
*/
public var throttleCount: kotlin.Long? = null
/**
* The total number of requests that failed with a 4xx Client Error status code.
*/
public var totalCount: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.ErrorStatistics) : this() {
this.otherCount = x.otherCount
this.throttleCount = x.throttleCount
this.totalCount = x.totalCount
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.ErrorStatistics = ErrorStatistics(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy