commonMain.aws.sdk.kotlin.services.athena.model.CreateCapacityReservationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.athena.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateCapacityReservationRequest private constructor(builder: Builder) {
/**
* The name of the capacity reservation to create.
*/
public val name: kotlin.String? = builder.name
/**
* The tags for the capacity reservation.
*/
public val tags: List? = builder.tags
/**
* The number of requested data processing units.
*/
public val targetDpus: kotlin.Int? = builder.targetDpus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.CreateCapacityReservationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateCapacityReservationRequest(")
append("name=$name,")
append("tags=$tags,")
append("targetDpus=$targetDpus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (targetDpus ?: 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 CreateCapacityReservationRequest
if (name != other.name) return false
if (tags != other.tags) return false
if (targetDpus != other.targetDpus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.CreateCapacityReservationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the capacity reservation to create.
*/
public var name: kotlin.String? = null
/**
* The tags for the capacity reservation.
*/
public var tags: List? = null
/**
* The number of requested data processing units.
*/
public var targetDpus: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.CreateCapacityReservationRequest) : this() {
this.name = x.name
this.tags = x.tags
this.targetDpus = x.targetDpus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.CreateCapacityReservationRequest = CreateCapacityReservationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}