Class: DeleteMonitorsMonitorIDResponseMonitor

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



3198
3199
3200
3201
3202
3203
3204
# File 'lib/schemas.rb', line 3198

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

.from_json!(json) ⇒ Object



3206
3207
3208
# File 'lib/schemas.rb', line 3206

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

Instance Method Details

#to_dynamicObject



3210
3211
3212
3213
3214
3215
# File 'lib/schemas.rb', line 3210

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

#to_json(options = nil) ⇒ Object



3217
3218
3219
# File 'lib/schemas.rb', line 3217

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