azure_mgmt_network 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_network.gemspec +4 -5
  3. data/lib/azure_mgmt_network.rb +3 -201
  4. data/lib/generated/azure_mgmt_network.rb +175 -0
  5. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/application_gateways.rb +158 -59
  6. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/express_route_circuit_authorizations.rb +92 -42
  7. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/express_route_circuit_peerings.rb +91 -42
  8. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/express_route_circuits.rb +210 -92
  9. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/express_route_service_providers.rb +32 -11
  10. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/load_balancers.rb +120 -53
  11. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/local_network_gateways.rb +91 -42
  12. data/lib/generated/azure_mgmt_network/models/address_space.rb +53 -0
  13. data/lib/generated/azure_mgmt_network/models/application_gateway.rb +326 -0
  14. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +54 -0
  15. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +112 -0
  16. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +128 -0
  17. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_cookie_based_affinity.rb +0 -0
  18. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +120 -0
  19. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +84 -0
  20. data/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +142 -0
  21. data/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +87 -0
  22. data/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +94 -0
  23. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_operational_state.rb +0 -0
  24. data/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +115 -0
  25. data/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +135 -0
  26. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_protocol.rb +0 -0
  27. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +133 -0
  28. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_request_routing_rule_type.rb +0 -0
  29. data/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +68 -0
  30. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_sku_name.rb +0 -0
  31. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +104 -0
  32. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/application_gateway_tier.rb +0 -0
  33. data/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +117 -0
  34. data/lib/generated/azure_mgmt_network/models/authorization_list_result.rb +95 -0
  35. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/authorization_use_status.rb +0 -0
  36. data/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +63 -0
  37. data/lib/generated/azure_mgmt_network/models/backend_address_pool.rb +127 -0
  38. data/lib/generated/azure_mgmt_network/models/bgp_settings.rb +66 -0
  39. data/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +45 -0
  40. data/lib/generated/azure_mgmt_network/models/connection_shared_key.rb +44 -0
  41. data/lib/generated/azure_mgmt_network/models/connection_shared_key_result.rb +44 -0
  42. data/lib/generated/azure_mgmt_network/models/dhcp_options.rb +53 -0
  43. data/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb +44 -0
  44. data/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +76 -0
  45. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +56 -0
  46. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +95 -0
  47. data/lib/generated/azure_mgmt_network/models/effective_network_security_rules.rb +162 -0
  48. data/lib/generated/azure_mgmt_network/models/effective_route.rb +124 -0
  49. data/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +93 -0
  50. data/lib/generated/azure_mgmt_network/models/effective_route_source.rb +18 -0
  51. data/lib/generated/azure_mgmt_network/models/effective_route_state.rb +16 -0
  52. data/lib/generated/azure_mgmt_network/models/error.rb +92 -0
  53. data/lib/generated/azure_mgmt_network/models/error_details.rb +64 -0
  54. data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +215 -0
  55. data/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +74 -0
  56. data/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +95 -0
  57. data/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +94 -0
  58. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +200 -0
  59. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/express_route_circuit_peering_advertised_public_prefix_state.rb +0 -0
  60. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +85 -0
  61. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +95 -0
  62. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/express_route_circuit_peering_state.rb +0 -0
  63. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/express_route_circuit_peering_type.rb +0 -0
  64. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +84 -0
  65. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +87 -0
  66. data/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +65 -0
  67. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +66 -0
  68. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/express_route_circuit_sku_family.rb +0 -0
  69. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/express_route_circuit_sku_tier.rb +0 -0
  70. data/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +74 -0
  71. data/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +62 -0
  72. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +65 -0
  73. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +65 -0
  74. data/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb +124 -0
  75. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +55 -0
  76. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +94 -0
  77. data/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +199 -0
  78. data/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb +140 -0
  79. data/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +169 -0
  80. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/ipallocation_method.rb +0 -0
  81. data/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +119 -0
  82. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/ipversion.rb +0 -0
  83. data/lib/generated/azure_mgmt_network/models/load_balancer.rb +239 -0
  84. data/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +94 -0
  85. data/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +191 -0
  86. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/load_distribution.rb +0 -0
  87. data/lib/generated/azure_mgmt_network/models/local_network_gateway.rb +143 -0
  88. data/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +94 -0
  89. data/lib/generated/azure_mgmt_network/models/network_interface.rb +197 -0
  90. data/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +99 -0
  91. data/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +195 -0
  92. data/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +94 -0
  93. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/network_operation_status.rb +0 -0
  94. data/lib/generated/azure_mgmt_network/models/network_security_group.rb +188 -0
  95. data/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb +94 -0
  96. data/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb +117 -0
  97. data/lib/generated/azure_mgmt_network/models/probe.rb +159 -0
  98. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/probe_protocol.rb +0 -0
  99. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/processor_architecture.rb +0 -0
  100. data/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +177 -0
  101. data/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +73 -0
  102. data/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +94 -0
  103. data/lib/generated/azure_mgmt_network/models/route.rb +110 -0
  104. data/lib/generated/azure_mgmt_network/models/route_list_result.rb +93 -0
  105. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/route_next_hop_type.rb +0 -0
  106. data/lib/generated/azure_mgmt_network/models/route_table.rb +137 -0
  107. data/lib/generated/azure_mgmt_network/models/route_table_list_result.rb +94 -0
  108. data/lib/generated/azure_mgmt_network/models/security_rule.rb +185 -0
  109. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/security_rule_access.rb +0 -0
  110. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/security_rule_direction.rb +0 -0
  111. data/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb +95 -0
  112. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/security_rule_protocol.rb +0 -0
  113. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/service_provider_provisioning_state.rb +0 -0
  114. data/lib/generated/azure_mgmt_network/models/subnet.rb +127 -0
  115. data/lib/generated/azure_mgmt_network/models/subnet_list_result.rb +94 -0
  116. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/transport_protocol.rb +0 -0
  117. data/lib/generated/azure_mgmt_network/models/usage.rb +78 -0
  118. data/lib/generated/azure_mgmt_network/models/usage_name.rb +55 -0
  119. data/lib/generated/azure_mgmt_network/models/usages_list_result.rb +52 -0
  120. data/lib/generated/azure_mgmt_network/models/virtual_network.rb +173 -0
  121. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +213 -0
  122. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +239 -0
  123. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +96 -0
  124. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/virtual_network_gateway_connection_status.rb +0 -0
  125. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/virtual_network_gateway_connection_type.rb +0 -0
  126. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +108 -0
  127. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +94 -0
  128. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +68 -0
  129. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/virtual_network_gateway_sku_name.rb +0 -0
  130. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/virtual_network_gateway_sku_tier.rb +0 -0
  131. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/virtual_network_gateway_type.rb +0 -0
  132. data/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb +94 -0
  133. data/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb +146 -0
  134. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +95 -0
  135. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +17 -0
  136. data/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +84 -0
  137. data/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb +45 -0
  138. data/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +85 -0
  139. data/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +84 -0
  140. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/models/vpn_type.rb +0 -0
  141. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/module_definition.rb +0 -0
  142. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/network_interfaces.rb +913 -113
  143. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/network_management_client.rb +31 -25
  144. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/network_security_groups.rb +122 -53
  145. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/public_ipaddresses.rb +120 -53
  146. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/route_tables.rb +118 -53
  147. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/routes.rb +90 -42
  148. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/security_rules.rb +94 -42
  149. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/subnets.rb +94 -46
  150. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/usages.rb +4 -94
  151. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/version.rb +1 -1
  152. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/virtual_network_gateway_connections.rb +164 -86
  153. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/virtual_network_gateways.rb +146 -70
  154. data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +654 -0
  155. data/lib/{azure_mgmt_network → generated/azure_mgmt_network}/virtual_networks.rb +123 -58
  156. metadata +173 -221
  157. data/lib/azure_mgmt_network/models/address_space.rb +0 -58
  158. data/lib/azure_mgmt_network/models/application_gateway.rb +0 -102
  159. data/lib/azure_mgmt_network/models/application_gateway_backend_address.rb +0 -65
  160. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +0 -88
  161. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool_properties_format.rb +0 -119
  162. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +0 -88
  163. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings_properties_format.rb +0 -122
  164. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +0 -89
  165. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration_properties_format.rb +0 -114
  166. data/lib/azure_mgmt_network/models/application_gateway_frontend_port.rb +0 -88
  167. data/lib/azure_mgmt_network/models/application_gateway_frontend_port_properties_format.rb +0 -68
  168. data/lib/azure_mgmt_network/models/application_gateway_http_listener.rb +0 -88
  169. data/lib/azure_mgmt_network/models/application_gateway_http_listener_properties_format.rb +0 -141
  170. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +0 -88
  171. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration_properties_format.rb +0 -75
  172. data/lib/azure_mgmt_network/models/application_gateway_list_result.rb +0 -86
  173. data/lib/azure_mgmt_network/models/application_gateway_path_rule.rb +0 -88
  174. data/lib/azure_mgmt_network/models/application_gateway_path_rule_properties_format.rb +0 -101
  175. data/lib/azure_mgmt_network/models/application_gateway_probe.rb +0 -88
  176. data/lib/azure_mgmt_network/models/application_gateway_probe_properties_format.rb +0 -118
  177. data/lib/azure_mgmt_network/models/application_gateway_properties_format.rb +0 -408
  178. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +0 -88
  179. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_properties_format.rb +0 -139
  180. data/lib/azure_mgmt_network/models/application_gateway_sku.rb +0 -86
  181. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +0 -88
  182. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate_properties_format.rb +0 -85
  183. data/lib/azure_mgmt_network/models/application_gateway_url_path_map.rb +0 -88
  184. data/lib/azure_mgmt_network/models/application_gateway_url_path_map_properties_format.rb +0 -122
  185. data/lib/azure_mgmt_network/models/authorization_list_result.rb +0 -87
  186. data/lib/azure_mgmt_network/models/authorization_properties_format.rb +0 -79
  187. data/lib/azure_mgmt_network/models/azure_async_operation_result.rb +0 -83
  188. data/lib/azure_mgmt_network/models/backend_address_pool.rb +0 -88
  189. data/lib/azure_mgmt_network/models/backend_address_pool_properties_format.rb +0 -135
  190. data/lib/azure_mgmt_network/models/bgp_settings.rb +0 -78
  191. data/lib/azure_mgmt_network/models/connection_reset_shared_key.rb +0 -58
  192. data/lib/azure_mgmt_network/models/connection_shared_key.rb +0 -56
  193. data/lib/azure_mgmt_network/models/connection_shared_key_result.rb +0 -56
  194. data/lib/azure_mgmt_network/models/dhcp_options.rb +0 -58
  195. data/lib/azure_mgmt_network/models/dns_name_availability_result.rb +0 -56
  196. data/lib/azure_mgmt_network/models/error.rb +0 -112
  197. data/lib/azure_mgmt_network/models/error_details.rb +0 -74
  198. data/lib/azure_mgmt_network/models/express_route_circuit.rb +0 -118
  199. data/lib/azure_mgmt_network/models/express_route_circuit_arp_table.rb +0 -84
  200. data/lib/azure_mgmt_network/models/express_route_circuit_authorization.rb +0 -88
  201. data/lib/azure_mgmt_network/models/express_route_circuit_list_result.rb +0 -86
  202. data/lib/azure_mgmt_network/models/express_route_circuit_peering.rb +0 -88
  203. data/lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb +0 -92
  204. data/lib/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +0 -87
  205. data/lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb +0 -194
  206. data/lib/azure_mgmt_network/models/express_route_circuit_properties_format.rb +0 -188
  207. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb +0 -93
  208. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +0 -97
  209. data/lib/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +0 -76
  210. data/lib/azure_mgmt_network/models/express_route_circuit_sku.rb +0 -83
  211. data/lib/azure_mgmt_network/models/express_route_circuit_stats.rb +0 -87
  212. data/lib/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +0 -85
  213. data/lib/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +0 -88
  214. data/lib/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +0 -88
  215. data/lib/azure_mgmt_network/models/express_route_service_provider.rb +0 -92
  216. data/lib/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +0 -67
  217. data/lib/azure_mgmt_network/models/express_route_service_provider_list_result.rb +0 -86
  218. data/lib/azure_mgmt_network/models/express_route_service_provider_properties_format.rb +0 -97
  219. data/lib/azure_mgmt_network/models/frontend_ipconfiguration.rb +0 -88
  220. data/lib/azure_mgmt_network/models/frontend_ipconfiguration_properties_format.rb +0 -237
  221. data/lib/azure_mgmt_network/models/inbound_nat_pool.rb +0 -88
  222. data/lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb +0 -134
  223. data/lib/azure_mgmt_network/models/inbound_nat_rule.rb +0 -88
  224. data/lib/azure_mgmt_network/models/inbound_nat_rule_properties_format.rb +0 -162
  225. data/lib/azure_mgmt_network/models/ipconfiguration.rb +0 -88
  226. data/lib/azure_mgmt_network/models/ipconfiguration_properties_format.rb +0 -113
  227. data/lib/azure_mgmt_network/models/load_balancer.rb +0 -102
  228. data/lib/azure_mgmt_network/models/load_balancer_list_result.rb +0 -86
  229. data/lib/azure_mgmt_network/models/load_balancer_properties_format.rb +0 -278
  230. data/lib/azure_mgmt_network/models/load_balancing_rule.rb +0 -88
  231. data/lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb +0 -195
  232. data/lib/azure_mgmt_network/models/local_network_gateway.rb +0 -102
  233. data/lib/azure_mgmt_network/models/local_network_gateway_list_result.rb +0 -86
  234. data/lib/azure_mgmt_network/models/local_network_gateway_properties_format.rb +0 -107
  235. data/lib/azure_mgmt_network/models/network_interface.rb +0 -102
  236. data/lib/azure_mgmt_network/models/network_interface_dns_settings.rb +0 -94
  237. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration.rb +0 -88
  238. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration_properties_format.rb +0 -218
  239. data/lib/azure_mgmt_network/models/network_interface_list_result.rb +0 -86
  240. data/lib/azure_mgmt_network/models/network_interface_properties_format.rb +0 -176
  241. data/lib/azure_mgmt_network/models/network_security_group.rb +0 -102
  242. data/lib/azure_mgmt_network/models/network_security_group_list_result.rb +0 -86
  243. data/lib/azure_mgmt_network/models/network_security_group_properties_format.rb +0 -189
  244. data/lib/azure_mgmt_network/models/outbound_nat_rule.rb +0 -88
  245. data/lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb +0 -117
  246. data/lib/azure_mgmt_network/models/probe.rb +0 -88
  247. data/lib/azure_mgmt_network/models/probe_properties_format.rb +0 -156
  248. data/lib/azure_mgmt_network/models/public_ipaddress.rb +0 -102
  249. data/lib/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +0 -83
  250. data/lib/azure_mgmt_network/models/public_ipaddress_list_result.rb +0 -86
  251. data/lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb +0 -146
  252. data/lib/azure_mgmt_network/models/route.rb +0 -88
  253. data/lib/azure_mgmt_network/models/route_list_result.rb +0 -85
  254. data/lib/azure_mgmt_network/models/route_properties_format.rb +0 -94
  255. data/lib/azure_mgmt_network/models/route_table.rb +0 -102
  256. data/lib/azure_mgmt_network/models/route_table_list_result.rb +0 -86
  257. data/lib/azure_mgmt_network/models/route_table_properties_format.rb +0 -116
  258. data/lib/azure_mgmt_network/models/security_rule.rb +0 -88
  259. data/lib/azure_mgmt_network/models/security_rule_list_result.rb +0 -87
  260. data/lib/azure_mgmt_network/models/security_rule_properties_format.rb +0 -176
  261. data/lib/azure_mgmt_network/models/subnet.rb +0 -88
  262. data/lib/azure_mgmt_network/models/subnet_list_result.rb +0 -86
  263. data/lib/azure_mgmt_network/models/subnet_properties_format.rb +0 -130
  264. data/lib/azure_mgmt_network/models/usage.rb +0 -96
  265. data/lib/azure_mgmt_network/models/usage_name.rb +0 -66
  266. data/lib/azure_mgmt_network/models/usages_list_result.rb +0 -76
  267. data/lib/azure_mgmt_network/models/virtual_network.rb +0 -102
  268. data/lib/azure_mgmt_network/models/virtual_network_gateway.rb +0 -102
  269. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection.rb +0 -102
  270. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +0 -87
  271. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_properties_format.rb +0 -218
  272. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +0 -88
  273. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration_properties_format.rb +0 -114
  274. data/lib/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +0 -86
  275. data/lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb +0 -205
  276. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku.rb +0 -86
  277. data/lib/azure_mgmt_network/models/virtual_network_list_result.rb +0 -86
  278. data/lib/azure_mgmt_network/models/virtual_network_properties_format.rb +0 -131
  279. data/lib/azure_mgmt_network/models/vpn_client_configuration.rb +0 -125
  280. data/lib/azure_mgmt_network/models/vpn_client_parameters.rb +0 -60
  281. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +0 -88
  282. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate_properties_format.rb +0 -69
  283. data/lib/azure_mgmt_network/models/vpn_client_root_certificate.rb +0 -88
  284. data/lib/azure_mgmt_network/models/vpn_client_root_certificate_properties_format.rb +0 -66
@@ -32,11 +32,32 @@ module Azure::ARM::Network
32
32
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
33
  # will be added to the HTTP request.
34
34
  #
35
- # @return [ExpressRouteServiceProviderListResult] operation results.
35
+ # @return [ExpressRouteServiceProviderListResult] which provide lazy access to
36
+ # pages of the response.
36
37
  #
37
- def list(custom_headers = nil)
38
+ def list_as_lazy(custom_headers = nil)
38
39
  response = list_async(custom_headers).value!
39
- response.body unless response.nil?
40
+ unless response.nil?
41
+ page = response.body
42
+ page.next_method = Proc.new do |next_link|
43
+ list_next_async(next_link, custom_headers)
44
+ end
45
+ page
46
+ end
47
+ end
48
+
49
+ #
50
+ # The List ExpressRouteServiceProvider opertion retrieves all the available
51
+ # ExpressRouteServiceProviders.
52
+ #
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [Array<ExpressRouteServiceProvider>] operation results.
57
+ #
58
+ def list(custom_headers = nil)
59
+ first_page = list_as_lazy(custom_headers)
60
+ first_page.get_all_items
40
61
  end
41
62
 
42
63
  #
@@ -64,6 +85,8 @@ module Azure::ARM::Network
64
85
  def list_async(custom_headers = nil)
65
86
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
87
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
88
+
89
+
67
90
  request_headers = {}
68
91
 
69
92
  # Set Headers
@@ -99,10 +122,8 @@ module Azure::ARM::Network
99
122
  if status_code == 200
100
123
  begin
101
124
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
102
- unless parsed_response.nil?
103
- parsed_response = ExpressRouteServiceProviderListResult.deserialize_object(parsed_response)
104
- end
105
- result.body = parsed_response
125
+ result_mapper = ExpressRouteServiceProviderListResult.mapper()
126
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
106
127
  rescue Exception => e
107
128
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
108
129
  end
@@ -158,6 +179,8 @@ module Azure::ARM::Network
158
179
  #
159
180
  def list_next_async(next_page_link, custom_headers = nil)
160
181
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
182
+
183
+
161
184
  request_headers = {}
162
185
 
163
186
  # Set Headers
@@ -192,10 +215,8 @@ module Azure::ARM::Network
192
215
  if status_code == 200
193
216
  begin
194
217
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
195
- unless parsed_response.nil?
196
- parsed_response = ExpressRouteServiceProviderListResult.deserialize_object(parsed_response)
197
- end
198
- result.body = parsed_response
218
+ result_mapper = ExpressRouteServiceProviderListResult.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
199
220
  rescue Exception => e
