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

commonMain.aws.sdk.kotlin.services.eks.model.ClientStat.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.eks.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Details about clients using the deprecated resources.
 */
public class ClientStat private constructor(builder: Builder) {
    /**
     * The timestamp of the last request seen from the Kubernetes client.
     */
    public val lastRequestTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastRequestTime
    /**
     * The number of requests from the Kubernetes client seen over the last 30 days.
     */
    public val numberOfRequestsLast30Days: kotlin.Int = builder.numberOfRequestsLast30Days
    /**
     * The user agent of the Kubernetes client using the deprecated resource.
     */
    public val userAgent: kotlin.String? = builder.userAgent

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

    override fun toString(): kotlin.String = buildString {
        append("ClientStat(")
        append("lastRequestTime=$lastRequestTime,")
        append("numberOfRequestsLast30Days=$numberOfRequestsLast30Days,")
        append("userAgent=$userAgent")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastRequestTime?.hashCode() ?: 0
        result = 31 * result + (numberOfRequestsLast30Days)
        result = 31 * result + (userAgent?.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 ClientStat

        if (lastRequestTime != other.lastRequestTime) return false
        if (numberOfRequestsLast30Days != other.numberOfRequestsLast30Days) return false
        if (userAgent != other.userAgent) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The timestamp of the last request seen from the Kubernetes client.
         */
        public var lastRequestTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The number of requests from the Kubernetes client seen over the last 30 days.
         */
        public var numberOfRequestsLast30Days: kotlin.Int = 0
        /**
         * The user agent of the Kubernetes client using the deprecated resource.
         */
        public var userAgent: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.ClientStat) : this() {
            this.lastRequestTime = x.lastRequestTime
            this.numberOfRequestsLast30Days = x.numberOfRequestsLast30Days
            this.userAgent = x.userAgent
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy