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

commonMain.aws.sdk.kotlin.services.iot.model.UpdateCustomMetricResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model

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

public class UpdateCustomMetricResponse private constructor(builder: Builder) {
    /**
     * The creation date of the custom metric in milliseconds since epoch.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * A friendly name in the console for the custom metric
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The time the custom metric was last modified in milliseconds since epoch.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate
    /**
     * The Amazon Resource Number (ARN) of the custom metric.
     */
    public val metricArn: kotlin.String? = builder.metricArn
    /**
     * The name of the custom metric.
     */
    public val metricName: kotlin.String? = builder.metricName
    /**
     * The type of the custom metric.
     *
     * The type `number` only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.
     */
    public val metricType: aws.sdk.kotlin.services.iot.model.CustomMetricType? = builder.metricType

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateCustomMetricResponse(")
        append("creationDate=$creationDate,")
        append("displayName=$displayName,")
        append("lastModifiedDate=$lastModifiedDate,")
        append("metricArn=$metricArn,")
        append("metricName=$metricName,")
        append("metricType=$metricType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationDate?.hashCode() ?: 0
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
        result = 31 * result + (metricArn?.hashCode() ?: 0)
        result = 31 * result + (metricName?.hashCode() ?: 0)
        result = 31 * result + (metricType?.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 UpdateCustomMetricResponse

        if (creationDate != other.creationDate) return false
        if (displayName != other.displayName) return false
        if (lastModifiedDate != other.lastModifiedDate) return false
        if (metricArn != other.metricArn) return false
        if (metricName != other.metricName) return false
        if (metricType != other.metricType) return false

        return true
    }

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

    public class Builder {
        /**
         * The creation date of the custom metric in milliseconds since epoch.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A friendly name in the console for the custom metric
         */
        public var displayName: kotlin.String? = null
        /**
         * The time the custom metric was last modified in milliseconds since epoch.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Number (ARN) of the custom metric.
         */
        public var metricArn: kotlin.String? = null
        /**
         * The name of the custom metric.
         */
        public var metricName: kotlin.String? = null
        /**
         * The type of the custom metric.
         *
         * The type `number` only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.
         */
        public var metricType: aws.sdk.kotlin.services.iot.model.CustomMetricType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateCustomMetricResponse) : this() {
            this.creationDate = x.creationDate
            this.displayName = x.displayName
            this.lastModifiedDate = x.lastModifiedDate
            this.metricArn = x.metricArn
            this.metricName = x.metricName
            this.metricType = x.metricType
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy