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

commonMain.aws.sdk.kotlin.services.cloudtrail.model.CreateChannelResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudtrail.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateChannelResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the new channel.
     */
    public val channelArn: kotlin.String? = builder.channelArn
    /**
     * The event data stores that log the events arriving through the channel.
     */
    public val destinations: List? = builder.destinations
    /**
     * The name of the new channel.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The partner or external event source name.
     */
    public val source: kotlin.String? = builder.source
    /**
     * A list of tags.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateChannelResponse(")
        append("channelArn=$channelArn,")
        append("destinations=$destinations,")
        append("name=$name,")
        append("source=$source,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channelArn?.hashCode() ?: 0
        result = 31 * result + (destinations?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (source?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateChannelResponse

        if (channelArn != other.channelArn) return false
        if (destinations != other.destinations) return false
        if (name != other.name) return false
        if (source != other.source) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the new channel.
         */
        public var channelArn: kotlin.String? = null
        /**
         * The event data stores that log the events arriving through the channel.
         */
        public var destinations: List? = null
        /**
         * The name of the new channel.
         */
        public var name: kotlin.String? = null
        /**
         * The partner or external event source name.
         */
        public var source: kotlin.String? = null
        /**
         * A list of tags.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudtrail.model.CreateChannelResponse) : this() {
            this.channelArn = x.channelArn
            this.destinations = x.destinations
            this.name = x.name
            this.source = x.source
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy