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

commonMain.aws.sdk.kotlin.services.devicefarm.model.Offering.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

/**
 * Represents the metadata of a device offering.
 */
public class Offering private constructor(builder: Builder) {
    /**
     * A string that describes the offering.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The ID that corresponds to a device offering.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The platform of the device (for example, `ANDROID` or `IOS`).
     */
    public val platform: aws.sdk.kotlin.services.devicefarm.model.DevicePlatform? = builder.platform
    /**
     * Specifies whether there are recurring charges for the offering.
     */
    public val recurringCharges: List? = builder.recurringCharges
    /**
     * The type of offering (for example, `RECURRING`) for a device.
     */
    public val type: aws.sdk.kotlin.services.devicefarm.model.OfferingType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("Offering(")
        append("description=$description,")
        append("id=$id,")
        append("platform=$platform,")
        append("recurringCharges=$recurringCharges,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (platform?.hashCode() ?: 0)
        result = 31 * result + (recurringCharges?.hashCode() ?: 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 Offering

        if (description != other.description) return false
        if (id != other.id) return false
        if (platform != other.platform) return false
        if (recurringCharges != other.recurringCharges) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A string that describes the offering.
         */
        public var description: kotlin.String? = null
        /**
         * The ID that corresponds to a device offering.
         */
        public var id: kotlin.String? = null
        /**
         * The platform of the device (for example, `ANDROID` or `IOS`).
         */
        public var platform: aws.sdk.kotlin.services.devicefarm.model.DevicePlatform? = null
        /**
         * Specifies whether there are recurring charges for the offering.
         */
        public var recurringCharges: List? = null
        /**
         * The type of offering (for example, `RECURRING`) for a device.
         */
        public var type: aws.sdk.kotlin.services.devicefarm.model.OfferingType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.Offering) : this() {
            this.description = x.description
            this.id = x.id
            this.platform = x.platform
            this.recurringCharges = x.recurringCharges
            this.type = x.type
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy