
commonMain.aws.sdk.kotlin.services.deadline.model.FleetAttributeCapability.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Defines the fleet's capability name, minimum, and maximum.
*/
public class FleetAttributeCapability private constructor(builder: Builder) {
/**
* The name of the fleet attribute capability for the worker.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The number of fleet attribute capabilities.
*/
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.FleetAttributeCapability = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FleetAttributeCapability(")
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 FleetAttributeCapability
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.FleetAttributeCapability = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the fleet attribute capability for the worker.
*/
public var name: kotlin.String? = null
/**
* The number of fleet attribute capabilities.
*/
public var values: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.FleetAttributeCapability) : this() {
this.name = x.name
this.values = x.values
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.FleetAttributeCapability = FleetAttributeCapability(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (values == null) values = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy