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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 *
 */
public class CreateClusterSecurityGroupRequest private constructor(builder: Builder) {
    /**
     * The name for the security group. Amazon Redshift stores the value as a lowercase string.
     *
     * Constraints:
     * + Must contain no more than 255 alphanumeric characters or hyphens.
     * + Must not be "Default".
     * + Must be unique for all security groups that are created by your Amazon Web Services account.
     *
     * Example: `examplesecuritygroup`
     */
    public val clusterSecurityGroupName: kotlin.String? = builder.clusterSecurityGroupName
    /**
     * A description for the security group.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A list of tag instances.
     */
    public val tags: List? = builder.tags

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

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name for the security group. Amazon Redshift stores the value as a lowercase string.
         *
         * Constraints:
         * + Must contain no more than 255 alphanumeric characters or hyphens.
         * + Must not be "Default".
         * + Must be unique for all security groups that are created by your Amazon Web Services account.
         *
         * Example: `examplesecuritygroup`
         */
        public var clusterSecurityGroupName: kotlin.String? = null
        /**
         * A description for the security group.
         */
        public var description: kotlin.String? = null
        /**
         * A list of tag instances.
         */
        public var tags: List? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy