All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.athena.model.UpdateCapacityReservationRequest.kt Maven / Gradle / Ivy

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 UpdateCapacityReservationRequest private constructor(builder: Builder) {
    /**
     * The name of the capacity reservation.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The new 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.UpdateCapacityReservationRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateCapacityReservationRequest(")
        append("name=$name,")
        append("targetDpus=$targetDpus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.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 UpdateCapacityReservationRequest

        if (name != other.name) return false
        if (targetDpus != other.targetDpus) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.UpdateCapacityReservationRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The name of the capacity reservation.
         */
        public var name: kotlin.String? = null
        /**
         * The new 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.UpdateCapacityReservationRequest) : this() {
            this.name = x.name
            this.targetDpus = x.targetDpus
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.athena.model.UpdateCapacityReservationRequest = UpdateCapacityReservationRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy