Class: GetApisAPIIDVersionsResponse422

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



6262
6263
6264
6265
6266
6267
6268
6269
# File 'lib/schemas.rb', line 6262

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

.from_json!(json) ⇒ Object



6271
6272
6273
# File 'lib/schemas.rb', line 6271

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

Instance Method Details

#to_dynamicObject



6275
6276
6277
6278
6279
6280
6281
# File 'lib/schemas.rb', line 6275

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

#to_json(options = nil) ⇒ Object



6283
6284
6285
# File 'lib/schemas.rb', line 6283

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