commonMain.aws.sdk.kotlin.services.deadline.model.WorkerCapabilities.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 for worker capabilities.
*/
public class WorkerCapabilities private constructor(builder: Builder) {
/**
* The worker capabilities amounts on a list of worker capabilities.
*/
public val amounts: List = requireNotNull(builder.amounts) { "A non-null value must be provided for amounts" }
/**
* The worker attribute capabilities in the list of attribute capabilities.
*/
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.WorkerCapabilities = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WorkerCapabilities(")
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 WorkerCapabilities
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.WorkerCapabilities = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The worker capabilities amounts on a list of worker capabilities.
*/
public var amounts: List? = null
/**
* The worker attribute capabilities in the list of attribute capabilities.
*/
public var attributes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.WorkerCapabilities) : this() {
this.amounts = x.amounts
this.attributes = x.attributes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.WorkerCapabilities = WorkerCapabilities(this)
internal fun correctErrors(): Builder {
if (amounts == null) amounts = emptyList()
if (attributes == null) attributes = emptyList()
return this
}
}
}