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

io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersion Maven / Gradle / Ivy

package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;

/**
 * (experimental) Creates a version of the prompt.
 * 

* Use this to create a static snapshot of your prompt that can be deployed * to production. Versions allow you to easily switch between different * configurations for your prompt and update your application with the most * appropriate version for your use-case. *

* @see https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-deploy.html */ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-07T16:14:00.742Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.PromptVersion") public class PromptVersion extends software.constructs.Construct { protected PromptVersion(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected PromptVersion(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public PromptVersion(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersionProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) The prompt used by this version. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.bedrock.Prompt getPrompt() { return software.amazon.jsii.Kernel.get(this, "prompt", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.Prompt.class)); } /** * (experimental) The version of the prompt that was created. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getVersion() { return software.amazon.jsii.Kernel.get(this, "version", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The Amazon Resource Name (ARN) of the prompt version. *

* Example: *

*

     * "arn:aws:bedrock:us-east-1:123456789012:prompt/PROMPT12345:1"
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getVersionArn() { return software.amazon.jsii.Kernel.get(this, "versionArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersion}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersionProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersionProps.Builder(); } /** * (experimental) The prompt to use for this version. *

* @return {@code this} * @param prompt The prompt to use for this version. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder prompt(final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.Prompt prompt) { this.props.prompt(prompt); return this; } /** * (experimental) The description of the prompt version. *

* @return {@code this} * @param description The description of the prompt version. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * @return a newly built instance of {@link io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersion}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersion build() { return new io.github.cdklabs.generative_ai_cdk_constructs.bedrock.PromptVersion( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy