
commonMain.aws.sdk.kotlin.services.kafka.model.Cluster.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kafka.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Returns information about a cluster.
*/
public class Cluster private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) that uniquely identifies a cluster operation.
*/
public val activeOperationArn: kotlin.String? = builder.activeOperationArn
/**
* The Amazon Resource Name (ARN) that uniquely identifies the cluster.
*/
public val clusterArn: kotlin.String? = builder.clusterArn
/**
* The name of the cluster.
*/
public val clusterName: kotlin.String? = builder.clusterName
/**
* Cluster Type.
*/
public val clusterType: aws.sdk.kotlin.services.kafka.model.ClusterType? = builder.clusterType
/**
* The time when the cluster was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* The current version of the MSK cluster.
*/
public val currentVersion: kotlin.String? = builder.currentVersion
/**
* Information about the provisioned cluster.
*/
public val provisioned: aws.sdk.kotlin.services.kafka.model.Provisioned? = builder.provisioned
/**
* Information about the serverless cluster.
*/
public val serverless: aws.sdk.kotlin.services.kafka.model.Serverless? = builder.serverless
/**
* The state of the cluster. The possible states are ACTIVE, CREATING, DELETING, FAILED, HEALING, MAINTENANCE, REBOOTING_BROKER, and UPDATING.
*/
public val state: aws.sdk.kotlin.services.kafka.model.ClusterState? = builder.state
/**
* State Info for the Amazon MSK cluster.
*/
public val stateInfo: aws.sdk.kotlin.services.kafka.model.StateInfo? = builder.stateInfo
/**
* Tags attached to the cluster.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafka.model.Cluster = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Cluster(")
append("activeOperationArn=$activeOperationArn,")
append("clusterArn=$clusterArn,")
append("clusterName=$clusterName,")
append("clusterType=$clusterType,")
append("creationTime=$creationTime,")
append("currentVersion=$currentVersion,")
append("provisioned=$provisioned,")
append("serverless=$serverless,")
append("state=$state,")
append("stateInfo=$stateInfo,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = activeOperationArn?.hashCode() ?: 0
result = 31 * result + (clusterArn?.hashCode() ?: 0)
result = 31 * result + (clusterName?.hashCode() ?: 0)
result = 31 * result + (clusterType?.hashCode() ?: 0)
result = 31 * result + (creationTime?.hashCode() ?: 0)
result = 31 * result + (currentVersion?.hashCode() ?: 0)
result = 31 * result + (provisioned?.hashCode() ?: 0)
result = 31 * result + (serverless?.hashCode() ?: 0)
result = 31 * result + (state?.hashCode() ?: 0)
result = 31 * result + (stateInfo?.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 Cluster
if (activeOperationArn != other.activeOperationArn) return false
if (clusterArn != other.clusterArn) return false
if (clusterName != other.clusterName) return false
if (clusterType != other.clusterType) return false
if (creationTime != other.creationTime) return false
if (currentVersion != other.currentVersion) return false
if (provisioned != other.provisioned) return false
if (serverless != other.serverless) return false
if (state != other.state) return false
if (stateInfo != other.stateInfo) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafka.model.Cluster = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) that uniquely identifies a cluster operation.
*/
public var activeOperationArn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) that uniquely identifies the cluster.
*/
public var clusterArn: kotlin.String? = null
/**
* The name of the cluster.
*/
public var clusterName: kotlin.String? = null
/**
* Cluster Type.
*/
public var clusterType: aws.sdk.kotlin.services.kafka.model.ClusterType? = null
/**
* The time when the cluster was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The current version of the MSK cluster.
*/
public var currentVersion: kotlin.String? = null
/**
* Information about the provisioned cluster.
*/
public var provisioned: aws.sdk.kotlin.services.kafka.model.Provisioned? = null
/**
* Information about the serverless cluster.
*/
public var serverless: aws.sdk.kotlin.services.kafka.model.Serverless? = null
/**
* The state of the cluster. The possible states are ACTIVE, CREATING, DELETING, FAILED, HEALING, MAINTENANCE, REBOOTING_BROKER, and UPDATING.
*/
public var state: aws.sdk.kotlin.services.kafka.model.ClusterState? = null
/**
* State Info for the Amazon MSK cluster.
*/
public var stateInfo: aws.sdk.kotlin.services.kafka.model.StateInfo? = null
/**
* Tags attached to the cluster.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafka.model.Cluster) : this() {
this.activeOperationArn = x.activeOperationArn
this.clusterArn = x.clusterArn
this.clusterName = x.clusterName
this.clusterType = x.clusterType
this.creationTime = x.creationTime
this.currentVersion = x.currentVersion
this.provisioned = x.provisioned
this.serverless = x.serverless
this.state = x.state
this.stateInfo = x.stateInfo
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafka.model.Cluster = Cluster(this)
/**
* construct an [aws.sdk.kotlin.services.kafka.model.Provisioned] inside the given [block]
*/
public fun provisioned(block: aws.sdk.kotlin.services.kafka.model.Provisioned.Builder.() -> kotlin.Unit) {
this.provisioned = aws.sdk.kotlin.services.kafka.model.Provisioned.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kafka.model.Serverless] inside the given [block]
*/
public fun serverless(block: aws.sdk.kotlin.services.kafka.model.Serverless.Builder.() -> kotlin.Unit) {
this.serverless = aws.sdk.kotlin.services.kafka.model.Serverless.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kafka.model.StateInfo] inside the given [block]
*/
public fun stateInfo(block: aws.sdk.kotlin.services.kafka.model.StateInfo.Builder.() -> kotlin.Unit) {
this.stateInfo = aws.sdk.kotlin.services.kafka.model.StateInfo.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy