Class: GetApisAPIIDSchemasSchemaIDResponse500

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



5528
5529
5530
5531
5532
5533
5534
5535
# File 'lib/schemas.rb', line 5528

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

.from_json!(json) ⇒ Object



5537
5538
5539
# File 'lib/schemas.rb', line 5537

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

Instance Method Details

#to_dynamicObject



5541
5542
5543
5544
5545
5546
5547
# File 'lib/schemas.rb', line 5541

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

#to_json(options = nil) ⇒ Object



5549
5550
5551
# File 'lib/schemas.rb', line 5549

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