Class: Google::ADK::FunctionResponse
- Inherits:
-
Object
- Object
- Google::ADK::FunctionResponse
- Defined in:
- lib/google/adk/events.rb
Overview
Represents a function response in an event
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_error ⇒ Object
readonly
Returns the value of attribute is_error.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(id:, name:, response:, is_error: false) ⇒ FunctionResponse
constructor
Initialize a function response.
-
#to_h ⇒ Hash
Convert to hash.
Constructor Details
#initialize(id:, name:, response:, is_error: false) ⇒ FunctionResponse
Initialize a function response
46 47 48 49 50 51 |
# File 'lib/google/adk/events.rb', line 46 def initialize(id:, name:, response:, is_error: false) @id = id @name = name @response = response @is_error = is_error end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
38 39 40 |
# File 'lib/google/adk/events.rb', line 38 def id @id end |
#is_error ⇒ Object (readonly)
Returns the value of attribute is_error.
38 39 40 |
# File 'lib/google/adk/events.rb', line 38 def is_error @is_error end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/google/adk/events.rb', line 38 def name @name end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
38 39 40 |
# File 'lib/google/adk/events.rb', line 38 def response @response end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash
56 57 58 59 60 61 62 63 |
# File 'lib/google/adk/events.rb', line 56 def to_h { id: @id, name: @name, response: @response, is_error: @is_error } end |