
commonMain.aws.sdk.kotlin.services.appmesh.model.MatchRange.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appmesh.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that represents the range of values to match on. The first character of the range is included in the range, though the last character is not. For example, if the range specified were 1-100, only values 1-99 would be matched.
*/
public class MatchRange private constructor(builder: Builder) {
/**
* The end of the range.
*/
public val end: kotlin.Long = requireNotNull(builder.end) { "A non-null value must be provided for end" }
/**
* The start of the range.
*/
public val start: kotlin.Long = requireNotNull(builder.start) { "A non-null value must be provided for start" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.MatchRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MatchRange(")
append("end=$end,")
append("start=$start")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = end.hashCode()
result = 31 * result + (start.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 MatchRange
if (end != other.end) return false
if (start != other.start) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.MatchRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The end of the range.
*/
public var end: kotlin.Long? = null
/**
* The start of the range.
*/
public var start: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.MatchRange) : this() {
this.end = x.end
this.start = x.start
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.MatchRange = MatchRange(this)
internal fun correctErrors(): Builder {
if (end == null) end = 0L
if (start == null) start = 0L
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy