Class: Azure::ARM::Web::Models::AutoHealTriggers
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::AutoHealTriggers
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/auto_heal_triggers.rb
Overview
AutoHealTriggers - describes the triggers for auto-heal.
Instance Attribute Summary collapse
-
#private_bytes_in_kb ⇒ Integer
bytes.
-
#requests ⇒ RequestsBasedTrigger
total requests.
-
#slow_requests ⇒ SlowRequestsBasedTrigger
on request execution time.
-
#status_codes ⇒ Array<StatusCodesBasedTrigger>
based on status codes.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ AutoHealTriggers
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
#private_bytes_in_kb ⇒ Integer
bytes
21 22 23 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 21 def private_bytes_in_kb @private_bytes_in_kb end |
#requests ⇒ RequestsBasedTrigger
total requests
17 18 19 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 17 def requests @requests end |
#slow_requests ⇒ SlowRequestsBasedTrigger
on request execution time
29 30 31 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 29 def slow_requests @slow_requests end |
#status_codes ⇒ Array<StatusCodesBasedTrigger>
based on status codes
25 26 27 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 25 def status_codes @status_codes end |
Class Method Details
.deserialize_object(object) ⇒ AutoHealTriggers
Deserializes given Ruby Hash into Model object.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 85 def self.deserialize_object(object) return if object.nil? output_object = AutoHealTriggers.new deserialized_property = object['requests'] unless deserialized_property.nil? deserialized_property = RequestsBasedTrigger.deserialize_object(deserialized_property) end output_object.requests = deserialized_property deserialized_property = object['privateBytesInKB'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.private_bytes_in_kb = deserialized_property deserialized_property = object['statusCodes'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element1| unless element1.nil? element1 = StatusCodesBasedTrigger.deserialize_object(element1) end deserialized_array.push(element1) end deserialized_property = deserialized_array end output_object.status_codes = deserialized_property deserialized_property = object['slowRequests'] unless deserialized_property.nil? deserialized_property = SlowRequestsBasedTrigger.deserialize_object(deserialized_property) end output_object.slow_requests = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 45 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.requests unless serialized_property.nil? serialized_property = RequestsBasedTrigger.serialize_object(serialized_property) end output_object['requests'] = serialized_property unless serialized_property.nil? serialized_property = object.private_bytes_in_kb output_object['privateBytesInKB'] = serialized_property unless serialized_property.nil? serialized_property = object.status_codes unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = StatusCodesBasedTrigger.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['statusCodes'] = serialized_property unless serialized_property.nil? serialized_property = object.slow_requests unless serialized_property.nil? serialized_property = SlowRequestsBasedTrigger.serialize_object(serialized_property) end output_object['slowRequests'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
34 35 36 37 38 |
# File 'lib/azure_mgmt_web/models/auto_heal_triggers.rb', line 34 def validate @requests.validate unless @requests.nil? @status_codes.each{ |e| e.validate if e.respond_to?(:validate) } unless @status_codes.nil? @slow_requests.validate unless @slow_requests.nil? end |