Class: A2A::DataPart

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

Overview

Represents a part of a message containing structured data (JSON).

Instance Method Summary collapse

Methods included from Extensions::CaseTransformation

#camelize, included, #to_json

Instance Method Details

#dataHash

Returns The structured data content as a JSON object.

Returns:

  • (Hash)

    The structured data content as a JSON object.



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

attribute :data, Types::Hash

#metadataHash?

Returns Optional metadata associated with this data part.

Returns:

  • (Hash, nil)

    Optional metadata associated with this data part.



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

attribute? :metadata, Types::Hash.optional

#typeString

Returns Type identifier for this part.

Returns:

  • (String)

    Type identifier for this part.



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

attribute :type, Types::String.constant('data')