Class: Cadenya::Types::ToolSetEventData_SyncStarted

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_started: nil) ⇒ ToolSetEventData_SyncStarted

Returns a new instance of ToolSetEventData_SyncStarted.



7878
7879
7880
7881
# File 'lib/cadenya/types.rb', line 7878

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

Instance Attribute Details

#sync_startedObject (readonly)

Returns the value of attribute sync_started.



7876
7877
7878
# File 'lib/cadenya/types.rb', line 7876

def sync_started
  @sync_started
end

#typeObject (readonly)

Returns the value of attribute type.



7876
7877
7878
# File 'lib/cadenya/types.rb', line 7876

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



7883
7884
7885
7886
7887
7888
# File 'lib/cadenya/types.rb', line 7883

def self.from_json(data)
  new(
    type: data["type"],
    sync_started: data["syncStarted"].nil? ? nil : Types::SyncStarted.from_json(data["syncStarted"]),
  )
end

Instance Method Details

#to_hObject



7890
7891
7892
7893
7894
7895
# File 'lib/cadenya/types.rb', line 7890

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