Class: GetApisAPIIDVersionsResponse401

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



6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
# File 'lib/schemas.rb', line 6184

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

.from_json!(json) ⇒ Object



6195
6196
6197
# File 'lib/schemas.rb', line 6195

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

Instance Method Details

#to_dynamicObject



6199
6200
6201
6202
6203
6204
6205
6206
6207
# File 'lib/schemas.rb', line 6199

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

#to_json(options = nil) ⇒ Object



6209
6210
6211
# File 'lib/schemas.rb', line 6209

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