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

commonMain.aws.sdk.kotlin.services.neptune.model.EventSubscription.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.neptune.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the results of a successful invocation of the DescribeEventSubscriptions action.
 */
public class EventSubscription private constructor(builder: Builder) {
    /**
     * The event notification subscription Id.
     */
    public val custSubscriptionId: kotlin.String? = builder.custSubscriptionId
    /**
     * The Amazon customer account associated with the event notification subscription.
     */
    public val customerAwsId: kotlin.String? = builder.customerAwsId
    /**
     * A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * A list of event categories for the event notification subscription.
     */
    public val eventCategoriesList: List? = builder.eventCategoriesList
    /**
     * The Amazon Resource Name (ARN) for the event subscription.
     */
    public val eventSubscriptionArn: kotlin.String? = builder.eventSubscriptionArn
    /**
     * The topic ARN of the event notification subscription.
     */
    public val snsTopicArn: kotlin.String? = builder.snsTopicArn
    /**
     * A list of source IDs for the event notification subscription.
     */
    public val sourceIdsList: List? = builder.sourceIdsList
    /**
     * The source type for the event notification subscription.
     */
    public val sourceType: kotlin.String? = builder.sourceType
    /**
     * The status of the event notification subscription.
     *
     * Constraints:
     *
     * Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
     *
     * The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
     */
    public val status: kotlin.String? = builder.status
    /**
     * The time the event notification subscription was created.
     */
    public val subscriptionCreationTime: kotlin.String? = builder.subscriptionCreationTime

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

    override fun toString(): kotlin.String = buildString {
        append("EventSubscription(")
        append("custSubscriptionId=$custSubscriptionId,")
        append("customerAwsId=$customerAwsId,")
        append("enabled=$enabled,")
        append("eventCategoriesList=$eventCategoriesList,")
        append("eventSubscriptionArn=$eventSubscriptionArn,")
        append("snsTopicArn=$snsTopicArn,")
        append("sourceIdsList=$sourceIdsList,")
        append("sourceType=$sourceType,")
        append("status=$status,")
        append("subscriptionCreationTime=$subscriptionCreationTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = custSubscriptionId?.hashCode() ?: 0
        result = 31 * result + (customerAwsId?.hashCode() ?: 0)
        result = 31 * result + (enabled?.hashCode() ?: 0)
        result = 31 * result + (eventCategoriesList?.hashCode() ?: 0)
        result = 31 * result + (eventSubscriptionArn?.hashCode() ?: 0)
        result = 31 * result + (snsTopicArn?.hashCode() ?: 0)
        result = 31 * result + (sourceIdsList?.hashCode() ?: 0)
        result = 31 * result + (sourceType?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (subscriptionCreationTime?.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 EventSubscription

        if (custSubscriptionId != other.custSubscriptionId) return false
        if (customerAwsId != other.customerAwsId) return false
        if (enabled != other.enabled) return false
        if (eventCategoriesList != other.eventCategoriesList) return false
        if (eventSubscriptionArn != other.eventSubscriptionArn) return false
        if (snsTopicArn != other.snsTopicArn) return false
        if (sourceIdsList != other.sourceIdsList) return false
        if (sourceType != other.sourceType) return false
        if (status != other.status) return false
        if (subscriptionCreationTime != other.subscriptionCreationTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The event notification subscription Id.
         */
        public var custSubscriptionId: kotlin.String? = null
        /**
         * The Amazon customer account associated with the event notification subscription.
         */
        public var customerAwsId: kotlin.String? = null
        /**
         * A Boolean value indicating if the subscription is enabled. True indicates the subscription is enabled.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * A list of event categories for the event notification subscription.
         */
        public var eventCategoriesList: List? = null
        /**
         * The Amazon Resource Name (ARN) for the event subscription.
         */
        public var eventSubscriptionArn: kotlin.String? = null
        /**
         * The topic ARN of the event notification subscription.
         */
        public var snsTopicArn: kotlin.String? = null
        /**
         * A list of source IDs for the event notification subscription.
         */
        public var sourceIdsList: List? = null
        /**
         * The source type for the event notification subscription.
         */
        public var sourceType: kotlin.String? = null
        /**
         * The status of the event notification subscription.
         *
         * Constraints:
         *
         * Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
         *
         * The status "no-permission" indicates that Neptune no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.
         */
        public var status: kotlin.String? = null
        /**
         * The time the event notification subscription was created.
         */
        public var subscriptionCreationTime: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.EventSubscription) : this() {
            this.custSubscriptionId = x.custSubscriptionId
            this.customerAwsId = x.customerAwsId
            this.enabled = x.enabled
            this.eventCategoriesList = x.eventCategoriesList
            this.eventSubscriptionArn = x.eventSubscriptionArn
            this.snsTopicArn = x.snsTopicArn
            this.sourceIdsList = x.sourceIdsList
            this.sourceType = x.sourceType
            this.status = x.status
            this.subscriptionCreationTime = x.subscriptionCreationTime
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy