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

commonMain.aws.sdk.kotlin.services.glacier.model.VaultNotificationConfig.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glacier.model



/**
 * Represents a vault's notification configuration.
 */
public class VaultNotificationConfig private constructor(builder: Builder) {
    /**
     * A list of one or more events for which Amazon S3 Glacier will send a notification to the specified Amazon SNS topic.
     */
    public val events: List? = builder.events
    /**
     * The Amazon Simple Notification Service (Amazon SNS) topic Amazon Resource Name (ARN).
     */
    public val snsTopic: kotlin.String? = builder.snsTopic

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

    override fun toString(): kotlin.String = buildString {
        append("VaultNotificationConfig(")
        append("events=$events,")
        append("snsTopic=$snsTopic")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = events?.hashCode() ?: 0
        result = 31 * result + (snsTopic?.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 VaultNotificationConfig

        if (events != other.events) return false
        if (snsTopic != other.snsTopic) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of one or more events for which Amazon S3 Glacier will send a notification to the specified Amazon SNS topic.
         */
        public var events: List? = null
        /**
         * The Amazon Simple Notification Service (Amazon SNS) topic Amazon Resource Name (ARN).
         */
        public var snsTopic: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glacier.model.VaultNotificationConfig) : this() {
            this.events = x.events
            this.snsTopic = x.snsTopic
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy