Class: AWSCDK::Bedrock::CfnPromptVersion::ContentBlockProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache_point: nil, text: nil) ⇒ ContentBlockProperty

Returns a new instance of ContentBlockProperty.

Parameters:



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_pointAWSCDK::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

#textString? (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_propertiesObject



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_jsiiObject



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