Class: AWSCDK::Bedrock::CfnPromptVersion::ContentBlockProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::ContentBlockProperty
- Defined in:
- bedrock/cfn_prompt_version.rb
Overview
A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.
Instance Attribute Summary collapse
-
#cache_point ⇒ AWSCDK::IResolvable, ...
readonly
CachePoint to include in the message.
-
#text ⇒ String?
readonly
Text to include in the message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_point: nil, text: nil) ⇒ ContentBlockProperty
constructor
A new instance of ContentBlockProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_point: nil, text: nil) ⇒ ContentBlockProperty
Returns a new instance of ContentBlockProperty.
709 710 711 712 713 714 |
# File 'bedrock/cfn_prompt_version.rb', line 709 def initialize(cache_point: nil, text: nil) @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uQ2FjaGVQb2ludEJsb2NrUHJvcGVydHkifV19fQ==")), "cachePoint") unless @cache_point.nil? @text = text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") unless @text.nil? end |
Instance Attribute Details
#cache_point ⇒ AWSCDK::IResolvable, ... (readonly)
CachePoint to include in the message.
720 721 722 |
# File 'bedrock/cfn_prompt_version.rb', line 720 def cache_point @cache_point end |
#text ⇒ String? (readonly)
Text to include in the message.
725 726 727 |
# File 'bedrock/cfn_prompt_version.rb', line 725 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
727 728 729 730 731 732 |
# File 'bedrock/cfn_prompt_version.rb', line 727 def self.jsii_properties { :cache_point => "cachePoint", :text => "text", } end |
Instance Method Details
#to_jsii ⇒ Object
734 735 736 737 738 739 740 741 |
# File 'bedrock/cfn_prompt_version.rb', line 734 def to_jsii result = {} result.merge!({ "cachePoint" => @cache_point, "text" => @text, }) result.compact end |