Class: GetApisAPIIDVersionsVersionIDResponse404

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



6528
6529
6530
6531
6532
6533
6534
6535
# File 'lib/schemas.rb', line 6528

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                               d["detail"],
    title:                                                d["title"],
    get_apis_api_id_versions_version_id_response404_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



6537
6538
6539
# File 'lib/schemas.rb', line 6537

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

Instance Method Details

#to_dynamicObject



6541
6542
6543
6544
6545
6546
6547
# File 'lib/schemas.rb', line 6541

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => get_apis_api_id_versions_version_id_response404_type,
  }
end

#to_json(options = nil) ⇒ Object



6549
6550
6551
# File 'lib/schemas.rb', line 6549

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