Class: Fog::Network::AzureRM::ApplicationGatewayRequestRoutingRule

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/azurerm/models/network/application_gateway_request_routing_rule.rb

Overview

Request Routing Rule model class for Network Service

Class Method Summary collapse

Class Method Details

.parse(request_routing_rule) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fog/azurerm/models/network/application_gateway_request_routing_rule.rb', line 13

def self.parse(request_routing_rule)
  request_routing_rule_properties = request_routing_rule['properties']

  hash = {}
  hash['name'] = request_routing_rule['name']
  unless request_routing_rule_properties.nil?
    hash['type'] = request_routing_rule_properties['ruleType']
    unless request_routing_rule_properties['httpListener'].nil?
      hash['http_listener_id'] = request_routing_rule_properties['httpListener']['id']
    end
    unless request_routing_rule_properties['backendAddressPool'].nil?
      hash['backend_address_pool_id'] = request_routing_rule_properties['backendAddressPool']['id']
    end
    unless request_routing_rule_properties['backendHttpSettings'].nil?
      hash['backend_http_settings_id'] = request_routing_rule_properties['backendHttpSettings']['id']
    end
  end
  hash
end