Class: PutMonitorsMonitorIDResponse401

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



33441
33442
33443
33444
33445
33446
# File 'lib/schemas.rb', line 33441

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

.from_json!(json) ⇒ Object



33448
33449
33450
# File 'lib/schemas.rb', line 33448

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

Instance Method Details

#to_dynamicObject



33452
33453
33454
33455
33456
# File 'lib/schemas.rb', line 33452

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

#to_json(options = nil) ⇒ Object



33458
33459
33460
# File 'lib/schemas.rb', line 33458

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