Class: Cadenya::Types::ObjectiveEventData_ToolDenied

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, tool_denied: nil) ⇒ ObjectiveEventData_ToolDenied

Returns a new instance of ObjectiveEventData_ToolDenied.



8619
8620
8621
8622
# File 'lib/cadenya/types.rb', line 8619

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

Instance Attribute Details

#tool_deniedObject (readonly)

Returns the value of attribute tool_denied.



8617
8618
8619
# File 'lib/cadenya/types.rb', line 8617

def tool_denied
  @tool_denied
end

#typeObject (readonly)

Returns the value of attribute type.



8617
8618
8619
# File 'lib/cadenya/types.rb', line 8617

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8624
8625
8626
8627
8628
8629
# File 'lib/cadenya/types.rb', line 8624

def self.from_json(data)
  new(
    type: data["type"],
    tool_denied: data["toolDenied"].nil? ? nil : Types::ToolDenied.from_json(data["toolDenied"]),
  )
end

Instance Method Details

#to_hObject



8631
8632
8633
8634
8635
8636
# File 'lib/cadenya/types.rb', line 8631

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