
commonMain.aws.sdk.kotlin.services.directconnect.model.AllocateTransitVirtualInterfaceRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.directconnect.model
public class AllocateTransitVirtualInterfaceRequest private constructor(builder: Builder) {
/**
* The ID of the connection on which the transit virtual interface is provisioned.
*/
public val connectionId: kotlin.String? = builder.connectionId
/**
* Information about the transit virtual interface.
*/
public val newTransitVirtualInterfaceAllocation: aws.sdk.kotlin.services.directconnect.model.NewTransitVirtualInterfaceAllocation? = builder.newTransitVirtualInterfaceAllocation
/**
* The ID of the Amazon Web Services account that owns the transit virtual interface.
*/
public val ownerAccount: kotlin.String? = builder.ownerAccount
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.directconnect.model.AllocateTransitVirtualInterfaceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AllocateTransitVirtualInterfaceRequest(")
append("connectionId=$connectionId,")
append("newTransitVirtualInterfaceAllocation=$newTransitVirtualInterfaceAllocation,")
append("ownerAccount=$ownerAccount")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionId?.hashCode() ?: 0
result = 31 * result + (newTransitVirtualInterfaceAllocation?.hashCode() ?: 0)
result = 31 * result + (ownerAccount?.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 AllocateTransitVirtualInterfaceRequest
if (connectionId != other.connectionId) return false
if (newTransitVirtualInterfaceAllocation != other.newTransitVirtualInterfaceAllocation) return false
if (ownerAccount != other.ownerAccount) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.directconnect.model.AllocateTransitVirtualInterfaceRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The ID of the connection on which the transit virtual interface is provisioned.
*/
public var connectionId: kotlin.String? = null
/**
* Information about the transit virtual interface.
*/
public var newTransitVirtualInterfaceAllocation: aws.sdk.kotlin.services.directconnect.model.NewTransitVirtualInterfaceAllocation? = null
/**
* The ID of the Amazon Web Services account that owns the transit virtual interface.
*/
public var ownerAccount: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.directconnect.model.AllocateTransitVirtualInterfaceRequest) : this() {
this.connectionId = x.connectionId
this.newTransitVirtualInterfaceAllocation = x.newTransitVirtualInterfaceAllocation
this.ownerAccount = x.ownerAccount
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.directconnect.model.AllocateTransitVirtualInterfaceRequest = AllocateTransitVirtualInterfaceRequest(this)
/**
* construct an [aws.sdk.kotlin.services.directconnect.model.NewTransitVirtualInterfaceAllocation] inside the given [block]
*/
public fun newTransitVirtualInterfaceAllocation(block: aws.sdk.kotlin.services.directconnect.model.NewTransitVirtualInterfaceAllocation.Builder.() -> kotlin.Unit) {
this.newTransitVirtualInterfaceAllocation = aws.sdk.kotlin.services.directconnect.model.NewTransitVirtualInterfaceAllocation.invoke(block)
}
internal fun correctErrors(): Builder {
if (connectionId == null) connectionId = ""
if (newTransitVirtualInterfaceAllocation == null) newTransitVirtualInterfaceAllocation = NewTransitVirtualInterfaceAllocation.Builder().correctErrors().build()
if (ownerAccount == null) ownerAccount = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy