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

commonMain.aws.sdk.kotlin.services.cloudsearchdomain.model.SearchStatus.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudsearchdomain.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the resource id (`rid`) and the time it took to process the request (`timems`).
 */
public class SearchStatus private constructor(builder: Builder) {
    /**
     * The encrypted resource ID for the request.
     */
    public val rid: kotlin.String? = builder.rid
    /**
     * How long it took to process the request, in milliseconds.
     */
    public val timems: kotlin.Long = builder.timems

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

    override fun toString(): kotlin.String = buildString {
        append("SearchStatus(")
        append("rid=$rid,")
        append("timems=$timems")
        append(")")
    }

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

        if (rid != other.rid) return false
        if (timems != other.timems) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The encrypted resource ID for the request.
         */
        public var rid: kotlin.String? = null
        /**
         * How long it took to process the request, in milliseconds.
         */
        public var timems: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearchdomain.model.SearchStatus) : this() {
            this.rid = x.rid
            this.timems = x.timems
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy