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

commonMain.aws.sdk.kotlin.services.devopsguru.model.Event.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devopsguru.model

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

/**
 * An Amazon Web Services resource event. Amazon Web Services resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and provide recommendations to improve your operational solutions.
 */
public class Event private constructor(builder: Builder) {
    /**
     * The source, `AWS_CLOUD_TRAIL` or `AWS_CODE_DEPLOY`, where DevOps Guru analysis found the event.
     */
    public val dataSource: aws.sdk.kotlin.services.devopsguru.model.EventDataSource? = builder.dataSource
    /**
     * The class of the event. The class specifies what the event is related to, such as an infrastructure change, a deployment, or a schema change.
     */
    public val eventClass: aws.sdk.kotlin.services.devopsguru.model.EventClass? = builder.eventClass
    /**
     * The Amazon Web Services source that emitted the event.
     */
    public val eventSource: kotlin.String? = builder.eventSource
    /**
     * The ID of the event.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of the event.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A collection of Amazon Web Services resources supported by DevOps Guru. The two types of Amazon Web Services resource collections supported are Amazon Web Services CloudFormation stacks and Amazon Web Services resources that contain the same Amazon Web Services tag. DevOps Guru can be configured to analyze the Amazon Web Services resources that are defined in the stacks or that are tagged using the same tag *key*. You can specify up to 500 Amazon Web Services CloudFormation stacks.
     */
    public val resourceCollection: aws.sdk.kotlin.services.devopsguru.model.ResourceCollection? = builder.resourceCollection
    /**
     * An `EventResource` object that contains information about the resource that emitted the event.
     */
    public val resources: List? = builder.resources
    /**
     * A `Timestamp` that specifies the time the event occurred.
     */
    public val time: aws.smithy.kotlin.runtime.time.Instant? = builder.time

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

    override fun toString(): kotlin.String = buildString {
        append("Event(")
        append("dataSource=$dataSource,")
        append("eventClass=$eventClass,")
        append("eventSource=$eventSource,")
        append("id=$id,")
        append("name=$name,")
        append("resourceCollection=$resourceCollection,")
        append("resources=$resources,")
        append("time=$time")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataSource?.hashCode() ?: 0
        result = 31 * result + (eventClass?.hashCode() ?: 0)
        result = 31 * result + (eventSource?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (resourceCollection?.hashCode() ?: 0)
        result = 31 * result + (resources?.hashCode() ?: 0)
        result = 31 * result + (time?.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 (dataSource != other.dataSource) return false
        if (eventClass != other.eventClass) return false
        if (eventSource != other.eventSource) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (resourceCollection != other.resourceCollection) return false
        if (resources != other.resources) return false
        if (time != other.time) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The source, `AWS_CLOUD_TRAIL` or `AWS_CODE_DEPLOY`, where DevOps Guru analysis found the event.
         */
        public var dataSource: aws.sdk.kotlin.services.devopsguru.model.EventDataSource? = null
        /**
         * The class of the event. The class specifies what the event is related to, such as an infrastructure change, a deployment, or a schema change.
         */
        public var eventClass: aws.sdk.kotlin.services.devopsguru.model.EventClass? = null
        /**
         * The Amazon Web Services source that emitted the event.
         */
        public var eventSource: kotlin.String? = null
        /**
         * The ID of the event.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the event.
         */
        public var name: kotlin.String? = null
        /**
         * A collection of Amazon Web Services resources supported by DevOps Guru. The two types of Amazon Web Services resource collections supported are Amazon Web Services CloudFormation stacks and Amazon Web Services resources that contain the same Amazon Web Services tag. DevOps Guru can be configured to analyze the Amazon Web Services resources that are defined in the stacks or that are tagged using the same tag *key*. You can specify up to 500 Amazon Web Services CloudFormation stacks.
         */
        public var resourceCollection: aws.sdk.kotlin.services.devopsguru.model.ResourceCollection? = null
        /**
         * An `EventResource` object that contains information about the resource that emitted the event.
         */
        public var resources: List? = null
        /**
         * A `Timestamp` that specifies the time the event occurred.
         */
        public var time: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.Event) : this() {
            this.dataSource = x.dataSource
            this.eventClass = x.eventClass
            this.eventSource = x.eventSource
            this.id = x.id
            this.name = x.name
            this.resourceCollection = x.resourceCollection
            this.resources = x.resources
            this.time = x.time
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.ResourceCollection] inside the given [block]
         */
        public fun resourceCollection(block: aws.sdk.kotlin.services.devopsguru.model.ResourceCollection.Builder.() -> kotlin.Unit) {
            this.resourceCollection = aws.sdk.kotlin.services.devopsguru.model.ResourceCollection.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy