commonMain.aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains configurations for a Lex node in the flow. You specify a Amazon Lex bot to invoke. This node takes an utterance as the input and returns as the output the intent identified by the Amazon Lex bot. For more information, see [Node types in Amazon Bedrock works](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-nodes.html) in the Amazon Bedrock User Guide.
*/
public class LexFlowNodeConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.
*/
public val botAliasArn: kotlin.String = requireNotNull(builder.botAliasArn) { "A non-null value must be provided for botAliasArn" }
/**
* The Region to invoke the Amazon Lex bot in.
*/
public val localeId: kotlin.String = requireNotNull(builder.localeId) { "A non-null value must be provided for localeId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LexFlowNodeConfiguration(")
append("botAliasArn=$botAliasArn,")
append("localeId=$localeId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = botAliasArn.hashCode()
result = 31 * result + (localeId.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 LexFlowNodeConfiguration
if (botAliasArn != other.botAliasArn) return false
if (localeId != other.localeId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.
*/
public var botAliasArn: kotlin.String? = null
/**
* The Region to invoke the Amazon Lex bot in.
*/
public var localeId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration) : this() {
this.botAliasArn = x.botAliasArn
this.localeId = x.localeId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration = LexFlowNodeConfiguration(this)
internal fun correctErrors(): Builder {
if (botAliasArn == null) botAliasArn = ""
if (localeId == null) localeId = ""
return this
}
}
}