Class: GetApisAPIIDSchemasSchemaIDFilesResponse422

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



5259
5260
5261
5262
5263
5264
5265
5266
# File 'lib/schemas.rb', line 5259

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

.from_json!(json) ⇒ Object



5268
5269
5270
# File 'lib/schemas.rb', line 5268

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

Instance Method Details

#to_dynamicObject



5272
5273
5274
5275
5276
5277
5278
# File 'lib/schemas.rb', line 5272

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

#to_json(options = nil) ⇒ Object



5280
5281
5282
# File 'lib/schemas.rb', line 5280

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