Class: AWSCDK::Bedrock::CfnPrompt::ToolSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_prompt.rb

Overview

The specification for the tool.

For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_schema:, name:, description: nil) ⇒ ToolSpecificationProperty

Returns a new instance of ToolSpecificationProperty.

Parameters:



1594
1595
1596
1597
1598
1599
1600
1601
# File 'bedrock/cfn_prompt.rb', line 1594

def initialize(input_schema:, name:, description: nil)
  @input_schema = input_schema.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPrompt::ToolInputSchemaProperty.new(**input_schema.transform_keys(&:to_sym)) : input_schema
  Jsii::Type.check_type(@input_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdC5Ub29sSW5wdXRTY2hlbWFQcm9wZXJ0eSJ9XX19")), "inputSchema")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description for the tool.



1617
1618
1619
# File 'bedrock/cfn_prompt.rb', line 1617

def description
  @description
end

#nameString (readonly)

The name for the tool.



1612
1613
1614
# File 'bedrock/cfn_prompt.rb', line 1612

def name
  @name
end

Class Method Details

.jsii_propertiesObject



1619
1620
1621
1622
1623
1624
1625
# File 'bedrock/cfn_prompt.rb', line 1619

def self.jsii_properties
  {
    :input_schema => "inputSchema",
    :name => "name",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



1627
1628
1629
1630
1631
1632
1633
1634
1635
# File 'bedrock/cfn_prompt.rb', line 1627

def to_jsii
  result = {}
  result.merge!({
    "inputSchema" => @input_schema,
    "name" => @name,
    "description" => @description,
  })
  result.compact
end