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

commonMain.aws.sdk.kotlin.services.codestarconnections.model.CreateConnectionResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codestarconnections.model



public class CreateConnectionResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between Amazon Web Services services.
     *
     * The ARN is never reused if the connection is deleted.
     */
    public val connectionArn: kotlin.String = requireNotNull(builder.connectionArn) { "A non-null value must be provided for connectionArn" }
    /**
     * Specifies the tags applied to the resource.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateConnectionResponse(")
        append("connectionArn=$connectionArn,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = connectionArn.hashCode()
        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 CreateConnectionResponse

        if (connectionArn != other.connectionArn) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between Amazon Web Services services.
         *
         * The ARN is never reused if the connection is deleted.
         */
        public var connectionArn: kotlin.String? = null
        /**
         * Specifies the tags applied to the resource.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.CreateConnectionResponse) : this() {
            this.connectionArn = x.connectionArn
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (connectionArn == null) connectionArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy