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

commonMain.aws.sdk.kotlin.services.wisdom.model.ContentSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wisdom.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Summary information about the content.
 */
public class ContentSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the content.
     */
    public val contentArn: kotlin.String = requireNotNull(builder.contentArn) { "A non-null value must be provided for contentArn" }
    /**
     * The identifier of the content.
     */
    public val contentId: kotlin.String = requireNotNull(builder.contentId) { "A non-null value must be provided for contentId" }
    /**
     * The media type of the content.
     */
    public val contentType: kotlin.String = requireNotNull(builder.contentType) { "A non-null value must be provided for contentType" }
    /**
     * The Amazon Resource Name (ARN) of the knowledge base.
     */
    public val knowledgeBaseArn: kotlin.String = requireNotNull(builder.knowledgeBaseArn) { "A non-null value must be provided for knowledgeBaseArn" }
    /**
     * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.
     */
    public val knowledgeBaseId: kotlin.String = requireNotNull(builder.knowledgeBaseId) { "A non-null value must be provided for knowledgeBaseId" }
    /**
     * A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.
     */
    public val metadata: Map = requireNotNull(builder.metadata) { "A non-null value must be provided for metadata" }
    /**
     * The name of the content.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The identifier of the revision of the content.
     */
    public val revisionId: kotlin.String = requireNotNull(builder.revisionId) { "A non-null value must be provided for revisionId" }
    /**
     * The status of the content.
     */
    public val status: aws.sdk.kotlin.services.wisdom.model.ContentStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The tags used to organize, track, or control access for this resource.
     */
    public val tags: Map? = builder.tags
    /**
     * The title of the content.
     */
    public val title: kotlin.String = requireNotNull(builder.title) { "A non-null value must be provided for title" }

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

    override fun toString(): kotlin.String = buildString {
        append("ContentSummary(")
        append("contentArn=$contentArn,")
        append("contentId=$contentId,")
        append("contentType=$contentType,")
        append("knowledgeBaseArn=$knowledgeBaseArn,")
        append("knowledgeBaseId=$knowledgeBaseId,")
        append("metadata=$metadata,")
        append("name=$name,")
        append("revisionId=$revisionId,")
        append("status=$status,")
        append("tags=$tags,")
        append("title=$title")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contentArn.hashCode()
        result = 31 * result + (contentId.hashCode())
        result = 31 * result + (contentType.hashCode())
        result = 31 * result + (knowledgeBaseArn.hashCode())
        result = 31 * result + (knowledgeBaseId.hashCode())
        result = 31 * result + (metadata.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (revisionId.hashCode())
        result = 31 * result + (status.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (title.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 ContentSummary

        if (contentArn != other.contentArn) return false
        if (contentId != other.contentId) return false
        if (contentType != other.contentType) return false
        if (knowledgeBaseArn != other.knowledgeBaseArn) return false
        if (knowledgeBaseId != other.knowledgeBaseId) return false
        if (metadata != other.metadata) return false
        if (name != other.name) return false
        if (revisionId != other.revisionId) return false
        if (status != other.status) return false
        if (tags != other.tags) return false
        if (title != other.title) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the content.
         */
        public var contentArn: kotlin.String? = null
        /**
         * The identifier of the content.
         */
        public var contentId: kotlin.String? = null
        /**
         * The media type of the content.
         */
        public var contentType: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the knowledge base.
         */
        public var knowledgeBaseArn: kotlin.String? = null
        /**
         * The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.
         */
        public var knowledgeBaseId: kotlin.String? = null
        /**
         * A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.
         */
        public var metadata: Map? = null
        /**
         * The name of the content.
         */
        public var name: kotlin.String? = null
        /**
         * The identifier of the revision of the content.
         */
        public var revisionId: kotlin.String? = null
        /**
         * The status of the content.
         */
        public var status: aws.sdk.kotlin.services.wisdom.model.ContentStatus? = null
        /**
         * The tags used to organize, track, or control access for this resource.
         */
        public var tags: Map? = null
        /**
         * The title of the content.
         */
        public var title: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wisdom.model.ContentSummary) : this() {
            this.contentArn = x.contentArn
            this.contentId = x.contentId
            this.contentType = x.contentType
            this.knowledgeBaseArn = x.knowledgeBaseArn
            this.knowledgeBaseId = x.knowledgeBaseId
            this.metadata = x.metadata
            this.name = x.name
            this.revisionId = x.revisionId
            this.status = x.status
            this.tags = x.tags
            this.title = x.title
        }

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

        internal fun correctErrors(): Builder {
            if (contentArn == null) contentArn = ""
            if (contentId == null) contentId = ""
            if (contentType == null) contentType = ""
            if (knowledgeBaseArn == null) knowledgeBaseArn = ""
            if (knowledgeBaseId == null) knowledgeBaseId = ""
            if (metadata == null) metadata = emptyMap()
            if (name == null) name = ""
            if (revisionId == null) revisionId = ""
            if (status == null) status = ContentStatus.SdkUnknown("no value provided")
            if (title == null) title = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy