
commonMain.aws.sdk.kotlin.services.qbusiness.model.ActionExecution.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* Performs an Amazon Q Business plugin action during a non-streaming chat conversation.
*/
public class ActionExecution private constructor(builder: Builder) {
/**
* A mapping of field names to the field values in input that an end user provides to Amazon Q Business requests to perform their plugin action.
*/
public val payload: Map = requireNotNull(builder.payload) { "A non-null value must be provided for payload" }
/**
* A string used to retain information about the hierarchical contexts within an action execution event payload.
*/
public val payloadFieldNameSeparator: kotlin.String = requireNotNull(builder.payloadFieldNameSeparator) { "A non-null value must be provided for payloadFieldNameSeparator" }
/**
* The identifier of the plugin the action is attached to.
*/
public val pluginId: kotlin.String = requireNotNull(builder.pluginId) { "A non-null value must be provided for pluginId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.ActionExecution = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ActionExecution(")
append("payload=$payload,")
append("payloadFieldNameSeparator=$payloadFieldNameSeparator,")
append("pluginId=$pluginId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = payload.hashCode()
result = 31 * result + (payloadFieldNameSeparator.hashCode())
result = 31 * result + (pluginId.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 ActionExecution
if (payload != other.payload) return false
if (payloadFieldNameSeparator != other.payloadFieldNameSeparator) return false
if (pluginId != other.pluginId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.ActionExecution = Builder(this).apply(block).build()
public class Builder {
/**
* A mapping of field names to the field values in input that an end user provides to Amazon Q Business requests to perform their plugin action.
*/
public var payload: Map? = null
/**
* A string used to retain information about the hierarchical contexts within an action execution event payload.
*/
public var payloadFieldNameSeparator: kotlin.String? = null
/**
* The identifier of the plugin the action is attached to.
*/
public var pluginId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.ActionExecution) : this() {
this.payload = x.payload
this.payloadFieldNameSeparator = x.payloadFieldNameSeparator
this.pluginId = x.pluginId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.ActionExecution = ActionExecution(this)
internal fun correctErrors(): Builder {
if (payload == null) payload = emptyMap()
if (payloadFieldNameSeparator == null) payloadFieldNameSeparator = ""
if (pluginId == null) pluginId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy