Class: PutMonitorsMonitorIDResponse401Error

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



33414
33415
33416
33417
33418
33419
33420
# File 'lib/schemas.rb', line 33414

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

.from_json!(json) ⇒ Object



33422
33423
33424
# File 'lib/schemas.rb', line 33422

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

Instance Method Details

#to_dynamicObject



33426
33427
33428
33429
33430
33431
# File 'lib/schemas.rb', line 33426

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

#to_json(options = nil) ⇒ Object



33433
33434
33435
# File 'lib/schemas.rb', line 33433

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