Class: Cadenya::Types::UpdateMemoryLayerRequest

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

Returns a new instance of UpdateMemoryLayerRequest.



6797
6798
6799
6800
6801
6802
6803
# File 'lib/cadenya/types.rb', line 6797

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6795
6796
6797
# File 'lib/cadenya/types.rb', line 6795

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6795
6796
6797
# File 'lib/cadenya/types.rb', line 6795

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6795
6796
6797
# File 'lib/cadenya/types.rb', line 6795

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6795
6796
6797
# File 'lib/cadenya/types.rb', line 6795

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6795
6796
6797
# File 'lib/cadenya/types.rb', line 6795

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6805
6806
6807
6808
6809
6810
6811
6812
6813
# File 'lib/cadenya/types.rb', line 6805

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

Instance Method Details

#to_hObject



6815
6816
6817
6818
6819
6820
6821
6822
6823
# File 'lib/cadenya/types.rb', line 6815

def to_h
  {
    workspace_id: Util.plain(@workspace_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