Class: DeleteMonitorsMonitorIDResponse

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



3225
3226
3227
3228
3229
3230
# File 'lib/schemas.rb', line 3225

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

.from_json!(json) ⇒ Object



3232
3233
3234
# File 'lib/schemas.rb', line 3232

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

Instance Method Details

#to_dynamicObject



3236
3237
3238
3239
3240
# File 'lib/schemas.rb', line 3236

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

#to_json(options = nil) ⇒ Object



3242
3243
3244
# File 'lib/schemas.rb', line 3242

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