Class: Cadenya::Types::ObjectiveEpisodicConfig

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(key: nil, memory_layer_id: nil) ⇒ ObjectiveEpisodicConfig

Returns a new instance of ObjectiveEpisodicConfig.



3699
3700
3701
3702
# File 'lib/cadenya/types.rb', line 3699

def initialize(key: nil, memory_layer_id: nil)
  @key = key
  @memory_layer_id = memory_layer_id
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



3697
3698
3699
# File 'lib/cadenya/types.rb', line 3697

def key
  @key
end

#memory_layer_idObject (readonly)

Returns the value of attribute memory_layer_id.



3697
3698
3699
# File 'lib/cadenya/types.rb', line 3697

def memory_layer_id
  @memory_layer_id
end

Class Method Details

.from_json(data) ⇒ Object



3704
3705
3706
3707
3708
3709
# File 'lib/cadenya/types.rb', line 3704

def self.from_json(data)
  new(
    key: data["key"],
    memory_layer_id: data["memoryLayerId"],
  )
end

Instance Method Details

#to_hObject



3711
3712
3713
3714
3715
3716
# File 'lib/cadenya/types.rb', line 3711

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