Class: PostMonitorsResponse
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PostMonitorsResponse
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
25653 25654 25655 25656 25657 25658 |
# File 'lib/schemas.rb', line 25653 def self.from_dynamic!(d) d = Types::Hash[d] new( monitor: d["monitor"] ? PostMonitorsResponseMonitor.from_dynamic!(d["monitor"]) : nil, ) end |
.from_json!(json) ⇒ Object
25660 25661 25662 |
# File 'lib/schemas.rb', line 25660 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
25664 25665 25666 25667 25668 |
# File 'lib/schemas.rb', line 25664 def to_dynamic { "monitor" => monitor&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
25670 25671 25672 |
# File 'lib/schemas.rb', line 25670 def to_json( = nil) JSON.generate(to_dynamic, ) end |