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

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

There is a newer version: 1.4.1
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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Usage information for the identity.
 */
public class IdentityUsage private constructor(builder: Builder) {
    /**
     * Total data storage for this identity.
     */
    public val dataStorage: kotlin.Long? = builder.dataStorage
    /**
     * Number of datasets for the identity.
     */
    public val datasetCount: kotlin.Int = builder.datasetCount
    /**
     * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
     */
    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. GUID generation is unique within a region.
     */
    public val identityPoolId: kotlin.String? = builder.identityPoolId
    /**
     * Date on which the identity was last modified.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate

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

    override fun toString(): kotlin.String = buildString {
        append("IdentityUsage(")
        append("dataStorage=$dataStorage,")
        append("datasetCount=$datasetCount,")
        append("identityId=$identityId,")
        append("identityPoolId=$identityPoolId,")
        append("lastModifiedDate=$lastModifiedDate")
        append(")")
    }

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

        if (dataStorage != other.dataStorage) return false
        if (datasetCount != other.datasetCount) return false
        if (identityId != other.identityId) return false
        if (identityPoolId != other.identityPoolId) return false
        if (lastModifiedDate != other.lastModifiedDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Total data storage for this identity.
         */
        public var dataStorage: kotlin.Long? = null
        /**
         * Number of datasets for the identity.
         */
        public var datasetCount: kotlin.Int = 0
        /**
         * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
         */
        public var identityId: kotlin.String? = null
        /**
         * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
         */
        public var identityPoolId: kotlin.String? = null
        /**
         * Date on which the identity was last modified.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cognitosync.model.IdentityUsage) : this() {
            this.dataStorage = x.dataStorage
            this.datasetCount = x.datasetCount
            this.identityId = x.identityId
            this.identityPoolId = x.identityPoolId
            this.lastModifiedDate = x.lastModifiedDate
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy