Class: Cadenya::Types::AddAgentVariationMemoryLayerRequest

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(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil, position: nil) ⇒ AddAgentVariationMemoryLayerRequest

Returns a new instance of AddAgentVariationMemoryLayerRequest.



328
329
330
331
332
333
334
# File 'lib/cadenya/types.rb', line 328

def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil, position: nil)
  @workspace_id = workspace_id
  @agent_id = agent_id
  @variation_id = variation_id
  @memory_layer_id = memory_layer_id
  @position = position
end

Instance Attribute Details

#agent_idObject (readonly)

Returns the value of attribute agent_id.



326
327
328
# File 'lib/cadenya/types.rb', line 326

def agent_id
  @agent_id
end

#memory_layer_idObject (readonly)

Returns the value of attribute memory_layer_id.



326
327
328
# File 'lib/cadenya/types.rb', line 326

def memory_layer_id
  @memory_layer_id
end

#positionObject (readonly)

Returns the value of attribute position.



326
327
328
# File 'lib/cadenya/types.rb', line 326

def position
  @position
end

#variation_idObject (readonly)

Returns the value of attribute variation_id.



326
327
328
# File 'lib/cadenya/types.rb', line 326

def variation_id
  @variation_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



326
327
328
# File 'lib/cadenya/types.rb', line 326

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



336
337
338
339
340
341
342
343
344
# File 'lib/cadenya/types.rb', line 336

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    agent_id: data["agentId"],
    variation_id: data["variationId"],
    memory_layer_id: data["memoryLayerId"],
    position: data["position"],
  )
end

Instance Method Details

#to_hObject



346
347
348
349
350
351
352
353
354
# File 'lib/cadenya/types.rb', line 346

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