Class: Azure::ARM::Web::Models::AutoHealRules
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::AutoHealRules
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/auto_heal_rules.rb
Overview
AutoHealRules - describes the rules which can be defined for auto-heal
Instance Attribute Summary collapse
-
#actions ⇒ AutoHealActions
is triggered.
-
#triggers ⇒ AutoHealTriggers
execute the auto-heal actions.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ AutoHealRules
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#actions ⇒ AutoHealActions
is triggered
21 22 23 |
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 21 def actions @actions end |
#triggers ⇒ AutoHealTriggers
execute the auto-heal actions
17 18 19 |
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 17 def triggers @triggers end |
Class Method Details
.deserialize_object(object) ⇒ AutoHealRules
Deserializes given Ruby Hash into Model object.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 60 def self.deserialize_object(object) return if object.nil? output_object = AutoHealRules.new deserialized_property = object['triggers'] unless deserialized_property.nil? deserialized_property = AutoHealTriggers.deserialize_object(deserialized_property) end output_object.triggers = deserialized_property deserialized_property = object['actions'] unless deserialized_property.nil? deserialized_property = AutoHealActions.deserialize_object(deserialized_property) end output_object.actions = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 36 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.triggers unless serialized_property.nil? serialized_property = AutoHealTriggers.serialize_object(serialized_property) end output_object['triggers'] = serialized_property unless serialized_property.nil? serialized_property = object.actions unless serialized_property.nil? serialized_property = AutoHealActions.serialize_object(serialized_property) end output_object['actions'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
26 27 28 29 |
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 26 def validate @triggers.validate unless @triggers.nil? @actions.validate unless @actions.nil? end |