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

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

public class ModifyEventSubscriptionRequest private constructor(builder: Builder) {
    /**
     * A Boolean value; set to **true** to activate the subscription.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType by using the **DescribeEventCategories** action.
     */
    public val eventCategories: List? = builder.eventCategories
    /**
     * The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
     */
    public val snsTopicArn: kotlin.String? = builder.snsTopicArn
    /**
     * The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned.
     *
     * Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot
     */
    public val sourceType: kotlin.String? = builder.sourceType
    /**
     * The name of the event notification subscription.
     */
    public val subscriptionName: kotlin.String? = builder.subscriptionName

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

    override fun toString(): kotlin.String = buildString {
        append("ModifyEventSubscriptionRequest(")
        append("enabled=$enabled,")
        append("eventCategories=$eventCategories,")
        append("snsTopicArn=$snsTopicArn,")
        append("sourceType=$sourceType,")
        append("subscriptionName=$subscriptionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enabled?.hashCode() ?: 0
        result = 31 * result + (eventCategories?.hashCode() ?: 0)
        result = 31 * result + (snsTopicArn?.hashCode() ?: 0)
        result = 31 * result + (sourceType?.hashCode() ?: 0)
        result = 31 * result + (subscriptionName?.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 ModifyEventSubscriptionRequest

        if (enabled != other.enabled) return false
        if (eventCategories != other.eventCategories) return false
        if (snsTopicArn != other.snsTopicArn) return false
        if (sourceType != other.sourceType) return false
        if (subscriptionName != other.subscriptionName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A Boolean value; set to **true** to activate the subscription.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType by using the **DescribeEventCategories** action.
         */
        public var eventCategories: List? = null
        /**
         * The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
         */
        public var snsTopicArn: kotlin.String? = null
        /**
         * The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned.
         *
         * Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot
         */
        public var sourceType: kotlin.String? = null
        /**
         * The name of the event notification subscription.
         */
        public var subscriptionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.ModifyEventSubscriptionRequest) : this() {
            this.enabled = x.enabled
            this.eventCategories = x.eventCategories
            this.snsTopicArn = x.snsTopicArn
            this.sourceType = x.sourceType
            this.subscriptionName = x.subscriptionName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy