
commonMain.aws.sdk.kotlin.services.batch.model.NodeDetails.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* An object that represents the details of a multi-node parallel job node.
*/
public class NodeDetails private constructor(builder: Builder) {
/**
* Specifies whether the current node is the main node for a multi-node parallel job.
*/
public val isMainNode: kotlin.Boolean? = builder.isMainNode
/**
* The node index for the node. Node index numbering starts at zero. This index is also available on the node with the `AWS_BATCH_JOB_NODE_INDEX` environment variable.
*/
public val nodeIndex: kotlin.Int? = builder.nodeIndex
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.NodeDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NodeDetails(")
append("isMainNode=$isMainNode,")
append("nodeIndex=$nodeIndex")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = isMainNode?.hashCode() ?: 0
result = 31 * result + (nodeIndex ?: 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 NodeDetails
if (isMainNode != other.isMainNode) return false
if (nodeIndex != other.nodeIndex) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.NodeDetails = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies whether the current node is the main node for a multi-node parallel job.
*/
public var isMainNode: kotlin.Boolean? = null
/**
* The node index for the node. Node index numbering starts at zero. This index is also available on the node with the `AWS_BATCH_JOB_NODE_INDEX` environment variable.
*/
public var nodeIndex: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.NodeDetails) : this() {
this.isMainNode = x.isMainNode
this.nodeIndex = x.nodeIndex
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.NodeDetails = NodeDetails(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy