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

commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.DescribeEventSourceResponse.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.cloudwatchevents.model

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

public class DescribeEventSourceResponse private constructor(builder: Builder) {
    /**
     * The ARN of the partner event source.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The name of the SaaS partner that created the event source.
     */
    public val createdBy: kotlin.String? = builder.createdBy
    /**
     * The date and time that the event source was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The date and time that the event source will expire if you do not create a matching event bus.
     */
    public val expirationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationTime
    /**
     * The name of the partner event source.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
     */
    public val state: aws.sdk.kotlin.services.cloudwatchevents.model.EventSourceState? = builder.state

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeEventSourceResponse(")
        append("arn=$arn,")
        append("createdBy=$createdBy,")
        append("creationTime=$creationTime,")
        append("expirationTime=$expirationTime,")
        append("name=$name,")
        append("state=$state")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (expirationTime?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (state?.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 DescribeEventSourceResponse

        if (arn != other.arn) return false
        if (createdBy != other.createdBy) return false
        if (creationTime != other.creationTime) return false
        if (expirationTime != other.expirationTime) return false
        if (name != other.name) return false
        if (state != other.state) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the partner event source.
         */
        public var arn: kotlin.String? = null
        /**
         * The name of the SaaS partner that created the event source.
         */
        public var createdBy: kotlin.String? = null
        /**
         * The date and time that the event source was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The date and time that the event source will expire if you do not create a matching event bus.
         */
        public var expirationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the partner event source.
         */
        public var name: kotlin.String? = null
        /**
         * The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
         */
        public var state: aws.sdk.kotlin.services.cloudwatchevents.model.EventSourceState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.DescribeEventSourceResponse) : this() {
            this.arn = x.arn
            this.createdBy = x.createdBy
            this.creationTime = x.creationTime
            this.expirationTime = x.expirationTime
            this.name = x.name
            this.state = x.state
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy