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

commonMain.aws.sdk.kotlin.services.eventbridge.model.PutPartnerEventsRequestEntry.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details about an event generated by an SaaS partner.
 */
public class PutPartnerEventsRequestEntry private constructor(builder: Builder) {
    /**
     * A valid JSON string. There is no other schema imposed. The JSON string may contain fields and nested sub-objects.
     *
     * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
     */
    public val detail: kotlin.String? = builder.detail
    /**
     * A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.
     *
     * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
     */
    public val detailType: kotlin.String? = builder.detailType
    /**
     * Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.
     */
    public val resources: List? = builder.resources
    /**
     * The event source that is generating the entry.
     *
     * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
     */
    public val source: kotlin.String? = builder.source
    /**
     * The date and time of the event.
     */
    public val time: aws.smithy.kotlin.runtime.time.Instant? = builder.time

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

    override fun toString(): kotlin.String = buildString {
        append("PutPartnerEventsRequestEntry(")
        append("detail=$detail,")
        append("detailType=$detailType,")
        append("resources=$resources,")
        append("source=$source,")
        append("time=$time")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = detail?.hashCode() ?: 0
        result = 31 * result + (detailType?.hashCode() ?: 0)
        result = 31 * result + (resources?.hashCode() ?: 0)
        result = 31 * result + (source?.hashCode() ?: 0)
        result = 31 * result + (time?.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 PutPartnerEventsRequestEntry

        if (detail != other.detail) return false
        if (detailType != other.detailType) return false
        if (resources != other.resources) return false
        if (source != other.source) return false
        if (time != other.time) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A valid JSON string. There is no other schema imposed. The JSON string may contain fields and nested sub-objects.
         *
         * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
         */
        public var detail: kotlin.String? = null
        /**
         * A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.
         *
         * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
         */
        public var detailType: kotlin.String? = null
        /**
         * Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.
         */
        public var resources: List? = null
        /**
         * The event source that is generating the entry.
         *
         * `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire request.
         */
        public var source: kotlin.String? = null
        /**
         * The date and time of the event.
         */
        public var time: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.PutPartnerEventsRequestEntry) : this() {
            this.detail = x.detail
            this.detailType = x.detailType
            this.resources = x.resources
            this.source = x.source
            this.time = x.time
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy