Class: Cadenya::Types::ObjectiveEventWebhookDataData
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveEventWebhookDataData
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#agent_variation ⇒ Object
readonly
Returns the value of attribute agent_variation.
-
#objective ⇒ Object
readonly
Returns the value of attribute objective.
-
#objective_event ⇒ Object
readonly
Returns the value of attribute objective_event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(agent: nil, agent_variation: nil, objective: nil, objective_event: nil) ⇒ ObjectiveEventWebhookDataData
constructor
A new instance of ObjectiveEventWebhookDataData.
- #to_h ⇒ Object
Constructor Details
#initialize(agent: nil, agent_variation: nil, objective: nil, objective_event: nil) ⇒ ObjectiveEventWebhookDataData
Returns a new instance of ObjectiveEventWebhookDataData.
7676 7677 7678 7679 7680 7681 |
# File 'lib/cadenya/types.rb', line 7676 def initialize(agent: nil, agent_variation: nil, objective: nil, objective_event: nil) @agent = agent @agent_variation = agent_variation @objective = objective @objective_event = objective_event end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
7674 7675 7676 |
# File 'lib/cadenya/types.rb', line 7674 def agent @agent end |
#agent_variation ⇒ Object (readonly)
Returns the value of attribute agent_variation.
7674 7675 7676 |
# File 'lib/cadenya/types.rb', line 7674 def agent_variation @agent_variation end |
#objective ⇒ Object (readonly)
Returns the value of attribute objective.
7674 7675 7676 |
# File 'lib/cadenya/types.rb', line 7674 def objective @objective end |
#objective_event ⇒ Object (readonly)
Returns the value of attribute objective_event.
7674 7675 7676 |
# File 'lib/cadenya/types.rb', line 7674 def objective_event @objective_event end |
Class Method Details
.from_json(data) ⇒ Object
7683 7684 7685 7686 7687 7688 7689 7690 |
# File 'lib/cadenya/types.rb', line 7683 def self.from_json(data) new( agent: data["agent"].nil? ? nil : Types::ResourceMetadata.from_json(data["agent"]), agent_variation: data["agentVariation"].nil? ? nil : Types::ResourceMetadata.from_json(data["agentVariation"]), objective: data["objective"].nil? ? nil : Types::OperationMetadata.from_json(data["objective"]), objective_event: data["objectiveEvent"].nil? ? nil : Types::ObjectiveEvent.from_json(data["objectiveEvent"]), ) end |