200
221
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
201
222
  end
@@ -30,10 +30,24 @@ module Azure::ARM::Network
30
30
  #
31
31
  # @param resource_group_name [String] The name of the resource group.
32
32
  # @param load_balancer_name [String] The name of the loadBalancer.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ def delete(resource_group_name, load_balancer_name, custom_headers = nil)
37
+ response = delete_async(resource_group_name, load_balancer_name, custom_headers).value!
38
+ nil
39
+ end
40
+
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group.
43
+ # @param load_balancer_name [String] The name of the loadBalancer.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
33
47
  # @return [Concurrent::Promise] promise which provides async access to http
34
48
  # response.
35
49
  #
36
- def delete(resource_group_name, load_balancer_name, custom_headers = nil)
50
+ def delete_async(resource_group_name, load_balancer_name, custom_headers = nil)
37
51
  # Send request
38
52
  promise = begin_delete_async(resource_group_name, load_balancer_name, custom_headers)
39
53
 
@@ -42,8 +56,8 @@ module Azure::ARM::Network
42
56
  deserialize_method = lambda do |parsed_response|
43
57
  end
44
58
 
45
- # Waiting for response.
46
- @client.get_long_running_operation_result(response, deserialize_method)
59
+ # Waiting for response.
60
+ @client.get_long_running_operation_result(response, deserialize_method)
47
61
  end
48
62
 
49
63
  promise
@@ -92,6 +106,8 @@ module Azure::ARM::Network
92
106
  fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
93
107
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
94
108
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
109
+
110
+
95
111
  request_headers = {}
96
112
 
97
113
  # Set Headers
@@ -180,6 +196,8 @@ module Azure::ARM::Network
180
196
  fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
181
197
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
182
198
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
199
+
200
+
183
201
  request_headers = {}
184
202
 
185
203
  # Set Headers
@@ -215,10 +233,8 @@ module Azure::ARM::Network
215
233
  if status_code == 200
216
234
  begin
217
235
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
- unless parsed_response.nil?
219
- parsed_response = LoadBalancer.deserialize_object(parsed_response)
220
- end
221
- result.body = parsed_response
236
+ result_mapper = LoadBalancer.mapper()
237
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
222
238
  rescue Exception => e
223
239
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
240
  end
@@ -237,26 +253,36 @@ module Azure::ARM::Network
237
253
  # @param load_balancer_name [String] The name of the loadBalancer.
238
254
  # @param parameters [LoadBalancer] Parameters supplied to the create/delete
239
255
  # LoadBalancer operation
240
- # @param @client.api_version [String] Client Api Version.
241
- # @param @client.subscription_id [String] Gets subscription credentials which
242
- # uniquely identify Microsoft Azure subscription. The subscription ID forms
243
- # part of the URI for every service call.
244
- # @param @client.accept_language [String] Gets or sets the preferred language
245
- # for the response.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [LoadBalancer] operation results.
260
+ #
261
+ def create_or_update(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
262
+ response = create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers).value!
263
+ response.body unless response.nil?
264
+ end
265
+
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group.
268
+ # @param load_balancer_name [String] The name of the loadBalancer.
269
+ # @param parameters [LoadBalancer] Parameters supplied to the create/delete
270
+ # LoadBalancer operation
271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
+ # will be added to the HTTP request.
246
273
  #
247
274
  # @return [Concurrent::Promise] promise which provides async access to http
248
275
  # response.
249
276
  #
250
- def create_or_update(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
277
+ def create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
251
278
  # Send request
252
279
  promise = begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers)
253
280
 
254
281
  promise = promise.then do |response|
255
282
  # Defining deserialization method.
256
283
  deserialize_method = lambda do |parsed_response|
257
- unless parsed_response.nil?
258
- parsed_response = LoadBalancer.deserialize_object(parsed_response)
259
- end
284
+ result_mapper = LoadBalancer.mapper()
285
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
260
286
  end
261
287
 
262
288
  # Waiting for response.
@@ -315,21 +341,23 @@ module Azure::ARM::Network
315
341
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
316
342
  fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
317
343
  fail ArgumentError, 'parameters is nil' if parameters.nil?
318
- parameters.validate unless parameters.nil?
319
344
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
320
345
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
346
+
347
+
321
348
  request_headers = {}
322
349
 
323
350
  # Set Headers
324
351
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
325
352
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
326
353
 
