Class: AWSCDK::BedrockAgentCore::CfnGatewayTarget::ToolDefinitionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/cfn_gateway_target.rb

Overview

The tool definition for the gateway.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description:, input_schema:, name:, output_schema: nil) ⇒ ToolDefinitionProperty

Returns a new instance of ToolDefinitionProperty.

Parameters:



2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2145

def initialize(description:, input_schema:, name:, output_schema: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description")
  @input_schema = input_schema.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnGatewayTarget::SchemaDefinitionProperty.new(**input_schema.transform_keys(&:to_sym)) : input_schema
  Jsii::Type.check_type(@input_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkdhdGV3YXlUYXJnZXQuU2NoZW1hRGVmaW5pdGlvblByb3BlcnR5In1dfX0=")), "inputSchema")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @output_schema = output_schema.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnGatewayTarget::SchemaDefinitionProperty.new(**output_schema.transform_keys(&:to_sym)) : output_schema
  Jsii::Type.check_type(@output_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbkdhdGV3YXlUYXJnZXQuU2NoZW1hRGVmaW5pdGlvblByb3BlcnR5In1dfX0=")), "outputSchema") unless @output_schema.nil?
end

Instance Attribute Details

#descriptionString (readonly)



2158
2159
2160
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2158

def description
  @description
end

#nameString (readonly)

The tool name.



2168
2169
2170
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2168

def name
  @name
end

#output_schemaAWSCDK::IResolvable, ... (readonly)

The tool definition output schema for the gateway target.



2173
2174
2175
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2173

def output_schema
  @output_schema
end

Class Method Details

.jsii_propertiesObject



2175
2176
2177
2178
2179
2180
2181
2182
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2175

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

Instance Method Details

#to_jsiiObject



2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
# File 'bedrock_agent_core/cfn_gateway_target.rb', line 2184

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