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

commonMain.aws.sdk.kotlin.services.cognitosync.model.UnsubscribeFromDatasetRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cognitosync.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A request to UnsubscribeFromDataset.
 */
public class UnsubscribeFromDatasetRequest private constructor(builder: Builder) {
    /**
     * The name of the dataset from which to unsubcribe.
     */
    public val datasetName: kotlin.String? = builder.datasetName
    /**
     * The unique ID generated for this device by Cognito.
     */
    public val deviceId: kotlin.String? = builder.deviceId
    /**
     * Unique ID for this identity.
     */
    public val identityId: kotlin.String? = builder.identityId
    /**
     * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which this identity belongs.
     */
    public val identityPoolId: kotlin.String? = builder.identityPoolId

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

    override fun toString(): kotlin.String = buildString {
        append("UnsubscribeFromDatasetRequest(")
        append("datasetName=$datasetName,")
        append("deviceId=$deviceId,")
        append("identityId=$identityId,")
        append("identityPoolId=$identityPoolId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = datasetName?.hashCode() ?: 0
        result = 31 * result + (deviceId?.hashCode() ?: 0)
        result = 31 * result + (identityId?.hashCode() ?: 0)
        result = 31 * result + (identityPoolId?.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 UnsubscribeFromDatasetRequest

        if (datasetName != other.datasetName) return false
        if (deviceId != other.deviceId) return false
        if (identityId != other.identityId) return false
        if (identityPoolId != other.identityPoolId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the dataset from which to unsubcribe.
         */
        public var datasetName: kotlin.String? = null
        /**
         * The unique ID generated for this device by Cognito.
         */
        public var deviceId: kotlin.String? = null
        /**
         * Unique ID for this identity.
         */
        public var identityId: kotlin.String? = null
        /**
         * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which this identity belongs.
         */
        public var identityPoolId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cognitosync.model.UnsubscribeFromDatasetRequest) : this() {
            this.datasetName = x.datasetName
            this.deviceId = x.deviceId
            this.identityId = x.identityId
            this.identityPoolId = x.identityPoolId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy