Class: A2A::Message

Inherits:
ProtocolStruct
  • Object
show all
Defined in:
lib/a2a/types/message.rb

Overview

Represents a message exchanged between a user and an agent.

Instance Method Summary collapse

Methods included from Extensions::CaseTransformation

#camelize, included, #to_json

Instance Method Details

#metadataHash?

Returns Optional metadata associated with the message.

Returns:

  • (Hash, nil)

    Optional metadata associated with the message.



13
# File 'lib/a2a/types/message.rb', line 13

attribute? :metadata, Types::Hash.optional

#partsArray<Part>

Returns The content of the message, composed of one or more parts.

Returns:

  • (Array<Part>)

    The content of the message, composed of one or more parts.



10
# File 'lib/a2a/types/message.rb', line 10

attribute :parts, Types::Array.of(Types::Constructor(Part))

#roleString

Returns The role of the sender (user or agent).

Returns:

  • (String)

    The role of the sender (user or agent).



7
# File 'lib/a2a/types/message.rb', line 7

attribute :role, Types::String.enum('user', 'agent')