Class: Cadenya::Types::UpdateAccountResourceMetadata

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(name: nil, external_id: nil, labels: nil) ⇒ UpdateAccountResourceMetadata

Returns a new instance of UpdateAccountResourceMetadata.



6602
6603
6604
6605
6606
# File 'lib/cadenya/types.rb', line 6602

def initialize(name: nil, external_id: nil, labels: nil)
  @name = name
  @external_id = external_id
  @labels = labels
end

Instance Attribute Details

#external_idObject (readonly)

Returns the value of attribute external_id.



6600
6601
6602
# File 'lib/cadenya/types.rb', line 6600

def external_id
  @external_id
end

#labelsObject (readonly)

Returns the value of attribute labels.



6600
6601
6602
# File 'lib/cadenya/types.rb', line 6600

def labels
  @labels
end

#nameObject (readonly)

Returns the value of attribute name.



6600
6601
6602
# File 'lib/cadenya/types.rb', line 6600

def name
  @name
end

Class Method Details

.from_json(data) ⇒ Object



6608
6609
6610
6611
6612
6613
6614
# File 'lib/cadenya/types.rb', line 6608

def self.from_json(data)
  new(
    name: data["name"],
    external_id: data["externalId"],
    labels: data["labels"],
  )
end

Instance Method Details

#to_hObject



6616
6617
6618
6619
6620
6621
6622
# File 'lib/cadenya/types.rb', line 6616

def to_h
  {
    name: Util.plain(@name),
    external_id: Util.plain(@external_id),
    labels: Util.plain(@labels),
  }.reject { |_k, v| v.nil? }
end