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

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

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

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



/**
 * A source for an import read set job.
 */
public class ImportReadSetSourceItem private constructor(builder: Builder) {
    /**
     * The source's description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Where the source originated.
     */
    public val generatedFrom: kotlin.String? = builder.generatedFrom
    /**
     * The source's name.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The source's genome reference ARN.
     */
    public val referenceArn: kotlin.String? = builder.referenceArn
    /**
     * The source's sample ID.
     */
    public val sampleId: kotlin.String = requireNotNull(builder.sampleId) { "A non-null value must be provided for sampleId" }
    /**
     * The source's file type.
     */
    public val sourceFileType: aws.sdk.kotlin.services.omics.model.FileType = requireNotNull(builder.sourceFileType) { "A non-null value must be provided for sourceFileType" }
    /**
     * The source files' location in Amazon S3.
     */
    public val sourceFiles: aws.sdk.kotlin.services.omics.model.SourceFiles? = builder.sourceFiles
    /**
     * The source's status.
     */
    public val status: aws.sdk.kotlin.services.omics.model.ReadSetImportJobItemStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The source's status message.
     */
    public val statusMessage: kotlin.String? = builder.statusMessage
    /**
     * The source's subject ID.
     */
    public val subjectId: kotlin.String = requireNotNull(builder.subjectId) { "A non-null value must be provided for subjectId" }
    /**
     * The source's tags.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("ImportReadSetSourceItem(")
        append("description=$description,")
        append("generatedFrom=$generatedFrom,")
        append("name=$name,")
        append("referenceArn=$referenceArn,")
        append("sampleId=$sampleId,")
        append("sourceFileType=$sourceFileType,")
        append("sourceFiles=$sourceFiles,")
        append("status=$status,")
        append("statusMessage=$statusMessage,")
        append("subjectId=$subjectId,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (generatedFrom?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (referenceArn?.hashCode() ?: 0)
        result = 31 * result + (sampleId.hashCode())
        result = 31 * result + (sourceFileType.hashCode())
        result = 31 * result + (sourceFiles?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        result = 31 * result + (statusMessage?.hashCode() ?: 0)
        result = 31 * result + (subjectId.hashCode())
        result = 31 * result + (tags?.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 ImportReadSetSourceItem

        if (description != other.description) return false
        if (generatedFrom != other.generatedFrom) return false
        if (name != other.name) return false
        if (referenceArn != other.referenceArn) return false
        if (sampleId != other.sampleId) return false
        if (sourceFileType != other.sourceFileType) return false
        if (sourceFiles != other.sourceFiles) return false
        if (status != other.status) return false
        if (statusMessage != other.statusMessage) return false
        if (subjectId != other.subjectId) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * The source's description.
         */
        public var description: kotlin.String? = null
        /**
         * Where the source originated.
         */
        public var generatedFrom: kotlin.String? = null
        /**
         * The source's name.
         */
        public var name: kotlin.String? = null
        /**
         * The source's genome reference ARN.
         */
        public var referenceArn: kotlin.String? = null
        /**
         * The source's sample ID.
         */
        public var sampleId: kotlin.String? = null
        /**
         * The source's file type.
         */
        public var sourceFileType: aws.sdk.kotlin.services.omics.model.FileType? = null
        /**
         * The source files' location in Amazon S3.
         */
        public var sourceFiles: aws.sdk.kotlin.services.omics.model.SourceFiles? = null
        /**
         * The source's status.
         */
        public var status: aws.sdk.kotlin.services.omics.model.ReadSetImportJobItemStatus? = null
        /**
         * The source's status message.
         */
        public var statusMessage: kotlin.String? = null
        /**
         * The source's subject ID.
         */
        public var subjectId: kotlin.String? = null
        /**
         * The source's tags.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.omics.model.ImportReadSetSourceItem) : this() {
            this.description = x.description
            this.generatedFrom = x.generatedFrom
            this.name = x.name
            this.referenceArn = x.referenceArn
            this.sampleId = x.sampleId
            this.sourceFileType = x.sourceFileType
            this.sourceFiles = x.sourceFiles
            this.status = x.status
            this.statusMessage = x.statusMessage
            this.subjectId = x.subjectId
            this.tags = x.tags
        }

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

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

        internal fun correctErrors(): Builder {
            if (sampleId == null) sampleId = ""
            if (sourceFileType == null) sourceFileType = FileType.SdkUnknown("no value provided")
            if (status == null) status = ReadSetImportJobItemStatus.SdkUnknown("no value provided")
            if (subjectId == null) subjectId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy