Class: PutMonitorsMonitorIDResponseMonitor

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



33355
33356
33357
33358
33359
33360
33361
33362
# File 'lib/schemas.rb', line 33355

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:                                            d["id"],
    put_monitors_monitor_id_response_monitor_name: d["name"],
    uid:                                           d["uid"],
  )
end

.from_json!(json) ⇒ Object



33364
33365
33366
# File 'lib/schemas.rb', line 33364

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

Instance Method Details

#to_dynamicObject



33368
33369
33370
33371
33372
33373
33374
# File 'lib/schemas.rb', line 33368

def to_dynamic
  {
    "id"   => id,
    "name" => put_monitors_monitor_id_response_monitor_name,
    "uid"  => uid,
  }
end

#to_json(options = nil) ⇒ Object



33376
33377
33378
# File 'lib/schemas.rb', line 33376

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