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

commonMain.aws.sdk.kotlin.services.redshiftserverless.model.CreateNamespaceRequest.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.redshiftserverless.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateNamespaceRequest private constructor(builder: Builder) {
    /**
     * The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret. You can only use this parameter if `manageAdminPassword` is true.
     */
    public val adminPasswordSecretKmsKeyId: kotlin.String? = builder.adminPasswordSecretKmsKeyId
    /**
     * The password of the administrator for the first database created in the namespace.
     *
     * You can't use `adminUserPassword` if `manageAdminPassword` is true.
     */
    public val adminUserPassword: kotlin.String? = builder.adminUserPassword
    /**
     * The username of the administrator for the first database created in the namespace.
     */
    public val adminUsername: kotlin.String? = builder.adminUsername
    /**
     * The name of the first database created in the namespace.
     */
    public val dbName: kotlin.String? = builder.dbName
    /**
     * The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace.
     */
    public val defaultIamRoleArn: kotlin.String? = builder.defaultIamRoleArn
    /**
     * A list of IAM roles to associate with the namespace.
     */
    public val iamRoles: List? = builder.iamRoles
    /**
     * The ID of the Amazon Web Services Key Management Service key used to encrypt your data.
     */
    public val kmsKeyId: kotlin.String? = builder.kmsKeyId
    /**
     * The types of logs the namespace can export. Available export types are `userlog`, `connectionlog`, and `useractivitylog`.
     */
    public val logExports: List? = builder.logExports
    /**
     * If `true`, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't use `adminUserPassword` if `manageAdminPassword` is true. If `manageAdminPassword` is false or not set, Amazon Redshift uses `adminUserPassword` for the admin user account's password.
     */
    public val manageAdminPassword: kotlin.Boolean? = builder.manageAdminPassword
    /**
     * The name of the namespace.
     */
    public val namespaceName: kotlin.String? = builder.namespaceName
    /**
     * The ARN for the Redshift application that integrates with IAM Identity Center.
     */
    public val redshiftIdcApplicationArn: kotlin.String? = builder.redshiftIdcApplicationArn
    /**
     * 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.redshiftserverless.model.CreateNamespaceRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateNamespaceRequest(")
        append("adminPasswordSecretKmsKeyId=$adminPasswordSecretKmsKeyId,")
        append("adminUserPassword=*** Sensitive Data Redacted ***,")
        append("adminUsername=*** Sensitive Data Redacted ***,")
        append("dbName=$dbName,")
        append("defaultIamRoleArn=$defaultIamRoleArn,")
        append("iamRoles=$iamRoles,")
        append("kmsKeyId=$kmsKeyId,")
        append("logExports=$logExports,")
        append("manageAdminPassword=$manageAdminPassword,")
        append("namespaceName=$namespaceName,")
        append("redshiftIdcApplicationArn=$redshiftIdcApplicationArn,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = adminPasswordSecretKmsKeyId?.hashCode() ?: 0
        result = 31 * result + (adminUserPassword?.hashCode() ?: 0)
        result = 31 * result + (adminUsername?.hashCode() ?: 0)
        result = 31 * result + (dbName?.hashCode() ?: 0)
        result = 31 * result + (defaultIamRoleArn?.hashCode() ?: 0)
        result = 31 * result + (iamRoles?.hashCode() ?: 0)
        result = 31 * result + (kmsKeyId?.hashCode() ?: 0)
        result = 31 * result + (logExports?.hashCode() ?: 0)
        result = 31 * result + (manageAdminPassword?.hashCode() ?: 0)
        result = 31 * result + (namespaceName?.hashCode() ?: 0)
        result = 31 * result + (redshiftIdcApplicationArn?.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 CreateNamespaceRequest

        if (adminPasswordSecretKmsKeyId != other.adminPasswordSecretKmsKeyId) return false
        if (adminUserPassword != other.adminUserPassword) return false
        if (adminUsername != other.adminUsername) return false
        if (dbName != other.dbName) return false
        if (defaultIamRoleArn != other.defaultIamRoleArn) return false
        if (iamRoles != other.iamRoles) return false
        if (kmsKeyId != other.kmsKeyId) return false
        if (logExports != other.logExports) return false
        if (manageAdminPassword != other.manageAdminPassword) return false
        if (namespaceName != other.namespaceName) return false
        if (redshiftIdcApplicationArn != other.redshiftIdcApplicationArn) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret. You can only use this parameter if `manageAdminPassword` is true.
         */
        public var adminPasswordSecretKmsKeyId: kotlin.String? = null
        /**
         * The password of the administrator for the first database created in the namespace.
         *
         * You can't use `adminUserPassword` if `manageAdminPassword` is true.
         */
        public var adminUserPassword: kotlin.String? = null
        /**
         * The username of the administrator for the first database created in the namespace.
         */
        public var adminUsername: kotlin.String? = null
        /**
         * The name of the first database created in the namespace.
         */
        public var dbName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace.
         */
        public var defaultIamRoleArn: kotlin.String? = null
        /**
         * A list of IAM roles to associate with the namespace.
         */
        public var iamRoles: List? = null
        /**
         * The ID of the Amazon Web Services Key Management Service key used to encrypt your data.
         */
        public var kmsKeyId: kotlin.String? = null
        /**
         * The types of logs the namespace can export. Available export types are `userlog`, `connectionlog`, and `useractivitylog`.
         */
        public var logExports: List? = null
        /**
         * If `true`, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't use `adminUserPassword` if `manageAdminPassword` is true. If `manageAdminPassword` is false or not set, Amazon Redshift uses `adminUserPassword` for the admin user account's password.
         */
        public var manageAdminPassword: kotlin.Boolean? = null
        /**
         * The name of the namespace.
         */
        public var namespaceName: kotlin.String? = null
        /**
         * The ARN for the Redshift application that integrates with IAM Identity Center.
         */
        public var redshiftIdcApplicationArn: kotlin.String? = null
        /**
         * A list of tag instances.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshiftserverless.model.CreateNamespaceRequest) : this() {
            this.adminPasswordSecretKmsKeyId = x.adminPasswordSecretKmsKeyId
            this.adminUserPassword = x.adminUserPassword
            this.adminUsername = x.adminUsername
            this.dbName = x.dbName
            this.defaultIamRoleArn = x.defaultIamRoleArn
            this.iamRoles = x.iamRoles
            this.kmsKeyId = x.kmsKeyId
            this.logExports = x.logExports
            this.manageAdminPassword = x.manageAdminPassword
            this.namespaceName = x.namespaceName
            this.redshiftIdcApplicationArn = x.redshiftIdcApplicationArn
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy