Class: DeleteApisAPIIDSchemasSchemaIDFilesFilePathResponse401

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



295
296
297
298
299
300
301
302
303
304
# File 'lib/schemas.rb', line 295

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

.from_json!(json) ⇒ Object



306
307
308
# File 'lib/schemas.rb', line 306

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

Instance Method Details

#to_dynamicObject



310
311
312
313
314
315
316
317
318
# File 'lib/schemas.rb', line 310

def to_dynamic
  {
    "detail"   => detail,
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => delete_apis_api_id_schemas_schema_id_files_file_path_response401_type,
  }
end

#to_json(options = nil) ⇒ Object



320
321
322
# File 'lib/schemas.rb', line 320

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