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
@@ -0,0 +1,18 @@
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
+ # Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState
10
+ #
11
+ module ExpressRouteCircuitPeeringAdvertisedPublicPrefixState
12
+ NotConfigured = "NotConfigured"
13
+ Configuring = "Configuring"
14
+ Configured = "Configured"
15
+ ValidationNeeded = "ValidationNeeded"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,92 @@
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
+ # Specfies the peering config
10
+ #
11
+ class ExpressRouteCircuitPeeringConfig
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Gets or sets the reference of
16
+ # AdvertisedPublicPrefixes
17
+ attr_accessor :advertised_public_prefixes
18
+
19
+ # @return [ExpressRouteCircuitPeeringAdvertisedPublicPrefixState] Gets
20
+ # or sets AdvertisedPublicPrefixState of the Peering resource .
21
+ # Possible values include: 'NotConfigured', 'Configuring',
22
+ # 'Configured', 'ValidationNeeded'
23
+ attr_accessor :advertised_public_prefixes_state
24
+
25
+ # @return [Integer] Gets or Sets CustomerAsn of the peering.
26
+ attr_accessor :customer_asn
27
+
28
+ # @return [String] Gets or Sets RoutingRegistryName of the config.
29
+ attr_accessor :routing_registry_name
30
+
31
+ #
32
+ # Validate the object. Throws ValidationError if validation fails.
33
+ #
34
+ def validate
35
+ @advertised_public_prefixes.each{ |e| e.validate if e.respond_to?(:validate) } unless @advertised_public_prefixes.nil?
36
+ end
37
+
38
+ #
39
+ # Serializes given Model object into Ruby Hash.
40
+ # @param object Model object to serialize.
41
+ # @return [Hash] Serialized object in form of Ruby Hash.
42
+ #
43
+ def self.serialize_object(object)
44
+ object.validate
45
+ output_object = {}
46
+
47
+ serialized_property = object.advertised_public_prefixes
48
+ output_object['advertisedPublicPrefixes'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.advertised_public_prefixes_state
51
+ output_object['advertisedPublicPrefixesState'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.customer_asn
54
+ output_object['customerASN'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.routing_registry_name
57
+ output_object['routingRegistryName'] = serialized_property unless serialized_property.nil?
58
+
59
+ output_object
60
+ end
61
+
62
+ #
63
+ # Deserializes given Ruby Hash into Model object.
64
+ # @param object [Hash] Ruby Hash object to deserialize.
65
+ # @return [ExpressRouteCircuitPeeringConfig] Deserialized object.
66
+ #
67
+ def self.deserialize_object(object)
68
+ return if object.nil?
69
+ output_object = ExpressRouteCircuitPeeringConfig.new
70
+
71
+ deserialized_property = object['advertisedPublicPrefixes']
72
+ output_object.advertised_public_prefixes = deserialized_property
73
+
74
+ deserialized_property = object['advertisedPublicPrefixesState']
75
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
76
+ enum_is_valid = ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.constants.any? { |e| ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.const_get(e).to_s.downcase == deserialized_property.downcase }
77
+ warn 'Enum ExpressRouteCircuitPeeringAdvertisedPublicPrefixState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
78
+ end
79
+ output_object.advertised_public_prefixes_state = deserialized_property
80
+
81
+ deserialized_property = object['customerASN']
82
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
83
+ output_object.customer_asn = deserialized_property
84
+
85
+ deserialized_property = object['routingRegistryName']
86
+ output_object.routing_registry_name = deserialized_property
87
+
88
+ output_object
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,87 @@
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
+ # Response for ListPeering Api service callRetrieves all Peerings that
10
+ # belongs to an ExpressRouteCircuit
11
+ #
12
+ class ExpressRouteCircuitPeeringListResult
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<ExpressRouteCircuitPeering>] Gets the peerings in an
17
+ # express route circuit
18
+ attr_accessor :value
19
+
20
+ # @return [String] Gets the URL to get the next set of results.
21
+ attr_accessor :next_link
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
28
+ end
29
+
30
+ #
31
+ # Serializes given Model object into Ruby Hash.
32
+ # @param object Model object to serialize.
33
+ # @return [Hash] Serialized object in form of Ruby Hash.
34
+ #
35
+ def self.serialize_object(object)
36
+ object.validate
37
+ output_object = {}
38
+
39
+ serialized_property = object.value
40
+ unless serialized_property.nil?
41
+ serializedArray = []
42
+ serialized_property.each do |element|
43
+ unless element.nil?
44
+ element = ExpressRouteCircuitPeering.serialize_object(element)
45
+ end
46
+ serializedArray.push(element)
47
+ end
48
+ serialized_property = serializedArray
49
+ end
50
+ output_object['value'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.next_link
53
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
54
+
55
+ output_object
56
+ end
57
+
58
+ #
59
+ # Deserializes given Ruby Hash into Model object.
60
+ # @param object [Hash] Ruby Hash object to deserialize.
61
+ # @return [ExpressRouteCircuitPeeringListResult] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = ExpressRouteCircuitPeeringListResult.new
66
+
67
+ deserialized_property = object['value']
68
+ unless deserialized_property.nil?
69
+ deserialized_array = []
70
+ deserialized_property.each do |element1|
71
+ unless element1.nil?
72
+ element1 = ExpressRouteCircuitPeering.deserialize_object(element1)
73
+ end
74
+ deserialized_array.push(element1)
75
+ end
76
+ deserialized_property = deserialized_array
77
+ end
78
+ output_object.value = deserialized_property
79
+
80
+ deserialized_property = object['nextLink']
81
+ output_object.next_link = deserialized_property
82
+
83
+ output_object
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,194 @@
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
+ # Model object.
10
+ #
11
+ class ExpressRouteCircuitPeeringPropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ExpressRouteCircuitPeeringType] Gets or sets PeeringType.
16
+ # Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering',
17
+ # 'MicrosoftPeering'
18
+ attr_accessor :peering_type
19
+
20
+ # @return [ExpressRouteCircuitPeeringState] Gets or sets state of
21
+ # Peering. Possible values include: 'Disabled', 'Enabled'
22
+ attr_accessor :state
23
+
24
+ # @return [Integer] Gets or sets the azure ASN
25
+ attr_accessor :azure_asn
26
+
27
+ # @return [Integer] Gets or sets the peer ASN
28
+ attr_accessor :peer_asn
29
+
30
+ # @return [String] Gets or sets the primary address prefix
31
+ attr_accessor :primary_peer_address_prefix
32
+
33
+ # @return [String] Gets or sets the secondary address prefix
34
+ attr_accessor :secondary_peer_address_prefix
35
+
36
+ # @return [String] Gets or sets the primary port
37
+ attr_accessor :primary_azure_port
38
+
39
+ # @return [String] Gets or sets the secondary port
40
+ attr_accessor :secondary_azure_port
41
+
42
+ # @return [String] Gets or sets the shared key
43
+ attr_accessor :shared_key
44
+
45
+ # @return [Integer] Gets or sets the vlan id
46
+ attr_accessor :vlan_id
47
+
48
+ # @return [ExpressRouteCircuitPeeringConfig] Gets or sets the mircosoft
49
+ # peering config
50
+ attr_accessor :microsoft_peering_config
51
+
52
+ # @return [ExpressRouteCircuitStats] Gets or peering stats
53
+ attr_accessor :stats
54
+
55
+ # @return [String] Gets or sets Provisioning state of the PublicIP
56
+ # resource Updating/Deleting/Failed
57
+ attr_accessor :provisioning_state
58
+
59
+ #
60
+ # Validate the object. Throws ValidationError if validation fails.
61
+ #
62
+ def validate
63
+ @microsoft_peering_config.validate unless @microsoft_peering_config.nil?
64
+ @stats.validate unless @stats.nil?
65
+ end
66
+
67
+ #
68
+ # Serializes given Model object into Ruby Hash.
69
+ # @param object Model object to serialize.
70
+ # @return [Hash] Serialized object in form of Ruby Hash.
71
+ #
72
+ def self.serialize_object(object)
73
+ object.validate
74
+ output_object = {}
75
+
76
+ serialized_property = object.peering_type
77
+ output_object['peeringType'] = serialized_property unless serialized_property.nil?
78
+
79
+ serialized_property = object.state
80
+ output_object['state'] = serialized_property unless serialized_property.nil?
81
+
82
+ serialized_property = object.azure_asn
83
+ output_object['azureASN'] = serialized_property unless serialized_property.nil?
84
+
85
+ serialized_property = object.peer_asn
86
+ output_object['peerASN'] = serialized_property unless serialized_property.nil?
87
+
88
+ serialized_property = object.primary_peer_address_prefix
89
+ output_object['primaryPeerAddressPrefix'] = serialized_property unless serialized_property.nil?
90
+
91
+ serialized_property = object.secondary_peer_address_prefix
92
+ output_object['secondaryPeerAddressPrefix'] = serialized_property unless serialized_property.nil?
93
+
94
+ serialized_property = object.primary_azure_port
95
+ output_object['primaryAzurePort'] = serialized_property unless serialized_property.nil?
96
+
97
+ serialized_property = object.secondary_azure_port
98
+ output_object['secondaryAzurePort'] = serialized_property unless serialized_property.nil?
99
+
100
+ serialized_property = object.shared_key
101
+ output_object['sharedKey'] = serialized_property unless serialized_property.nil?
102
+
103
+ serialized_property = object.vlan_id
104
+ output_object['vlanId'] = serialized_property unless serialized_property.nil?
105
+
106
+ serialized_property = object.microsoft_peering_config
107
+ unless serialized_property.nil?
108
+ serialized_property = ExpressRouteCircuitPeeringConfig.serialize_object(serialized_property)
109
+ end
110
+ output_object['microsoftPeeringConfig'] = serialized_property unless serialized_property.nil?
111
+
112
+ serialized_property = object.stats
113
+ unless serialized_property.nil?
114
+ serialized_property = ExpressRouteCircuitStats.serialize_object(serialized_property)
115
+ end
116
+ output_object['stats'] = serialized_property unless serialized_property.nil?
117
+
118
+ serialized_property = object.provisioning_state
119
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
120
+
121
+ output_object
122
+ end
123
+
124
+ #
125
+ # Deserializes given Ruby Hash into Model object.
126
+ # @param object [Hash] Ruby Hash object to deserialize.
127
+ # @return [ExpressRouteCircuitPeeringPropertiesFormat] Deserialized
128
+ # object.
129
+ #
130
+ def self.deserialize_object(object)
131
+ return if object.nil?
132
+ output_object = ExpressRouteCircuitPeeringPropertiesFormat.new
133
+
134
+ deserialized_property = object['peeringType']
135
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
136
+ enum_is_valid = ExpressRouteCircuitPeeringType.constants.any? { |e| ExpressRouteCircuitPeeringType.const_get(e).to_s.downcase == deserialized_property.downcase }
137
+ warn 'Enum ExpressRouteCircuitPeeringType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
138
+ end
139
+ output_object.peering_type = deserialized_property
140
+
141
+ deserialized_property = object['state']
142
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
143
+ enum_is_valid = ExpressRouteCircuitPeeringState.constants.any? { |e| ExpressRouteCircuitPeeringState.const_get(e).to_s.downcase == deserialized_property.downcase }
144
+ warn 'Enum ExpressRouteCircuitPeeringState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
145
+ end
146
+ output_object.state = deserialized_property
147
+
148
+ deserialized_property = object['azureASN']
149
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
150
+ output_object.azure_asn = deserialized_property
151
+
152
+ deserialized_property = object['peerASN']
153
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
154
+ output_object.peer_asn = deserialized_property
155
+
156
+ deserialized_property = object['primaryPeerAddressPrefix']
157
+ output_object.primary_peer_address_prefix = deserialized_property
158
+
159
+ deserialized_property = object['secondaryPeerAddressPrefix']
160
+ output_object.secondary_peer_address_prefix = deserialized_property
161
+
162
+ deserialized_property = object['primaryAzurePort']
163
+ output_object.primary_azure_port = deserialized_property
164
+
165
+ deserialized_property = object['secondaryAzurePort']
166
+ output_object.secondary_azure_port = deserialized_property
167
+
168
+ deserialized_property = object['sharedKey']
169
+ output_object.shared_key = deserialized_property
170
+
171
+ deserialized_property = object['vlanId']
172
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
173
+ output_object.vlan_id = deserialized_property
174
+
175
+ deserialized_property = object['microsoftPeeringConfig']
176
+ unless deserialized_property.nil?
177
+ deserialized_property = ExpressRouteCircuitPeeringConfig.deserialize_object(deserialized_property)
178
+ end
179
+ output_object.microsoft_peering_config = deserialized_property
180
+
181
+ deserialized_property = object['stats']
182
+ unless deserialized_property.nil?
183
+ deserialized_property = ExpressRouteCircuitStats.deserialize_object(deserialized_property)
184
+ end
185
+ output_object.stats = deserialized_property
186
+
187
+ deserialized_property = object['provisioningState']
188
+ output_object.provisioning_state = deserialized_property
189
+
190
+ output_object
191
+ end
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,16 @@
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
+ # Defines values for ExpressRouteCircuitPeeringState
10
+ #
11
+ module ExpressRouteCircuitPeeringState
12
+ Disabled = "Disabled"
13
+ Enabled = "Enabled"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
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
+ # Defines values for ExpressRouteCircuitPeeringType
10
+ #
11
+ module ExpressRouteCircuitPeeringType
12
+ AzurePublicPeering = "AzurePublicPeering"
13
+ AzurePrivatePeering = "AzurePrivatePeering"
14
+ MicrosoftPeering = "MicrosoftPeering"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,179 @@
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 ExpressRouteCircuit
10
+ #
11
+ class ExpressRouteCircuitPropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets CircuitProvisioningState state of the
16
+ # resource
17
+ attr_accessor :circuit_provisioning_state
18
+
19
+ # @return [ServiceProviderProvisioningState] Gets or sets
20
+ # ServiceProviderProvisioningState state of the resource . Possible
21
+ # values include: 'NotProvisioned', 'Provisioning', 'Provisioned',
22
+ # 'Deprovisioning'
23
+ attr_accessor :service_provider_provisioning_state
24
+
25
+ # @return [Array<ExpressRouteCircuitAuthorization>] Gets or sets list of
26
+ # authorizations
27
+ attr_accessor :authorizations
28
+
29
+ # @return [Array<ExpressRouteCircuitPeering>] Gets or sets list of
30
+ # peerings
31
+ attr_accessor :peerings
32
+
33
+ # @return [String] Gets or sets ServiceKey
34
+ attr_accessor :service_key
35
+
36
+ # @return [String] Gets or sets ServiceProviderNotes
37
+ attr_accessor :service_provider_notes
38
+
39
+ # @return [ExpressRouteCircuitServiceProviderProperties] Gets or sets
40
+ # ServiceProviderProperties
41
+ attr_accessor :service_provider_properties
42
+
43
+ # @return [String] Gets or sets Provisioning state of the PublicIP
44
+ # resource Updating/Deleting/Failed
45
+ attr_accessor :provisioning_state
46
+
47
+ #
48
+ # Validate the object. Throws ValidationError if validation fails.
49
+ #
50
+ def validate
51
+ @authorizations.each{ |e| e.validate if e.respond_to?(:validate) } unless @authorizations.nil?
52
+ @peerings.each{ |e| e.validate if e.respond_to?(:validate) } unless @peerings.nil?
53
+ @service_provider_properties.validate unless @service_provider_properties.nil?
54
+ end
55
+
56
+ #
57
+ # Serializes given Model object into Ruby Hash.
58
+ # @param object Model object to serialize.
59
+ # @return [Hash] Serialized object in form of Ruby Hash.
60
+ #
61
+ def self.serialize_object(object)
62
+ object.validate
63
+ output_object = {}
64
+
65
+ serialized_property = object.circuit_provisioning_state
66
+ output_object['circuitProvisioningState'] = serialized_property unless serialized_property.nil?
67
+
68
+ serialized_property = object.service_provider_provisioning_state
69
+ output_object['serviceProviderProvisioningState'] = serialized_property unless serialized_property.nil?
70
+
71
+ serialized_property = object.authorizations
72
+ unless serialized_property.nil?
73
+ serializedArray = []
74
+ serialized_property.each do |element|
75
+ unless element.nil?
76
+ element = ExpressRouteCircuitAuthorization.serialize_object(element)
77
+ end
78
+ serializedArray.push(element)
79
+ end
80
+ serialized_property = serializedArray
81
+ end
82
+ output_object['authorizations'] = serialized_property unless serialized_property.nil?
83
+
84
+ serialized_property = object.peerings
85
+ unless serialized_property.nil?
86
+ serializedArray = []
87
+ serialized_property.each do |element1|
88
+ unless element1.nil?
89
+ element1 = ExpressRouteCircuitPeering.serialize_object(element1)
90
+ end
91
+ serializedArray.push(element1)
92
+ end
93
+ serialized_property = serializedArray
94
+ end
95
+ output_object['peerings'] = serialized_property unless serialized_property.nil?
96
+
97
+ serialized_property = object.service_key
98
+ output_object['serviceKey'] = serialized_property unless serialized_property.nil?
99
+
100
+ serialized_property = object.service_provider_notes
101
+ output_object['serviceProviderNotes'] = serialized_property unless serialized_property.nil?
102
+
103
+ serialized_property = object.service_provider_properties
104
+ unless serialized_property.nil?
105
+ serialized_property = ExpressRouteCircuitServiceProviderProperties.serialize_object(serialized_property)
106
+ end
107
+ output_object['serviceProviderProperties'] = serialized_property unless serialized_property.nil?
108
+
109
+ serialized_property = object.provisioning_state
110
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
111
+
112
+ output_object
113
+ end
114
+
115
+ #
116
+ # Deserializes given Ruby Hash into Model object.
117
+ # @param object [Hash] Ruby Hash object to deserialize.
118
+ # @return [ExpressRouteCircuitPropertiesFormat] Deserialized object.
119
+ #
120
+ def self.deserialize_object(object)
121
+ return if object.nil?
122
+ output_object = ExpressRouteCircuitPropertiesFormat.new
123
+
124
+ deserialized_property = object['circuitProvisioningState']
125
+ output_object.circuit_provisioning_state = deserialized_property
126
+
127
+ deserialized_property = object['serviceProviderProvisioningState']
128
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
129
+ enum_is_valid = ServiceProviderProvisioningState.constants.any? { |e| ServiceProviderProvisioningState.const_get(e).to_s.downcase == deserialized_property.downcase }
130
+ warn 'Enum ServiceProviderProvisioningState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
131
+ end
132
+ output_object.service_provider_provisioning_state = deserialized_property
133
+
134
+ deserialized_property = object['authorizations']
135
+ unless deserialized_property.nil?
136
+ deserialized_array = []
137
+ deserialized_property.each do |element2|
138
+ unless element2.nil?
139
+ element2 = ExpressRouteCircuitAuthorization.deserialize_object(element2)
140
+ end
141
+ deserialized_array.push(element2)
142
+ end
143
+ deserialized_property = deserialized_array
144
+ end
145
+ output_object.authorizations = deserialized_property
146
+
147
+ deserialized_property = object['peerings']
148
+ unless deserialized_property.nil?
149
+ deserialized_array = []
150
+ deserialized_property.each do |element3|
151
+ unless element3.nil?
152
+ element3 = ExpressRouteCircuitPeering.deserialize_object(element3)
153
+ end
154
+ deserialized_array.push(element3)
155
+ end
156
+ deserialized_property = deserialized_array
157
+ end
158
+ output_object.peerings = deserialized_property
159
+
160
+ deserialized_property = object['serviceKey']
161
+ output_object.service_key = deserialized_property
162
+
163
+ deserialized_property = object['serviceProviderNotes']
164
+ output_object.service_provider_notes = deserialized_property
165
+
166
+ deserialized_property = object['serviceProviderProperties']
167
+ unless deserialized_property.nil?
168
+ deserialized_property = ExpressRouteCircuitServiceProviderProperties.deserialize_object(deserialized_property)
169
+ end
170
+ output_object.service_provider_properties = deserialized_property
171
+
172
+ deserialized_property = object['provisioningState']
173
+ output_object.provisioning_state = deserialized_property
174
+
175
+ output_object
176
+ end
177
+ end
178
+ end
179
+ end