All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model



/**
 * Contains configurations for a node in your 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 sealed class FlowNodeConfiguration {
    /**
     * Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response.
     */
    public data class Agent(val value: aws.sdk.kotlin.services.bedrockagent.model.AgentFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs.
     */
    public data class Collector(val value: aws.sdk.kotlin.services.bedrockagent.model.CollectorFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a Condition node in your flow. Defines conditions that lead to different branches of the flow.
     */
    public data class Condition(val value: aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for an input flow node in your flow. The first node in the flow. `inputs` can't be specified for this node.
     */
    public data class Input(val value: aws.sdk.kotlin.services.bedrockagent.model.InputFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for an iterator node in your flow. Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output.
     *
     * The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.
     */
    public data class Iterator(val value: aws.sdk.kotlin.services.bedrockagent.model.IteratorFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response.
     */
    public data class KnowledgeBase(val value: aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a Lambda function node in your flow. Invokes an Lambda function.
     */
    public data class LambdaFunction(val value: aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a Lex node in your flow. Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.
     */
    public data class Lex(val value: aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for an output flow node in your flow. The last node in the flow. `outputs` can't be specified for this node.
     */
    public data class Output(val value: aws.sdk.kotlin.services.bedrockagent.model.OutputFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a prompt node in your flow. Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.
     */
    public data class Prompt(val value: aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a Retrieval node in your flow. Retrieves data from an Amazon S3 location and returns it as the output.
     */
    public data class Retrieval(val value: aws.sdk.kotlin.services.bedrockagent.model.RetrievalFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Contains configurations for a Storage node in your flow. Stores an input in an Amazon S3 location.
     */
    public data class Storage(val value: aws.sdk.kotlin.services.bedrockagent.model.StorageFlowNodeConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration() {
    }

    /**
     * Casts this [FlowNodeConfiguration] as a [Agent] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AgentFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Agent].
     */
    public fun asAgent(): aws.sdk.kotlin.services.bedrockagent.model.AgentFlowNodeConfiguration = (this as FlowNodeConfiguration.Agent).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Agent] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AgentFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Agent].
     */
    public fun asAgentOrNull(): aws.sdk.kotlin.services.bedrockagent.model.AgentFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Agent)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Collector] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.CollectorFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Collector].
     */
    public fun asCollector(): aws.sdk.kotlin.services.bedrockagent.model.CollectorFlowNodeConfiguration = (this as FlowNodeConfiguration.Collector).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Collector] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.CollectorFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Collector].
     */
    public fun asCollectorOrNull(): aws.sdk.kotlin.services.bedrockagent.model.CollectorFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Collector)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Condition] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Condition].
     */
    public fun asCondition(): aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration = (this as FlowNodeConfiguration.Condition).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Condition] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Condition].
     */
    public fun asConditionOrNull(): aws.sdk.kotlin.services.bedrockagent.model.ConditionFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Condition)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Input] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.InputFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Input].
     */
    public fun asInput(): aws.sdk.kotlin.services.bedrockagent.model.InputFlowNodeConfiguration = (this as FlowNodeConfiguration.Input).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Input] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.InputFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Input].
     */
    public fun asInputOrNull(): aws.sdk.kotlin.services.bedrockagent.model.InputFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Input)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Iterator] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.IteratorFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Iterator].
     */
    public fun asIterator(): aws.sdk.kotlin.services.bedrockagent.model.IteratorFlowNodeConfiguration = (this as FlowNodeConfiguration.Iterator).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Iterator] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.IteratorFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Iterator].
     */
    public fun asIteratorOrNull(): aws.sdk.kotlin.services.bedrockagent.model.IteratorFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Iterator)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [KnowledgeBase] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [KnowledgeBase].
     */
    public fun asKnowledgeBase(): aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseFlowNodeConfiguration = (this as FlowNodeConfiguration.KnowledgeBase).value

    /**
     * Casts this [FlowNodeConfiguration] as a [KnowledgeBase] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [KnowledgeBase].
     */
    public fun asKnowledgeBaseOrNull(): aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseFlowNodeConfiguration? = (this as? FlowNodeConfiguration.KnowledgeBase)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [LambdaFunction] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [LambdaFunction].
     */
    public fun asLambdaFunction(): aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration = (this as FlowNodeConfiguration.LambdaFunction).value

    /**
     * Casts this [FlowNodeConfiguration] as a [LambdaFunction] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [LambdaFunction].
     */
    public fun asLambdaFunctionOrNull(): aws.sdk.kotlin.services.bedrockagent.model.LambdaFunctionFlowNodeConfiguration? = (this as? FlowNodeConfiguration.LambdaFunction)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Lex] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Lex].
     */
    public fun asLex(): aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration = (this as FlowNodeConfiguration.Lex).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Lex] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Lex].
     */
    public fun asLexOrNull(): aws.sdk.kotlin.services.bedrockagent.model.LexFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Lex)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Output] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.OutputFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Output].
     */
    public fun asOutput(): aws.sdk.kotlin.services.bedrockagent.model.OutputFlowNodeConfiguration = (this as FlowNodeConfiguration.Output).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Output] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.OutputFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Output].
     */
    public fun asOutputOrNull(): aws.sdk.kotlin.services.bedrockagent.model.OutputFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Output)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Prompt] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Prompt].
     */
    public fun asPrompt(): aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeConfiguration = (this as FlowNodeConfiguration.Prompt).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Prompt] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Prompt].
     */
    public fun asPromptOrNull(): aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Prompt)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Retrieval] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.RetrievalFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Retrieval].
     */
    public fun asRetrieval(): aws.sdk.kotlin.services.bedrockagent.model.RetrievalFlowNodeConfiguration = (this as FlowNodeConfiguration.Retrieval).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Retrieval] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.RetrievalFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Retrieval].
     */
    public fun asRetrievalOrNull(): aws.sdk.kotlin.services.bedrockagent.model.RetrievalFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Retrieval)?.value

    /**
     * Casts this [FlowNodeConfiguration] as a [Storage] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.StorageFlowNodeConfiguration] value. Throws an exception if the [FlowNodeConfiguration] is not a
     * [Storage].
     */
    public fun asStorage(): aws.sdk.kotlin.services.bedrockagent.model.StorageFlowNodeConfiguration = (this as FlowNodeConfiguration.Storage).value

    /**
     * Casts this [FlowNodeConfiguration] as a [Storage] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.StorageFlowNodeConfiguration] value. Returns null if the [FlowNodeConfiguration] is not a [Storage].
     */
    public fun asStorageOrNull(): aws.sdk.kotlin.services.bedrockagent.model.StorageFlowNodeConfiguration? = (this as? FlowNodeConfiguration.Storage)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy