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

commonMain.aws.sdk.kotlin.services.eventbridge.model.PutPartnerEventsResultEntry.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.eventbridge.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The result of an event entry the partner submitted in this request. If the event was successfully submitted, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.
 */
public class PutPartnerEventsResultEntry private constructor(builder: Builder) {
    /**
     * The error code that indicates why the event submission failed.
     */
    public val errorCode: kotlin.String? = builder.errorCode
    /**
     * The error message that explains why the event submission failed.
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The ID of the event.
     */
    public val eventId: kotlin.String? = builder.eventId

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

    override fun toString(): kotlin.String = buildString {
        append("PutPartnerEventsResultEntry(")
        append("errorCode=$errorCode,")
        append("errorMessage=$errorMessage,")
        append("eventId=$eventId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorCode?.hashCode() ?: 0
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (eventId?.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 PutPartnerEventsResultEntry

        if (errorCode != other.errorCode) return false
        if (errorMessage != other.errorMessage) return false
        if (eventId != other.eventId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The error code that indicates why the event submission failed.
         */
        public var errorCode: kotlin.String? = null
        /**
         * The error message that explains why the event submission failed.
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The ID of the event.
         */
        public var eventId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.PutPartnerEventsResultEntry) : this() {
            this.errorCode = x.errorCode
            this.errorMessage = x.errorMessage
            this.eventId = x.eventId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy