Class: GetApisAPIIDSchemasSchemaIDFilesFilePathResponse500

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



4985
4986
4987
4988
4989
4990
4991
4992
# File 'lib/schemas.rb', line 4985

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

.from_json!(json) ⇒ Object



4994
4995
4996
# File 'lib/schemas.rb', line 4994

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

Instance Method Details

#to_dynamicObject



4998
4999
5000
5001
5002
5003
5004
# File 'lib/schemas.rb', line 4998

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

#to_json(options = nil) ⇒ Object



5006
5007
5008
# File 'lib/schemas.rb', line 5006

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