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

commonMain.aws.sdk.kotlin.services.cloudwatch.model.AlarmHistoryItem.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudwatch.model

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

/**
 * Represents the history of a specific alarm.
 */
public class AlarmHistoryItem private constructor(builder: Builder) {
    /**
     * The descriptive name for the alarm.
     */
    public val alarmName: kotlin.String? = builder.alarmName
    /**
     * The type of alarm, either metric alarm or composite alarm.
     */
    public val alarmType: aws.sdk.kotlin.services.cloudwatch.model.AlarmType? = builder.alarmType
    /**
     * Data about the alarm, in JSON format.
     */
    public val historyData: kotlin.String? = builder.historyData
    /**
     * The type of alarm history item.
     */
    public val historyItemType: aws.sdk.kotlin.services.cloudwatch.model.HistoryItemType? = builder.historyItemType
    /**
     * A summary of the alarm history, in text format.
     */
    public val historySummary: kotlin.String? = builder.historySummary
    /**
     * The time stamp for the alarm history item.
     */
    public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp

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

    override fun toString(): kotlin.String = buildString {
        append("AlarmHistoryItem(")
        append("alarmName=$alarmName,")
        append("alarmType=$alarmType,")
        append("historyData=$historyData,")
        append("historyItemType=$historyItemType,")
        append("historySummary=$historySummary,")
        append("timestamp=$timestamp")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = alarmName?.hashCode() ?: 0
        result = 31 * result + (alarmType?.hashCode() ?: 0)
        result = 31 * result + (historyData?.hashCode() ?: 0)
        result = 31 * result + (historyItemType?.hashCode() ?: 0)
        result = 31 * result + (historySummary?.hashCode() ?: 0)
        result = 31 * result + (timestamp?.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 AlarmHistoryItem

        if (alarmName != other.alarmName) return false
        if (alarmType != other.alarmType) return false
        if (historyData != other.historyData) return false
        if (historyItemType != other.historyItemType) return false
        if (historySummary != other.historySummary) return false
        if (timestamp != other.timestamp) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The descriptive name for the alarm.
         */
        public var alarmName: kotlin.String? = null
        /**
         * The type of alarm, either metric alarm or composite alarm.
         */
        public var alarmType: aws.sdk.kotlin.services.cloudwatch.model.AlarmType? = null
        /**
         * Data about the alarm, in JSON format.
         */
        public var historyData: kotlin.String? = null
        /**
         * The type of alarm history item.
         */
        public var historyItemType: aws.sdk.kotlin.services.cloudwatch.model.HistoryItemType? = null
        /**
         * A summary of the alarm history, in text format.
         */
        public var historySummary: kotlin.String? = null
        /**
         * The time stamp for the alarm history item.
         */
        public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.AlarmHistoryItem) : this() {
            this.alarmName = x.alarmName
            this.alarmType = x.alarmType
            this.historyData = x.historyData
            this.historyItemType = x.historyItemType
            this.historySummary = x.historySummary
            this.timestamp = x.timestamp
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy