
commonMain.aws.sdk.kotlin.services.groundstation.model.IntegerRange.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.groundstation.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An integer range that has a minimum and maximum value.
*/
public class IntegerRange private constructor(builder: Builder) {
/**
* A maximum value.
*/
public val maximum: kotlin.Int = requireNotNull(builder.maximum) { "A non-null value must be provided for maximum" }
/**
* A minimum value.
*/
public val minimum: kotlin.Int = requireNotNull(builder.minimum) { "A non-null value must be provided for minimum" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.groundstation.model.IntegerRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("IntegerRange(")
append("maximum=$maximum,")
append("minimum=$minimum")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maximum
result = 31 * result + (minimum)
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 IntegerRange
if (maximum != other.maximum) return false
if (minimum != other.minimum) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.groundstation.model.IntegerRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A maximum value.
*/
public var maximum: kotlin.Int? = null
/**
* A minimum value.
*/
public var minimum: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.groundstation.model.IntegerRange) : this() {
this.maximum = x.maximum
this.minimum = x.minimum
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.groundstation.model.IntegerRange = IntegerRange(this)
internal fun correctErrors(): Builder {
if (maximum == null) maximum = 0
if (minimum == null) minimum = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy