Class: GetMonitorsMonitorIDResponse500Error

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



12973
12974
12975
12976
12977
12978
12979
# File 'lib/schemas.rb', line 12973

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

.from_json!(json) ⇒ Object



12981
12982
12983
# File 'lib/schemas.rb', line 12981

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

Instance Method Details

#to_dynamicObject



12985
12986
12987
12988
12989
12990
# File 'lib/schemas.rb', line 12985

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

#to_json(options = nil) ⇒ Object



12992
12993
12994
# File 'lib/schemas.rb', line 12992

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