Class: DeleteApisAPIIDSchemasSchemaIDFilesFilePathResponse500

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



447
448
449
450
451
452
453
454
# File 'lib/schemas.rb', line 447

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

.from_json!(json) ⇒ Object



456
457
458
# File 'lib/schemas.rb', line 456

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

Instance Method Details

#to_dynamicObject



460
461
462
463
464
465
466
# File 'lib/schemas.rb', line 460

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

#to_json(options = nil) ⇒ Object



468
469
470
# File 'lib/schemas.rb', line 468

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