commonMain.aws.sdk.kotlin.services.devicefarm.model.VpcConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devicefarm-jvm Show documentation
Show all versions of devicefarm-jvm Show documentation
The AWS SDK for Kotlin client for Device Farm
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.devicefarm.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains the VPC configuration data necessary to interface with AWS Device Farm's services.
*/
public class VpcConfig private constructor(builder: Builder) {
/**
* An array of one or more security groups IDs in your Amazon VPC.
*/
public val securityGroupIds: List = requireNotNull(builder.securityGroupIds) { "A non-null value must be provided for securityGroupIds" }
/**
* An array of one or more subnet IDs in your Amazon VPC.
*/
public val subnetIds: List = requireNotNull(builder.subnetIds) { "A non-null value must be provided for subnetIds" }
/**
* The ID of the Amazon VPC.
*/
public val vpcId: kotlin.String = requireNotNull(builder.vpcId) { "A non-null value must be provided for vpcId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devicefarm.model.VpcConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VpcConfig(")
append("securityGroupIds=$securityGroupIds,")
append("subnetIds=$subnetIds,")
append("vpcId=$vpcId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = securityGroupIds.hashCode()
result = 31 * result + (subnetIds.hashCode())
result = 31 * result + (vpcId.hashCode())
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 VpcConfig
if (securityGroupIds != other.securityGroupIds) return false
if (subnetIds != other.subnetIds) return false
if (vpcId != other.vpcId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devicefarm.model.VpcConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of one or more security groups IDs in your Amazon VPC.
*/
public var securityGroupIds: List? = null
/**
* An array of one or more subnet IDs in your Amazon VPC.
*/
public var subnetIds: List? = null
/**
* The ID of the Amazon VPC.
*/
public var vpcId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.VpcConfig) : this() {
this.securityGroupIds = x.securityGroupIds
this.subnetIds = x.subnetIds
this.vpcId = x.vpcId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devicefarm.model.VpcConfig = VpcConfig(this)
internal fun correctErrors(): Builder {
if (securityGroupIds == null) securityGroupIds = emptyList()
if (subnetIds == null) subnetIds = emptyList()
if (vpcId == null) vpcId = ""
return this
}
}
}