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

commonMain.aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pipes.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * This structure specifies the VPC subnets and security groups for the stream, and whether a public IP address is to be used.
 */
public class SelfManagedKafkaAccessConfigurationVpc private constructor(builder: Builder) {
    /**
     * Specifies the security groups associated with the stream. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
     */
    public val securityGroup: List? = builder.securityGroup
    /**
     * Specifies the subnets associated with the stream. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
     */
    public val subnets: List? = builder.subnets

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

    override fun toString(): kotlin.String = buildString {
        append("SelfManagedKafkaAccessConfigurationVpc(")
        append("securityGroup=$securityGroup,")
        append("subnets=$subnets")
        append(")")
    }

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

        if (securityGroup != other.securityGroup) return false
        if (subnets != other.subnets) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the security groups associated with the stream. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
         */
        public var securityGroup: List? = null
        /**
         * Specifies the subnets associated with the stream. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
         */
        public var subnets: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc) : this() {
            this.securityGroup = x.securityGroup
            this.subnets = x.subnets
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy