Class: PutApisAPIIDSchemasSchemaIDFilesFilePathResponse404

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



28813
28814
28815
28816
28817
28818
28819
28820
# File 'lib/schemas.rb', line 28813

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_response404_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



28822
28823
28824
# File 'lib/schemas.rb', line 28822

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

Instance Method Details

#to_dynamicObject



28826
28827
28828
28829
28830
28831
28832
# File 'lib/schemas.rb', line 28826

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

#to_json(options = nil) ⇒ Object



28834
28835
28836
# File 'lib/schemas.rb', line 28834

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