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

commonMain.aws.sdk.kotlin.services.wisdom.model.QuickResponseSearchResultData.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The result of quick response search.
 */
public class QuickResponseSearchResultData private constructor(builder: Builder) {
    /**
     * The user defined contact attributes that are resolved when the search result is returned.
     */
    public val attributesInterpolated: List? = builder.attributesInterpolated
    /**
     * The user defined contact attributes that are not resolved when the search result is returned.
     */
    public val attributesNotInterpolated: List? = builder.attributesNotInterpolated
    /**
     * The Amazon Connect contact channels this quick response applies to. The supported contact channel types include `Chat`.
     */
    public val channels: List? = builder.channels
    /**
     * The media type of the quick response content.
     * + Use `application/x.quickresponse;format=plain` for quick response written in plain text.
     * + Use `application/x.quickresponse;format=markdown` for quick response written in richtext.
     */
    public val contentType: kotlin.String = requireNotNull(builder.contentType) { "A non-null value must be provided for contentType" }
    /**
     * The contents of the quick response.
     */
    public val contents: aws.sdk.kotlin.services.wisdom.model.QuickResponseContents? = builder.contents
    /**
     * The timestamp when the quick response was created.
     */
    public val createdTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTime) { "A non-null value must be provided for createdTime" }
    /**
     * The description of the quick response.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The configuration information of the user groups that the quick response is accessible to.
     */
    public val groupingConfiguration: aws.sdk.kotlin.services.wisdom.model.GroupingConfiguration? = builder.groupingConfiguration
    /**
     * Whether the quick response is active.
     */
    public val isActive: kotlin.Boolean = requireNotNull(builder.isActive) { "A non-null value must be provided for isActive" }
    /**
     * 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. Can be either the ID or the ARN. URLs cannot contain the ARN.
     */
    public val knowledgeBaseId: kotlin.String = requireNotNull(builder.knowledgeBaseId) { "A non-null value must be provided for knowledgeBaseId" }
    /**
     * The language code value for the language in which the quick response is written.
     */
    public val language: kotlin.String? = builder.language
    /**
     * The Amazon Resource Name (ARN) of the user who last updated the quick response search result data.
     */
    public val lastModifiedBy: kotlin.String? = builder.lastModifiedBy
    /**
     * The timestamp when the quick response search result data was last modified.
     */
    public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedTime) { "A non-null value must be provided for lastModifiedTime" }
    /**
     * The name of the quick response.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The Amazon Resource Name (ARN) of the quick response.
     */
    public val quickResponseArn: kotlin.String = requireNotNull(builder.quickResponseArn) { "A non-null value must be provided for quickResponseArn" }
    /**
     * The identifier of the quick response.
     */
    public val quickResponseId: kotlin.String = requireNotNull(builder.quickResponseId) { "A non-null value must be provided for quickResponseId" }
    /**
     * The shortcut key of the quick response. The value should be unique across the knowledge base.
     */
    public val shortcutKey: kotlin.String? = builder.shortcutKey
    /**
     * The resource status of the quick response.
     */
    public val status: aws.sdk.kotlin.services.wisdom.model.QuickResponseStatus = 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

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

    override fun toString(): kotlin.String = buildString {
        append("QuickResponseSearchResultData(")
        append("attributesInterpolated=*** Sensitive Data Redacted ***,")
        append("attributesNotInterpolated=*** Sensitive Data Redacted ***,")
        append("channels=*** Sensitive Data Redacted ***,")
        append("contentType=$contentType,")
        append("contents=$contents,")
        append("createdTime=$createdTime,")
        append("description=$description,")
        append("groupingConfiguration=$groupingConfiguration,")
        append("isActive=$isActive,")
        append("knowledgeBaseArn=$knowledgeBaseArn,")
        append("knowledgeBaseId=$knowledgeBaseId,")
        append("language=$language,")
        append("lastModifiedBy=$lastModifiedBy,")
        append("lastModifiedTime=$lastModifiedTime,")
        append("name=$name,")
        append("quickResponseArn=$quickResponseArn,")
        append("quickResponseId=$quickResponseId,")
        append("shortcutKey=$shortcutKey,")
        append("status=$status,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attributesInterpolated?.hashCode() ?: 0
        result = 31 * result + (attributesNotInterpolated?.hashCode() ?: 0)
        result = 31 * result + (channels?.hashCode() ?: 0)
        result = 31 * result + (contentType.hashCode())
        result = 31 * result + (contents?.hashCode() ?: 0)
        result = 31 * result + (createdTime.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (groupingConfiguration?.hashCode() ?: 0)
        result = 31 * result + (isActive.hashCode())
        result = 31 * result + (knowledgeBaseArn.hashCode())
        result = 31 * result + (knowledgeBaseId.hashCode())
        result = 31 * result + (language?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedBy?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedTime.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (quickResponseArn.hashCode())
        result = 31 * result + (quickResponseId.hashCode())
        result = 31 * result + (shortcutKey?.hashCode() ?: 0)
        result = 31 * result + (status.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 QuickResponseSearchResultData

        if (attributesInterpolated != other.attributesInterpolated) return false
        if (attributesNotInterpolated != other.attributesNotInterpolated) return false
        if (channels != other.channels) return false
        if (contentType != other.contentType) return false
        if (contents != other.contents) return false
        if (createdTime != other.createdTime) return false
        if (description != other.description) return false
        if (groupingConfiguration != other.groupingConfiguration) return false
        if (isActive != other.isActive) return false
        if (knowledgeBaseArn != other.knowledgeBaseArn) return false
        if (knowledgeBaseId != other.knowledgeBaseId) return false
        if (language != other.language) return false
        if (lastModifiedBy != other.lastModifiedBy) return false
        if (lastModifiedTime != other.lastModifiedTime) return false
        if (name != other.name) return false
        if (quickResponseArn != other.quickResponseArn) return false
        if (quickResponseId != other.quickResponseId) return false
        if (shortcutKey != other.shortcutKey) return false
        if (status != other.status) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The user defined contact attributes that are resolved when the search result is returned.
         */
        public var attributesInterpolated: List? = null
        /**
         * The user defined contact attributes that are not resolved when the search result is returned.
         */
        public var attributesNotInterpolated: List? = null
        /**
         * The Amazon Connect contact channels this quick response applies to. The supported contact channel types include `Chat`.
         */
        public var channels: List? = null
        /**
         * The media type of the quick response content.
         * + Use `application/x.quickresponse;format=plain` for quick response written in plain text.
         * + Use `application/x.quickresponse;format=markdown` for quick response written in richtext.
         */
        public var contentType: kotlin.String? = null
        /**
         * The contents of the quick response.
         */
        public var contents: aws.sdk.kotlin.services.wisdom.model.QuickResponseContents? = null
        /**
         * The timestamp when the quick response was created.
         */
        public var createdTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description of the quick response.
         */
        public var description: kotlin.String? = null
        /**
         * The configuration information of the user groups that the quick response is accessible to.
         */
        public var groupingConfiguration: aws.sdk.kotlin.services.wisdom.model.GroupingConfiguration? = null
        /**
         * Whether the quick response is active.
         */
        public var isActive: kotlin.Boolean? = 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. Can be either the ID or the ARN. URLs cannot contain the ARN.
         */
        public var knowledgeBaseId: kotlin.String? = null
        /**
         * The language code value for the language in which the quick response is written.
         */
        public var language: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the user who last updated the quick response search result data.
         */
        public var lastModifiedBy: kotlin.String? = null
        /**
         * The timestamp when the quick response search result data was last modified.
         */
        public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the quick response.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the quick response.
         */
        public var quickResponseArn: kotlin.String? = null
        /**
         * The identifier of the quick response.
         */
        public var quickResponseId: kotlin.String? = null
        /**
         * The shortcut key of the quick response. The value should be unique across the knowledge base.
         */
        public var shortcutKey: kotlin.String? = null
        /**
         * The resource status of the quick response.
         */
        public var status: aws.sdk.kotlin.services.wisdom.model.QuickResponseStatus? = null
        /**
         * The tags used to organize, track, or control access for this resource.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wisdom.model.QuickResponseSearchResultData) : this() {
            this.attributesInterpolated = x.attributesInterpolated
            this.attributesNotInterpolated = x.attributesNotInterpolated
            this.channels = x.channels
            this.contentType = x.contentType
            this.contents = x.contents
            this.createdTime = x.createdTime
            this.description = x.description
            this.groupingConfiguration = x.groupingConfiguration
            this.isActive = x.isActive
            this.knowledgeBaseArn = x.knowledgeBaseArn
            this.knowledgeBaseId = x.knowledgeBaseId
            this.language = x.language
            this.lastModifiedBy = x.lastModifiedBy
            this.lastModifiedTime = x.lastModifiedTime
            this.name = x.name
            this.quickResponseArn = x.quickResponseArn
            this.quickResponseId = x.quickResponseId
            this.shortcutKey = x.shortcutKey
            this.status = x.status
            this.tags = x.tags
        }

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

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

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

        internal fun correctErrors(): Builder {
            if (contentType == null) contentType = ""
            if (createdTime == null) createdTime = Instant.fromEpochSeconds(0)
            if (isActive == null) isActive = false
            if (knowledgeBaseArn == null) knowledgeBaseArn = ""
            if (knowledgeBaseId == null) knowledgeBaseId = ""
            if (lastModifiedTime == null) lastModifiedTime = Instant.fromEpochSeconds(0)
            if (name == null) name = ""
            if (quickResponseArn == null) quickResponseArn = ""
            if (quickResponseId == null) quickResponseId = ""
            if (status == null) status = QuickResponseStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy