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

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

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

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



/**
 * A source for a read set import job.
 */
public class StartReadSetImportJobSourceItem 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 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 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.StartReadSetImportJobSourceItem = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("StartReadSetImportJobSourceItem(")
        append("description=$description,")
        append("generatedFrom=$generatedFrom,")
        append("name=$name,")
        append("referenceArn=$referenceArn,")
        append("sampleId=$sampleId,")
        append("sourceFileType=$sourceFileType,")
        append("sourceFiles=$sourceFiles,")
        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 + (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 StartReadSetImportJobSourceItem

        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 (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.StartReadSetImportJobSourceItem = 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 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 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.StartReadSetImportJobSourceItem) : 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.subjectId = x.subjectId
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.omics.model.StartReadSetImportJobSourceItem = StartReadSetImportJobSourceItem(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 (subjectId == null) subjectId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy