Class: Cadenya::Types::ToolOverlay_ParameterAction_Pin

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, pin: nil) ⇒ ToolOverlay_ParameterAction_Pin

Returns a new instance of ToolOverlay_ParameterAction_Pin.



8412
8413
8414
8415
# File 'lib/cadenya/types.rb', line 8412

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

Instance Attribute Details

#pinObject (readonly)

Returns the value of attribute pin.



8410
8411
8412
# File 'lib/cadenya/types.rb', line 8410

def pin
  @pin
end

#typeObject (readonly)

Returns the value of attribute type.



8410
8411
8412
# File 'lib/cadenya/types.rb', line 8410

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8417
8418
8419
8420
8421
8422
# File 'lib/cadenya/types.rb', line 8417

def self.from_json(data)
  new(
    type: data["type"],
    pin: data["pin"].nil? ? nil : Types::ParameterAction_Pin.from_json(data["pin"]),
  )
end

Instance Method Details

#to_hObject



8424
8425
8426
8427
8428
8429
# File 'lib/cadenya/types.rb', line 8424

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