Class: A2A::Operation::SendMessageRequest
- Inherits:
-
Object
- Object
- A2A::Operation::SendMessageRequest
- Defined in:
- lib/a2a/operation/send_message_request.rb
Overview
Server-side counterpart to SendMessage. Deserialises the params hash from an incoming SendMessage / SendStreamingMessage JSON-RPC call or HTTP+JSON request body into typed objects.
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message:, configuration: nil, metadata: nil, tenant: nil) ⇒ SendMessageRequest
constructor
A new instance of SendMessageRequest.
Constructor Details
#initialize(message:, configuration: nil, metadata: nil, tenant: nil) ⇒ SendMessageRequest
Returns a new instance of SendMessageRequest.
13 14 15 16 17 18 |
# File 'lib/a2a/operation/send_message_request.rb', line 13 def initialize(message:, configuration: nil, metadata: nil, tenant: nil) @message = @configuration = configuration @metadata = @tenant = tenant end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
11 12 13 |
# File 'lib/a2a/operation/send_message_request.rb', line 11 def configuration @configuration end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
11 12 13 |
# File 'lib/a2a/operation/send_message_request.rb', line 11 def @message end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/a2a/operation/send_message_request.rb', line 11 def @metadata end |
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
11 12 13 |
# File 'lib/a2a/operation/send_message_request.rb', line 11 def tenant @tenant end |
Class Method Details
.from_h(hash) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/a2a/operation/send_message_request.rb', line 20 def self.from_h(hash) config_raw = hash["configuration"] config = if config_raw SendMessage::Configuration.from_h(config_raw) else SendMessage::Configuration.new end new( message: Message.from_h(hash.fetch("message")), configuration: config, metadata: hash["metadata"], tenant: hash["tenant"] ) end |