Class: Azure::ARM::Web::Models::AutoHealRules

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionsAutoHealActions

is triggered

Returns:



21
22
23
# File 'lib/azure_mgmt_web/models/auto_heal_rules.rb', line 21

def actions
  @actions
end

#triggersAutoHealTriggers

execute the auto-heal actions

Returns:



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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