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

commonMain.aws.sdk.kotlin.services.omics.model.VariantStoreItem.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.omics.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * A variant store.
 */
public class VariantStoreItem private constructor(builder: Builder) {
    /**
     * When the store was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
    /**
     * The store's description.
     */
    public val description: kotlin.String = requireNotNull(builder.description) { "A non-null value must be provided for description" }
    /**
     * The store's ID.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The store's name.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The store's genome reference.
     */
    public val reference: aws.sdk.kotlin.services.omics.model.ReferenceItem? = builder.reference
    /**
     * The store's server-side encryption (SSE) settings.
     */
    public val sseConfig: aws.sdk.kotlin.services.omics.model.SseConfig? = builder.sseConfig
    /**
     * The store's status.
     */
    public val status: aws.sdk.kotlin.services.omics.model.StoreStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The store's status message.
     */
    public val statusMessage: kotlin.String = requireNotNull(builder.statusMessage) { "A non-null value must be provided for statusMessage" }
    /**
     * The store's ARN.
     */
    public val storeArn: kotlin.String = requireNotNull(builder.storeArn) { "A non-null value must be provided for storeArn" }
    /**
     * The store's size in bytes.
     */
    public val storeSizeBytes: kotlin.Long = requireNotNull(builder.storeSizeBytes) { "A non-null value must be provided for storeSizeBytes" }
    /**
     * When the store was updated.
     */
    public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }

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

    override fun toString(): kotlin.String = buildString {
        append("VariantStoreItem(")
        append("creationTime=$creationTime,")
        append("description=$description,")
        append("id=$id,")
        append("name=$name,")
        append("reference=$reference,")
        append("sseConfig=$sseConfig,")
        append("status=$status,")
        append("statusMessage=$statusMessage,")
        append("storeArn=$storeArn,")
        append("storeSizeBytes=$storeSizeBytes,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime.hashCode()
        result = 31 * result + (description.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (reference?.hashCode() ?: 0)
        result = 31 * result + (sseConfig?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        result = 31 * result + (statusMessage.hashCode())
        result = 31 * result + (storeArn.hashCode())
        result = 31 * result + (storeSizeBytes.hashCode())
        result = 31 * result + (updateTime.hashCode())
        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 VariantStoreItem

        if (creationTime != other.creationTime) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (reference != other.reference) return false
        if (sseConfig != other.sseConfig) return false
        if (status != other.status) return false
        if (statusMessage != other.statusMessage) return false
        if (storeArn != other.storeArn) return false
        if (storeSizeBytes != other.storeSizeBytes) return false
        if (updateTime != other.updateTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * When the store was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The store's description.
         */
        public var description: kotlin.String? = null
        /**
         * The store's ID.
         */
        public var id: kotlin.String? = null
        /**
         * The store's name.
         */
        public var name: kotlin.String? = null
        /**
         * The store's genome reference.
         */
        public var reference: aws.sdk.kotlin.services.omics.model.ReferenceItem? = null
        /**
         * The store's server-side encryption (SSE) settings.
         */
        public var sseConfig: aws.sdk.kotlin.services.omics.model.SseConfig? = null
        /**
         * The store's status.
         */
        public var status: aws.sdk.kotlin.services.omics.model.StoreStatus? = null
        /**
         * The store's status message.
         */
        public var statusMessage: kotlin.String? = null
        /**
         * The store's ARN.
         */
        public var storeArn: kotlin.String? = null
        /**
         * The store's size in bytes.
         */
        public var storeSizeBytes: kotlin.Long? = null
        /**
         * When the store was updated.
         */
        public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.omics.model.VariantStoreItem) : this() {
            this.creationTime = x.creationTime
            this.description = x.description
            this.id = x.id
            this.name = x.name
            this.reference = x.reference
            this.sseConfig = x.sseConfig
            this.status = x.status
            this.statusMessage = x.statusMessage
            this.storeArn = x.storeArn
            this.storeSizeBytes = x.storeSizeBytes
            this.updateTime = x.updateTime
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.omics.model.SseConfig] inside the given [block]
         */
        public fun sseConfig(block: aws.sdk.kotlin.services.omics.model.SseConfig.Builder.() -> kotlin.Unit) {
            this.sseConfig = aws.sdk.kotlin.services.omics.model.SseConfig.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
            if (description == null) description = ""
            if (id == null) id = ""
            if (name == null) name = ""
            if (status == null) status = StoreStatus.SdkUnknown("no value provided")
            if (statusMessage == null) statusMessage = ""
            if (storeArn == null) storeArn = ""
            if (storeSizeBytes == null) storeSizeBytes = 0L
            if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy