
commonMain.aws.sdk.kotlin.services.qbusiness.model.PutFeedbackRequest.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
public class PutFeedbackRequest private constructor(builder: Builder) {
/**
* The identifier of the application associated with the feedback.
*/
public val applicationId: kotlin.String? = builder.applicationId
/**
* The identifier of the conversation the feedback is attached to.
*/
public val conversationId: kotlin.String? = builder.conversationId
/**
* The timestamp for when the feedback was recorded.
*/
public val messageCopiedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.messageCopiedAt
/**
* The identifier of the chat message that the feedback was given for.
*/
public val messageId: kotlin.String? = builder.messageId
/**
* The feedback usefulness value given by the user to the chat message.
*/
public val messageUsefulness: aws.sdk.kotlin.services.qbusiness.model.MessageUsefulnessFeedback? = builder.messageUsefulness
/**
* The identifier of the user giving the feedback.
*/
public val userId: kotlin.String? = builder.userId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.PutFeedbackRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutFeedbackRequest(")
append("applicationId=$applicationId,")
append("conversationId=$conversationId,")
append("messageCopiedAt=$messageCopiedAt,")
append("messageId=$messageId,")
append("messageUsefulness=$messageUsefulness,")
append("userId=$userId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = applicationId?.hashCode() ?: 0
result = 31 * result + (conversationId?.hashCode() ?: 0)
result = 31 * result + (messageCopiedAt?.hashCode() ?: 0)
result = 31 * result + (messageId?.hashCode() ?: 0)
result = 31 * result + (messageUsefulness?.hashCode() ?: 0)
result = 31 * result + (userId?.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 PutFeedbackRequest
if (applicationId != other.applicationId) return false
if (conversationId != other.conversationId) return false
if (messageCopiedAt != other.messageCopiedAt) return false
if (messageId != other.messageId) return false
if (messageUsefulness != other.messageUsefulness) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.PutFeedbackRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The identifier of the application associated with the feedback.
*/
public var applicationId: kotlin.String? = null
/**
* The identifier of the conversation the feedback is attached to.
*/
public var conversationId: kotlin.String? = null
/**
* The timestamp for when the feedback was recorded.
*/
public var messageCopiedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The identifier of the chat message that the feedback was given for.
*/
public var messageId: kotlin.String? = null
/**
* The feedback usefulness value given by the user to the chat message.
*/
public var messageUsefulness: aws.sdk.kotlin.services.qbusiness.model.MessageUsefulnessFeedback? = null
/**
* The identifier of the user giving the feedback.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.PutFeedbackRequest) : this() {
this.applicationId = x.applicationId
this.conversationId = x.conversationId
this.messageCopiedAt = x.messageCopiedAt
this.messageId = x.messageId
this.messageUsefulness = x.messageUsefulness
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.PutFeedbackRequest = PutFeedbackRequest(this)
/**
* construct an [aws.sdk.kotlin.services.qbusiness.model.MessageUsefulnessFeedback] inside the given [block]
*/
public fun messageUsefulness(block: aws.sdk.kotlin.services.qbusiness.model.MessageUsefulnessFeedback.Builder.() -> kotlin.Unit) {
this.messageUsefulness = aws.sdk.kotlin.services.qbusiness.model.MessageUsefulnessFeedback.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy