Class: Cadenya::Types::SubAgentSpawned
- Inherits:
-
Object
- Object
- Cadenya::Types::SubAgentSpawned
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#objective ⇒ Object
readonly
Returns the value of attribute objective.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(agent: nil, objective: nil, task: nil) ⇒ SubAgentSpawned
constructor
A new instance of SubAgentSpawned.
- #to_h ⇒ Object
Constructor Details
#initialize(agent: nil, objective: nil, task: nil) ⇒ SubAgentSpawned
Returns a new instance of SubAgentSpawned.
5222 5223 5224 5225 5226 |
# File 'lib/cadenya/types.rb', line 5222 def initialize(agent: nil, objective: nil, task: nil) @agent = agent @objective = objective @task = task end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
5220 5221 5222 |
# File 'lib/cadenya/types.rb', line 5220 def agent @agent end |
#objective ⇒ Object (readonly)
Returns the value of attribute objective.
5220 5221 5222 |
# File 'lib/cadenya/types.rb', line 5220 def objective @objective end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
5220 5221 5222 |
# File 'lib/cadenya/types.rb', line 5220 def task @task end |
Class Method Details
.from_json(data) ⇒ Object
5228 5229 5230 5231 5232 5233 5234 |
# File 'lib/cadenya/types.rb', line 5228 def self.from_json(data) new( agent: data["agent"].nil? ? nil : Types::ResourceMetadata.from_json(data["agent"]), objective: data["objective"].nil? ? nil : Types::OperationMetadata.from_json(data["objective"]), task: data["task"], ) end |