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

commonMain.aws.sdk.kotlin.services.redshift.model.CreateClusterSubnetGroupRequest.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 CreateClusterSubnetGroupRequest private constructor(builder: Builder) {
    /**
     * The name for the subnet 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 subnet groups that are created by your Amazon Web Services account.
     *
     * Example: `examplesubnetgroup`
     */
    public val clusterSubnetGroupName: kotlin.String? = builder.clusterSubnetGroupName
    /**
     * A description for the subnet group.
     */
    public val description: kotlin.String? = builder.description
    /**
     * An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.
     */
    public val subnetIds: List? = builder.subnetIds
    /**
     * 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.CreateClusterSubnetGroupRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateClusterSubnetGroupRequest(")
        append("clusterSubnetGroupName=$clusterSubnetGroupName,")
        append("description=$description,")
        append("subnetIds=$subnetIds,")
        append("tags=$tags")
        append(")")
    }

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

        if (clusterSubnetGroupName != other.clusterSubnetGroupName) return false
        if (description != other.description) return false
        if (subnetIds != other.subnetIds) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name for the subnet 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 subnet groups that are created by your Amazon Web Services account.
         *
         * Example: `examplesubnetgroup`
         */
        public var clusterSubnetGroupName: kotlin.String? = null
        /**
         * A description for the subnet group.
         */
        public var description: kotlin.String? = null
        /**
         * An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.
         */
        public var subnetIds: List? = null
        /**
         * A list of tag instances.
         */
        public var tags: List? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy