Class: Cadenya::Types::CreateOperationMetadata

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

Returns a new instance of CreateOperationMetadata.



1779
1780
1781
1782
# File 'lib/cadenya/types.rb', line 1779

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

Instance Attribute Details

#external_idObject (readonly)

Returns the value of attribute external_id.



1777
1778
1779
# File 'lib/cadenya/types.rb', line 1777

def external_id
  @external_id
end

#labelsObject (readonly)

Returns the value of attribute labels.



1777
1778
1779
# File 'lib/cadenya/types.rb', line 1777

def labels
  @labels
end

Class Method Details

.from_json(data) ⇒ Object



1784
1785
1786
1787
1788
1789
# File 'lib/cadenya/types.rb', line 1784

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

Instance Method Details

#to_hObject



1791
1792
1793
1794
1795
1796
# File 'lib/cadenya/types.rb', line 1791

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