Class: Cadenya::Types::ToolSetEventInfo

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(tool_set: nil, created_by: nil) ⇒ ToolSetEventInfo

Returns a new instance of ToolSetEventInfo.



6216
6217
6218
6219
# File 'lib/cadenya/types.rb', line 6216

def initialize(tool_set: nil, created_by: nil)
  @tool_set = tool_set
  @created_by = created_by
end

Instance Attribute Details

#created_byObject (readonly)

Returns the value of attribute created_by.



6214
6215
6216
# File 'lib/cadenya/types.rb', line 6214

def created_by
  @created_by
end

#tool_setObject (readonly)

Returns the value of attribute tool_set.



6214
6215
6216
# File 'lib/cadenya/types.rb', line 6214

def tool_set
  @tool_set
end

Class Method Details

.from_json(data) ⇒ Object



6221
6222
6223
6224
6225
6226
# File 'lib/cadenya/types.rb', line 6221

def self.from_json(data)
  new(
    tool_set: data["toolSet"].nil? ? nil : Types::ResourceMetadata.from_json(data["toolSet"]),
    created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
  )
end

Instance Method Details

#to_hObject



6228
6229
6230
6231
6232
6233
# File 'lib/cadenya/types.rb', line 6228

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