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

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

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

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



public class StartBgpFailoverTestRequest private constructor(builder: Builder) {
    /**
     * The BGP peers to place in the DOWN state.
     */
    public val bgpPeers: List? = builder.bgpPeers
    /**
     * The time in minutes that the virtual interface failover test will last.
     *
     * Maximum value: 4,320 minutes (72 hours).
     *
     * Default: 180 minutes (3 hours).
     */
    public val testDurationInMinutes: kotlin.Int? = builder.testDurationInMinutes
    /**
     * The ID of the virtual interface you want to test.
     */
    public val virtualInterfaceId: kotlin.String? = builder.virtualInterfaceId

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

    override fun toString(): kotlin.String = buildString {
        append("StartBgpFailoverTestRequest(")
        append("bgpPeers=$bgpPeers,")
        append("testDurationInMinutes=$testDurationInMinutes,")
        append("virtualInterfaceId=$virtualInterfaceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bgpPeers?.hashCode() ?: 0
        result = 31 * result + (testDurationInMinutes ?: 0)
        result = 31 * result + (virtualInterfaceId?.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 StartBgpFailoverTestRequest

        if (bgpPeers != other.bgpPeers) return false
        if (testDurationInMinutes != other.testDurationInMinutes) return false
        if (virtualInterfaceId != other.virtualInterfaceId) return false

        return true
    }

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

    public class Builder {
        /**
         * The BGP peers to place in the DOWN state.
         */
        public var bgpPeers: List? = null
        /**
         * The time in minutes that the virtual interface failover test will last.
         *
         * Maximum value: 4,320 minutes (72 hours).
         *
         * Default: 180 minutes (3 hours).
         */
        public var testDurationInMinutes: kotlin.Int? = null
        /**
         * The ID of the virtual interface you want to test.
         */
        public var virtualInterfaceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.directconnect.model.StartBgpFailoverTestRequest) : this() {
            this.bgpPeers = x.bgpPeers
            this.testDurationInMinutes = x.testDurationInMinutes
            this.virtualInterfaceId = x.virtualInterfaceId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy