Class: GetApisAPIIDVersionsVersionIDResponse401

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



6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
# File 'lib/schemas.rb', line 6487

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

.from_json!(json) ⇒ Object



6498
6499
6500
# File 'lib/schemas.rb', line 6498

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

Instance Method Details

#to_dynamicObject



6502
6503
6504
6505
6506
6507
6508
6509
6510
# File 'lib/schemas.rb', line 6502

def to_dynamic
  {
    "detail"   => detail,
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => get_apis_api_id_versions_version_id_response401_type,
  }
end

#to_json(options = nil) ⇒ Object



6512
6513
6514
# File 'lib/schemas.rb', line 6512

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