commonMain.aws.sdk.kotlin.services.redshift.model.ClusterNode.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
/**
* The identifier of a node in a cluster.
*/
public class ClusterNode private constructor(builder: Builder) {
/**
* Whether the node is a leader node or a compute node.
*/
public val nodeRole: kotlin.String? = builder.nodeRole
/**
* The private IP address of a node within a cluster.
*/
public val privateIpAddress: kotlin.String? = builder.privateIpAddress
/**
* The public IP address of a node within a cluster.
*/
public val publicIpAddress: kotlin.String? = builder.publicIpAddress
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.ClusterNode = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ClusterNode(")
append("nodeRole=$nodeRole,")
append("privateIpAddress=$privateIpAddress,")
append("publicIpAddress=$publicIpAddress")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = nodeRole?.hashCode() ?: 0
result = 31 * result + (privateIpAddress?.hashCode() ?: 0)
result = 31 * result + (publicIpAddress?.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 ClusterNode
if (nodeRole != other.nodeRole) return false
if (privateIpAddress != other.privateIpAddress) return false
if (publicIpAddress != other.publicIpAddress) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.ClusterNode = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Whether the node is a leader node or a compute node.
*/
public var nodeRole: kotlin.String? = null
/**
* The private IP address of a node within a cluster.
*/
public var privateIpAddress: kotlin.String? = null
/**
* The public IP address of a node within a cluster.
*/
public var publicIpAddress: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.ClusterNode) : this() {
this.nodeRole = x.nodeRole
this.privateIpAddress = x.privateIpAddress
this.publicIpAddress = x.publicIpAddress
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.ClusterNode = ClusterNode(this)
internal fun correctErrors(): Builder {
return this
}
}
}