Class: A2A::Operation::ListTasks
- Inherits:
-
Object
- Object
- A2A::Operation::ListTasks
- Includes:
- Executable
- Defined in:
- lib/a2a/operation/list_tasks.rb
Defined Under Namespace
Classes: Response
Constant Summary collapse
- METHOD =
"ListTasks"
Instance Attribute Summary collapse
-
#context_id ⇒ Object
readonly
Returns the value of attribute context_id.
-
#history_length ⇒ Object
readonly
Returns the value of attribute history_length.
-
#include_artifacts ⇒ Object
readonly
Returns the value of attribute include_artifacts.
-
#page_size ⇒ Object
readonly
Returns the value of attribute page_size.
-
#page_token ⇒ Object
readonly
Returns the value of attribute page_token.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_timestamp_after ⇒ Object
readonly
Returns the value of attribute status_timestamp_after.
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
Instance Method Summary collapse
- #execute_http_json(protocol) ⇒ Object
- #execute_json_rpc(protocol) ⇒ Object
-
#initialize(**kwargs) ⇒ ListTasks
constructor
A new instance of ListTasks.
- #params ⇒ Object
Methods included from Executable
Constructor Details
#initialize(**kwargs) ⇒ ListTasks
Returns a new instance of ListTasks.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/a2a/operation/list_tasks.rb', line 13 def initialize(**kwargs) @context_id = kwargs[:context_id] @status = kwargs[:status] @page_size = kwargs[:page_size] @page_token = kwargs[:page_token] @history_length = kwargs[:history_length] @status_timestamp_after = kwargs[:status_timestamp_after] @include_artifacts = kwargs[:include_artifacts] @tenant = kwargs[:tenant] end |
Instance Attribute Details
#context_id ⇒ Object (readonly)
Returns the value of attribute context_id.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def context_id @context_id end |
#history_length ⇒ Object (readonly)
Returns the value of attribute history_length.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def history_length @history_length end |
#include_artifacts ⇒ Object (readonly)
Returns the value of attribute include_artifacts.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def include_artifacts @include_artifacts end |
#page_size ⇒ Object (readonly)
Returns the value of attribute page_size.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def page_size @page_size end |
#page_token ⇒ Object (readonly)
Returns the value of attribute page_token.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def page_token @page_token end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def status @status end |
#status_timestamp_after ⇒ Object (readonly)
Returns the value of attribute status_timestamp_after.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def @status_timestamp_after end |
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
10 11 12 |
# File 'lib/a2a/operation/list_tasks.rb', line 10 def tenant @tenant end |
Instance Method Details
#execute_http_json(protocol) ⇒ Object
31 32 33 |
# File 'lib/a2a/operation/list_tasks.rb', line 31 def execute_http_json(protocol) Response.from_h(protocol.get("/tasks", query: params)) end |
#execute_json_rpc(protocol) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/a2a/operation/list_tasks.rb', line 24 def execute_json_rpc(protocol) raw = protocol.post(METHOD, params) raise A2A.from_json_rpc_error(raw["error"]) if raw["error"] Response.from_h(Hash(raw["result"])) end |
#params ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/a2a/operation/list_tasks.rb', line 35 def params { "contextId" => context_id, "status" => status, "pageSize" => page_size, "pageToken" => page_token, "historyLength" => history_length, "statusTimestampAfter" => , "includeArtifacts" => include_artifacts, "tenant" => tenant }.compact end |