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

commonMain.aws.sdk.kotlin.services.partnercentralselling.model.UpdateOpportunityResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.partnercentralselling.model

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

public class UpdateOpportunityResponse private constructor(builder: Builder) {
    /**
     * Read-only, system generated `Opportunity` unique identifier.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * `DateTime` when the opportunity was last modified.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedDate) { "A non-null value must be provided for lastModifiedDate" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateOpportunityResponse(")
        append("id=$id,")
        append("lastModifiedDate=$lastModifiedDate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = id.hashCode()
        result = 31 * result + (lastModifiedDate.hashCode())
        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 UpdateOpportunityResponse

        if (id != other.id) return false
        if (lastModifiedDate != other.lastModifiedDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Read-only, system generated `Opportunity` unique identifier.
         */
        public var id: kotlin.String? = null
        /**
         * `DateTime` when the opportunity was last modified.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.partnercentralselling.model.UpdateOpportunityResponse) : this() {
            this.id = x.id
            this.lastModifiedDate = x.lastModifiedDate
        }

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

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            if (lastModifiedDate == null) lastModifiedDate = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy