Class: GetApisAPIIDSchemasSchemaIDResponse404

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



5454
5455
5456
5457
5458
5459
5460
5461
# File 'lib/schemas.rb', line 5454

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

.from_json!(json) ⇒ Object



5463
5464
5465
# File 'lib/schemas.rb', line 5463

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

Instance Method Details

#to_dynamicObject



5467
5468
5469
5470
5471
5472
5473
# File 'lib/schemas.rb', line 5467

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

#to_json(options = nil) ⇒ Object



5475
5476
5477
# File 'lib/schemas.rb', line 5475

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