Class: Fog::Network::AzureRM::ApplicationGatewayUrlPathMap

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

Overview

URL Path Map model class for Network Service

Class Method Summary collapse

Class Method Details

.parse(url_path_map) ⇒ Object



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

def self.parse(url_path_map)
  url_path_map_properties = url_path_map['properties']

  hash = {}
  hash['name'] = url_path_map['name']
  unless url_path_map_properties.nil?
    hash['default_backend_address_pool_id'] = url_path_map_properties['defaultBackendAddressPool']['id']
    hash['default_backend_http_settings_id'] = url_path_map_properties['defaultBackendHttpSettings']['id']

    path_rules = url_path_map_properties['pathRules']
    hash['path_rules'] = []
    path_rules.each do |rule|
      path_rule = Fog::Network::AzureRM::PathRule.new
      hash['path_rules'] << path_rule.merge_attributes(Fog::Network::AzureRM::PathRule.parse(rule))
    end unless path_rules.nil?
  end
  hash
end