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