Class CfnPromptVersionPropsMixin.PromptVariantProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnPromptVersionPropsMixin.PromptVariantProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnPromptVersionPropsMixin.PromptVariantProperty>
- Enclosing interface:
CfnPromptVersionPropsMixin.PromptVariantProperty
@Stability(Stable)
public static final class CfnPromptVersionPropsMixin.PromptVariantProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnPromptVersionPropsMixin.PromptVariantProperty>
A builder for
CfnPromptVersionPropsMixin.PromptVariantProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields(Object additionalModelRequestFields) build()Builds the configured instance.Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getGenAiResource()genAiResource(IResolvable genAiResource) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getGenAiResource()inferenceConfiguration(CfnPromptVersionPropsMixin.PromptInferenceConfigurationProperty inferenceConfiguration) inferenceConfiguration(IResolvable inferenceConfiguration) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getMetadata()metadata(IResolvable metadata) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getMetadata()Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getModelId()Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getName()templateConfiguration(CfnPromptVersionPropsMixin.PromptTemplateConfigurationProperty templateConfiguration) templateConfiguration(IResolvable templateConfiguration) templateType(String templateType) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getTemplateType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
additionalModelRequestFields
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder additionalModelRequestFields(Object additionalModelRequestFields) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getAdditionalModelRequestFields()- Parameters:
additionalModelRequestFields- Contains model-specific inference configurations that aren't in theinferenceConfigurationfield. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models .- Returns:
this
-
genAiResource
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder genAiResource(IResolvable genAiResource) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getGenAiResource()- Parameters:
genAiResource- Specifies a generative AI resource with which to use the prompt.- Returns:
this
-
genAiResource
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder genAiResource(CfnPromptVersionPropsMixin.PromptGenAiResourceProperty genAiResource) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getGenAiResource()- Parameters:
genAiResource- Specifies a generative AI resource with which to use the prompt.- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder inferenceConfiguration(IResolvable inferenceConfiguration) - Parameters:
inferenceConfiguration- Contains inference configurations for the prompt variant.- Returns:
this
-
inferenceConfiguration
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder inferenceConfiguration(CfnPromptVersionPropsMixin.PromptInferenceConfigurationProperty inferenceConfiguration) - Parameters:
inferenceConfiguration- Contains inference configurations for the prompt variant.- Returns:
this
-
metadata
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder metadata(IResolvable metadata) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getMetadata()- Parameters:
metadata- An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.- Returns:
this
-
metadata
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder metadata(List<? extends Object> metadata) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getMetadata()- Parameters:
metadata- An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.- Returns:
this
-
modelId
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder modelId(String modelId) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getModelId()- Parameters:
modelId- The unique identifier of the model or inference profile with which to run inference on the prompt.- Returns:
this
-
name
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder name(String name) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getName()- Parameters:
name- The name of the prompt variant.- Returns:
this
-
templateConfiguration
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder templateConfiguration(IResolvable templateConfiguration) - Parameters:
templateConfiguration- Contains configurations for the prompt template.- Returns:
this
-
templateConfiguration
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder templateConfiguration(CfnPromptVersionPropsMixin.PromptTemplateConfigurationProperty templateConfiguration) - Parameters:
templateConfiguration- Contains configurations for the prompt template.- Returns:
this
-
templateType
@Stability(Stable) public CfnPromptVersionPropsMixin.PromptVariantProperty.Builder templateType(String templateType) Sets the value ofCfnPromptVersionPropsMixin.PromptVariantProperty.getTemplateType()- Parameters:
templateType- The type of prompt template to use.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnPromptVersionPropsMixin.PromptVariantProperty>- Returns:
- a new instance of
CfnPromptVersionPropsMixin.PromptVariantProperty - Throws:
NullPointerException- if any required attribute was not provided
-