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

commonMain.aws.sdk.kotlin.services.qconnect.model.PutFeedbackResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qconnect.model



public class PutFeedbackResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the Amazon Q assistant.
     */
    public val assistantArn: kotlin.String = requireNotNull(builder.assistantArn) { "A non-null value must be provided for assistantArn" }
    /**
     * The identifier of the Amazon Q assistant.
     */
    public val assistantId: kotlin.String = requireNotNull(builder.assistantId) { "A non-null value must be provided for assistantId" }
    /**
     * Information about the feedback provided.
     */
    public val contentFeedback: aws.sdk.kotlin.services.qconnect.model.ContentFeedbackData? = builder.contentFeedback
    /**
     * The identifier of the feedback target.
     */
    public val targetId: kotlin.String = requireNotNull(builder.targetId) { "A non-null value must be provided for targetId" }
    /**
     * The type of the feedback target.
     */
    public val targetType: aws.sdk.kotlin.services.qconnect.model.TargetType = requireNotNull(builder.targetType) { "A non-null value must be provided for targetType" }

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

    override fun toString(): kotlin.String = buildString {
        append("PutFeedbackResponse(")
        append("assistantArn=$assistantArn,")
        append("assistantId=$assistantId,")
        append("contentFeedback=$contentFeedback,")
        append("targetId=$targetId,")
        append("targetType=$targetType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assistantArn.hashCode()
        result = 31 * result + (assistantId.hashCode())
        result = 31 * result + (contentFeedback?.hashCode() ?: 0)
        result = 31 * result + (targetId.hashCode())
        result = 31 * result + (targetType.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 PutFeedbackResponse

        if (assistantArn != other.assistantArn) return false
        if (assistantId != other.assistantId) return false
        if (contentFeedback != other.contentFeedback) return false
        if (targetId != other.targetId) return false
        if (targetType != other.targetType) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the Amazon Q assistant.
         */
        public var assistantArn: kotlin.String? = null
        /**
         * The identifier of the Amazon Q assistant.
         */
        public var assistantId: kotlin.String? = null
        /**
         * Information about the feedback provided.
         */
        public var contentFeedback: aws.sdk.kotlin.services.qconnect.model.ContentFeedbackData? = null
        /**
         * The identifier of the feedback target.
         */
        public var targetId: kotlin.String? = null
        /**
         * The type of the feedback target.
         */
        public var targetType: aws.sdk.kotlin.services.qconnect.model.TargetType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qconnect.model.PutFeedbackResponse) : this() {
            this.assistantArn = x.assistantArn
            this.assistantId = x.assistantId
            this.contentFeedback = x.contentFeedback
            this.targetId = x.targetId
            this.targetType = x.targetType
        }

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

        internal fun correctErrors(): Builder {
            if (assistantArn == null) assistantArn = ""
            if (assistantId == null) assistantId = ""
            if (targetId == null) targetId = ""
            if (targetType == null) targetType = TargetType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy