Class: GetApisAPIIDTagsResponse

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



5586
5587
5588
5589
5590
5591
# File 'lib/schemas.rb', line 5586

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    tags: d["tags"]&.map { |x| GetApisAPIIDTagsResponseTagsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



5593
5594
5595
# File 'lib/schemas.rb', line 5593

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



5597
5598
5599
5600
5601
# File 'lib/schemas.rb', line 5597

def to_dynamic
  {
    "tags" => tags&.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



5603
5604
5605
# File 'lib/schemas.rb', line 5603

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end