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

commonMain.aws.sdk.kotlin.services.batch.model.NodeRangeProperty.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 properties of the node range for a multi-node parallel job.
 */
public class NodeRangeProperty private constructor(builder: Builder) {
    /**
     * The container details for the node range.
     */
    public val container: aws.sdk.kotlin.services.batch.model.ContainerProperties? = builder.container
    /**
     * The range of nodes, using node index values. A range of `0:3` indicates nodes with index values of `0` through `3`. If the starting range value is omitted (`:n`), then `0` is used to start the range. If the ending range value is omitted (`n:`), then the highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes (`0:n`). You can nest node ranges (for example, `0:10` and `4:5`). In this case, the `4:5` range properties override the `0:10` properties.
     */
    public val targetNodes: kotlin.String? = builder.targetNodes

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

    override fun toString(): kotlin.String = buildString {
        append("NodeRangeProperty(")
        append("container=$container,")
        append("targetNodes=$targetNodes")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = container?.hashCode() ?: 0
        result = 31 * result + (targetNodes?.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 NodeRangeProperty

        if (container != other.container) return false
        if (targetNodes != other.targetNodes) return false

        return true
    }

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

    public class Builder {
        /**
         * The container details for the node range.
         */
        public var container: aws.sdk.kotlin.services.batch.model.ContainerProperties? = null
        /**
         * The range of nodes, using node index values. A range of `0:3` indicates nodes with index values of `0` through `3`. If the starting range value is omitted (`:n`), then `0` is used to start the range. If the ending range value is omitted (`n:`), then the highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes (`0:n`). You can nest node ranges (for example, `0:10` and `4:5`). In this case, the `4:5` range properties override the `0:10` properties.
         */
        public var targetNodes: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.batch.model.NodeRangeProperty) : this() {
            this.container = x.container
            this.targetNodes = x.targetNodes
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.batch.model.ContainerProperties] inside the given [block]
         */
        public fun container(block: aws.sdk.kotlin.services.batch.model.ContainerProperties.Builder.() -> kotlin.Unit) {
            this.container = aws.sdk.kotlin.services.batch.model.ContainerProperties.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy