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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateOrderRequest private constructor(builder: Builder) {
    /**
     * The line items that make up the order.
     */
    public val lineItems: List? = builder.lineItems
    /**
     * The ID or the Amazon Resource Name (ARN) of the Outpost.
     */
    public val outpostIdentifier: kotlin.String? = builder.outpostIdentifier
    /**
     * The payment option.
     */
    public val paymentOption: aws.sdk.kotlin.services.outposts.model.PaymentOption? = builder.paymentOption
    /**
     * The payment terms.
     */
    public val paymentTerm: aws.sdk.kotlin.services.outposts.model.PaymentTerm? = builder.paymentTerm

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

    override fun toString(): kotlin.String = buildString {
        append("CreateOrderRequest(")
        append("lineItems=$lineItems,")
        append("outpostIdentifier=$outpostIdentifier,")
        append("paymentOption=$paymentOption,")
        append("paymentTerm=$paymentTerm")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lineItems?.hashCode() ?: 0
        result = 31 * result + (outpostIdentifier?.hashCode() ?: 0)
        result = 31 * result + (paymentOption?.hashCode() ?: 0)
        result = 31 * result + (paymentTerm?.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 CreateOrderRequest

        if (lineItems != other.lineItems) return false
        if (outpostIdentifier != other.outpostIdentifier) return false
        if (paymentOption != other.paymentOption) return false
        if (paymentTerm != other.paymentTerm) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The line items that make up the order.
         */
        public var lineItems: List? = null
        /**
         * The ID or the Amazon Resource Name (ARN) of the Outpost.
         */
        public var outpostIdentifier: kotlin.String? = null
        /**
         * The payment option.
         */
        public var paymentOption: aws.sdk.kotlin.services.outposts.model.PaymentOption? = null
        /**
         * The payment terms.
         */
        public var paymentTerm: aws.sdk.kotlin.services.outposts.model.PaymentTerm? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.outposts.model.CreateOrderRequest) : this() {
            this.lineItems = x.lineItems
            this.outpostIdentifier = x.outpostIdentifier
            this.paymentOption = x.paymentOption
            this.paymentTerm = x.paymentTerm
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy