Class: PutMonitorsMonitorIDResponse404Error

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



33471
33472
33473
33474
33475
33476
33477
# File 'lib/schemas.rb', line 33471

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                                        d["message"],
    put_monitors_monitor_id_response404_error_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



33479
33480
33481
# File 'lib/schemas.rb', line 33479

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

Instance Method Details

#to_dynamicObject



33483
33484
33485
33486
33487
33488
# File 'lib/schemas.rb', line 33483

def to_dynamic
  {
    "message" => message,
    "name"    => put_monitors_monitor_id_response404_error_name,
  }
end

#to_json(options = nil) ⇒ Object



33490
33491
33492
# File 'lib/schemas.rb', line 33490

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