Class: GetMonitorsMonitorIDResponseMonitorNotifications
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- GetMonitorsMonitorIDResponseMonitorNotifications
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
12655 12656 12657 12658 12659 12660 12661 |
# File 'lib/schemas.rb', line 12655 def self.from_dynamic!(d) d = Types::Hash[d] new( on_error: d["onError"]&.map { |x| GetMonitorsMonitorIDResponseMonitorNotificationsOnErrorItem.from_dynamic!(x) }, on_failure: d["onFailure"]&.map { |x| GetMonitorsMonitorIDResponseMonitorNotificationsOnFailureItem.from_dynamic!(x) }, ) end |
.from_json!(json) ⇒ Object
12663 12664 12665 |
# File 'lib/schemas.rb', line 12663 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
12667 12668 12669 12670 12671 12672 |
# File 'lib/schemas.rb', line 12667 def to_dynamic { "onError" => on_error&.map { |x| x.to_dynamic }, "onFailure" => on_failure&.map { |x| x.to_dynamic }, } end |
#to_json(options = nil) ⇒ Object
12674 12675 12676 |
# File 'lib/schemas.rb', line 12674 def to_json( = nil) JSON.generate(to_dynamic, ) end |