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

commonMain.aws.sdk.kotlin.services.devicefarm.model.OfferingStatus.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.devicefarm.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The status of the offering.
 */
public class OfferingStatus private constructor(builder: Builder) {
    /**
     * The date on which the offering is effective.
     */
    public val effectiveOn: aws.smithy.kotlin.runtime.time.Instant? = builder.effectiveOn
    /**
     * Represents the metadata of an offering status.
     */
    public val offering: aws.sdk.kotlin.services.devicefarm.model.Offering? = builder.offering
    /**
     * The number of available devices in the offering.
     */
    public val quantity: kotlin.Int? = builder.quantity
    /**
     * The type specified for the offering status.
     */
    public val type: aws.sdk.kotlin.services.devicefarm.model.OfferingTransactionType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("OfferingStatus(")
        append("effectiveOn=$effectiveOn,")
        append("offering=$offering,")
        append("quantity=$quantity,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = effectiveOn?.hashCode() ?: 0
        result = 31 * result + (offering?.hashCode() ?: 0)
        result = 31 * result + (quantity ?: 0)
        result = 31 * result + (type?.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 OfferingStatus

        if (effectiveOn != other.effectiveOn) return false
        if (offering != other.offering) return false
        if (quantity != other.quantity) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date on which the offering is effective.
         */
        public var effectiveOn: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Represents the metadata of an offering status.
         */
        public var offering: aws.sdk.kotlin.services.devicefarm.model.Offering? = null
        /**
         * The number of available devices in the offering.
         */
        public var quantity: kotlin.Int? = null
        /**
         * The type specified for the offering status.
         */
        public var type: aws.sdk.kotlin.services.devicefarm.model.OfferingTransactionType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.OfferingStatus) : this() {
            this.effectiveOn = x.effectiveOn
            this.offering = x.offering
            this.quantity = x.quantity
            this.type = x.type
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.devicefarm.model.Offering] inside the given [block]
         */
        public fun offering(block: aws.sdk.kotlin.services.devicefarm.model.Offering.Builder.() -> kotlin.Unit) {
            this.offering = aws.sdk.kotlin.services.devicefarm.model.Offering.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy