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

commonMain.aws.sdk.kotlin.services.codestarconnections.model.CreateConnectionRequest.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

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateConnectionRequest private constructor(builder: Builder) {
    /**
     * The name of the connection to be created.
     */
    public val connectionName: kotlin.String? = builder.connectionName
    /**
     * The Amazon Resource Name (ARN) of the host associated with the connection to be created.
     */
    public val hostArn: kotlin.String? = builder.hostArn
    /**
     * The name of the external provider where your third-party code repository is configured.
     */
    public val providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType? = builder.providerType
    /**
     * The key-value pair to use when tagging 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.CreateConnectionRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateConnectionRequest(")
        append("connectionName=$connectionName,")
        append("hostArn=$hostArn,")
        append("providerType=$providerType,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = connectionName?.hashCode() ?: 0
        result = 31 * result + (hostArn?.hashCode() ?: 0)
        result = 31 * result + (providerType?.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 CreateConnectionRequest

        if (connectionName != other.connectionName) return false
        if (hostArn != other.hostArn) return false
        if (providerType != other.providerType) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the connection to be created.
         */
        public var connectionName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the host associated with the connection to be created.
         */
        public var hostArn: kotlin.String? = null
        /**
         * The name of the external provider where your third-party code repository is configured.
         */
        public var providerType: aws.sdk.kotlin.services.codestarconnections.model.ProviderType? = null
        /**
         * The key-value pair to use when tagging the resource.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.CreateConnectionRequest) : this() {
            this.connectionName = x.connectionName
            this.hostArn = x.hostArn
            this.providerType = x.providerType
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy