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

commonMain.aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.neptunedata.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.content.Document

/**
 * Structure to capture query statistics such as how many queries are running, accepted or waiting and their details.
 */
public class QueryEvalStats private constructor(builder: Builder) {
    /**
     * Set to `TRUE` if the query was cancelled, or FALSE otherwise.
     */
    public val cancelled: kotlin.Boolean? = builder.cancelled
    /**
     * The number of milliseconds the query has been running so far.
     */
    public val elapsed: kotlin.Int? = builder.elapsed
    /**
     * The number of subqueries in this query.
     */
    public val subqueries: aws.smithy.kotlin.runtime.content.Document? = builder.subqueries
    /**
     * Indicates how long the query waited, in milliseconds.
     */
    public val waited: kotlin.Int? = builder.waited

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

    override fun toString(): kotlin.String = buildString {
        append("QueryEvalStats(")
        append("cancelled=$cancelled,")
        append("elapsed=$elapsed,")
        append("subqueries=$subqueries,")
        append("waited=$waited")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cancelled?.hashCode() ?: 0
        result = 31 * result + (elapsed ?: 0)
        result = 31 * result + (subqueries?.hashCode() ?: 0)
        result = 31 * result + (waited ?: 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 QueryEvalStats

        if (cancelled != other.cancelled) return false
        if (elapsed != other.elapsed) return false
        if (subqueries != other.subqueries) return false
        if (waited != other.waited) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Set to `TRUE` if the query was cancelled, or FALSE otherwise.
         */
        public var cancelled: kotlin.Boolean? = null
        /**
         * The number of milliseconds the query has been running so far.
         */
        public var elapsed: kotlin.Int? = null
        /**
         * The number of subqueries in this query.
         */
        public var subqueries: aws.smithy.kotlin.runtime.content.Document? = null
        /**
         * Indicates how long the query waited, in milliseconds.
         */
        public var waited: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats) : this() {
            this.cancelled = x.cancelled
            this.elapsed = x.elapsed
            this.subqueries = x.subqueries
            this.waited = x.waited
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy