Class: PutMonitorsMonitorIDResponse500Error

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



33560
33561
33562
33563
33564
33565
33566
# File 'lib/schemas.rb', line 33560

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

.from_json!(json) ⇒ Object



33568
33569
33570
# File 'lib/schemas.rb', line 33568

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

Instance Method Details

#to_dynamicObject



33572
33573
33574
33575
33576
33577
# File 'lib/schemas.rb', line 33572

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

#to_json(options = nil) ⇒ Object



33579
33580
33581
# File 'lib/schemas.rb', line 33579

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