
commonMain.aws.sdk.kotlin.services.directconnect.model.NewPublicVirtualInterface.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.directconnect.model
/**
* Information about a public virtual interface.
*/
public class NewPublicVirtualInterface private constructor(builder: Builder) {
/**
* The address family for the BGP peer.
*/
public val addressFamily: aws.sdk.kotlin.services.directconnect.model.AddressFamily? = builder.addressFamily
/**
* The IP address assigned to the Amazon interface.
*/
public val amazonAddress: kotlin.String? = builder.amazonAddress
/**
* The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
*
* The valid values are 1-2147483647.
*/
public val asn: kotlin.Int = builder.asn
/**
* The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
*/
public val authKey: kotlin.String? = builder.authKey
/**
* The IP address assigned to the customer interface.
*/
public val customerAddress: kotlin.String? = builder.customerAddress
/**
* The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.
*/
public val routeFilterPrefixes: List? = builder.routeFilterPrefixes
/**
* The tags associated with the public virtual interface.
*/
public val tags: List? = builder.tags
/**
* The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
*/
public val virtualInterfaceName: kotlin.String? = builder.virtualInterfaceName
/**
* The ID of the VLAN.
*/
public val vlan: kotlin.Int = builder.vlan
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.directconnect.model.NewPublicVirtualInterface = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NewPublicVirtualInterface(")
append("addressFamily=$addressFamily,")
append("amazonAddress=$amazonAddress,")
append("asn=$asn,")
append("authKey=$authKey,")
append("customerAddress=$customerAddress,")
append("routeFilterPrefixes=$routeFilterPrefixes,")
append("tags=$tags,")
append("virtualInterfaceName=$virtualInterfaceName,")
append("vlan=$vlan")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addressFamily?.hashCode() ?: 0
result = 31 * result + (amazonAddress?.hashCode() ?: 0)
result = 31 * result + (asn)
result = 31 * result + (authKey?.hashCode() ?: 0)
result = 31 * result + (customerAddress?.hashCode() ?: 0)
result = 31 * result + (routeFilterPrefixes?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (virtualInterfaceName?.hashCode() ?: 0)
result = 31 * result + (vlan)
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 NewPublicVirtualInterface
if (addressFamily != other.addressFamily) return false
if (amazonAddress != other.amazonAddress) return false
if (asn != other.asn) return false
if (authKey != other.authKey) return false
if (customerAddress != other.customerAddress) return false
if (routeFilterPrefixes != other.routeFilterPrefixes) return false
if (tags != other.tags) return false
if (virtualInterfaceName != other.virtualInterfaceName) return false
if (vlan != other.vlan) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.directconnect.model.NewPublicVirtualInterface = Builder(this).apply(block).build()
public class Builder {
/**
* The address family for the BGP peer.
*/
public var addressFamily: aws.sdk.kotlin.services.directconnect.model.AddressFamily? = null
/**
* The IP address assigned to the Amazon interface.
*/
public var amazonAddress: kotlin.String? = null
/**
* The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
*
* The valid values are 1-2147483647.
*/
public var asn: kotlin.Int = 0
/**
* The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.
*/
public var authKey: kotlin.String? = null
/**
* The IP address assigned to the customer interface.
*/
public var customerAddress: kotlin.String? = null
/**
* The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.
*/
public var routeFilterPrefixes: List? = null
/**
* The tags associated with the public virtual interface.
*/
public var tags: List? = null
/**
* The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).
*/
public var virtualInterfaceName: kotlin.String? = null
/**
* The ID of the VLAN.
*/
public var vlan: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.directconnect.model.NewPublicVirtualInterface) : this() {
this.addressFamily = x.addressFamily
this.amazonAddress = x.amazonAddress
this.asn = x.asn
this.authKey = x.authKey
this.customerAddress = x.customerAddress
this.routeFilterPrefixes = x.routeFilterPrefixes
this.tags = x.tags
this.virtualInterfaceName = x.virtualInterfaceName
this.vlan = x.vlan
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.directconnect.model.NewPublicVirtualInterface = NewPublicVirtualInterface(this)
internal fun correctErrors(): Builder {
if (asn == null) asn = 0
if (virtualInterfaceName == null) virtualInterfaceName = ""
if (vlan == null) vlan = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy