Class: Cadenya::Types::ToolSetEventData_SyncFailed

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(type: nil, sync_failed: nil) ⇒ ToolSetEventData_SyncFailed

Returns a new instance of ToolSetEventData_SyncFailed.



7924
7925
7926
7927
# File 'lib/cadenya/types.rb', line 7924

def initialize(type: nil, sync_failed: nil)
  @type = type
  @sync_failed = sync_failed
end

Instance Attribute Details

#sync_failedObject (readonly)

Returns the value of attribute sync_failed.



7922
7923
7924
# File 'lib/cadenya/types.rb', line 7922

def sync_failed
  @sync_failed
end

#typeObject (readonly)

Returns the value of attribute type.



7922
7923
7924
# File 'lib/cadenya/types.rb', line 7922

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



7929
7930
7931
7932
7933
7934
# File 'lib/cadenya/types.rb', line 7929

def self.from_json(data)
  new(
    type: data["type"],
    sync_failed: data["syncFailed"].nil? ? nil : Types::SyncFailed.from_json(data["syncFailed"]),
  )
end

Instance Method Details

#to_hObject



7936
7937
7938
7939
7940
7941
# File 'lib/cadenya/types.rb', line 7936

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