
commonMain.aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.directconnect.model
public class CreateDirectConnectGatewayAssociationRequest private constructor(builder: Builder) {
/**
* The Amazon VPC prefixes to advertise to the Direct Connect gateway
*
* This parameter is required when you create an association to a transit gateway.
*
* For information about how to set the prefixes, see [Allowed Prefixes](https://docs.aws.amazon.com/directconnect/latest/UserGuide/multi-account-associate-vgw.html#allowed-prefixes) in the *Direct Connect User Guide*.
*/
public val addAllowedPrefixesToDirectConnectGateway: List? = builder.addAllowedPrefixesToDirectConnectGateway
/**
* The ID of the Direct Connect gateway.
*/
public val directConnectGatewayId: kotlin.String? = builder.directConnectGatewayId
/**
* The ID of the virtual private gateway or transit gateway.
*/
public val gatewayId: kotlin.String? = builder.gatewayId
/**
* The ID of the virtual private gateway.
*/
public val virtualGatewayId: kotlin.String? = builder.virtualGatewayId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDirectConnectGatewayAssociationRequest(")
append("addAllowedPrefixesToDirectConnectGateway=$addAllowedPrefixesToDirectConnectGateway,")
append("directConnectGatewayId=$directConnectGatewayId,")
append("gatewayId=$gatewayId,")
append("virtualGatewayId=$virtualGatewayId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addAllowedPrefixesToDirectConnectGateway?.hashCode() ?: 0
result = 31 * result + (directConnectGatewayId?.hashCode() ?: 0)
result = 31 * result + (gatewayId?.hashCode() ?: 0)
result = 31 * result + (virtualGatewayId?.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 CreateDirectConnectGatewayAssociationRequest
if (addAllowedPrefixesToDirectConnectGateway != other.addAllowedPrefixesToDirectConnectGateway) return false
if (directConnectGatewayId != other.directConnectGatewayId) return false
if (gatewayId != other.gatewayId) return false
if (virtualGatewayId != other.virtualGatewayId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon VPC prefixes to advertise to the Direct Connect gateway
*
* This parameter is required when you create an association to a transit gateway.
*
* For information about how to set the prefixes, see [Allowed Prefixes](https://docs.aws.amazon.com/directconnect/latest/UserGuide/multi-account-associate-vgw.html#allowed-prefixes) in the *Direct Connect User Guide*.
*/
public var addAllowedPrefixesToDirectConnectGateway: List? = null
/**
* The ID of the Direct Connect gateway.
*/
public var directConnectGatewayId: kotlin.String? = null
/**
* The ID of the virtual private gateway or transit gateway.
*/
public var gatewayId: kotlin.String? = null
/**
* The ID of the virtual private gateway.
*/
public var virtualGatewayId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationRequest) : this() {
this.addAllowedPrefixesToDirectConnectGateway = x.addAllowedPrefixesToDirectConnectGateway
this.directConnectGatewayId = x.directConnectGatewayId
this.gatewayId = x.gatewayId
this.virtualGatewayId = x.virtualGatewayId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.directconnect.model.CreateDirectConnectGatewayAssociationRequest = CreateDirectConnectGatewayAssociationRequest(this)
internal fun correctErrors(): Builder {
if (directConnectGatewayId == null) directConnectGatewayId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy