Class: GetMonitorsMonitorIDResponse401Error

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



12827
12828
12829
12830
12831
12832
12833
# File 'lib/schemas.rb', line 12827

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

.from_json!(json) ⇒ Object



12835
12836
12837
# File 'lib/schemas.rb', line 12835

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

Instance Method Details

#to_dynamicObject



12839
12840
12841
12842
12843
12844
# File 'lib/schemas.rb', line 12839

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

#to_json(options = nil) ⇒ Object



12846
12847
12848
# File 'lib/schemas.rb', line 12846

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