azure_mgmt_network 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/azure_mgmt_network.gemspec +4 -9
  3. data/lib/azure_mgmt_network.rb +100 -39
  4. data/lib/azure_mgmt_network/application_gateways.rb +175 -401
  5. data/lib/azure_mgmt_network/express_route_circuit_authorizations.rb +429 -0
  6. data/lib/azure_mgmt_network/express_route_circuit_peerings.rb +427 -0
  7. data/lib/azure_mgmt_network/express_route_circuits.rb +911 -0
  8. data/lib/azure_mgmt_network/express_route_service_providers.rb +149 -0
  9. data/lib/azure_mgmt_network/load_balancers.rb +139 -314
  10. data/lib/azure_mgmt_network/local_network_gateways.rb +102 -228
  11. data/lib/azure_mgmt_network/models/address_space.rb +1 -3
  12. data/lib/azure_mgmt_network/models/application_gateway.rb +7 -9
  13. data/lib/azure_mgmt_network/models/application_gateway_backend_address.rb +1 -3
  14. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +1 -3
  15. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool_properties_format.rb +16 -18
  16. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +1 -3
  17. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings_properties_format.rb +32 -8
  18. data/lib/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
  19. data/lib/azure_mgmt_network/models/{application_gateway_frontend_ip_configuration.rb → application_gateway_frontend_ipconfiguration.rb} +7 -9
  20. data/lib/azure_mgmt_network/models/{application_gateway_frontend_ip_configuration_properties_format.rb → application_gateway_frontend_ipconfiguration_properties_format.rb} +12 -15
  21. data/lib/azure_mgmt_network/models/application_gateway_frontend_port.rb +1 -3
  22. data/lib/azure_mgmt_network/models/application_gateway_frontend_port_properties_format.rb +1 -3
  23. data/lib/azure_mgmt_network/models/application_gateway_http_listener.rb +1 -3
  24. data/lib/azure_mgmt_network/models/application_gateway_http_listener_properties_format.rb +34 -17
  25. data/lib/azure_mgmt_network/models/{application_gateway_ip_configuration.rb → application_gateway_ipconfiguration.rb} +7 -9
  26. data/lib/azure_mgmt_network/models/{application_gateway_ip_configuration_properties_format.rb → application_gateway_ipconfiguration_properties_format.rb} +6 -8
  27. data/lib/azure_mgmt_network/models/application_gateway_list_result.rb +4 -6
  28. data/lib/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
  29. data/lib/azure_mgmt_network/models/application_gateway_path_rule.rb +88 -0
  30. data/lib/azure_mgmt_network/models/application_gateway_path_rule_properties_format.rb +101 -0
  31. data/lib/azure_mgmt_network/models/application_gateway_probe.rb +88 -0
  32. data/lib/azure_mgmt_network/models/application_gateway_probe_properties_format.rb +118 -0
  33. data/lib/azure_mgmt_network/models/application_gateway_properties_format.rb +151 -81
  34. data/lib/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
  35. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +1 -3
  36. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_properties_format.rb +26 -11
  37. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +2 -1
  38. data/lib/azure_mgmt_network/models/application_gateway_sku.rb +6 -8
  39. data/lib/azure_mgmt_network/models/application_gateway_sku_name.rb +1 -1
  40. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +1 -3
  41. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate_properties_format.rb +1 -3
  42. data/lib/azure_mgmt_network/models/application_gateway_tier.rb +1 -1
  43. data/lib/azure_mgmt_network/models/application_gateway_url_path_map.rb +88 -0
  44. data/lib/azure_mgmt_network/models/application_gateway_url_path_map_properties_format.rb +122 -0
  45. data/lib/azure_mgmt_network/models/authorization_list_result.rb +87 -0
  46. data/lib/azure_mgmt_network/models/authorization_properties_format.rb +79 -0
  47. data/lib/azure_mgmt_network/models/authorization_use_status.rb +16 -0
  48. data/lib/azure_mgmt_network/models/azure_async_operation_result.rb +5 -7
  49. data/lib/azure_mgmt_network/models/backend_address_pool.rb +1 -3
  50. data/lib/azure_mgmt_network/models/backend_address_pool_properties_format.rb +30 -15
  51. data/lib/azure_mgmt_network/models/connection_reset_shared_key.rb +10 -16
  52. data/lib/azure_mgmt_network/models/connection_shared_key.rb +1 -3
  53. data/lib/azure_mgmt_network/models/{connection_reset_shared_key_properties_format.rb → connection_shared_key_result.rb} +11 -15
  54. data/lib/azure_mgmt_network/models/dhcp_options.rb +1 -3
  55. data/lib/azure_mgmt_network/models/dns_name_availability_result.rb +1 -3
  56. data/lib/azure_mgmt_network/models/error.rb +4 -6
  57. data/lib/azure_mgmt_network/models/error_details.rb +1 -3
  58. data/lib/azure_mgmt_network/models/express_route_circuit.rb +118 -0
  59. data/lib/azure_mgmt_network/models/express_route_circuit_arp_table.rb +65 -0
  60. data/lib/azure_mgmt_network/models/express_route_circuit_authorization.rb +88 -0
  61. data/lib/azure_mgmt_network/models/express_route_circuit_list_result.rb +86 -0
  62. data/lib/azure_mgmt_network/models/express_route_circuit_peering.rb +88 -0
  63. data/lib/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +18 -0
  64. data/lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb +92 -0
  65. data/lib/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +87 -0
  66. data/lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb +194 -0
  67. data/lib/azure_mgmt_network/models/express_route_circuit_peering_state.rb +16 -0
  68. data/lib/azure_mgmt_network/models/express_route_circuit_peering_type.rb +17 -0
  69. data/lib/azure_mgmt_network/models/express_route_circuit_properties_format.rb +179 -0
  70. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb +89 -0
  71. data/lib/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +76 -0
  72. data/lib/azure_mgmt_network/models/express_route_circuit_sku.rb +83 -0
  73. data/lib/azure_mgmt_network/models/express_route_circuit_sku_family.rb +16 -0
  74. data/lib/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +16 -0
  75. data/lib/azure_mgmt_network/models/express_route_circuit_stats.rb +67 -0
  76. data/lib/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +85 -0
  77. data/lib/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +88 -0
  78. data/lib/azure_mgmt_network/models/express_route_circuits_stats_list_result.rb +85 -0
  79. data/lib/azure_mgmt_network/models/express_route_service_provider.rb +92 -0
  80. data/lib/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +67 -0
  81. data/lib/azure_mgmt_network/models/express_route_service_provider_list_result.rb +86 -0
  82. data/lib/azure_mgmt_network/models/express_route_service_provider_properties_format.rb +97 -0
  83. data/lib/azure_mgmt_network/models/{frontend_ip_configuration.rb → frontend_ipconfiguration.rb} +7 -9
  84. data/lib/azure_mgmt_network/models/{frontend_ip_configuration_properties_format.rb → frontend_ipconfiguration_properties_format.rb} +133 -77
  85. data/lib/azure_mgmt_network/models/inbound_nat_pool.rb +88 -0
  86. data/lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb +134 -0
  87. data/lib/azure_mgmt_network/models/inbound_nat_rule.rb +1 -3
  88. data/lib/azure_mgmt_network/models/inbound_nat_rule_properties_format.rb +11 -12
  89. data/lib/azure_mgmt_network/models/{ip_allocation_method.rb → ipallocation_method.rb} +3 -3
  90. data/lib/azure_mgmt_network/models/ipconfiguration.rb +88 -0
  91. data/lib/azure_mgmt_network/models/ipconfiguration_properties_format.rb +113 -0
  92. data/lib/azure_mgmt_network/models/load_balancer.rb +7 -9
  93. data/lib/azure_mgmt_network/models/load_balancer_list_result.rb +4 -6
  94. data/lib/azure_mgmt_network/models/load_balancer_properties_format.rb +103 -35
  95. data/lib/azure_mgmt_network/models/load_balancing_rule.rb +1 -3
  96. data/lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb +30 -30
  97. data/lib/azure_mgmt_network/models/load_distribution.rb +1 -1
  98. data/lib/azure_mgmt_network/models/local_network_gateway.rb +7 -9
  99. data/lib/azure_mgmt_network/models/local_network_gateway_list_result.rb +4 -6
  100. data/lib/azure_mgmt_network/models/local_network_gateway_properties_format.rb +11 -3
  101. data/lib/azure_mgmt_network/models/network_interface.rb +7 -9
  102. data/lib/azure_mgmt_network/models/network_interface_dns_settings.rb +1 -3
  103. data/lib/azure_mgmt_network/models/{network_interface_ip_configuration.rb → network_interface_ipconfiguration.rb} +7 -9
  104. data/lib/azure_mgmt_network/models/{network_interface_ip_configuration_properties_format.rb → network_interface_ipconfiguration_properties_format.rb} +70 -76
  105. data/lib/azure_mgmt_network/models/network_interface_list_result.rb +4 -6
  106. data/lib/azure_mgmt_network/models/network_interface_properties_format.rb +32 -14
  107. data/lib/azure_mgmt_network/models/{operation_status.rb → network_operation_status.rb} +3 -3
  108. data/lib/azure_mgmt_network/models/network_security_group.rb +7 -9
  109. data/lib/azure_mgmt_network/models/network_security_group_list_result.rb +4 -6
  110. data/lib/azure_mgmt_network/models/network_security_group_properties_format.rb +30 -22
  111. data/lib/azure_mgmt_network/models/outbound_nat_rule.rb +88 -0
  112. data/lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb +117 -0
  113. data/lib/azure_mgmt_network/models/probe.rb +1 -3
  114. data/lib/azure_mgmt_network/models/probe_properties_format.rb +25 -26
  115. data/lib/azure_mgmt_network/models/probe_protocol.rb +1 -1
  116. data/lib/azure_mgmt_network/models/processor_architecture.rb +16 -0
  117. data/lib/azure_mgmt_network/models/{public_ip_address.rb → public_ipaddress.rb} +13 -15
  118. data/lib/azure_mgmt_network/models/{public_ip_address_dns_settings.rb → public_ipaddress_dns_settings.rb} +4 -6
  119. data/lib/azure_mgmt_network/models/{public_ip_address_list_result.rb → public_ipaddress_list_result.rb} +10 -12
  120. data/lib/azure_mgmt_network/models/{public_ip_address_properties_format.rb → public_ipaddress_properties_format.rb} +25 -19
  121. data/lib/azure_mgmt_network/models/route.rb +88 -0
  122. data/lib/azure_mgmt_network/models/route_list_result.rb +85 -0
  123. data/lib/azure_mgmt_network/models/route_next_hop_type.rb +19 -0
  124. data/lib/azure_mgmt_network/models/route_properties_format.rb +94 -0
  125. data/lib/azure_mgmt_network/models/route_table.rb +102 -0
  126. data/lib/azure_mgmt_network/models/route_table_list_result.rb +86 -0
  127. data/lib/azure_mgmt_network/models/route_table_properties_format.rb +116 -0
  128. data/lib/azure_mgmt_network/models/security_rule.rb +1 -3
  129. data/lib/azure_mgmt_network/models/security_rule_access.rb +1 -1
  130. data/lib/azure_mgmt_network/models/security_rule_direction.rb +1 -1
  131. data/lib/azure_mgmt_network/models/security_rule_list_result.rb +4 -6
  132. data/lib/azure_mgmt_network/models/security_rule_properties_format.rb +50 -48
  133. data/lib/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
  134. data/lib/azure_mgmt_network/models/service_provider_provisioning_state.rb +18 -0
  135. data/lib/azure_mgmt_network/models/subnet.rb +1 -3
  136. data/lib/azure_mgmt_network/models/subnet_list_result.rb +4 -6
  137. data/lib/azure_mgmt_network/models/subnet_properties_format.rb +28 -13
  138. data/lib/azure_mgmt_network/models/transport_protocol.rb +1 -1
  139. data/lib/azure_mgmt_network/models/usage.rb +7 -5
  140. data/lib/azure_mgmt_network/models/usage_name.rb +1 -3
  141. data/lib/azure_mgmt_network/models/usage_unit.rb +1 -1
  142. data/lib/azure_mgmt_network/models/usages_list_result.rb +4 -6
  143. data/lib/azure_mgmt_network/models/virtual_network.rb +7 -9
  144. data/lib/azure_mgmt_network/models/virtual_network_gateway.rb +7 -9
  145. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection.rb +7 -9
  146. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +4 -6
  147. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_properties_format.rb +74 -6
  148. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +18 -0
  149. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
  150. data/lib/azure_mgmt_network/models/{virtual_network_gateway_ip_configuration.rb → virtual_network_gateway_ipconfiguration.rb} +7 -9
  151. data/lib/azure_mgmt_network/models/{virtual_network_gateway_ip_configuration_properties_format.rb → virtual_network_gateway_ipconfiguration_properties_format.rb} +14 -17
  152. data/lib/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +4 -6
  153. data/lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb +76 -13
  154. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku.rb +86 -0
  155. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +17 -0
  156. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +17 -0
  157. data/lib/azure_mgmt_network/models/virtual_network_gateway_type.rb +2 -1
  158. data/lib/azure_mgmt_network/models/virtual_network_list_result.rb +4 -6
  159. data/lib/azure_mgmt_network/models/virtual_network_properties_format.rb +14 -6
  160. data/lib/azure_mgmt_network/models/vpn_client_configuration.rb +125 -0
  161. data/lib/azure_mgmt_network/models/vpn_client_parameters.rb +60 -0
  162. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +88 -0
  163. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate_properties_format.rb +69 -0
  164. data/lib/azure_mgmt_network/models/vpn_client_root_certificate.rb +88 -0
  165. data/lib/azure_mgmt_network/models/vpn_client_root_certificate_properties_format.rb +66 -0
  166. data/lib/azure_mgmt_network/models/vpn_type.rb +1 -1
  167. data/lib/azure_mgmt_network/module_definition.rb +5 -3
  168. data/lib/azure_mgmt_network/network_interfaces.rb +451 -304
  169. data/lib/azure_mgmt_network/{network_resource_provider_client.rb → network_management_client.rb} +61 -57
  170. data/lib/azure_mgmt_network/network_security_groups.rb +139 -314
  171. data/lib/azure_mgmt_network/public_ipaddresses.rb +536 -0
  172. data/lib/azure_mgmt_network/route_tables.rb +532 -0
  173. data/lib/azure_mgmt_network/routes.rb +423 -0
  174. data/lib/azure_mgmt_network/security_rules.rb +102 -232
  175. data/lib/azure_mgmt_network/subnets.rb +104 -233
  176. data/lib/azure_mgmt_network/usages.rb +79 -43
  177. data/lib/azure_mgmt_network/version.rb +5 -3
  178. data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +262 -467
  179. data/lib/azure_mgmt_network/virtual_network_gateways.rb +204 -280
  180. data/lib/azure_mgmt_network/virtual_networks.rb +139 -314
  181. metadata +92 -106
  182. data/.gitignore +0 -10
  183. data/.travis.yml +0 -3
  184. data/Gemfile +0 -15
  185. data/lib/azure_mgmt_network/public_ip_addresses.rb +0 -711
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -8,37 +8,41 @@ module Azure::ARM::Network
8
8
  #
9
9
  # Properties of Frontend IP Configuration of the load balancer
10
10
  #
11
- class FrontendIpConfigurationPropertiesFormat
11
+ class FrontendIPConfigurationPropertiesFormat
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Gets or sets the IP address of the Load Balancer.This
16
- # is only specified if a specific private IP address shall be allocated
17
- # from the subnet specified in subnetRef
15
+ # @return [Array<SubResource>] Read only.Inbound rules URIs that use
16
+ # this frontend IP
17
+ attr_accessor :inbound_nat_rules
18
+
19
+ # @return [Array<SubResource>] Read only.Inbound pools URIs that use
20
+ # this frontend IP
21
+ attr_accessor :inbound_nat_pools
22
+
23
+ # @return [Array<SubResource>] Read only.Outbound rules URIs that use
24
+ # this frontend IP
25
+ attr_accessor :outbound_nat_rules
26
+
27
+ # @return [Array<SubResource>] Gets Load Balancing rules URIs that use
28
+ # this frontend IP
29
+ attr_accessor :load_balancing_rules
30
+
31
+ # @return [String] Gets or sets the privateIPAddress of the IP
32
+ # Configuration
18
33
  attr_accessor :private_ipaddress
19
34
 
20
- # @return [IpAllocationMethod] Gets or sets PrivateIP allocation method
21
- # (Static/Dynamic). Possible values for this property include:
22
- # 'Static', 'Dynamic'.
35
+ # @return [IPAllocationMethod] Gets or sets PrivateIP allocation method
36
+ # (Static/Dynamic). Possible values include: 'Static', 'Dynamic'
23
37
  attr_accessor :private_ipallocation_method
24
38
 
25
- # @return [SubResource] Gets or sets the reference of the subnet
26
- # resource.A subnet from wher the load balancer gets its private
27
- # frontend address
39
+ # @return [Subnet] Gets or sets the reference of the subnet resource
28
40
  attr_accessor :subnet
29
41
 
30
- # @return [SubResource] Gets or sets the reference of the PublicIP
42
+ # @return [PublicIPAddress] Gets or sets the reference of the PublicIP
31
43
  # resource
32
44
  attr_accessor :public_ipaddress
33
45
 
34
- # @return [Array<SubResource>] Read only.Inbound rules URIs that use
35
- # this frontend IP
36
- attr_accessor :inbound_nat_rules
37
-
38
- # @return [Array<SubResource>] Gets Load Balancing rules URIs that use
39
- # this frontend IP
40
- attr_accessor :load_balancing_rules
41
-
42
46
  # @return [String] Gets or sets Provisioning state of the PublicIP
43
47
  # resource Updating/Deleting/Failed
44
48
  attr_accessor :provisioning_state
@@ -47,10 +51,12 @@ module Azure::ARM::Network
47
51
  # Validate the object. Throws ValidationError if validation fails.
48
52
  #
49
53
  def validate
50
- @subnet.validate unless @subnet.nil?
51
- @public_ipaddress.validate unless @public_ipaddress.nil?
52
54
  @inbound_nat_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @inbound_nat_rules.nil?
55
+ @inbound_nat_pools.each{ |e| e.validate if e.respond_to?(:validate) } unless @inbound_nat_pools.nil?
56
+ @outbound_nat_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @outbound_nat_rules.nil?
53
57
  @load_balancing_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancing_rules.nil?
58
+ @subnet.validate unless @subnet.nil?
59
+ @public_ipaddress.validate unless @public_ipaddress.nil?
54
60
  end
55
61
 
56
62
  #
@@ -62,30 +68,12 @@ module Azure::ARM::Network
62
68
  object.validate
63
69
  output_object = {}
64
70
 
65
- serialized_property = object.private_ipaddress
66
- output_object['privateIPAddress'] = serialized_property unless serialized_property.nil?
67
-
68
- serialized_property = object.private_ipallocation_method
69
- output_object['privateIPAllocationMethod'] = serialized_property unless serialized_property.nil?
70
-
71
- serialized_property = object.subnet
72
- unless serialized_property.nil?
73
- serialized_property = SubResource.serialize_object(serialized_property)
74
- end
75
- output_object['subnet'] = serialized_property unless serialized_property.nil?
76
-
77
- serialized_property = object.public_ipaddress
78
- unless serialized_property.nil?
79
- serialized_property = SubResource.serialize_object(serialized_property)
80
- end
81
- output_object['publicIPAddress'] = serialized_property unless serialized_property.nil?
82
-
83
71
  serialized_property = object.inbound_nat_rules
84
72
  unless serialized_property.nil?
85
73
  serializedArray = []
86
74
  serialized_property.each do |element|
87
75
  unless element.nil?
88
- element = SubResource.serialize_object(element)
76
+ element = MsRestAzure::SubResource.serialize_object(element)
89
77
  end
90
78
  serializedArray.push(element)
91
79
  end
@@ -93,19 +81,63 @@ module Azure::ARM::Network
93
81
  end
94
82
  output_object['inboundNatRules'] = serialized_property unless serialized_property.nil?
95
83
 
96
- serialized_property = object.load_balancing_rules
84
+ serialized_property = object.inbound_nat_pools
97
85
  unless serialized_property.nil?
98
86
  serializedArray = []
99
87
  serialized_property.each do |element1|
100
88
  unless element1.nil?
101
- element1 = SubResource.serialize_object(element1)
89
+ element1 = MsRestAzure::SubResource.serialize_object(element1)
102
90
  end
103
91
  serializedArray.push(element1)
104
92
  end
105
93
  serialized_property = serializedArray
106
94
  end
95
+ output_object['inboundNatPools'] = serialized_property unless serialized_property.nil?
96
+
97
+ serialized_property = object.outbound_nat_rules
98
+ unless serialized_property.nil?
99
+ serializedArray = []
100
+ serialized_property.each do |element2|
101
+ unless element2.nil?
102
+ element2 = MsRestAzure::SubResource.serialize_object(element2)
103
+ end
104
+ serializedArray.push(element2)
105
+ end
106
+ serialized_property = serializedArray
107
+ end
108
+ output_object['outboundNatRules'] = serialized_property unless serialized_property.nil?
109
+
110
+ serialized_property = object.load_balancing_rules
111
+ unless serialized_property.nil?
112
+ serializedArray = []
113
+ serialized_property.each do |element3|
114
+ unless element3.nil?
115
+ element3 = MsRestAzure::SubResource.serialize_object(element3)
116
+ end
117
+ serializedArray.push(element3)
118
+ end
119
+ serialized_property = serializedArray
120
+ end
107
121
  output_object['loadBalancingRules'] = serialized_property unless serialized_property.nil?
108
122
 
123
+ serialized_property = object.private_ipaddress
124
+ output_object['privateIPAddress'] = serialized_property unless serialized_property.nil?
125
+
126
+ serialized_property = object.private_ipallocation_method
127
+ output_object['privateIPAllocationMethod'] = serialized_property unless serialized_property.nil?
128
+
129
+ serialized_property = object.subnet
130
+ unless serialized_property.nil?
131
+ serialized_property = Subnet.serialize_object(serialized_property)
132
+ end
133
+ output_object['subnet'] = serialized_property unless serialized_property.nil?
134
+
135
+ serialized_property = object.public_ipaddress
136
+ unless serialized_property.nil?
137
+ serialized_property = PublicIPAddress.serialize_object(serialized_property)
138
+ end
139
+ output_object['publicIPAddress'] = serialized_property unless serialized_property.nil?
140
+
109
141
  serialized_property = object.provisioning_state
110
142
  output_object['provisioningState'] = serialized_property unless serialized_property.nil?
111
143
 
@@ -115,65 +147,89 @@ module Azure::ARM::Network
115
147
  #
116
148
  # Deserializes given Ruby Hash into Model object.
117
149
  # @param object [Hash] Ruby Hash object to deserialize.
118
- # @return [FrontendIpConfigurationPropertiesFormat] Deserialized object.
150
+ # @return [FrontendIPConfigurationPropertiesFormat] Deserialized object.
119
151
  #
120
152
  def self.deserialize_object(object)
121
153
  return if object.nil?
122
- output_object = FrontendIpConfigurationPropertiesFormat.new
123
-
124
- deserialized_property = object['privateIPAddress']
125
- output_object.private_ipaddress = deserialized_property
126
-
127
- deserialized_property = object['privateIPAllocationMethod']
128
- if (!deserialized_property.nil? && !deserialized_property.empty?)
129
- enum_is_valid = IpAllocationMethod.constants.any? { |e| IpAllocationMethod.const_get(e).to_s.downcase == deserialized_property.downcase }
130
- fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
131
- end
132
- output_object.private_ipallocation_method = deserialized_property
154
+ output_object = FrontendIPConfigurationPropertiesFormat.new
133
155
 
134
- deserialized_property = object['subnet']
156
+ deserialized_property = object['inboundNatRules']
135
157
  unless deserialized_property.nil?
136
- deserialized_property = SubResource.deserialize_object(deserialized_property)
158
+ deserialized_array = []
159
+ deserialized_property.each do |element4|
160
+ unless element4.nil?
161
+ element4 = MsRestAzure::SubResource.deserialize_object(element4)
162
+ end
163
+ deserialized_array.push(element4)
164
+ end
165
+ deserialized_property = deserialized_array
137
166
  end
138
- output_object.subnet = deserialized_property
167
+ output_object.inbound_nat_rules = deserialized_property
139
168
 
140
- deserialized_property = object['publicIPAddress']
169
+ deserialized_property = object['inboundNatPools']
141
170
  unless deserialized_property.nil?
142
- deserialized_property = SubResource.deserialize_object(deserialized_property)
171
+ deserialized_array = []
172
+ deserialized_property.each do |element5|
173
+ unless element5.nil?
174
+ element5 = MsRestAzure::SubResource.deserialize_object(element5)
175
+ end
176
+ deserialized_array.push(element5)
177
+ end
178
+ deserialized_property = deserialized_array
143
179
  end
144
- output_object.public_ipaddress = deserialized_property
180
+ output_object.inbound_nat_pools = deserialized_property
145
181
 
146
- deserialized_property = object['inboundNatRules']
182
+ deserialized_property = object['outboundNatRules']
147
183
  unless deserialized_property.nil?
148
- deserializedArray = [];
149
- deserialized_property.each do |element2|
150
- unless element2.nil?
151
- element2 = SubResource.deserialize_object(element2)
184
+ deserialized_array = []
185
+ deserialized_property.each do |element6|
186
+ unless element6.nil?
187
+ element6 = MsRestAzure::SubResource.deserialize_object(element6)
152
188
  end
153
- deserializedArray.push(element2);
189
+ deserialized_array.push(element6)
154
190
  end
155
- deserialized_property = deserializedArray;
191
+ deserialized_property = deserialized_array
156
192
  end
157
- output_object.inbound_nat_rules = deserialized_property
193
+ output_object.outbound_nat_rules = deserialized_property
158
194
 
159
195
  deserialized_property = object['loadBalancingRules']
160
196
  unless deserialized_property.nil?
161
- deserializedArray = [];
162
- deserialized_property.each do |element3|
163
- unless element3.nil?
164
- element3 = SubResource.deserialize_object(element3)
197
+ deserialized_array = []
198
+ deserialized_property.each do |element7|
199
+ unless element7.nil?
200
+ element7 = MsRestAzure::SubResource.deserialize_object(element7)
165
201
  end
166
- deserializedArray.push(element3);
202
+ deserialized_array.push(element7)
167
203
  end
168
- deserialized_property = deserializedArray;
204
+ deserialized_property = deserialized_array
169
205
  end
170
206
  output_object.load_balancing_rules = deserialized_property
171
207
 
208
+ deserialized_property = object['privateIPAddress']
209
+ output_object.private_ipaddress = deserialized_property
210
+
211
+ deserialized_property = object['privateIPAllocationMethod']
212
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
213
+ enum_is_valid = IPAllocationMethod.constants.any? { |e| IPAllocationMethod.const_get(e).to_s.downcase == deserialized_property.downcase }
214
+ warn 'Enum IPAllocationMethod does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
215
+ end
216
+ output_object.private_ipallocation_method = deserialized_property
217
+
218
+ deserialized_property = object['subnet']
219
+ unless deserialized_property.nil?
220
+ deserialized_property = Subnet.deserialize_object(deserialized_property)
221
+ end
222
+ output_object.subnet = deserialized_property
223
+
224
+ deserialized_property = object['publicIPAddress']
225
+ unless deserialized_property.nil?
226
+ deserialized_property = PublicIPAddress.deserialize_object(deserialized_property)
227
+ end
228
+ output_object.public_ipaddress = deserialized_property
229
+
172
230
  deserialized_property = object['provisioningState']
173
231
  output_object.provisioning_state = deserialized_property
174
232
 
175
- output_object.validate
176
-
177
233
  output_object
178
234
  end
179
235
  end
@@ -0,0 +1,88 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Network
7
+ module Models
8
+ #
9
+ # Inbound NAT pool of the loadbalancer
10
+ #
11
+ class InboundNatPool < MsRestAzure::SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [InboundNatPoolPropertiesFormat]
16
+ attr_accessor :properties
17
+
18
+ # @return [String] Gets name of the resource that is unique within a
19
+ # resource group. This name can be used to access the resource
20
+ attr_accessor :name
21
+
22
+ # @return [String] A unique read-only string that changes whenever the
23
+ # resource is updated
24
+ attr_accessor :etag
25
+
26
+ #
27
+ # Validate the object. Throws ValidationError if validation fails.
28
+ #
29
+ def validate
30
+ @properties.validate unless @properties.nil?
31
+ end
32
+
33
+ #
34
+ # Serializes given Model object into Ruby Hash.
35
+ # @param object Model object to serialize.
36
+ # @return [Hash] Serialized object in form of Ruby Hash.
37
+ #
38
+ def self.serialize_object(object)
39
+ object.validate
40
+ output_object = {}
41
+
42
+ serialized_property = object.id
43
+ output_object['id'] = serialized_property unless serialized_property.nil?
44
+
45
+ serialized_property = object.properties
46
+ unless serialized_property.nil?
47
+ serialized_property = InboundNatPoolPropertiesFormat.serialize_object(serialized_property)
48
+ end
49
+ output_object['properties'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.name
52
+ output_object['name'] = serialized_property unless serialized_property.nil?
53
+
54
+ serialized_property = object.etag
55
+ output_object['etag'] = serialized_property unless serialized_property.nil?
56
+
57
+ output_object
58
+ end
59
+
60
+ #
61
+ # Deserializes given Ruby Hash into Model object.
62
+ # @param object [Hash] Ruby Hash object to deserialize.
63
+ # @return [InboundNatPool] Deserialized object.
64
+ #
65
+ def self.deserialize_object(object)
66
+ return if object.nil?
67
+ output_object = InboundNatPool.new
68
+
69
+ deserialized_property = object['id']
70
+ output_object.id = deserialized_property
71
+
72
+ deserialized_property = object['properties']
73
+ unless deserialized_property.nil?
74
+ deserialized_property = InboundNatPoolPropertiesFormat.deserialize_object(deserialized_property)
75
+ end
76
+ output_object.properties = deserialized_property
77
+
78
+ deserialized_property = object['name']
79
+ output_object.name = deserialized_property
80
+
81
+ deserialized_property = object['etag']
82
+ output_object.etag = deserialized_property
83
+
84
+ output_object
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,134 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Network
7
+ module Models
8
+ #
9
+ # Properties of Inbound NAT pool
10
+ #
11
+ class InboundNatPoolPropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [SubResource] Gets or sets a reference to frontend IP Addresses
16
+ attr_accessor :frontend_ipconfiguration
17
+
18
+ # @return [TransportProtocol] Gets or sets the transport potocol for the
19
+ # external endpoint. Possible values are Udp or Tcp. Possible values
20
+ # include: 'Udp', 'Tcp'
21
+ attr_accessor :protocol
22
+
23
+ # @return [Integer] Gets or sets the starting port range for the NAT
24
+ # pool. You can spcify any port number you choose, but the port numbers
25
+ # specified for each role in the service must be unique. Possible
26
+ # values range between 1 and 65535, inclusive
27
+ attr_accessor :frontend_port_range_start
28
+
29
+ # @return [Integer] Gets or sets the ending port range for the NAT pool.
30
+ # You can spcify any port number you choose, but the port numbers
31
+ # specified for each role in the service must be unique. Possible
32
+ # values range between 1 and 65535, inclusive
33
+ attr_accessor :frontend_port_range_end
34
+
35
+ # @return [Integer] Gets or sets a port used for internal connections on
36
+ # the endpoint. The localPort attribute maps the eternal port of the
37
+ # endpoint to an internal port on a role. This is useful in scenarios
38
+ # where a role must communicate to an internal compotnent on a port
39
+ # that is different from the one that is exposed externally. If not
40
+ # specified, the value of localPort is the same as the port attribute.
41
+ # Set the value of localPort to '*' to automatically assign an
42
+ # unallocated port that is discoverable using the runtime API
43
+ attr_accessor :backend_port
44
+
45
+ # @return [String] Gets or sets Provisioning state of the PublicIP
46
+ # resource Updating/Deleting/Failed
47
+ attr_accessor :provisioning_state
48
+
49
+ #
50
+ # Validate the object. Throws ValidationError if validation fails.
51
+ #
52
+ def validate
53
+ fail MsRest::ValidationError, 'property protocol is nil' if @protocol.nil?
54
+ fail MsRest::ValidationError, 'property frontend_port_range_start is nil' if @frontend_port_range_start.nil?
55
+ fail MsRest::ValidationError, 'property frontend_port_range_end is nil' if @frontend_port_range_end.nil?
56
+ fail MsRest::ValidationError, 'property backend_port is nil' if @backend_port.nil?
57
+ @frontend_ipconfiguration.validate unless @frontend_ipconfiguration.nil?
58
+ end
59
+
60
+ #
61
+ # Serializes given Model object into Ruby Hash.
62
+ # @param object Model object to serialize.
63
+ # @return [Hash] Serialized object in form of Ruby Hash.
64
+ #
65
+ def self.serialize_object(object)
66
+ object.validate
67
+ output_object = {}
68
+
69
+ serialized_property = object.protocol
70
+ output_object['protocol'] = serialized_property unless serialized_property.nil?
71
+
72
+ serialized_property = object.frontend_port_range_start
73
+ output_object['frontendPortRangeStart'] = serialized_property unless serialized_property.nil?
74
+
75
+ serialized_property = object.frontend_port_range_end
76
+ output_object['frontendPortRangeEnd'] = serialized_property unless serialized_property.nil?
77
+
78
+ serialized_property = object.backend_port
79
+ output_object['backendPort'] = serialized_property unless serialized_property.nil?
80
+
81
+ serialized_property = object.frontend_ipconfiguration
82
+ unless serialized_property.nil?
83
+ serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property)
84
+ end
85
+ output_object['frontendIPConfiguration'] = serialized_property unless serialized_property.nil?
86
+
87
+ serialized_property = object.provisioning_state
88
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
89
+
90
+ output_object
91
+ end
92
+
93
+ #
94
+ # Deserializes given Ruby Hash into Model object.
95
+ # @param object [Hash] Ruby Hash object to deserialize.
96
+ # @return [InboundNatPoolPropertiesFormat] Deserialized object.
97
+ #
98
+ def self.deserialize_object(object)
99
+ return if object.nil?
100
+ output_object = InboundNatPoolPropertiesFormat.new
101
+
102
+ deserialized_property = object['protocol']
103
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
104
+ enum_is_valid = TransportProtocol.constants.any? { |e| TransportProtocol.const_get(e).to_s.downcase == deserialized_property.downcase }
105
+ warn 'Enum TransportProtocol does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
106
+ end
107
+ output_object.protocol = deserialized_property
108
+
109
+ deserialized_property = object['frontendPortRangeStart']
110
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
111
+ output_object.frontend_port_range_start = deserialized_property
112
+
113
+ deserialized_property = object['frontendPortRangeEnd']
114
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
115
+ output_object.frontend_port_range_end = deserialized_property
116
+
117
+ deserialized_property = object['backendPort']
118
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
119
+ output_object.backend_port = deserialized_property
120
+
121
+ deserialized_property = object['frontendIPConfiguration']
122
+ unless deserialized_property.nil?
123
+ deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property)
124
+ end
125
+ output_object.frontend_ipconfiguration = deserialized_property
126
+
127
+ deserialized_property = object['provisioningState']
128
+ output_object.provisioning_state = deserialized_property
129
+
130
+ output_object
131
+ end
132
+ end
133
+ end
134
+ end