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

commonMain.aws.sdk.kotlin.services.codebuild.model.VpcConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codebuild.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the VPC configuration that CodeBuild accesses.
 */
public class VpcConfig private constructor(builder: Builder) {
    /**
     * A list of one or more security groups IDs in your Amazon VPC.
     */
    public val securityGroupIds: List? = builder.securityGroupIds
    /**
     * A list of one or more subnet IDs in your Amazon VPC.
     */
    public val subnets: List? = builder.subnets
    /**
     * The ID of the Amazon VPC.
     */
    public val vpcId: kotlin.String? = builder.vpcId

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

    override fun toString(): kotlin.String = buildString {
        append("VpcConfig(")
        append("securityGroupIds=$securityGroupIds,")
        append("subnets=$subnets,")
        append("vpcId=$vpcId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = securityGroupIds?.hashCode() ?: 0
        result = 31 * result + (subnets?.hashCode() ?: 0)
        result = 31 * result + (vpcId?.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 VpcConfig

        if (securityGroupIds != other.securityGroupIds) return false
        if (subnets != other.subnets) return false
        if (vpcId != other.vpcId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of one or more security groups IDs in your Amazon VPC.
         */
        public var securityGroupIds: List? = null
        /**
         * A list of one or more subnet IDs in your Amazon VPC.
         */
        public var subnets: 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.codebuild.model.VpcConfig) : this() {
            this.securityGroupIds = x.securityGroupIds
            this.subnets = x.subnets
            this.vpcId = x.vpcId
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy