Class: Azure::ARM::Web::Models::AutoHealActions
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::AutoHealActions
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/auto_heal_actions.rb
Overview
AutoHealActions - Describes the actions which can be taken by the auto-heal module when a rule is triggered.
Instance Attribute Summary collapse
-
#action_type ⇒ AutoHealActionType
taken.
-
#custom_action ⇒ AutoHealCustomAction
CustomAction - custom action to be taken.
-
#min_process_execution_time ⇒ String
must execute before taking the action.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ AutoHealActions
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
#action_type ⇒ AutoHealActionType
taken. Possible values include: ‘Recycle’, ‘LogEvent’, ‘CustomAction’
18 19 20 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 18 def action_type @action_type end |
#custom_action ⇒ AutoHealCustomAction
Returns CustomAction - custom action to be taken.
21 22 23 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 21 def custom_action @custom_action end |
#min_process_execution_time ⇒ String
must execute before taking the action
26 27 28 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 26 def min_process_execution_time @min_process_execution_time end |
Class Method Details
.deserialize_object(object) ⇒ AutoHealActions
Deserializes given Ruby Hash into Model object.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 65 def self.deserialize_object(object) return if object.nil? output_object = AutoHealActions.new deserialized_property = object['actionType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = AutoHealActionType.constants.any? { |e| AutoHealActionType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum AutoHealActionType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.action_type = deserialized_property deserialized_property = object['customAction'] unless deserialized_property.nil? deserialized_property = AutoHealCustomAction.deserialize_object(deserialized_property) end output_object.custom_action = deserialized_property deserialized_property = object['minProcessExecutionTime'] output_object.min_process_execution_time = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 41 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.action_type output_object['actionType'] = serialized_property unless serialized_property.nil? serialized_property = object.custom_action unless serialized_property.nil? serialized_property = AutoHealCustomAction.serialize_object(serialized_property) end output_object['customAction'] = serialized_property unless serialized_property.nil? serialized_property = object.min_process_execution_time output_object['minProcessExecutionTime'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
31 32 33 34 |
# File 'lib/azure_mgmt_web/models/auto_heal_actions.rb', line 31 def validate fail MsRest::ValidationError, 'property action_type is nil' if @action_type.nil? @custom_action.validate unless @custom_action.nil? end |