Class: Cadenya::Types::ToolSetEvent

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(metadata: nil, tool_set_id: nil, event: nil, info: nil) ⇒ ToolSetEvent

Returns a new instance of ToolSetEvent.



6173
6174
6175
6176
6177
6178
# File 'lib/cadenya/types.rb', line 6173

def initialize(metadata: nil, tool_set_id: nil, event: nil, info: nil)
  @metadata = 
  @tool_set_id = tool_set_id
  @event = event
  @info = info
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



6171
6172
6173
# File 'lib/cadenya/types.rb', line 6171

def event
  @event
end

#infoObject (readonly)

Returns the value of attribute info.



6171
6172
6173
# File 'lib/cadenya/types.rb', line 6171

def info
  @info
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6171
6172
6173
# File 'lib/cadenya/types.rb', line 6171

def 
  @metadata
end

#tool_set_idObject (readonly)

Returns the value of attribute tool_set_id.



6171
6172
6173
# File 'lib/cadenya/types.rb', line 6171

def tool_set_id
  @tool_set_id
end

Class Method Details

.from_json(data) ⇒ Object



6180
6181
6182
6183
6184
6185
6186
6187
# File 'lib/cadenya/types.rb', line 6180

def self.from_json(data)
  new(
    metadata: data["metadata"].nil? ? nil : Types::OperationMetadata.from_json(data["metadata"]),
    tool_set_id: data["toolSetId"],
    event: data["event"].nil? ? nil : Types.decode_ToolSetEventData(data["event"]),
    info: data["info"].nil? ? nil : Types::ToolSetEventInfo.from_json(data["info"]),
  )
end

Instance Method Details

#to_hObject



6189
6190
6191
6192
6193
6194
6195
6196
# File 'lib/cadenya/types.rb', line 6189

def to_h
  {
    metadata: Util.plain(@metadata),
    tool_set_id: Util.plain(@tool_set_id),
    event: Util.plain(@event),
    info: Util.plain(@info),
  }.reject { |_k, v| v.nil? }
end