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

commonMain.aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStatisticsResponse.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 GetPropertygraphStatisticsResponse private constructor(builder: Builder) {
    /**
     * Statistics for property-graph 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.
     */
    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.GetPropertygraphStatisticsResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetPropertygraphStatisticsResponse(")
        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 GetPropertygraphStatisticsResponse

        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.GetPropertygraphStatisticsResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Statistics for property-graph 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.
         */
        public var status: kotlin.String? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.neptunedata.model.GetPropertygraphStatisticsResponse = GetPropertygraphStatisticsResponse(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