Class: Cadenya::Types::ObjectiveEventData_TimedOut

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, timed_out: nil) ⇒ ObjectiveEventData_TimedOut

Returns a new instance of ObjectiveEventData_TimedOut.



8918
8919
8920
8921
# File 'lib/cadenya/types.rb', line 8918

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

Instance Attribute Details

#timed_outObject (readonly)

Returns the value of attribute timed_out.



8916
8917
8918
# File 'lib/cadenya/types.rb', line 8916

def timed_out
  @timed_out
end

#typeObject (readonly)

Returns the value of attribute type.



8916
8917
8918
# File 'lib/cadenya/types.rb', line 8916

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8923
8924
8925
8926
8927
8928
# File 'lib/cadenya/types.rb', line 8923

def self.from_json(data)
  new(
    type: data["type"],
    timed_out: data["timedOut"].nil? ? nil : Types::ObjectiveTimedOut.from_json(data["timedOut"]),
  )
end

Instance Method Details

#to_hObject



8930
8931
8932
8933
8934
8935
# File 'lib/cadenya/types.rb', line 8930

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