Class: GetMonitorsMonitorIDResponseMonitorLastRunStatsRequests

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



12501
12502
12503
12504
12505
12506
# File 'lib/schemas.rb', line 12501

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

.from_json!(json) ⇒ Object



12508
12509
12510
# File 'lib/schemas.rb', line 12508

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

Instance Method Details

#to_dynamicObject



12512
12513
12514
12515
12516
# File 'lib/schemas.rb', line 12512

def to_dynamic
  {
    "total" => total,
  }
end

#to_json(options = nil) ⇒ Object



12518
12519
12520
# File 'lib/schemas.rb', line 12518

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