Class: PutApisAPIIDSchemasSchemaIDFilesFilePathResponse500

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



28887
28888
28889
28890
28891
28892
28893
28894
# File 'lib/schemas.rb', line 28887

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

.from_json!(json) ⇒ Object



28896
28897
28898
# File 'lib/schemas.rb', line 28896

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

Instance Method Details

#to_dynamicObject



28900
28901
28902
28903
28904
28905
28906
# File 'lib/schemas.rb', line 28900

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

#to_json(options = nil) ⇒ Object



28908
28909
28910
# File 'lib/schemas.rb', line 28908

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