Class: Fog::Network::AzureRM::ApplicationGatewayHttpListener

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

Overview

Http Listener class for Network Service

Class Method Summary collapse

Class Method Details

.parse(http_listener) ⇒ Object



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

def self.parse(http_listener)
  http_listener_properties = http_listener['properties']
  hash = {}
  hash['name'] = http_listener['name']
  unless http_listener_properties.nil?
    unless http_listener_properties['frontendIPConfiguration'].nil?
      hash['frontend_ip_config_id'] = http_listener_properties['frontendIPConfiguration']['id']
    end
    unless http_listener_properties['frontendPort'].nil?
      hash['frontend_port_id'] = http_listener_properties['frontendPort']['id']
    end
    hash['protocol'] = http_listener_properties['protocol']
    hash['host_name'] = http_listener_properties['hostName']
    unless http_listener_properties['sslCertificate'].nil?
      hash['ssl_certificate_id'] = http_listener_properties['sslCertificate']['id']
      hash['require_server_name_indication'] = http_listener_properties['sslCertificate']['requireServerNameIndication']
    end
  end
  hash
end