commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.QueryStatistics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchlogs-jvm Show documentation
Show all versions of cloudwatchlogs-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Logs
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned.
*/
public class QueryStatistics private constructor(builder: Builder) {
/**
* The total number of bytes in the log events scanned during the query.
*/
public val bytesScanned: kotlin.Double = builder.bytesScanned
/**
* The number of log events that matched the query string.
*/
public val recordsMatched: kotlin.Double = builder.recordsMatched
/**
* The total number of log events scanned during the query.
*/
public val recordsScanned: kotlin.Double = builder.recordsScanned
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.QueryStatistics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("QueryStatistics(")
append("bytesScanned=$bytesScanned,")
append("recordsMatched=$recordsMatched,")
append("recordsScanned=$recordsScanned")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bytesScanned.hashCode()
result = 31 * result + (recordsMatched.hashCode())
result = 31 * result + (recordsScanned.hashCode())
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 QueryStatistics
if (!(bytesScanned?.equals(other.bytesScanned) ?: (other.bytesScanned == null))) return false
if (!(recordsMatched?.equals(other.recordsMatched) ?: (other.recordsMatched == null))) return false
if (!(recordsScanned?.equals(other.recordsScanned) ?: (other.recordsScanned == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.QueryStatistics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The total number of bytes in the log events scanned during the query.
*/
public var bytesScanned: kotlin.Double = 0.0
/**
* The number of log events that matched the query string.
*/
public var recordsMatched: kotlin.Double = 0.0
/**
* The total number of log events scanned during the query.
*/
public var recordsScanned: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.QueryStatistics) : this() {
this.bytesScanned = x.bytesScanned
this.recordsMatched = x.recordsMatched
this.recordsScanned = x.recordsScanned
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.QueryStatistics = QueryStatistics(this)
internal fun correctErrors(): Builder {
return this
}
}
}