commonMain.aws.sdk.kotlin.services.redshift.model.ClusterIamRole.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An Identity and Access Management (IAM) role that can be used by the associated Amazon Redshift cluster to access other Amazon Web Services services.
*/
public class ClusterIamRole private constructor(builder: Builder) {
/**
* A value that describes the status of the IAM role's association with an Amazon Redshift cluster.
*
* The following are possible statuses and descriptions.
* + `in-sync`: The role is available for use by the cluster.
* + `adding`: The role is in the process of being associated with the cluster.
* + `removing`: The role is in the process of being disassociated with the cluster.
*/
public val applyStatus: kotlin.String? = builder.applyStatus
/**
* The Amazon Resource Name (ARN) of the IAM role, for example, `arn:aws:iam::123456789012:role/RedshiftCopyUnload`.
*/
public val iamRoleArn: kotlin.String? = builder.iamRoleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.ClusterIamRole = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ClusterIamRole(")
append("applyStatus=$applyStatus,")
append("iamRoleArn=$iamRoleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = applyStatus?.hashCode() ?: 0
result = 31 * result + (iamRoleArn?.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 ClusterIamRole
if (applyStatus != other.applyStatus) return false
if (iamRoleArn != other.iamRoleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.ClusterIamRole = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A value that describes the status of the IAM role's association with an Amazon Redshift cluster.
*
* The following are possible statuses and descriptions.
* + `in-sync`: The role is available for use by the cluster.
* + `adding`: The role is in the process of being associated with the cluster.
* + `removing`: The role is in the process of being disassociated with the cluster.
*/
public var applyStatus: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role, for example, `arn:aws:iam::123456789012:role/RedshiftCopyUnload`.
*/
public var iamRoleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.ClusterIamRole) : this() {
this.applyStatus = x.applyStatus
this.iamRoleArn = x.iamRoleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.ClusterIamRole = ClusterIamRole(this)
internal fun correctErrors(): Builder {
return this
}
}
}