commonMain.aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration.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
/**
* Defines a condition node in your flow. You can specify conditions that determine which node comes next in the flow. 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 ConditionFlowNodeConfiguration private constructor(builder: Builder) {
/**
* An array of conditions. Each member contains the name of a condition and an expression that defines the condition.
*/
public val conditions: List = requireNotNull(builder.conditions) { "A non-null value must be provided for conditions" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConditionFlowNodeConfiguration(")
append("conditions=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = conditions.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 ConditionFlowNodeConfiguration
if (conditions != other.conditions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of conditions. Each member contains the name of a condition and an expression that defines the condition.
*/
public var conditions: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration) : this() {
this.conditions = x.conditions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration = ConditionFlowNodeConfiguration(this)
internal fun correctErrors(): Builder {
if (conditions == null) conditions = emptyList()
return this
}
}
}