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

commonMain.aws.sdk.kotlin.services.outposts.model.LineItem.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.outposts.model



/**
 * Information about a line item.
 */
class LineItem private constructor(builder: Builder) {
    /**
     * The ID of the catalog item.
     */
    val catalogItemId: kotlin.String? = builder.catalogItemId
    /**
     * The ID of the line item.
     */
    val lineItemId: kotlin.String? = builder.lineItemId
    /**
     * The quantity of the line item.
     */
    val quantity: kotlin.Int = builder.quantity
    /**
     * The status of the line item.
     */
    val status: aws.sdk.kotlin.services.outposts.model.LineItemStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("LineItem(")
        append("catalogItemId=$catalogItemId,")
        append("lineItemId=$lineItemId,")
        append("quantity=$quantity,")
        append("status=$status)")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogItemId?.hashCode() ?: 0
        result = 31 * result + (lineItemId?.hashCode() ?: 0)
        result = 31 * result + (quantity)
        result = 31 * result + (status?.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 LineItem

        if (catalogItemId != other.catalogItemId) return false
        if (lineItemId != other.lineItemId) return false
        if (quantity != other.quantity) return false
        if (status != other.status) return false

        return true
    }

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

    class Builder {
        /**
         * The ID of the catalog item.
         */
        var catalogItemId: kotlin.String? = null
        /**
         * The ID of the line item.
         */
        var lineItemId: kotlin.String? = null
        /**
         * The quantity of the line item.
         */
        var quantity: kotlin.Int = 0
        /**
         * The status of the line item.
         */
        var status: aws.sdk.kotlin.services.outposts.model.LineItemStatus? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.outposts.model.LineItem) : this() {
            this.catalogItemId = x.catalogItemId
            this.lineItemId = x.lineItemId
            this.quantity = x.quantity
            this.status = x.status
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy