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

commonMain.aws.sdk.kotlin.services.redshift.model.Event.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.redshift.model

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

/**
 * Describes an event.
 */
public class Event private constructor(builder: Builder) {
    /**
     * The date and time of the event.
     */
    public val date: aws.smithy.kotlin.runtime.time.Instant? = builder.date
    /**
     * A list of the event categories.
     *
     * Values: Configuration, Management, Monitoring, Security, Pending
     */
    public val eventCategories: List? = builder.eventCategories
    /**
     * The identifier of the event.
     */
    public val eventId: kotlin.String? = builder.eventId
    /**
     * The text of this event.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The severity of the event.
     *
     * Values: ERROR, INFO
     */
    public val severity: kotlin.String? = builder.severity
    /**
     * The identifier for the source of the event.
     */
    public val sourceIdentifier: kotlin.String? = builder.sourceIdentifier
    /**
     * The source type for this event.
     */
    public val sourceType: aws.sdk.kotlin.services.redshift.model.SourceType? = builder.sourceType

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

    override fun toString(): kotlin.String = buildString {
        append("Event(")
        append("date=$date,")
        append("eventCategories=$eventCategories,")
        append("eventId=$eventId,")
        append("message=$message,")
        append("severity=$severity,")
        append("sourceIdentifier=$sourceIdentifier,")
        append("sourceType=$sourceType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = date?.hashCode() ?: 0
        result = 31 * result + (eventCategories?.hashCode() ?: 0)
        result = 31 * result + (eventId?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (severity?.hashCode() ?: 0)
        result = 31 * result + (sourceIdentifier?.hashCode() ?: 0)
        result = 31 * result + (sourceType?.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 Event

        if (date != other.date) return false
        if (eventCategories != other.eventCategories) return false
        if (eventId != other.eventId) return false
        if (message != other.message) return false
        if (severity != other.severity) return false
        if (sourceIdentifier != other.sourceIdentifier) return false
        if (sourceType != other.sourceType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time of the event.
         */
        public var date: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A list of the event categories.
         *
         * Values: Configuration, Management, Monitoring, Security, Pending
         */
        public var eventCategories: List? = null
        /**
         * The identifier of the event.
         */
        public var eventId: kotlin.String? = null
        /**
         * The text of this event.
         */
        public var message: kotlin.String? = null
        /**
         * The severity of the event.
         *
         * Values: ERROR, INFO
         */
        public var severity: kotlin.String? = null
        /**
         * The identifier for the source of the event.
         */
        public var sourceIdentifier: kotlin.String? = null
        /**
         * The source type for this event.
         */
        public var sourceType: aws.sdk.kotlin.services.redshift.model.SourceType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.Event) : this() {
            this.date = x.date
            this.eventCategories = x.eventCategories
            this.eventId = x.eventId
            this.message = x.message
            this.severity = x.severity
            this.sourceIdentifier = x.sourceIdentifier
            this.sourceType = x.sourceType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy