Class: GetMonitorsMonitorIDResponse500

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



13000
13001
13002
13003
13004
13005
# File 'lib/schemas.rb', line 13000

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? GetMonitorsMonitorIDResponse500Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



13007
13008
13009
# File 'lib/schemas.rb', line 13007

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

Instance Method Details

#to_dynamicObject



13011
13012
13013
13014
13015
# File 'lib/schemas.rb', line 13011

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



13017
13018
13019
# File 'lib/schemas.rb', line 13017

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