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

commonMain.aws.sdk.kotlin.services.sns.model.ConfirmSubscriptionRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.sns.model



/**
 * Input for ConfirmSubscription action.
 */
public class ConfirmSubscriptionRequest private constructor(builder: Builder) {
    /**
     * Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is `true` and the request has an Amazon Web Services signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires Amazon Web Services authentication.
     */
    public val authenticateOnUnsubscribe: kotlin.String? = builder.authenticateOnUnsubscribe
    /**
     * Short-lived token sent to an endpoint during the `Subscribe` action.
     */
    public val token: kotlin.String? = builder.token
    /**
     * The ARN of the topic for which you wish to confirm a subscription.
     */
    public val topicArn: kotlin.String? = builder.topicArn

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

    override fun toString(): kotlin.String = buildString {
        append("ConfirmSubscriptionRequest(")
        append("authenticateOnUnsubscribe=$authenticateOnUnsubscribe,")
        append("token=$token,")
        append("topicArn=$topicArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authenticateOnUnsubscribe?.hashCode() ?: 0
        result = 31 * result + (token?.hashCode() ?: 0)
        result = 31 * result + (topicArn?.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 ConfirmSubscriptionRequest

        if (authenticateOnUnsubscribe != other.authenticateOnUnsubscribe) return false
        if (token != other.token) return false
        if (topicArn != other.topicArn) return false

        return true
    }

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

    public class Builder {
        /**
         * Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is `true` and the request has an Amazon Web Services signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires Amazon Web Services authentication.
         */
        public var authenticateOnUnsubscribe: kotlin.String? = null
        /**
         * Short-lived token sent to an endpoint during the `Subscribe` action.
         */
        public var token: kotlin.String? = null
        /**
         * The ARN of the topic for which you wish to confirm a subscription.
         */
        public var topicArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sns.model.ConfirmSubscriptionRequest) : this() {
            this.authenticateOnUnsubscribe = x.authenticateOnUnsubscribe
            this.token = x.token
            this.topicArn = x.topicArn
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy