Class: DeleteMonitorsMonitorIDResponse500Error

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



3401
3402
3403
3404
3405
3406
3407
# File 'lib/schemas.rb', line 3401

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                                           d["message"],
    delete_monitors_monitor_id_response500_error_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



3409
3410
3411
# File 'lib/schemas.rb', line 3409

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

Instance Method Details

#to_dynamicObject



3413
3414
3415
3416
3417
3418
# File 'lib/schemas.rb', line 3413

def to_dynamic
  {
    "message" => message,
    "name"    => delete_monitors_monitor_id_response500_error_name,
  }
end

#to_json(options = nil) ⇒ Object



3420
3421
3422
# File 'lib/schemas.rb', line 3420

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