Class: GetApisAPIIDSchemasSchemaIDResponse400

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



5333
5334
5335
5336
5337
5338
5339
5340
# File 'lib/schemas.rb', line 5333

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

.from_json!(json) ⇒ Object



5342
5343
5344
# File 'lib/schemas.rb', line 5342

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

Instance Method Details

#to_dynamicObject



5346
5347
5348
5349
5350
5351
5352
# File 'lib/schemas.rb', line 5346

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

#to_json(options = nil) ⇒ Object



5354
5355
5356
# File 'lib/schemas.rb', line 5354

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