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

commonMain.aws.sdk.kotlin.services.neptunedata.model.GremlinQueryStatus.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

/**
 * Captures the status of a Gremlin query (see the [Gremlin query status API](https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-api-status.html) page).
 */
public class GremlinQueryStatus private constructor(builder: Builder) {
    /**
     * The query statistics of the Gremlin query.
     */
    public val queryEvalStats: aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats? = builder.queryEvalStats
    /**
     * The ID of the Gremlin query.
     */
    public val queryId: kotlin.String? = builder.queryId
    /**
     * The query string of the Gremlin query.
     */
    public val queryString: kotlin.String? = builder.queryString

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

    override fun toString(): kotlin.String = buildString {
        append("GremlinQueryStatus(")
        append("queryEvalStats=$queryEvalStats,")
        append("queryId=$queryId,")
        append("queryString=$queryString")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = queryEvalStats?.hashCode() ?: 0
        result = 31 * result + (queryId?.hashCode() ?: 0)
        result = 31 * result + (queryString?.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 GremlinQueryStatus

        if (queryEvalStats != other.queryEvalStats) return false
        if (queryId != other.queryId) return false
        if (queryString != other.queryString) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The query statistics of the Gremlin query.
         */
        public var queryEvalStats: aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats? = null
        /**
         * The ID of the Gremlin query.
         */
        public var queryId: kotlin.String? = null
        /**
         * The query string of the Gremlin query.
         */
        public var queryString: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.GremlinQueryStatus) : this() {
            this.queryEvalStats = x.queryEvalStats
            this.queryId = x.queryId
            this.queryString = x.queryString
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats] inside the given [block]
         */
        public fun queryEvalStats(block: aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats.Builder.() -> kotlin.Unit) {
            this.queryEvalStats = aws.sdk.kotlin.services.neptunedata.model.QueryEvalStats.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy