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

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

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

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

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

/**
 * Describes an event for a database.
 */
public class RelationalDatabaseEvent private constructor(builder: Builder) {
    /**
     * The timestamp when the database event was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The category that the database event belongs to.
     */
    public val eventCategories: List? = builder.eventCategories
    /**
     * The message of the database event.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The database that the database event relates to.
     */
    public val resource: kotlin.String? = builder.resource

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

    override fun toString(): kotlin.String = buildString {
        append("RelationalDatabaseEvent(")
        append("createdAt=$createdAt,")
        append("eventCategories=$eventCategories,")
        append("message=$message,")
        append("resource=$resource)")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (eventCategories?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (resource?.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 RelationalDatabaseEvent

        if (createdAt != other.createdAt) return false
        if (eventCategories != other.eventCategories) return false
        if (message != other.message) return false
        if (resource != other.resource) return false

        return true
    }

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

    public class Builder {
        /**
         * The timestamp when the database event was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The category that the database event belongs to.
         */
        public var eventCategories: List? = null
        /**
         * The message of the database event.
         */
        public var message: kotlin.String? = null
        /**
         * The database that the database event relates to.
         */
        public var resource: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseEvent) : this() {
            this.createdAt = x.createdAt
            this.eventCategories = x.eventCategories
            this.message = x.message
            this.resource = x.resource
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy