azure_mgmt_network 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +3 -0
- data/.travis.yml +3 -0
- data/Gemfile +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +131 -0
- data/Rakefile +5 -0
- data/azure_mgmt_network.gemspec +39 -0
- data/lib/azure_mgmt_network.rb +139 -0
- data/lib/azure_mgmt_network/Models/address_space.rb +60 -0
- data/lib/azure_mgmt_network/Models/application_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address.rb +67 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool_properties_format.rb +121 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings_properties_format.rb +98 -0
- data/lib/azure_mgmt_network/Models/application_gateway_cookie_based_affinity.rb +16 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration.rb +91 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration_properties_format.rb +117 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_port.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_port_properties_format.rb +70 -0
- data/lib/azure_mgmt_network/Models/application_gateway_http_listener.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_http_listener_properties_format.rb +124 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration_properties_format.rb +77 -0
- data/lib/azure_mgmt_network/Models/application_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/application_gateway_operational_state.rb +18 -0
- data/lib/azure_mgmt_network/Models/application_gateway_properties_format.rb +338 -0
- data/lib/azure_mgmt_network/Models/application_gateway_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_properties_format.rb +124 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_type.rb +15 -0
- data/lib/azure_mgmt_network/Models/application_gateway_sku.rb +88 -0
- data/lib/azure_mgmt_network/Models/application_gateway_sku_name.rb +17 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate_properties_format.rb +87 -0
- data/lib/azure_mgmt_network/Models/application_gateway_tier.rb +15 -0
- data/lib/azure_mgmt_network/Models/azure_async_operation_result.rb +85 -0
- data/lib/azure_mgmt_network/Models/backend_address_pool.rb +90 -0
- data/lib/azure_mgmt_network/Models/backend_address_pool_properties_format.rb +120 -0
- data/lib/azure_mgmt_network/Models/connection_reset_shared_key.rb +64 -0
- data/lib/azure_mgmt_network/Models/connection_reset_shared_key_properties_format.rb +60 -0
- data/lib/azure_mgmt_network/Models/connection_shared_key.rb +58 -0
- data/lib/azure_mgmt_network/Models/dhcp_options.rb +60 -0
- data/lib/azure_mgmt_network/Models/dns_name_availability_result.rb +58 -0
- data/lib/azure_mgmt_network/Models/error.rb +114 -0
- data/lib/azure_mgmt_network/Models/error_details.rb +76 -0
- data/lib/azure_mgmt_network/Models/frontend_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/frontend_ip_configuration_properties_format.rb +181 -0
- data/lib/azure_mgmt_network/Models/inbound_nat_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb +163 -0
- data/lib/azure_mgmt_network/Models/ip_allocation_method.rb +16 -0
- data/lib/azure_mgmt_network/Models/load_balancer.rb +104 -0
- data/lib/azure_mgmt_network/Models/load_balancer_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/load_balancer_properties_format.rb +210 -0
- data/lib/azure_mgmt_network/Models/load_balancing_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/load_balancing_rule_properties_format.rb +195 -0
- data/lib/azure_mgmt_network/Models/load_distribution.rb +17 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway_properties_format.rb +83 -0
- data/lib/azure_mgmt_network/Models/network_interface.rb +104 -0
- data/lib/azure_mgmt_network/Models/network_interface_dns_settings.rb +89 -0
- data/lib/azure_mgmt_network/Models/network_interface_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/network_interface_ip_configuration_properties_format.rb +179 -0
- data/lib/azure_mgmt_network/Models/network_interface_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/network_interface_properties_format.rb +158 -0
- data/lib/azure_mgmt_network/Models/network_security_group.rb +104 -0
- data/lib/azure_mgmt_network/Models/network_security_group_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/network_security_group_properties_format.rb +181 -0
- data/lib/azure_mgmt_network/Models/operation_status.rb +17 -0
- data/lib/azure_mgmt_network/Models/probe.rb +90 -0
- data/lib/azure_mgmt_network/Models/probe_properties_format.rb +157 -0
- data/lib/azure_mgmt_network/Models/probe_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/public_ip_address.rb +104 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_dns_settings.rb +85 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_properties_format.rb +126 -0
- data/lib/azure_mgmt_network/Models/security_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/security_rule_access.rb +16 -0
- data/lib/azure_mgmt_network/Models/security_rule_direction.rb +16 -0
- data/lib/azure_mgmt_network/Models/security_rule_list_result.rb +89 -0
- data/lib/azure_mgmt_network/Models/security_rule_properties_format.rb +174 -0
- data/lib/azure_mgmt_network/Models/security_rule_protocol.rb +17 -0
- data/lib/azure_mgmt_network/Models/subnet.rb +90 -0
- data/lib/azure_mgmt_network/Models/subnet_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/subnet_properties_format.rb +115 -0
- data/lib/azure_mgmt_network/Models/transport_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/usage.rb +98 -0
- data/lib/azure_mgmt_network/Models/usage_name.rb +68 -0
- data/lib/azure_mgmt_network/Models/usage_unit.rb +15 -0
- data/lib/azure_mgmt_network/Models/usages_list_result.rb +78 -0
- data/lib/azure_mgmt_network/Models/virtual_network.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_list_result.rb +89 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb +141 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_type.rb +18 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration_properties_format.rb +117 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_properties_format.rb +126 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_type.rb +15 -0
- data/lib/azure_mgmt_network/Models/virtual_network_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/virtual_network_properties_format.rb +123 -0
- data/lib/azure_mgmt_network/Models/vpn_type.rb +16 -0
- data/lib/azure_mgmt_network/application_gateways.rb +915 -0
- data/lib/azure_mgmt_network/load_balancers.rb +709 -0
- data/lib/azure_mgmt_network/local_network_gateways.rb +550 -0
- data/lib/azure_mgmt_network/module_definition.rb +6 -0
- data/lib/azure_mgmt_network/network_interfaces.rb +709 -0
- data/lib/azure_mgmt_network/network_resource_provider_client.rb +195 -0
- data/lib/azure_mgmt_network/network_security_groups.rb +718 -0
- data/lib/azure_mgmt_network/public_ip_addresses.rb +711 -0
- data/lib/azure_mgmt_network/security_rules.rb +563 -0
- data/lib/azure_mgmt_network/subnets.rb +552 -0
- data/lib/azure_mgmt_network/usages.rb +113 -0
- data/lib/azure_mgmt_network/version.rb +6 -0
- data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +945 -0
- data/lib/azure_mgmt_network/virtual_network_gateways.rb +686 -0
- data/lib/azure_mgmt_network/virtual_networks.rb +707 -0
- metadata +311 -0
@@ -0,0 +1,210 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.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 Load Balancer
|
10
|
+
#
|
11
|
+
class LoadBalancerPropertiesFormat
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<FrontendIpConfiguration>] Gets or sets frontend IP
|
16
|
+
# addresses of the load balancer
|
17
|
+
attr_accessor :frontend_ipconfigurations
|
18
|
+
|
19
|
+
# @return [Array<BackendAddressPool>] Gets or sets Pools of backend IP
|
20
|
+
# addresseses
|
21
|
+
attr_accessor :backend_address_pools
|
22
|
+
|
23
|
+
# @return [Array<LoadBalancingRule>] Gets or sets loadbalancing rules
|
24
|
+
attr_accessor :load_balancing_rules
|
25
|
+
|
26
|
+
# @return [Array<Probe>] Gets or sets list of Load balancer probes
|
27
|
+
attr_accessor :probes
|
28
|
+
|
29
|
+
# @return [Array<InboundNatRule>] Gets or sets list of inbound rules
|
30
|
+
attr_accessor :inbound_nat_rules
|
31
|
+
|
32
|
+
# @return [String] Gets or sets Provisioning state of the PublicIP
|
33
|
+
# resource Updating/Deleting/Failed
|
34
|
+
attr_accessor :provisioning_state
|
35
|
+
|
36
|
+
#
|
37
|
+
# Validate the object. Throws ValidationError if validation fails.
|
38
|
+
#
|
39
|
+
def validate
|
40
|
+
@frontend_ipconfigurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @frontend_ipconfigurations.nil?
|
41
|
+
@backend_address_pools.each{ |e| e.validate if e.respond_to?(:validate) } unless @backend_address_pools.nil?
|
42
|
+
@load_balancing_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancing_rules.nil?
|
43
|
+
@probes.each{ |e| e.validate if e.respond_to?(:validate) } unless @probes.nil?
|
44
|
+
@inbound_nat_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @inbound_nat_rules.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Serializes given Model object into Ruby Hash.
|
49
|
+
# @param object Model object to serialize.
|
50
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
51
|
+
#
|
52
|
+
def self.serialize_object(object)
|
53
|
+
object.validate
|
54
|
+
output_object = {}
|
55
|
+
|
56
|
+
serialized_property = object.frontend_ipconfigurations
|
57
|
+
unless serialized_property.nil?
|
58
|
+
serializedArray = []
|
59
|
+
serialized_property.each do |element|
|
60
|
+
unless element.nil?
|
61
|
+
element = FrontendIpConfiguration.serialize_object(element)
|
62
|
+
end
|
63
|
+
serializedArray.push(element)
|
64
|
+
end
|
65
|
+
serialized_property = serializedArray
|
66
|
+
end
|
67
|
+
output_object['frontendIPConfigurations'] = serialized_property unless serialized_property.nil?
|
68
|
+
|
69
|
+
serialized_property = object.backend_address_pools
|
70
|
+
unless serialized_property.nil?
|
71
|
+
serializedArray = []
|
72
|
+
serialized_property.each do |element1|
|
73
|
+
unless element1.nil?
|
74
|
+
element1 = BackendAddressPool.serialize_object(element1)
|
75
|
+
end
|
76
|
+
serializedArray.push(element1)
|
77
|
+
end
|
78
|
+
serialized_property = serializedArray
|
79
|
+
end
|
80
|
+
output_object['backendAddressPools'] = serialized_property unless serialized_property.nil?
|
81
|
+
|
82
|
+
serialized_property = object.load_balancing_rules
|
83
|
+
unless serialized_property.nil?
|
84
|
+
serializedArray = []
|
85
|
+
serialized_property.each do |element2|
|
86
|
+
unless element2.nil?
|
87
|
+
element2 = LoadBalancingRule.serialize_object(element2)
|
88
|
+
end
|
89
|
+
serializedArray.push(element2)
|
90
|
+
end
|
91
|
+
serialized_property = serializedArray
|
92
|
+
end
|
93
|
+
output_object['loadBalancingRules'] = serialized_property unless serialized_property.nil?
|
94
|
+
|
95
|
+
serialized_property = object.probes
|
96
|
+
unless serialized_property.nil?
|
97
|
+
serializedArray = []
|
98
|
+
serialized_property.each do |element3|
|
99
|
+
unless element3.nil?
|
100
|
+
element3 = Probe.serialize_object(element3)
|
101
|
+
end
|
102
|
+
serializedArray.push(element3)
|
103
|
+
end
|
104
|
+
serialized_property = serializedArray
|
105
|
+
end
|
106
|
+
output_object['probes'] = serialized_property unless serialized_property.nil?
|
107
|
+
|
108
|
+
serialized_property = object.inbound_nat_rules
|
109
|
+
unless serialized_property.nil?
|
110
|
+
serializedArray = []
|
111
|
+
serialized_property.each do |element4|
|
112
|
+
unless element4.nil?
|
113
|
+
element4 = InboundNatRule.serialize_object(element4)
|
114
|
+
end
|
115
|
+
serializedArray.push(element4)
|
116
|
+
end
|
117
|
+
serialized_property = serializedArray
|
118
|
+
end
|
119
|
+
output_object['inboundNatRules'] = serialized_property unless serialized_property.nil?
|
120
|
+
|
121
|
+
serialized_property = object.provisioning_state
|
122
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
123
|
+
|
124
|
+
output_object
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
# Deserializes given Ruby Hash into Model object.
|
129
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
130
|
+
# @return [LoadBalancerPropertiesFormat] Deserialized object.
|
131
|
+
#
|
132
|
+
def self.deserialize_object(object)
|
133
|
+
return if object.nil?
|
134
|
+
output_object = LoadBalancerPropertiesFormat.new
|
135
|
+
|
136
|
+
deserialized_property = object['frontendIPConfigurations']
|
137
|
+
unless deserialized_property.nil?
|
138
|
+
deserializedArray = [];
|
139
|
+
deserialized_property.each do |element5|
|
140
|
+
unless element5.nil?
|
141
|
+
element5 = FrontendIpConfiguration.deserialize_object(element5)
|
142
|
+
end
|
143
|
+
deserializedArray.push(element5);
|
144
|
+
end
|
145
|
+
deserialized_property = deserializedArray;
|
146
|
+
end
|
147
|
+
output_object.frontend_ipconfigurations = deserialized_property
|
148
|
+
|
149
|
+
deserialized_property = object['backendAddressPools']
|
150
|
+
unless deserialized_property.nil?
|
151
|
+
deserializedArray = [];
|
152
|
+
deserialized_property.each do |element6|
|
153
|
+
unless element6.nil?
|
154
|
+
element6 = BackendAddressPool.deserialize_object(element6)
|
155
|
+
end
|
156
|
+
deserializedArray.push(element6);
|
157
|
+
end
|
158
|
+
deserialized_property = deserializedArray;
|
159
|
+
end
|
160
|
+
output_object.backend_address_pools = deserialized_property
|
161
|
+
|
162
|
+
deserialized_property = object['loadBalancingRules']
|
163
|
+
unless deserialized_property.nil?
|
164
|
+
deserializedArray = [];
|
165
|
+
deserialized_property.each do |element7|
|
166
|
+
unless element7.nil?
|
167
|
+
element7 = LoadBalancingRule.deserialize_object(element7)
|
168
|
+
end
|
169
|
+
deserializedArray.push(element7);
|
170
|
+
end
|
171
|
+
deserialized_property = deserializedArray;
|
172
|
+
end
|
173
|
+
output_object.load_balancing_rules = deserialized_property
|
174
|
+
|
175
|
+
deserialized_property = object['probes']
|
176
|
+
unless deserialized_property.nil?
|
177
|
+
deserializedArray = [];
|
178
|
+
deserialized_property.each do |element8|
|
179
|
+
unless element8.nil?
|
180
|
+
element8 = Probe.deserialize_object(element8)
|
181
|
+
end
|
182
|
+
deserializedArray.push(element8);
|
183
|
+
end
|
184
|
+
deserialized_property = deserializedArray;
|
185
|
+
end
|
186
|
+
output_object.probes = deserialized_property
|
187
|
+
|
188
|
+
deserialized_property = object['inboundNatRules']
|
189
|
+
unless deserialized_property.nil?
|
190
|
+
deserializedArray = [];
|
191
|
+
deserialized_property.each do |element9|
|
192
|
+
unless element9.nil?
|
193
|
+
element9 = InboundNatRule.deserialize_object(element9)
|
194
|
+
end
|
195
|
+
deserializedArray.push(element9);
|
196
|
+
end
|
197
|
+
deserialized_property = deserializedArray;
|
198
|
+
end
|
199
|
+
output_object.inbound_nat_rules = deserialized_property
|
200
|
+
|
201
|
+
deserialized_property = object['provisioningState']
|
202
|
+
output_object.provisioning_state = deserialized_property
|
203
|
+
|
204
|
+
output_object.validate
|
205
|
+
|
206
|
+
output_object
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.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
|
+
# Rules of the load balancer
|
10
|
+
#
|
11
|
+
class LoadBalancingRule < MsRestAzure::SubResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [LoadBalancingRulePropertiesFormat]
|
16
|
+
attr_accessor :properties
|
17
|
+
|
18
|
+
# @return [String] Gets name of the resource that is unique within a
|
19
|
+
# resource group. This name can be used to access the resource
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
# @return [String] A unique read-only string that changes whenever the
|
23
|
+
# resource is updated
|
24
|
+
attr_accessor :etag
|
25
|
+
|
26
|
+
#
|
27
|
+
# Validate the object. Throws ValidationError if validation fails.
|
28
|
+
#
|
29
|
+
def validate
|
30
|
+
@properties.validate unless @properties.nil?
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Serializes given Model object into Ruby Hash.
|
35
|
+
# @param object Model object to serialize.
|
36
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
37
|
+
#
|
38
|
+
def self.serialize_object(object)
|
39
|
+
object.validate
|
40
|
+
output_object = {}
|
41
|
+
|
42
|
+
serialized_property = object.id
|
43
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
44
|
+
|
45
|
+
serialized_property = object.properties
|
46
|
+
unless serialized_property.nil?
|
47
|
+
serialized_property = LoadBalancingRulePropertiesFormat.serialize_object(serialized_property)
|
48
|
+
end
|
49
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
serialized_property = object.name
|
52
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
54
|
+
serialized_property = object.etag
|
55
|
+
output_object['etag'] = serialized_property unless serialized_property.nil?
|
56
|
+
|
57
|
+
output_object
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Deserializes given Ruby Hash into Model object.
|
62
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
63
|
+
# @return [LoadBalancingRule] Deserialized object.
|
64
|
+
#
|
65
|
+
def self.deserialize_object(object)
|
66
|
+
return if object.nil?
|
67
|
+
output_object = LoadBalancingRule.new
|
68
|
+
|
69
|
+
deserialized_property = object['id']
|
70
|
+
output_object.id = deserialized_property
|
71
|
+
|
72
|
+
deserialized_property = object['properties']
|
73
|
+
unless deserialized_property.nil?
|
74
|
+
deserialized_property = LoadBalancingRulePropertiesFormat.deserialize_object(deserialized_property)
|
75
|
+
end
|
76
|
+
output_object.properties = deserialized_property
|
77
|
+
|
78
|
+
deserialized_property = object['name']
|
79
|
+
output_object.name = deserialized_property
|
80
|
+
|
81
|
+
deserialized_property = object['etag']
|
82
|
+
output_object.etag = deserialized_property
|
83
|
+
|
84
|
+
output_object.validate
|
85
|
+
|
86
|
+
output_object
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.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 the load balancer
|
10
|
+
#
|
11
|
+
class LoadBalancingRulePropertiesFormat
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [SubResource] Gets or sets a reference to frontend IP Addresses
|
16
|
+
attr_accessor :frontend_ipconfiguration
|
17
|
+
|
18
|
+
# @return [SubResource] Gets or sets a reference to a pool of DIPs.
|
19
|
+
# Inbound traffic is randomly load balanced across IPs in the backend
|
20
|
+
# IPs
|
21
|
+
attr_accessor :backend_address_pool
|
22
|
+
|
23
|
+
# @return [SubResource] Gets or sets the reference of the load balancer
|
24
|
+
# probe used by the Load Balancing rule.
|
25
|
+
attr_accessor :probe
|
26
|
+
|
27
|
+
# @return [TransportProtocol] Gets or sets the transport protocol for
|
28
|
+
# the external endpoint. Possible values are Udp or Tcp. Possible
|
29
|
+
# values for this property include: 'Udp', 'Tcp'.
|
30
|
+
attr_accessor :protocol
|
31
|
+
|
32
|
+
# @return [LoadDistribution] Gets or sets the load distribution policy
|
33
|
+
# for this rule. Possible values for this property include: 'Default',
|
34
|
+
# 'SourceIP', 'SourceIPProtocol'.
|
35
|
+
attr_accessor :load_distribution
|
36
|
+
|
37
|
+
# @return [Integer] Gets or sets the port for the external endpoint. You
|
38
|
+
# can specify any port number you choose, but the port numbers
|
39
|
+
# specified for each role in the service must be unique. Possible
|
40
|
+
# values range between 1 and 65535, inclusive
|
41
|
+
attr_accessor :frontend_port
|
42
|
+
|
43
|
+
# @return [Integer] Gets or sets a port used for internal connections on
|
44
|
+
# the endpoint. The localPort attribute maps the eternal port of the
|
45
|
+
# endpoint to an internal port on a role. This is useful in scenarios
|
46
|
+
# where a role must communicate to an internal compotnent on a port
|
47
|
+
# that is different from the one that is exposed externally. If not
|
48
|
+
# specified, the value of localPort is the same as the port attribute.
|
49
|
+
# Set the value of localPort to '*' to automatically assign an
|
50
|
+
# unallocated port that is discoverable using the runtime API
|
51
|
+
attr_accessor :backend_port
|
52
|
+
|
53
|
+
# @return [Integer] Gets or sets the timeout for the Tcp idle
|
54
|
+
# connection. The value can be set between 4 and 30 minutes. The
|
55
|
+
# default value is 4 minutes. This emlement is only used when the
|
56
|
+
# protocol is set to Tcp
|
57
|
+
attr_accessor :idle_timeout_in_minutes
|
58
|
+
|
59
|
+
# @return [Boolean] Configures a virtual machine's endpoint for the
|
60
|
+
# floating IP capability required to configure a SQL AlwaysOn
|
61
|
+
# availability Group. This setting is required when using the SQL
|
62
|
+
# Always ON availability Groups in SQL server. This setting can't be
|
63
|
+
# changed after you create the endpoint
|
64
|
+
attr_accessor :enable_floating_ip
|
65
|
+
|
66
|
+
# @return [String] Gets or sets Provisioning state of the PublicIP
|
67
|
+
# resource Updating/Deleting/Failed
|
68
|
+
attr_accessor :provisioning_state
|
69
|
+
|
70
|
+
#
|
71
|
+
# Validate the object. Throws ValidationError if validation fails.
|
72
|
+
#
|
73
|
+
def validate
|
74
|
+
@frontend_ipconfiguration.validate unless @frontend_ipconfiguration.nil?
|
75
|
+
@backend_address_pool.validate unless @backend_address_pool.nil?
|
76
|
+
@probe.validate unless @probe.nil?
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# Serializes given Model object into Ruby Hash.
|
81
|
+
# @param object Model object to serialize.
|
82
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
83
|
+
#
|
84
|
+
def self.serialize_object(object)
|
85
|
+
object.validate
|
86
|
+
output_object = {}
|
87
|
+
|
88
|
+
serialized_property = object.frontend_ipconfiguration
|
89
|
+
unless serialized_property.nil?
|
90
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
91
|
+
end
|
92
|
+
output_object['frontendIPConfiguration'] = serialized_property unless serialized_property.nil?
|
93
|
+
|
94
|
+
serialized_property = object.backend_address_pool
|
95
|
+
unless serialized_property.nil?
|
96
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
97
|
+
end
|
98
|
+
output_object['backendAddressPool'] = serialized_property unless serialized_property.nil?
|
99
|
+
|
100
|
+
serialized_property = object.probe
|
101
|
+
unless serialized_property.nil?
|
102
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
103
|
+
end
|
104
|
+
output_object['probe'] = serialized_property unless serialized_property.nil?
|
105
|
+
|
106
|
+
serialized_property = object.protocol
|
107
|
+
output_object['protocol'] = serialized_property unless serialized_property.nil?
|
108
|
+
|
109
|
+
serialized_property = object.load_distribution
|
110
|
+
output_object['loadDistribution'] = serialized_property unless serialized_property.nil?
|
111
|
+
|
112
|
+
serialized_property = object.frontend_port
|
113
|
+
output_object['frontendPort'] = serialized_property unless serialized_property.nil?
|
114
|
+
|
115
|
+
serialized_property = object.backend_port
|
116
|
+
output_object['backendPort'] = serialized_property unless serialized_property.nil?
|
117
|
+
|
118
|
+
serialized_property = object.idle_timeout_in_minutes
|
119
|
+
output_object['idleTimeoutInMinutes'] = serialized_property unless serialized_property.nil?
|
120
|
+
|
121
|
+
serialized_property = object.enable_floating_ip
|
122
|
+
output_object['enableFloatingIP'] = serialized_property unless serialized_property.nil?
|
123
|
+
|
124
|
+
serialized_property = object.provisioning_state
|
125
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
126
|
+
|
127
|
+
output_object
|
128
|
+
end
|
129
|
+
|
130
|
+
#
|
131
|
+
# Deserializes given Ruby Hash into Model object.
|
132
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
133
|
+
# @return [LoadBalancingRulePropertiesFormat] Deserialized object.
|
134
|
+
#
|
135
|
+
def self.deserialize_object(object)
|
136
|
+
return if object.nil?
|
137
|
+
output_object = LoadBalancingRulePropertiesFormat.new
|
138
|
+
|
139
|
+
deserialized_property = object['frontendIPConfiguration']
|
140
|
+
unless deserialized_property.nil?
|
141
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
142
|
+
end
|
143
|
+
output_object.frontend_ipconfiguration = deserialized_property
|
144
|
+
|
145
|
+
deserialized_property = object['backendAddressPool']
|
146
|
+
unless deserialized_property.nil?
|
147
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
148
|
+
end
|
149
|
+
output_object.backend_address_pool = deserialized_property
|
150
|
+
|
151
|
+
deserialized_property = object['probe']
|
152
|
+
unless deserialized_property.nil?
|
153
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
154
|
+
end
|
155
|
+
output_object.probe = deserialized_property
|
156
|
+
|
157
|
+
deserialized_property = object['protocol']
|
158
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
159
|
+
enum_is_valid = TransportProtocol.constants.any? { |e| TransportProtocol.const_get(e).to_s.downcase == deserialized_property.downcase }
|
160
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
161
|
+
end
|
162
|
+
output_object.protocol = deserialized_property
|
163
|
+
|
164
|
+
deserialized_property = object['loadDistribution']
|
165
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
166
|
+
enum_is_valid = LoadDistribution.constants.any? { |e| LoadDistribution.const_get(e).to_s.downcase == deserialized_property.downcase }
|
167
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
168
|
+
end
|
169
|
+
output_object.load_distribution = deserialized_property
|
170
|
+
|
171
|
+
deserialized_property = object['frontendPort']
|
172
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
173
|
+
output_object.frontend_port = deserialized_property
|
174
|
+
|
175
|
+
deserialized_property = object['backendPort']
|
176
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
177
|
+
output_object.backend_port = deserialized_property
|
178
|
+
|
179
|
+
deserialized_property = object['idleTimeoutInMinutes']
|
180
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
181
|
+
output_object.idle_timeout_in_minutes = deserialized_property
|
182
|
+
|
183
|
+
deserialized_property = object['enableFloatingIP']
|
184
|
+
output_object.enable_floating_ip = deserialized_property
|
185
|
+
|
186
|
+
deserialized_property = object['provisioningState']
|
187
|
+
output_object.provisioning_state = deserialized_property
|
188
|
+
|
189
|
+
output_object.validate
|
190
|
+
|
191
|
+
output_object
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|