Class: A2A::AgentCapabilities
- Inherits:
-
Object
- Object
- A2A::AgentCapabilities
- Defined in:
- lib/a2a/agent_capabilities.rb
Instance Attribute Summary collapse
-
#extended_agent_card ⇒ Object
readonly
Returns the value of attribute extended_agent_card.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#push_notifications ⇒ Object
readonly
Returns the value of attribute push_notifications.
-
#streaming ⇒ Object
readonly
Returns the value of attribute streaming.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(streaming: nil, push_notifications: nil, extensions: nil, extended_agent_card: nil) ⇒ AgentCapabilities
constructor
A new instance of AgentCapabilities.
- #to_h ⇒ Object
Constructor Details
#initialize(streaming: nil, push_notifications: nil, extensions: nil, extended_agent_card: nil) ⇒ AgentCapabilities
Returns a new instance of AgentCapabilities.
7 8 9 10 11 12 |
# File 'lib/a2a/agent_capabilities.rb', line 7 def initialize(streaming: nil, push_notifications: nil, extensions: nil, extended_agent_card: nil) @streaming = streaming @push_notifications = push_notifications @extensions = extensions @extended_agent_card = extended_agent_card end |
Instance Attribute Details
#extended_agent_card ⇒ Object (readonly)
Returns the value of attribute extended_agent_card.
5 6 7 |
# File 'lib/a2a/agent_capabilities.rb', line 5 def extended_agent_card @extended_agent_card end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
5 6 7 |
# File 'lib/a2a/agent_capabilities.rb', line 5 def extensions @extensions end |
#push_notifications ⇒ Object (readonly)
Returns the value of attribute push_notifications.
5 6 7 |
# File 'lib/a2a/agent_capabilities.rb', line 5 def push_notifications @push_notifications end |
#streaming ⇒ Object (readonly)
Returns the value of attribute streaming.
5 6 7 |
# File 'lib/a2a/agent_capabilities.rb', line 5 def streaming @streaming end |
Class Method Details
.from_h(hash) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/a2a/agent_capabilities.rb', line 14 def self.from_h(hash) new( streaming: hash["streaming"], push_notifications: hash["pushNotifications"], extensions: hash["extensions"]&.map { AgentExtension.from_h(_1) }, extended_agent_card: hash["extendedAgentCard"] ) end |
Instance Method Details
#to_h ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/a2a/agent_capabilities.rb', line 23 def to_h { "streaming" => streaming, "pushNotifications" => push_notifications, "extensions" => extensions, "extendedAgentCard" => extended_agent_card }.compact end |