commonMain.aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration.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 Lambda function node in the flow. You specify the Lambda function to invoke and the inputs into the function. The output is the response that is defined in the Lambda function. 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 LambdaFunctionFlowNodeConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Lambda function to invoke.
*/
public val lambdaArn: kotlin.String = requireNotNull(builder.lambdaArn) { "A non-null value must be provided for lambdaArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LambdaFunctionFlowNodeConfiguration(")
append("lambdaArn=$lambdaArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = lambdaArn.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 LambdaFunctionFlowNodeConfiguration
if (lambdaArn != other.lambdaArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Lambda function to invoke.
*/
public var lambdaArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration) : this() {
this.lambdaArn = x.lambdaArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration = LambdaFunctionFlowNodeConfiguration(this)
internal fun correctErrors(): Builder {
if (lambdaArn == null) lambdaArn = ""
return this
}
}
}