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

commonMain.aws.sdk.kotlin.services.snowball.model.CreateLongTermPricingRequest.kt Maven / Gradle / Ivy

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

public class CreateLongTermPricingRequest private constructor(builder: Builder) {
    /**
     * Specifies whether the current long-term pricing type for the device should be renewed.
     */
    public val isLongTermPricingAutoRenew: kotlin.Boolean? = builder.isLongTermPricingAutoRenew
    /**
     * The type of long-term pricing option you want for the device, either 1-year or 3-year long-term pricing.
     */
    public val longTermPricingType: aws.sdk.kotlin.services.snowball.model.LongTermPricingType? = builder.longTermPricingType
    /**
     * The type of Snow Family devices to use for the long-term pricing job.
     */
    public val snowballType: aws.sdk.kotlin.services.snowball.model.SnowballType? = builder.snowballType

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.snowball.model.CreateLongTermPricingRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateLongTermPricingRequest(")
        append("isLongTermPricingAutoRenew=$isLongTermPricingAutoRenew,")
        append("longTermPricingType=$longTermPricingType,")
        append("snowballType=$snowballType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = isLongTermPricingAutoRenew?.hashCode() ?: 0
        result = 31 * result + (longTermPricingType?.hashCode() ?: 0)
        result = 31 * result + (snowballType?.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 CreateLongTermPricingRequest

        if (isLongTermPricingAutoRenew != other.isLongTermPricingAutoRenew) return false
        if (longTermPricingType != other.longTermPricingType) return false
        if (snowballType != other.snowballType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies whether the current long-term pricing type for the device should be renewed.
         */
        public var isLongTermPricingAutoRenew: kotlin.Boolean? = null
        /**
         * The type of long-term pricing option you want for the device, either 1-year or 3-year long-term pricing.
         */
        public var longTermPricingType: aws.sdk.kotlin.services.snowball.model.LongTermPricingType? = null
        /**
         * The type of Snow Family devices to use for the long-term pricing job.
         */
        public var snowballType: aws.sdk.kotlin.services.snowball.model.SnowballType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.snowball.model.CreateLongTermPricingRequest) : this() {
            this.isLongTermPricingAutoRenew = x.isLongTermPricingAutoRenew
            this.longTermPricingType = x.longTermPricingType
            this.snowballType = x.snowballType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy