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