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

commonMain.aws.sdk.kotlin.services.medialive.model.RenewalSettings.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.medialive.model



/**
 * The Renewal settings for Reservations
 */
public class RenewalSettings private constructor(builder: Builder) {
    /**
     * Automatic renewal status for the reservation
     */
    public val automaticRenewal: aws.sdk.kotlin.services.medialive.model.ReservationAutomaticRenewal? = builder.automaticRenewal
    /**
     * Count for the reservation renewal
     */
    public val renewalCount: kotlin.Int = builder.renewalCount

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

    override fun toString(): kotlin.String = buildString {
        append("RenewalSettings(")
        append("automaticRenewal=$automaticRenewal,")
        append("renewalCount=$renewalCount")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = automaticRenewal?.hashCode() ?: 0
        result = 31 * result + (renewalCount)
        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 RenewalSettings

        if (automaticRenewal != other.automaticRenewal) return false
        if (renewalCount != other.renewalCount) return false

        return true
    }

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

    public class Builder {
        /**
         * Automatic renewal status for the reservation
         */
        public var automaticRenewal: aws.sdk.kotlin.services.medialive.model.ReservationAutomaticRenewal? = null
        /**
         * Count for the reservation renewal
         */
        public var renewalCount: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.medialive.model.RenewalSettings) : this() {
            this.automaticRenewal = x.automaticRenewal
            this.renewalCount = x.renewalCount
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.medialive.model.RenewalSettings = RenewalSettings(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy