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

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

public class GetSparqlStatisticsResponse private constructor(builder: Builder) {
    /**
     * Statistics for RDF data.
     */
    public val payload: aws.sdk.kotlin.services.neptunedata.model.Statistics? = builder.payload
    /**
     * The HTTP return code of the request. If the request succeeded, the code is 200. See [Common error codes for DFE statistics request](https://docs.aws.amazon.com/neptune/latest/userguide/neptune-dfe-statistics.html#neptune-dfe-statistics-errors) for a list of common errors.
     *
     * When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the [neptune-db:GetStatisticsStatus](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#getstatisticsstatus) IAM action in that cluster.
     */
    public val status: kotlin.String = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetSparqlStatisticsResponse(")
        append("payload=$payload,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = payload?.hashCode() ?: 0
        result = 31 * result + (status.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 GetSparqlStatisticsResponse

        if (payload != other.payload) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Statistics for RDF data.
         */
        public var payload: aws.sdk.kotlin.services.neptunedata.model.Statistics? = null
        /**
         * The HTTP return code of the request. If the request succeeded, the code is 200. See [Common error codes for DFE statistics request](https://docs.aws.amazon.com/neptune/latest/userguide/neptune-dfe-statistics.html#neptune-dfe-statistics-errors) for a list of common errors.
         *
         * When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the [neptune-db:GetStatisticsStatus](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#getstatisticsstatus) IAM action in that cluster.
         */
        public var status: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunedata.model.GetSparqlStatisticsResponse) : this() {
            this.payload = x.payload
            this.status = x.status
        }

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

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

        internal fun correctErrors(): Builder {
            if (status == null) status = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy