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

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

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

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



public class UpdateVirtualInterfaceAttributesRequest private constructor(builder: Builder) {
    /**
     * Indicates whether to enable or disable SiteLink.
     */
    public val enableSiteLink: kotlin.Boolean? = builder.enableSiteLink
    /**
     * The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.
     */
    public val mtu: kotlin.Int? = builder.mtu
    /**
     * The ID of the virtual private interface.
     */
    public val virtualInterfaceId: kotlin.String? = builder.virtualInterfaceId
    /**
     * The name of the virtual private interface.
     */
    public val virtualInterfaceName: kotlin.String? = builder.virtualInterfaceName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateVirtualInterfaceAttributesRequest(")
        append("enableSiteLink=$enableSiteLink,")
        append("mtu=$mtu,")
        append("virtualInterfaceId=$virtualInterfaceId,")
        append("virtualInterfaceName=$virtualInterfaceName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enableSiteLink?.hashCode() ?: 0
        result = 31 * result + (mtu ?: 0)
        result = 31 * result + (virtualInterfaceId?.hashCode() ?: 0)
        result = 31 * result + (virtualInterfaceName?.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 UpdateVirtualInterfaceAttributesRequest

        if (enableSiteLink != other.enableSiteLink) return false
        if (mtu != other.mtu) return false
        if (virtualInterfaceId != other.virtualInterfaceId) return false
        if (virtualInterfaceName != other.virtualInterfaceName) return false

        return true
    }

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

    public class Builder {
        /**
         * Indicates whether to enable or disable SiteLink.
         */
        public var enableSiteLink: kotlin.Boolean? = null
        /**
         * The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.
         */
        public var mtu: kotlin.Int? = null
        /**
         * The ID of the virtual private interface.
         */
        public var virtualInterfaceId: kotlin.String? = null
        /**
         * The name of the virtual private interface.
         */
        public var virtualInterfaceName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.UpdateVirtualInterfaceAttributesRequest) : this() {
            this.enableSiteLink = x.enableSiteLink
            this.mtu = x.mtu
            this.virtualInterfaceId = x.virtualInterfaceId
            this.virtualInterfaceName = x.virtualInterfaceName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy