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

commonMain.aws.sdk.kotlin.services.directconnect.model.UpdateConnectionRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.directconnect.model



public class UpdateConnectionRequest private constructor(builder: Builder) {
    /**
     * The ID of the dedicated connection.
     *
     * You can use DescribeConnections to retrieve the connection ID.
     */
    public val connectionId: kotlin.String? = builder.connectionId
    /**
     * The name of the connection.
     */
    public val connectionName: kotlin.String? = builder.connectionName
    /**
     * The connection MAC Security (MACsec) encryption mode.
     *
     * The valid values are `no_encrypt`, `should_encrypt`, and `must_encrypt`.
     */
    public val encryptionMode: kotlin.String? = builder.encryptionMode

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateConnectionRequest(")
        append("connectionId=$connectionId,")
        append("connectionName=$connectionName,")
        append("encryptionMode=$encryptionMode")
        append(")")
    }

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

        if (connectionId != other.connectionId) return false
        if (connectionName != other.connectionName) return false
        if (encryptionMode != other.encryptionMode) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the dedicated connection.
         *
         * You can use DescribeConnections to retrieve the connection ID.
         */
        public var connectionId: kotlin.String? = null
        /**
         * The name of the connection.
         */
        public var connectionName: kotlin.String? = null
        /**
         * The connection MAC Security (MACsec) encryption mode.
         *
         * The valid values are `no_encrypt`, `should_encrypt`, and `must_encrypt`.
         */
        public var encryptionMode: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.UpdateConnectionRequest) : this() {
            this.connectionId = x.connectionId
            this.connectionName = x.connectionName
            this.encryptionMode = x.encryptionMode
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy