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