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

commonMain.aws.sdk.kotlin.services.qbusiness.model.DataSource.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qbusiness.model

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

/**
 * A data source in an Amazon Q Business application.
 */
public class DataSource private constructor(builder: Builder) {
    /**
     * The Unix timestamp when the Amazon Q Business data source was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The identifier of the Amazon Q Business data source.
     */
    public val dataSourceId: kotlin.String? = builder.dataSourceId
    /**
     * The name of the Amazon Q Business data source.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The status of the Amazon Q Business data source.
     */
    public val status: aws.sdk.kotlin.services.qbusiness.model.DataSourceStatus? = builder.status
    /**
     * The type of the Amazon Q Business data source.
     */
    public val type: kotlin.String? = builder.type
    /**
     * The Unix timestamp when the Amazon Q Business data source was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("DataSource(")
        append("createdAt=$createdAt,")
        append("dataSourceId=$dataSourceId,")
        append("displayName=$displayName,")
        append("status=$status,")
        append("type=$type,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (dataSourceId?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (updatedAt?.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 DataSource

        if (createdAt != other.createdAt) return false
        if (dataSourceId != other.dataSourceId) return false
        if (displayName != other.displayName) return false
        if (status != other.status) return false
        if (type != other.type) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    public class Builder {
        /**
         * The Unix timestamp when the Amazon Q Business data source was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The identifier of the Amazon Q Business data source.
         */
        public var dataSourceId: kotlin.String? = null
        /**
         * The name of the Amazon Q Business data source.
         */
        public var displayName: kotlin.String? = null
        /**
         * The status of the Amazon Q Business data source.
         */
        public var status: aws.sdk.kotlin.services.qbusiness.model.DataSourceStatus? = null
        /**
         * The type of the Amazon Q Business data source.
         */
        public var type: kotlin.String? = null
        /**
         * The Unix timestamp when the Amazon Q Business data source was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.DataSource) : this() {
            this.createdAt = x.createdAt
            this.dataSourceId = x.dataSourceId
            this.displayName = x.displayName
            this.status = x.status
            this.type = x.type
            this.updatedAt = x.updatedAt
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy