Class: PutApisAPIIDVersionsVersionIDResponse401

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



29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
# File 'lib/schemas.rb', line 29294

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

.from_json!(json) ⇒ Object



29305
29306
29307
# File 'lib/schemas.rb', line 29305

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

Instance Method Details

#to_dynamicObject



29309
29310
29311
29312
29313
29314
29315
29316
29317
# File 'lib/schemas.rb', line 29309

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

#to_json(options = nil) ⇒ Object



29319
29320
29321
# File 'lib/schemas.rb', line 29319

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