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

commonMain.aws.sdk.kotlin.services.lightsail.model.GetDistributionMetricDataResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model



public class GetDistributionMetricDataResponse private constructor(builder: Builder) {
    /**
     * An array of objects that describe the metric data returned.
     */
    public val metricData: List? = builder.metricData
    /**
     * The name of the metric returned.
     */
    public val metricName: aws.sdk.kotlin.services.lightsail.model.DistributionMetricName? = builder.metricName

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

    override fun toString(): kotlin.String = buildString {
        append("GetDistributionMetricDataResponse(")
        append("metricData=$metricData,")
        append("metricName=$metricName")
        append(")")
    }

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

        if (metricData != other.metricData) return false
        if (metricName != other.metricName) return false

        return true
    }

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

    public class Builder {
        /**
         * An array of objects that describe the metric data returned.
         */
        public var metricData: List? = null
        /**
         * The name of the metric returned.
         */
        public var metricName: aws.sdk.kotlin.services.lightsail.model.DistributionMetricName? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.GetDistributionMetricDataResponse) : this() {
            this.metricData = x.metricData
            this.metricName = x.metricName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy