Class: Fog::ApplicationGateway::AzureRM::UrlPathMap

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

Overview

URL Path Map model class for Application Gateway Service

Class Method Summary collapse

Class Method Details

.parse(url_path_map) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fog/azurerm/models/application_gateway/url_path_map.rb', line 12

def self.parse(url_path_map)
  hash = {}
  hash['id'] = url_path_map.id
  hash['name'] = url_path_map.name
  hash['default_backend_address_pool_id'] = url_path_map.default_backend_address_pool.id unless url_path_map.default_backend_address_pool.nil?
  hash['default_backend_http_settings_id'] = url_path_map.default_backend_http_settings.id unless url_path_map.default_backend_http_settings.nil?

  path_rules = url_path_map.path_rules
  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?
  hash
end