327
- # Serialize Request
328
354
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
329
- unless parameters.nil?
330
- parameters = LoadBalancer.serialize_object(parameters)
331
- end
332
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
355
+
356
+ # Serialize Request
357
+ request_mapper = LoadBalancer.mapper()
358
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
359
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
360
+
333
361
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'
334
362
  options = {
335
363
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -361,10 +389,8 @@ module Azure::ARM::Network
361
389
  if status_code == 201
362
390
  begin
363
391
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
364
- unless parsed_response.nil?
365
- parsed_response = LoadBalancer.deserialize_object(parsed_response)
366
- end
367
- result.body = parsed_response
392
+ result_mapper = LoadBalancer.mapper()
393
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
368
394
  rescue Exception => e
369
395
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
370
396
  end
@@ -373,10 +399,8 @@ module Azure::ARM::Network
373
399
  if status_code == 200
374
400
  begin
375
401
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
376
- unless parsed_response.nil?
377
- parsed_response = LoadBalancer.deserialize_object(parsed_response)
378
- end
379
- result.body = parsed_response
402
+ result_mapper = LoadBalancer.mapper()
403
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
380
404
  rescue Exception => e
381
405
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
382
406
  end
@@ -395,11 +419,32 @@ module Azure::ARM::Network
395
419
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
420
  # will be added to the HTTP request.
397
421
  #
398
- # @return [LoadBalancerListResult] operation results.
422
+ # @return [LoadBalancerListResult] which provide lazy access to pages of the
423
+ # response.
399
424
  #
400
- def list_all(custom_headers = nil)
425
+ def list_all_as_lazy(custom_headers = nil)
401
426
  response = list_all_async(custom_headers).value!
402
- response.body unless response.nil?
427
+ unless response.nil?
428
+ page = response.body
429
+ page.next_method = Proc.new do |next_link|
430
+ list_all_next_async(next_link, custom_headers)
431
+ end
432
+ page
433
+ end
434
+ end
435
+
436
+ #
437
+ # The List loadBalancer opertion retrieves all the loadbalancers in a
438
+ # subscription.
439
+ #
440
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
441
+ # will be added to the HTTP request.
442
+ #
443
+ # @return [Array<LoadBalancer>] operation results.
444
+ #
445
+ def list_all(custom_headers = nil)
446
+ first_page = list_all_as_lazy(custom_headers)
447
+ first_page.get_all_items
403
448
  end
404
449
 
405
450
  #
@@ -427,6 +472,8 @@ module Azure::ARM::Network
427
472
  def list_all_async(custom_headers = nil)
428
473
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
429
474
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
475
+
476
+
430
477
  request_headers = {}
431
478
 
432
479
  # Set Headers
@@ -462,10 +509,8 @@ module Azure::ARM::Network
462
509
  if status_code == 200
463
510
  begin
464
511
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
465
- unless parsed_response.nil?
466
- parsed_response = LoadBalancerListResult.deserialize_object(parsed_response)
467
- end
468
- result.body = parsed_response
512
+ result_mapper = LoadBalancerListResult.mapper()
513
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
469
514
  rescue Exception => e
470
515
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
471
516
  end
@@ -485,11 +530,33 @@ module Azure::ARM::Network
485
530
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
486
531
  # will be added to the HTTP request.
487
532
  #
488
- # @return [LoadBalancerListResult] operation results.
533
+ # @return [LoadBalancerListResult] which provide lazy access to pages of the
534
+ # response.
489
535
  #
490
- def list(resource_group_name, custom_headers = nil)
536
+ def list_as_lazy(resource_group_name, custom_headers = nil)
491
537
  response = list_async(resource_group_name, custom_headers).value!
492
- response.body unless response.nil?
538
+ unless response.nil?
539
+ page = response.body
540
+ page.next_method = Proc.new do |next_link|
541
+ list_next_async(next_link, custom_headers)
542
+ end
543
+ page
544
+ end
545
+ end
546
+
547
+ #
548
+ # The List loadBalancer opertion retrieves all the loadbalancers in a resource
549
+ # group.
550
+ #
551
+ # @param resource_group_name [String] The name of the resource group.
552
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
553
+ # will be added to the HTTP request.
554
+ #
555
+ # @return [Array<LoadBalancer>] operation results.
556
+ #
557
+ def list(resource_group_name, custom_headers = nil)
558
+ first_page = list_as_lazy(resource_group_name, custom_headers)
559
+ first_page.get_all_items
493
560
  end
494
561
 
495
562
  #
@@ -520,6 +587,8 @@ module Azure::ARM::Network
520
587
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
521
588
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
522
589
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
590
+
591
+
523
592
  request_headers = {}
524
593
 
525
594
  # Set Headers
@@ -555,10 +624,8 @@ module Azure::ARM::Network
555
624
  if status_code == 200
556
625
  begin
557
626
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
558
- unless parsed_response.nil?
559
- parsed_response = LoadBalancerListResult.deserialize_object(parsed_response)
560
- end
561
- result.body = parsed_response
627
+ result_mapper = LoadBalancerListResult.mapper()
628
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
562
629
  rescue Exception => e
563
630
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
564
631
  end
@@ -614,6 +681,8 @@ module Azure::ARM::Network
614
681
  #
615
682
  def list_all_next_async(next_page_link, custom_headers = nil)
616
683
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
684
+
685
+
617
686
  request_headers = {}
618
687
 
619
688
  # Set Headers
@@ -648,10 +717,8 @@ module Azure::ARM::Network
648
717
  if status_code == 200
649
718
  begin
650
719
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
651
- unless parsed_response.nil?
652
- parsed_response = LoadBalancerListResult.deserialize_object(parsed_response)
653
- end
654
- result.body = parsed_response
720
+ result_mapper = LoadBalancerListResult.mapper()
721
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
655
722
  rescue Exception => e
656
723
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
657
724
  end
@@ -707,6 +774,8 @@ module Azure::ARM::Network
707
774
  #
708
775
  def list_next_async(next_page_link, custom_headers = nil)
709
776
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
777
+
778
+
710
779
  request_headers = {}
711
780
 
712
781
  # Set Headers
@@ -741,10 +810,8 @@ module Azure::ARM::Network
741
810
  if status_code == 200
742
811
  begin
743
812
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
744
- unless parsed_response.nil?
745
- parsed_response = LoadBalancerListResult.deserialize_object(parsed_response)
746
- end
747
- result.body = parsed_response
813
+ result_mapper = LoadBalancerListResult.mapper()
814
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
748
815
  rescue Exception => e
749
816
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
750
817
  end
@@ -35,26 +35,38 @@ module Azure::ARM::Network
35
35
  # @param parameters [LocalNetworkGateway] Parameters supplied to the Begin
36
36
  # Create or update Local Network Gateway operation through Network resource
37
37
  # provider.
38
- # @param @client.api_version [String] Client Api Version.
39
- # @param @client.subscription_id [String] Gets subscription credentials which
40
- # uniquely identify Microsoft Azure subscription. The subscription ID forms
41
- # part of the URI for every service call.
42
- # @param @client.accept_language [String] Gets or sets the preferred language
43
- # for the response.
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [LocalNetworkGateway] operation results.
42
+ #
43
+ def create_or_update(resource_group_name, local_network_gateway_name, parameters, custom_headers = nil)
44
+ response = create_or_update_async(resource_group_name, local_network_gateway_name, parameters, custom_headers).value!
45
+ response.body unless response.nil?
46
+ end
47
+
48
+ #
49
+ # @param resource_group_name [String] The name of the resource group.
50
+ # @param local_network_gateway_name [String] The name of the local network
51
+ # gateway.
52
+ # @param parameters [LocalNetworkGateway] Parameters supplied to the Begin
53
+ # Create or update Local Network Gateway operation through Network resource
54
+ # provider.
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
44
57
  #
45
58
  # @return [Concurrent::Promise] promise which provides async access to http
46
59
  # response.
47
60
  #
48
- def create_or_update(resource_group_name, local_network_gateway_name, parameters, custom_headers = nil)
61
+ def create_or_update_async(resource_group_name, local_network_gateway_name, parameters, custom_headers = nil)
49
62
  # Send request
50
63
  promise = begin_create_or_update_async(resource_group_name, local_network_gateway_name, parameters, custom_headers)
51
64
 
52
65
  promise = promise.then do |response|
53
66
  # Defining deserialization method.
54
67
  deserialize_method = lambda do |parsed_response|
55
- unless parsed_response.nil?
56
- parsed_response = LocalNetworkGateway.deserialize_object(parsed_response)
57
- end
68
+ result_mapper = LocalNetworkGateway.mapper()
69
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
58
70
  end
59
71
 
60
72
  # Waiting for response.
@@ -122,21 +134,23 @@ module Azure::ARM::Network
122
134
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
123
135
  fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil?
124
136
  fail ArgumentError, 'parameters is nil' if parameters.nil?
125
- parameters.validate unless parameters.nil?
126
137
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
127
138
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
139
+
140
+
128
141
  request_headers = {}
129
142
 
130
143
  # Set Headers
131
144
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
132
145
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
133
146
 
134
- # Serialize Request
135
147
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
136
- unless parameters.nil?
137
- parameters = LocalNetworkGateway.serialize_object(parameters)
138
- end
139
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
148
+
149
+ # Serialize Request
150
+ request_mapper = LocalNetworkGateway.mapper()
151
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
152
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
153
+
140
154
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'
141
155
  options = {
142
156
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -168,10 +182,8 @@ module Azure::ARM::Network
168
182
  if status_code == 201
169
183
  begin
170
184
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
171
- unless parsed_response.nil?
172
- parsed_response = LocalNetworkGateway.deserialize_object(parsed_response)
173
- end
174
- result.body = parsed_response
185
+ result_mapper = LocalNetworkGateway.mapper()
186
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
175
187
  rescue Exception => e
176
188
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
177
189
  end
@@ -180,10 +192,8 @@ module Azure::ARM::Network
180
192
  if status_code == 200
181
193
  begin
182
194
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
183
- unless parsed_response.nil?
184
- parsed_response = LocalNetworkGateway.deserialize_object(parsed_response)
185
- end
186
- result.body = parsed_response
195
+ result_mapper = LocalNetworkGateway.mapper()
196
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
187
197
  rescue Exception => e
188
198
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
189
199
  end
@@ -245,6 +255,8 @@ module Azure::ARM::Network
245
255
  fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil?
246
256
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
247
257
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
258
+
259
+
248
260
  request_headers = {}
249
261
 
250
262
  # Set Headers
@@ -280,10 +292,8 @@ module Azure::ARM::Network
280
292
  if status_code == 200
281
293
  begin
282
294
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
283
- unless parsed_response.nil?
284
- parsed_response = LocalNetworkGateway.deserialize_object(parsed_response)
285
- end
286
- result.body = parsed_response
295
+ result_mapper = LocalNetworkGateway.mapper()
296
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
287
297
  rescue Exception => e
288
298
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
289
299
  end
@@ -302,10 +312,25 @@ module Azure::ARM::Network
302
312
  # @param resource_group_name [String] The name of the resource group.
303
313
  # @param local_network_gateway_name [String] The name of the local network
304
314
  # gateway.
315
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
316
+ # will be added to the HTTP request.
317
+ #
318
+ def delete(resource_group_name, local_network_gateway_name, custom_headers = nil)
319
+ response = delete_async(resource_group_name, local_network_gateway_name, custom_headers).value!
320
+ nil
321
+ end
322
+
323
+ #
324
+ # @param resource_group_name [String] The name of the resource group.
325
+ # @param local_network_gateway_name [String] The name of the local network
326
+ # gateway.
327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
328
+ # will be added to the HTTP request.
329
+ #
305
330
  # @return [Concurrent::Promise] promise which provides async access to http
306
331
  # response.
307
332
  #
308
- def delete(resource_group_name, local_network_gateway_name, custom_headers = nil)
333
+ def delete_async(resource_group_name, local_network_gateway_name, custom_headers = nil)
309
334
  # Send request
310
335
  promise = begin_delete_async(resource_group_name, local_network_gateway_name, custom_headers)
311
336
 
@@ -314,8 +339,8 @@ module Azure::ARM::Network
314
339
  deserialize_method = lambda do |parsed_response|
315
340
  end
316
341
 
317
- # Waiting for response.
318
- @client.get_long_running_operation_result(response, deserialize_method)
342
+ # Waiting for response.
343
+ @client.get_long_running_operation_result(response, deserialize_method)
319
344
  end
320
345
 
321
346
  promise
@@ -370,6 +395,8 @@ module Azure::ARM::Network
370
395
  fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil?
371
396
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
372
397
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
398
+
399
+
373
400
  request_headers = {}
374
401
 
375
402
  # Set Headers
@@ -416,11 +443,33 @@ module Azure::ARM::Network
416
443
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
417
444
  # will be added to the HTTP request.
418
445
  #
419
- # @return [LocalNetworkGatewayListResult] operation results.
446
+ # @return [LocalNetworkGatewayListResult] which provide lazy access to pages
447
+ # of the response.
420
448
  #
421
- def list(resource_group_name, custom_headers = nil)
449
+ def list_as_lazy(resource_group_name, custom_headers = nil)
422
450
  response = list_async(resource_group_name, custom_headers).value!
423
- response.body unless response.nil?
451
+ unless response.nil?
452
+ page = response.body
453
+ page.next_method = Proc.new do |next_link|
454
+ list_next_async(next_link, custom_headers)
455
+ end
456
+ page
457
+ end
458
+ end
459
+
460
+ #
461
+ # The List LocalNetworkGateways opertion retrieves all the local network
462
+ # gateways stored.
463
+ #
464
+ # @param resource_group_name [String] The name of the resource group.
465
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
466
+ # will be added to the HTTP request.
467
+ #
468
+ # @return [Array<LocalNetworkGateway>] operation results.
469
+ #
470
+ def list(resource_group_name, custom_headers = nil)
471
+ first_page = list_as_lazy(resource_group_name, custom_headers)
472
+ first_page.get_all_items
424
473
  end
425
474
 
426
475
  #
@@ -451,6 +500,8 @@ module Azure::ARM::Network
451
500
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
452
501
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
453
502
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
503
+
504
+
454
505
  request_headers = {}
455
506
 
456
507
  # Set Headers
@@ -486,10 +537,8 @@ module Azure::ARM::Network
486
537
  if status_code == 200
487
538
  begin
488
539
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
489
- unless parsed_response.nil?
490
- parsed_response = LocalNetworkGatewayListResult.deserialize_object(parsed_response)
491
- end
492
- result.body = parsed_response
540
+ result_mapper = LocalNetworkGatewayListResult.mapper()
541
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
493
542
  rescue Exception => e
494
543
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
495
544
  end
@@ -545,6 +594,8 @@ module Azure::ARM::Network
545
594
  #
546
595
  def list_next_async(next_page_link, custom_headers = nil)
547
596
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
597
+
598
+
548
599
  request_headers = {}
549
600
 
550
601
  # Set Headers
@@ -579,10 +630,8 @@ module Azure::ARM::Network
579
630
  if status_code == 200
580
631
  begin
581
632
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
582
- unless parsed_response.nil?
583
- parsed_response = LocalNetworkGatewayListResult.deserialize_object(parsed_response)
584
- end
585
- result.body = parsed_response
633
+ result_mapper = LocalNetworkGatewayListResult.mapper()
634
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
586
635
  rescue Exception => e
587
636
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
588
637
  end