
commonMain.aws.sdk.kotlin.services.directconnect.model.CreateBgpPeerRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.directconnect.model
public class CreateBgpPeerRequest private constructor(builder: Builder) {
/**
* Information about the BGP peer.
*/
public val newBgpPeer: aws.sdk.kotlin.services.directconnect.model.NewBgpPeer? = builder.newBgpPeer
/**
* The ID of the virtual interface.
*/
public val virtualInterfaceId: kotlin.String? = builder.virtualInterfaceId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.directconnect.model.CreateBgpPeerRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateBgpPeerRequest(")
append("newBgpPeer=$newBgpPeer,")
append("virtualInterfaceId=$virtualInterfaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = newBgpPeer?.hashCode() ?: 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 CreateBgpPeerRequest
if (newBgpPeer != other.newBgpPeer) return false
if (virtualInterfaceId != other.virtualInterfaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.directconnect.model.CreateBgpPeerRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Information about the BGP peer.
*/
public var newBgpPeer: aws.sdk.kotlin.services.directconnect.model.NewBgpPeer? = null
/**
* The ID of the virtual interface.
*/
public var virtualInterfaceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.directconnect.model.CreateBgpPeerRequest) : this() {
this.newBgpPeer = x.newBgpPeer
this.virtualInterfaceId = x.virtualInterfaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.directconnect.model.CreateBgpPeerRequest = CreateBgpPeerRequest(this)
/**
* construct an [aws.sdk.kotlin.services.directconnect.model.NewBgpPeer] inside the given [block]
*/
public fun newBgpPeer(block: aws.sdk.kotlin.services.directconnect.model.NewBgpPeer.Builder.() -> kotlin.Unit) {
this.newBgpPeer = aws.sdk.kotlin.services.directconnect.model.NewBgpPeer.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy