Class: Cadenya::Types::UpdateToolSetRequest

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) ⇒ UpdateToolSetRequest

Returns a new instance of UpdateToolSetRequest.



6890
6891
6892
6893
6894
6895
6896
# File 'lib/cadenya/types.rb', line 6890

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.



6888
6889
6890
# File 'lib/cadenya/types.rb', line 6888

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6888
6889
6890
# File 'lib/cadenya/types.rb', line 6888

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6888
6889
6890
# File 'lib/cadenya/types.rb', line 6888

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6888
6889
6890
# File 'lib/cadenya/types.rb', line 6888

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6888
6889
6890
# File 'lib/cadenya/types.rb', line 6888

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6898
6899
6900
6901
6902
6903
6904
6905
6906
# File 'lib/cadenya/types.rb', line 6898

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::ToolSetSpec.from_json(data["spec"]),
    update_mask: data["updateMask"],
  )
end

Instance Method Details

#to_hObject



6908
6909
6910
6911
6912
6913
6914
6915
6916
# File 'lib/cadenya/types.rb', line 6908

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