Class: GetMonitorsMonitorIDResponse

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



12797
12798
12799
12800
12801
12802
# File 'lib/schemas.rb', line 12797

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

.from_json!(json) ⇒ Object



12804
12805
12806
# File 'lib/schemas.rb', line 12804

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

Instance Method Details

#to_dynamicObject



12808
12809
12810
12811
12812
# File 'lib/schemas.rb', line 12808

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

#to_json(options = nil) ⇒ Object



12814
12815
12816
# File 'lib/schemas.rb', line 12814

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