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

commonMain.aws.sdk.kotlin.services.redshift.model.ClusterSecurityGroup.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a security group.
 */
public class ClusterSecurityGroup private constructor(builder: Builder) {
    /**
     * The name of the cluster security group to which the operation was applied.
     */
    public val clusterSecurityGroupName: kotlin.String? = builder.clusterSecurityGroupName
    /**
     * A description of the security group.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A list of EC2 security groups that are permitted to access clusters associated with this cluster security group.
     */
    public val ec2SecurityGroups: List? = builder.ec2SecurityGroups
    /**
     * A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group.
     */
    public val ipRanges: List? = builder.ipRanges
    /**
     * The list of tags for the cluster security group.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("ClusterSecurityGroup(")
        append("clusterSecurityGroupName=$clusterSecurityGroupName,")
        append("description=$description,")
        append("ec2SecurityGroups=$ec2SecurityGroups,")
        append("ipRanges=$ipRanges,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterSecurityGroupName?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (ec2SecurityGroups?.hashCode() ?: 0)
        result = 31 * result + (ipRanges?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 ClusterSecurityGroup

        if (clusterSecurityGroupName != other.clusterSecurityGroupName) return false
        if (description != other.description) return false
        if (ec2SecurityGroups != other.ec2SecurityGroups) return false
        if (ipRanges != other.ipRanges) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the cluster security group to which the operation was applied.
         */
        public var clusterSecurityGroupName: kotlin.String? = null
        /**
         * A description of the security group.
         */
        public var description: kotlin.String? = null
        /**
         * A list of EC2 security groups that are permitted to access clusters associated with this cluster security group.
         */
        public var ec2SecurityGroups: List? = null
        /**
         * A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group.
         */
        public var ipRanges: List? = null
        /**
         * The list of tags for the cluster security group.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.ClusterSecurityGroup) : this() {
            this.clusterSecurityGroupName = x.clusterSecurityGroupName
            this.description = x.description
            this.ec2SecurityGroups = x.ec2SecurityGroups
            this.ipRanges = x.ipRanges
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy