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

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

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

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



public class DisassociateMacSecKeyRequest private constructor(builder: Builder) {
    /**
     * The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx).
     *
     * You can use DescribeConnections or DescribeLags to retrieve connection ID.
     */
    public val connectionId: kotlin.String? = builder.connectionId
    /**
     * The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key.
     *
     * You can use DescribeConnections to retrieve the ARN of the MAC Security (MACsec) secret key.
     */
    public val secretArn: kotlin.String? = builder.secretArn

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

    override fun toString(): kotlin.String = buildString {
        append("DisassociateMacSecKeyRequest(")
        append("connectionId=$connectionId,")
        append("secretArn=$secretArn")
        append(")")
    }

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

        if (connectionId != other.connectionId) return false
        if (secretArn != other.secretArn) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the dedicated connection (dxcon-xxxx), or the ID of the LAG (dxlag-xxxx).
         *
         * You can use DescribeConnections or DescribeLags to retrieve connection ID.
         */
        public var connectionId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key.
         *
         * You can use DescribeConnections to retrieve the ARN of the MAC Security (MACsec) secret key.
         */
        public var secretArn: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy