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

commonMain.aws.sdk.kotlin.services.qldbsession.model.IoUsage.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qldbsession.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains I/O usage metrics for a command that was invoked.
 */
public class IoUsage private constructor(builder: Builder) {
    /**
     * The number of read I/O requests that the command made.
     */
    public val readIos: kotlin.Long = builder.readIos
    /**
     * The number of write I/O requests that the command made.
     */
    public val writeIos: kotlin.Long = builder.writeIos

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

    override fun toString(): kotlin.String = buildString {
        append("IoUsage(")
        append("readIos=$readIos,")
        append("writeIos=$writeIos")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = readIos.hashCode()
        result = 31 * result + (writeIos.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 IoUsage

        if (readIos != other.readIos) return false
        if (writeIos != other.writeIos) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The number of read I/O requests that the command made.
         */
        public var readIos: kotlin.Long = 0L
        /**
         * The number of write I/O requests that the command made.
         */
        public var writeIos: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.IoUsage) : this() {
            this.readIos = x.readIos
            this.writeIos = x.writeIos
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy