commonMain.aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The details of required step capabilities.
*/
public class StepRequiredCapabilities private constructor(builder: Builder) {
/**
* The capability amounts that the step requires.
*/
public val amounts: List = requireNotNull(builder.amounts) { "A non-null value must be provided for amounts" }
/**
* The capability attributes that the step requires.
*/
public val attributes: List = requireNotNull(builder.attributes) { "A non-null value must be provided for attributes" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StepRequiredCapabilities(")
append("amounts=$amounts,")
append("attributes=$attributes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = amounts.hashCode()
result = 31 * result + (attributes.hashCode())
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 StepRequiredCapabilities
if (amounts != other.amounts) return false
if (attributes != other.attributes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The capability amounts that the step requires.
*/
public var amounts: List? = null
/**
* The capability attributes that the step requires.
*/
public var attributes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities) : this() {
this.amounts = x.amounts
this.attributes = x.attributes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.StepRequiredCapabilities = StepRequiredCapabilities(this)
internal fun correctErrors(): Builder {
if (amounts == null) amounts = emptyList()
if (attributes == null) attributes = emptyList()
return this
}
}
}