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

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

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

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

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

public class CreateAnnotationStoreResponse 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 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. Required for all stores except TSV format with generic annotations.
     */
    public val reference: aws.sdk.kotlin.services.omics.model.ReferenceItem? = builder.reference
    /**
     * 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 annotation file format of the store.
     */
    public val storeFormat: aws.sdk.kotlin.services.omics.model.StoreFormat? = builder.storeFormat
    /**
     * The store's file parsing options.
     */
    public val storeOptions: aws.sdk.kotlin.services.omics.model.StoreOptions? = builder.storeOptions
    /**
     * The name given to an annotation store version to distinguish it from other versions.
     */
    public val versionName: kotlin.String = requireNotNull(builder.versionName) { "A non-null value must be provided for versionName" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateAnnotationStoreResponse(")
        append("creationTime=$creationTime,")
        append("id=$id,")
        append("name=$name,")
        append("reference=$reference,")
        append("status=$status,")
        append("storeFormat=$storeFormat,")
        append("storeOptions=$storeOptions,")
        append("versionName=$versionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime.hashCode()
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (reference?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        result = 31 * result + (storeFormat?.hashCode() ?: 0)
        result = 31 * result + (storeOptions?.hashCode() ?: 0)
        result = 31 * result + (versionName.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 CreateAnnotationStoreResponse

        if (creationTime != other.creationTime) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (reference != other.reference) return false
        if (status != other.status) return false
        if (storeFormat != other.storeFormat) return false
        if (storeOptions != other.storeOptions) return false
        if (versionName != other.versionName) return false

        return true
    }

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

    public class Builder {
        /**
         * When the store was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = 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. Required for all stores except TSV format with generic annotations.
         */
        public var reference: aws.sdk.kotlin.services.omics.model.ReferenceItem? = null
        /**
         * The store's status.
         */
        public var status: aws.sdk.kotlin.services.omics.model.StoreStatus? = null
        /**
         * The annotation file format of the store.
         */
        public var storeFormat: aws.sdk.kotlin.services.omics.model.StoreFormat? = null
        /**
         * The store's file parsing options.
         */
        public var storeOptions: aws.sdk.kotlin.services.omics.model.StoreOptions? = null
        /**
         * The name given to an annotation store version to distinguish it from other versions.
         */
        public var versionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.omics.model.CreateAnnotationStoreResponse) : this() {
            this.creationTime = x.creationTime
            this.id = x.id
            this.name = x.name
            this.reference = x.reference
            this.status = x.status
            this.storeFormat = x.storeFormat
            this.storeOptions = x.storeOptions
            this.versionName = x.versionName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy