Class: AWSCDK::Bedrock::CfnAgent::AgentCollaboratorProperty

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

Overview

An agent collaborator.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_descriptor:, collaboration_instruction:, collaborator_name:, relay_conversation_history: nil) ⇒ AgentCollaboratorProperty

Returns a new instance of AgentCollaboratorProperty.

Parameters:

  • agent_descriptor (AWSCDK::IResolvable, AWSCDK::Bedrock::CfnAgent::AgentDescriptorProperty)

    The collaborator's agent descriptor.

  • collaboration_instruction (String)

    The collaborator's instructions.

  • collaborator_name (String)

    The collaborator's collaborator name.

  • relay_conversation_history (String, nil) (defaults to: nil)

    The collaborator's relay conversation history.



1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
# File 'bedrock/cfn_agent.rb', line 1078

def initialize(agent_descriptor:, collaboration_instruction:, collaborator_name:, relay_conversation_history: nil)
  @agent_descriptor = agent_descriptor.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::AgentDescriptorProperty.new(**agent_descriptor.transform_keys(&:to_sym)) : agent_descriptor
  Jsii::Type.check_type(@agent_descriptor, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LkFnZW50RGVzY3JpcHRvclByb3BlcnR5In1dfX0=")), "agentDescriptor")
  @collaboration_instruction = collaboration_instruction
  Jsii::Type.check_type(@collaboration_instruction, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "collaborationInstruction")
  @collaborator_name = collaborator_name
  Jsii::Type.check_type(@collaborator_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "collaboratorName")
  @relay_conversation_history = relay_conversation_history
  Jsii::Type.check_type(@relay_conversation_history, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "relayConversationHistory") unless @relay_conversation_history.nil?
end

Instance Attribute Details

#collaboration_instructionString (readonly)

The collaborator's instructions.



1098
1099
1100
# File 'bedrock/cfn_agent.rb', line 1098

def collaboration_instruction
  @collaboration_instruction
end

#collaborator_nameString (readonly)

The collaborator's collaborator name.



1103
1104
1105
# File 'bedrock/cfn_agent.rb', line 1103

def collaborator_name
  @collaborator_name
end

#relay_conversation_historyString? (readonly)

The collaborator's relay conversation history.



1108
1109
1110
# File 'bedrock/cfn_agent.rb', line 1108

def relay_conversation_history
  @relay_conversation_history
end

Class Method Details

.jsii_propertiesObject



1110
1111
1112
1113
1114
1115
1116
1117
# File 'bedrock/cfn_agent.rb', line 1110

def self.jsii_properties
  {
    :agent_descriptor => "agentDescriptor",
    :collaboration_instruction => "collaborationInstruction",
    :collaborator_name => "collaboratorName",
    :relay_conversation_history => "relayConversationHistory",
  }
end

Instance Method Details

#to_jsiiObject



1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'bedrock/cfn_agent.rb', line 1119

def to_jsii
  result = {}
  result.merge!({
    "agentDescriptor" => @agent_descriptor,
    "collaborationInstruction" => @collaboration_instruction,
    "collaboratorName" => @collaborator_name,
    "relayConversationHistory" => @relay_conversation_history,
  })
  result.compact
end