Class: A2A::Operation::ListTaskPushNotificationConfigs
- Inherits:
-
Object
- Object
- A2A::Operation::ListTaskPushNotificationConfigs
- Includes:
- Executable
- Defined in:
- lib/a2a/operation/list_task_push_notification_configs.rb
Defined Under Namespace
Classes: Response
Constant Summary collapse
- METHOD =
"ListTaskPushNotificationConfigs"
Instance Attribute Summary collapse
-
#page_size ⇒ Object
readonly
Returns the value of attribute page_size.
-
#page_token ⇒ Object
readonly
Returns the value of attribute page_token.
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
Instance Method Summary collapse
- #execute_http_json(protocol) ⇒ Object
- #execute_json_rpc(protocol) ⇒ Object
-
#initialize(task_id:, page_size: nil, page_token: nil, tenant: nil) ⇒ ListTaskPushNotificationConfigs
constructor
A new instance of ListTaskPushNotificationConfigs.
- #params ⇒ Object
Methods included from Executable
Constructor Details
#initialize(task_id:, page_size: nil, page_token: nil, tenant: nil) ⇒ ListTaskPushNotificationConfigs
Returns a new instance of ListTaskPushNotificationConfigs.
12 13 14 15 16 17 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 12 def initialize(task_id:, page_size: nil, page_token: nil, tenant: nil) @task_id = task_id @page_size = page_size @page_token = page_token @tenant = tenant end |
Instance Attribute Details
#page_size ⇒ Object (readonly)
Returns the value of attribute page_size.
10 11 12 |
# File 'lib/a2a/operation/list_task_push_notification_configs.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_task_push_notification_configs.rb', line 10 def page_token @page_token end |
#task_id ⇒ Object (readonly)
Returns the value of attribute task_id.
10 11 12 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 10 def task_id @task_id end |
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
10 11 12 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 10 def tenant @tenant end |
Instance Method Details
#execute_http_json(protocol) ⇒ Object
26 27 28 29 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 26 def execute_http_json(protocol) query = { "pageSize" => page_size, "pageToken" => page_token }.compact Response.from_h(protocol.get("/tasks/#{task_id}/pushNotificationConfigs", query: query)) end |
#execute_json_rpc(protocol) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 19 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
31 32 33 34 35 36 37 38 |
# File 'lib/a2a/operation/list_task_push_notification_configs.rb', line 31 def params { "taskId" => task_id, "pageSize" => page_size, "pageToken" => page_token, "tenant" => tenant }.compact end |