Class: Google::ADK::FunctionCall
- Inherits:
-
Object
- Object
- Google::ADK::FunctionCall
- Defined in:
- lib/google/adk/events.rb
Overview
Represents a function call in an event
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id: nil, name:, arguments:) ⇒ FunctionCall
constructor
Initialize a function call.
-
#to_h ⇒ Hash
Convert to hash.
Constructor Details
#initialize(id: nil, name:, arguments:) ⇒ FunctionCall
Initialize a function call
18 19 20 21 22 |
# File 'lib/google/adk/events.rb', line 18 def initialize(id: nil, name:, arguments:) @id = id || "call-#{SecureRandom.uuid}" @name = name @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
11 12 13 |
# File 'lib/google/adk/events.rb', line 11 def arguments @arguments end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/google/adk/events.rb', line 11 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/google/adk/events.rb', line 11 def name @name end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash
27 28 29 30 31 32 33 |
# File 'lib/google/adk/events.rb', line 27 def to_h { id: @id, name: @name, arguments: @arguments } end |