All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.VpcConfiguration.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lookoutmetrics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains configuration information about the Amazon Virtual Private Cloud (VPC).
 */
public class VpcConfiguration private constructor(builder: Builder) {
    /**
     * An array of strings containing the list of security groups.
     */
    public val securityGroupIdList: List = requireNotNull(builder.securityGroupIdList) { "A non-null value must be provided for securityGroupIdList" }
    /**
     * An array of strings containing the Amazon VPC subnet IDs (e.g., `subnet-0bb1c79de3EXAMPLE`.
     */
    public val subnetIdList: List = requireNotNull(builder.subnetIdList) { "A non-null value must be provided for subnetIdList" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutmetrics.model.VpcConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("VpcConfiguration(")
        append("securityGroupIdList=$securityGroupIdList,")
        append("subnetIdList=$subnetIdList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = securityGroupIdList.hashCode()
        result = 31 * result + (subnetIdList.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 VpcConfiguration

        if (securityGroupIdList != other.securityGroupIdList) return false
        if (subnetIdList != other.subnetIdList) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutmetrics.model.VpcConfiguration = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An array of strings containing the list of security groups.
         */
        public var securityGroupIdList: List? = null
        /**
         * An array of strings containing the Amazon VPC subnet IDs (e.g., `subnet-0bb1c79de3EXAMPLE`.
         */
        public var subnetIdList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.VpcConfiguration) : this() {
            this.securityGroupIdList = x.securityGroupIdList
            this.subnetIdList = x.subnetIdList
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.VpcConfiguration = VpcConfiguration(this)

        internal fun correctErrors(): Builder {
            if (securityGroupIdList == null) securityGroupIdList = emptyList()
            if (subnetIdList == null) subnetIdList = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy