Class: Cadenya::Types::UpdateMemoryEntryRequest

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, memory_layer_id: nil, id: nil, metadata: nil, spec: nil, update_mask: nil) ⇒ UpdateMemoryEntryRequest

Returns a new instance of UpdateMemoryEntryRequest.



6762
6763
6764
6765
6766
6767
6768
6769
# File 'lib/cadenya/types.rb', line 6762

def initialize(workspace_id: nil, memory_layer_id: nil, id: nil, metadata: nil, spec: nil, update_mask: nil)
  @workspace_id = workspace_id
  @memory_layer_id = memory_layer_id
  @id = id
  @metadata = 
  @spec = spec
  @update_mask = update_mask
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def id
  @id
end

#memory_layer_idObject (readonly)

Returns the value of attribute memory_layer_id.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def memory_layer_id
  @memory_layer_id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6760
6761
6762
# File 'lib/cadenya/types.rb', line 6760

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
# File 'lib/cadenya/types.rb', line 6771

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    memory_layer_id: data["memoryLayerId"],
    id: data["id"],
    metadata: data["metadata"].nil? ? nil : Types::UpdateResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::MemoryEntryUpdateSpec.from_json(data["spec"]),
    update_mask: data["updateMask"],
  )
end

Instance Method Details

#to_hObject



6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
# File 'lib/cadenya/types.rb', line 6782

def to_h
  {
    workspace_id: Util.plain(@workspace_id),
    memory_layer_id: Util.plain(@memory_layer_id),
    id: Util.plain(@id),
    metadata: Util.plain(@metadata),
    spec: Util.plain(@spec),
    update_mask: Util.plain(@update_mask),
  }.reject { |_k, v| v.nil? }
end