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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeSourceConfiguration.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 prompt and whether it is from Prompt management or defined inline.
 */
public sealed class PromptFlowNodeSourceConfiguration {
    /**
     * Contains configurations for a prompt that is defined inline
     */
    public data class Inline(val value: aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeInlineConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeSourceConfiguration() {
    }

    /**
     * Contains configurations for a prompt from Prompt management.
     */
    public data class Resource(val value: aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeResourceConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.PromptFlowNodeSourceConfiguration() {
    }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy