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

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

There is a newer version: 1.3.35
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

public class DescribeAlarmHistoryRequest private constructor(builder: Builder) {
    /**
     * The name of the alarm.
     */
    public val alarmName: kotlin.String? = builder.alarmName
    /**
     * Use this parameter to specify whether you want the operation to return metric alarms or composite alarms. If you omit this parameter, only metric alarms are returned.
     */
    public val alarmTypes: List? = builder.alarmTypes
    /**
     * The ending date to retrieve alarm history.
     */
    public val endDate: aws.smithy.kotlin.runtime.time.Instant? = builder.endDate
    /**
     * The type of alarm histories to retrieve.
     */
    public val historyItemType: aws.sdk.kotlin.services.cloudwatch.model.HistoryItemType? = builder.historyItemType
    /**
     * The maximum number of alarm history records to retrieve.
     */
    public val maxRecords: kotlin.Int? = builder.maxRecords
    /**
     * The token returned by a previous call to indicate that there is more data available.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * Specified whether to return the newest or oldest alarm history first. Specify `TimestampDescending` to have the newest event history returned first, and specify `TimestampAscending` to have the oldest history returned first.
     */
    public val scanBy: aws.sdk.kotlin.services.cloudwatch.model.ScanBy? = builder.scanBy
    /**
     * The starting date to retrieve alarm history.
     */
    public val startDate: aws.smithy.kotlin.runtime.time.Instant? = builder.startDate

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAlarmHistoryRequest(")
        append("alarmName=$alarmName,")
        append("alarmTypes=$alarmTypes,")
        append("endDate=$endDate,")
        append("historyItemType=$historyItemType,")
        append("maxRecords=$maxRecords,")
        append("nextToken=$nextToken,")
        append("scanBy=$scanBy,")
        append("startDate=$startDate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = alarmName?.hashCode() ?: 0
        result = 31 * result + (alarmTypes?.hashCode() ?: 0)
        result = 31 * result + (endDate?.hashCode() ?: 0)
        result = 31 * result + (historyItemType?.hashCode() ?: 0)
        result = 31 * result + (maxRecords ?: 0)
        result = 31 * result + (nextToken?.hashCode() ?: 0)
        result = 31 * result + (scanBy?.hashCode() ?: 0)
        result = 31 * result + (startDate?.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 DescribeAlarmHistoryRequest

        if (alarmName != other.alarmName) return false
        if (alarmTypes != other.alarmTypes) return false
        if (endDate != other.endDate) return false
        if (historyItemType != other.historyItemType) return false
        if (maxRecords != other.maxRecords) return false
        if (nextToken != other.nextToken) return false
        if (scanBy != other.scanBy) return false
        if (startDate != other.startDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the alarm.
         */
        public var alarmName: kotlin.String? = null
        /**
         * Use this parameter to specify whether you want the operation to return metric alarms or composite alarms. If you omit this parameter, only metric alarms are returned.
         */
        public var alarmTypes: List? = null
        /**
         * The ending date to retrieve alarm history.
         */
        public var endDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The type of alarm histories to retrieve.
         */
        public var historyItemType: aws.sdk.kotlin.services.cloudwatch.model.HistoryItemType? = null
        /**
         * The maximum number of alarm history records to retrieve.
         */
        public var maxRecords: kotlin.Int? = null
        /**
         * The token returned by a previous call to indicate that there is more data available.
         */
        public var nextToken: kotlin.String? = null
        /**
         * Specified whether to return the newest or oldest alarm history first. Specify `TimestampDescending` to have the newest event history returned first, and specify `TimestampAscending` to have the oldest history returned first.
         */
        public var scanBy: aws.sdk.kotlin.services.cloudwatch.model.ScanBy? = null
        /**
         * The starting date to retrieve alarm history.
         */
        public var startDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.DescribeAlarmHistoryRequest) : this() {
            this.alarmName = x.alarmName
            this.alarmTypes = x.alarmTypes
            this.endDate = x.endDate
            this.historyItemType = x.historyItemType
            this.maxRecords = x.maxRecords
            this.nextToken = x.nextToken
            this.scanBy = x.scanBy
            this.startDate = x.startDate
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy