Class: A2A::Operation::SendMessage::Configuration
- Inherits:
-
Object
- Object
- A2A::Operation::SendMessage::Configuration
- Defined in:
- lib/a2a/operation/send_message/configuration.rb
Instance Attribute Summary collapse
-
#accepted_output_modes ⇒ Object
readonly
Returns the value of attribute accepted_output_modes.
-
#history_length ⇒ Object
readonly
Returns the value of attribute history_length.
-
#return_immediately ⇒ Object
readonly
Returns the value of attribute return_immediately.
-
#task_push_notification_config ⇒ Object
readonly
Returns the value of attribute task_push_notification_config.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 10 def initialize(**kwargs) @accepted_output_modes = kwargs[:accepted_output_modes] @task_push_notification_config = kwargs[:task_push_notification_config] @history_length = kwargs[:history_length] @return_immediately = kwargs[:return_immediately] end |
Instance Attribute Details
#accepted_output_modes ⇒ Object (readonly)
Returns the value of attribute accepted_output_modes.
7 8 9 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 7 def accepted_output_modes @accepted_output_modes end |
#history_length ⇒ Object (readonly)
Returns the value of attribute history_length.
7 8 9 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 7 def history_length @history_length end |
#return_immediately ⇒ Object (readonly)
Returns the value of attribute return_immediately.
7 8 9 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 7 def return_immediately @return_immediately end |
#task_push_notification_config ⇒ Object (readonly)
Returns the value of attribute task_push_notification_config.
7 8 9 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 7 def task_push_notification_config @task_push_notification_config end |
Class Method Details
.from_h(hash) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 17 def self.from_h(hash) new( accepted_output_modes: hash["acceptedOutputModes"], task_push_notification_config: hash["taskPushNotificationConfig"], history_length: hash["historyLength"], return_immediately: hash["returnImmediately"] ) end |
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/a2a/operation/send_message/configuration.rb', line 26 def to_h push_config = task_push_notification_config push_config = push_config.to_h if push_config.is_a?(PushNotification::Config) { "acceptedOutputModes" => accepted_output_modes, "taskPushNotificationConfig" => push_config, "historyLength" => history_length, "returnImmediately" => return_immediately }.compact end |