commonMain.aws.sdk.kotlin.services.snowball.model.KeyRange.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snowball-jvm Show documentation
Show all versions of snowball-jvm Show documentation
The AWS SDK for Kotlin client for Snowball
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.snowball.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains a key range. For export jobs, a `S3Resource` object can have an optional `KeyRange` value. The length of the range is defined at job creation, and has either an inclusive `BeginMarker`, an inclusive `EndMarker`, or both. Ranges are UTF-8 binary sorted.
*/
public class KeyRange private constructor(builder: Builder) {
/**
* The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
*/
public val beginMarker: kotlin.String? = builder.beginMarker
/**
* The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
*/
public val endMarker: kotlin.String? = builder.endMarker
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.snowball.model.KeyRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("KeyRange(")
append("beginMarker=$beginMarker,")
append("endMarker=$endMarker")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginMarker?.hashCode() ?: 0
result = 31 * result + (endMarker?.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 KeyRange
if (beginMarker != other.beginMarker) return false
if (endMarker != other.endMarker) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.snowball.model.KeyRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
*/
public var beginMarker: kotlin.String? = null
/**
* The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
*/
public var endMarker: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.snowball.model.KeyRange) : this() {
this.beginMarker = x.beginMarker
this.endMarker = x.endMarker
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.snowball.model.KeyRange = KeyRange(this)
internal fun correctErrors(): Builder {
return this
}
}
}