Class: Cadenya::Types::ObjectiveEventData_SubAgentUpdated

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil, sub_agent_updated: nil) ⇒ ObjectiveEventData_SubAgentUpdated

Returns a new instance of ObjectiveEventData_SubAgentUpdated.



8849
8850
8851
8852
# File 'lib/cadenya/types.rb', line 8849

def initialize(type: nil, sub_agent_updated: nil)
  @type = type
  @sub_agent_updated = sub_agent_updated
end

Instance Attribute Details

#sub_agent_updatedObject (readonly)

Returns the value of attribute sub_agent_updated.



8847
8848
8849
# File 'lib/cadenya/types.rb', line 8847

def sub_agent_updated
  @sub_agent_updated
end

#typeObject (readonly)

Returns the value of attribute type.



8847
8848
8849
# File 'lib/cadenya/types.rb', line 8847

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8854
8855
8856
8857
8858
8859
# File 'lib/cadenya/types.rb', line 8854

def self.from_json(data)
  new(
    type: data["type"],
    sub_agent_updated: data["subAgentUpdated"].nil? ? nil : Types::SubAgentUpdated.from_json(data["subAgentUpdated"]),
  )
end

Instance Method Details

#to_hObject



8861
8862
8863
8864
8865
8866
# File 'lib/cadenya/types.rb', line 8861

def to_h
  {
    type: Util.plain(@type),
    sub_agent_updated: Util.plain(@sub_agent_updated),
  }.reject { |_k, v| v.nil? }
end