
commonMain.aws.sdk.kotlin.services.batch.model.NodePropertyOverride.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* The object that represents any node overrides to a job definition that's used in a SubmitJob API operation.
*/
public class NodePropertyOverride private constructor(builder: Builder) {
/**
* The overrides that are sent to a node range.
*/
public val containerOverrides: aws.sdk.kotlin.services.batch.model.ContainerOverrides? = builder.containerOverrides
/**
* The range of nodes, using node index values, that's used to override. 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.
*/
public val targetNodes: kotlin.String? = builder.targetNodes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.NodePropertyOverride = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NodePropertyOverride(")
append("containerOverrides=$containerOverrides,")
append("targetNodes=$targetNodes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = containerOverrides?.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 NodePropertyOverride
if (containerOverrides != other.containerOverrides) return false
if (targetNodes != other.targetNodes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.NodePropertyOverride = Builder(this).apply(block).build()
public class Builder {
/**
* The overrides that are sent to a node range.
*/
public var containerOverrides: aws.sdk.kotlin.services.batch.model.ContainerOverrides? = null
/**
* The range of nodes, using node index values, that's used to override. 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.
*/
public var targetNodes: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.NodePropertyOverride) : this() {
this.containerOverrides = x.containerOverrides
this.targetNodes = x.targetNodes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.NodePropertyOverride = NodePropertyOverride(this)
/**
* construct an [aws.sdk.kotlin.services.batch.model.ContainerOverrides] inside the given [block]
*/
public fun containerOverrides(block: aws.sdk.kotlin.services.batch.model.ContainerOverrides.Builder.() -> kotlin.Unit) {
this.containerOverrides = aws.sdk.kotlin.services.batch.model.ContainerOverrides.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy