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

commonMain.aws.sdk.kotlin.services.redshift.model.ModifyClusterIamRolesRequest.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 ModifyClusterIamRolesRequest private constructor(builder: Builder) {
    /**
     * Zero or more IAM roles to associate with the cluster. The roles must be in their Amazon Resource Name (ARN) format.
     */
    public val addIamRoles: List? = builder.addIamRoles
    /**
     * The unique identifier of the cluster for which you want to associate or disassociate IAM roles.
     */
    public val clusterIdentifier: kotlin.String? = builder.clusterIdentifier
    /**
     * The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified.
     */
    public val defaultIamRoleArn: kotlin.String? = builder.defaultIamRoleArn
    /**
     * Zero or more IAM roles in ARN format to disassociate from the cluster.
     */
    public val removeIamRoles: List? = builder.removeIamRoles

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

    override fun toString(): kotlin.String = buildString {
        append("ModifyClusterIamRolesRequest(")
        append("addIamRoles=$addIamRoles,")
        append("clusterIdentifier=$clusterIdentifier,")
        append("defaultIamRoleArn=$defaultIamRoleArn,")
        append("removeIamRoles=$removeIamRoles")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = addIamRoles?.hashCode() ?: 0
        result = 31 * result + (clusterIdentifier?.hashCode() ?: 0)
        result = 31 * result + (defaultIamRoleArn?.hashCode() ?: 0)
        result = 31 * result + (removeIamRoles?.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 ModifyClusterIamRolesRequest

        if (addIamRoles != other.addIamRoles) return false
        if (clusterIdentifier != other.clusterIdentifier) return false
        if (defaultIamRoleArn != other.defaultIamRoleArn) return false
        if (removeIamRoles != other.removeIamRoles) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Zero or more IAM roles to associate with the cluster. The roles must be in their Amazon Resource Name (ARN) format.
         */
        public var addIamRoles: List? = null
        /**
         * The unique identifier of the cluster for which you want to associate or disassociate IAM roles.
         */
        public var clusterIdentifier: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified.
         */
        public var defaultIamRoleArn: kotlin.String? = null
        /**
         * Zero or more IAM roles in ARN format to disassociate from the cluster.
         */
        public var removeIamRoles: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.ModifyClusterIamRolesRequest) : this() {
            this.addIamRoles = x.addIamRoles
            this.clusterIdentifier = x.clusterIdentifier
            this.defaultIamRoleArn = x.defaultIamRoleArn
            this.removeIamRoles = x.removeIamRoles
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy