Class: PutMonitorsMonitorIDResponse

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



33384
33385
33386
33387
33388
33389
# File 'lib/schemas.rb', line 33384

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

.from_json!(json) ⇒ Object



33391
33392
33393
# File 'lib/schemas.rb', line 33391

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

Instance Method Details

#to_dynamicObject



33395
33396
33397
33398
33399
# File 'lib/schemas.rb', line 33395

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

#to_json(options = nil) ⇒ Object



33401
33402
33403
# File 'lib/schemas.rb', line 33401

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