commonMain.aws.sdk.kotlin.services.neptune.model.Range.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-jvm Show documentation
Show all versions of neptune-jvm Show documentation
The AWS SDK for Kotlin client for Neptune
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptune.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A range of integer values.
*/
public class Range private constructor(builder: Builder) {
/**
* The minimum value in the range.
*/
public val from: kotlin.Int? = builder.from
/**
* The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...
*/
public val step: kotlin.Int? = builder.step
/**
* The maximum value in the range.
*/
public val to: kotlin.Int? = builder.to
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.neptune.model.Range = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Range(")
append("from=$from,")
append("step=$step,")
append("to=$to")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = from ?: 0
result = 31 * result + (step ?: 0)
result = 31 * result + (to ?: 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 Range
if (from != other.from) return false
if (step != other.step) return false
if (to != other.to) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.neptune.model.Range = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The minimum value in the range.
*/
public var from: kotlin.Int? = null
/**
* The step value for the range. For example, if you have a range of 5,000 to 10,000, with a step value of 1,000, the valid values start at 5,000 and step up by 1,000. Even though 7,500 is within the range, it isn't a valid value for the range. The valid values are 5,000, 6,000, 7,000, 8,000...
*/
public var step: kotlin.Int? = null
/**
* The maximum value in the range.
*/
public var to: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.neptune.model.Range) : this() {
this.from = x.from
this.step = x.step
this.to = x.to
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.neptune.model.Range = Range(this)
internal fun correctErrors(): Builder {
return this
}
}
}