commonMain.aws.sdk.kotlin.services.deadline.model.WorkerAttributeCapability.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 the worker attribute capability.
*/
public class WorkerAttributeCapability private constructor(builder: Builder) {
/**
* The name of the worker attribute capability.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The values of the worker amount capability.
*/
public val values: List = requireNotNull(builder.values) { "A non-null value must be provided for values" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.WorkerAttributeCapability = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WorkerAttributeCapability(")
append("name=$name,")
append("values=$values")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (values.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 WorkerAttributeCapability
if (name != other.name) return false
if (values != other.values) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.WorkerAttributeCapability = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the worker attribute capability.
*/
public var name: kotlin.String? = null
/**
* The values of the worker amount capability.
*/
public var values: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.WorkerAttributeCapability) : this() {
this.name = x.name
this.values = x.values
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.WorkerAttributeCapability = WorkerAttributeCapability(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (values == null) values = emptyList()
return this
}
}
}