Class: GetMonitorsMonitorIDResponse404Error

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



12884
12885
12886
12887
12888
12889
12890
# File 'lib/schemas.rb', line 12884

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

.from_json!(json) ⇒ Object



12892
12893
12894
# File 'lib/schemas.rb', line 12892

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

Instance Method Details

#to_dynamicObject



12896
12897
12898
12899
12900
12901
# File 'lib/schemas.rb', line 12896

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

#to_json(options = nil) ⇒ Object



12903
12904
12905
# File 'lib/schemas.rb', line 12903

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