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,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
|
+
# IPConfiguration in a NetworkInterface
|
10
|
+
#
|
11
|
+
class NetworkInterfaceIpConfiguration < MsRestAzure::SubResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [NetworkInterfaceIpConfigurationPropertiesFormat]
|
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 = NetworkInterfaceIpConfigurationPropertiesFormat.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 [NetworkInterfaceIpConfiguration] Deserialized object.
|
64
|
+
#
|
65
|
+
def self.deserialize_object(object)
|
66
|
+
return if object.nil?
|
67
|
+
output_object = NetworkInterfaceIpConfiguration.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 = NetworkInterfaceIpConfigurationPropertiesFormat.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,179 @@
|
|
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 IPConfiguration
|
10
|
+
#
|
11
|
+
class NetworkInterfaceIpConfigurationPropertiesFormat
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the privateIPAddress of the Network
|
16
|
+
# Interface IP Configuration
|
17
|
+
attr_accessor :private_ipaddress
|
18
|
+
|
19
|
+
# @return [IpAllocationMethod] Gets or sets PrivateIP allocation method
|
20
|
+
# (Static/Dynamic). Possible values for this property include:
|
21
|
+
# 'Static', 'Dynamic'.
|
22
|
+
attr_accessor :private_ipallocation_method
|
23
|
+
|
24
|
+
# @return [SubResource] Gets or sets the reference of the subnet resource
|
25
|
+
attr_accessor :subnet
|
26
|
+
|
27
|
+
# @return [SubResource] Gets or sets the reference of the PublicIP
|
28
|
+
# resource
|
29
|
+
attr_accessor :public_ipaddress
|
30
|
+
|
31
|
+
# @return [Array<SubResource>] Gets or sets the reference of
|
32
|
+
# LoadBalancerBackendAddressPool resource
|
33
|
+
attr_accessor :load_balancer_backend_address_pools
|
34
|
+
|
35
|
+
# @return [Array<SubResource>] Gets or sets list of references of
|
36
|
+
# LoadBalancerInboundNatRules
|
37
|
+
attr_accessor :load_balancer_inbound_nat_rules
|
38
|
+
|
39
|
+
# @return [String] Gets or sets Provisioning state of the PublicIP
|
40
|
+
# resource Updating/Deleting/Failed
|
41
|
+
attr_accessor :provisioning_state
|
42
|
+
|
43
|
+
#
|
44
|
+
# Validate the object. Throws ValidationError if validation fails.
|
45
|
+
#
|
46
|
+
def validate
|
47
|
+
@subnet.validate unless @subnet.nil?
|
48
|
+
@public_ipaddress.validate unless @public_ipaddress.nil?
|
49
|
+
@load_balancer_backend_address_pools.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancer_backend_address_pools.nil?
|
50
|
+
@load_balancer_inbound_nat_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancer_inbound_nat_rules.nil?
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Serializes given Model object into Ruby Hash.
|
55
|
+
# @param object Model object to serialize.
|
56
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
57
|
+
#
|
58
|
+
def self.serialize_object(object)
|
59
|
+
object.validate
|
60
|
+
output_object = {}
|
61
|
+
|
62
|
+
serialized_property = object.private_ipaddress
|
63
|
+
output_object['privateIPAddress'] = serialized_property unless serialized_property.nil?
|
64
|
+
|
65
|
+
serialized_property = object.private_ipallocation_method
|
66
|
+
output_object['privateIPAllocationMethod'] = serialized_property unless serialized_property.nil?
|
67
|
+
|
68
|
+
serialized_property = object.subnet
|
69
|
+
unless serialized_property.nil?
|
70
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
71
|
+
end
|
72
|
+
output_object['subnet'] = serialized_property unless serialized_property.nil?
|
73
|
+
|
74
|
+
serialized_property = object.public_ipaddress
|
75
|
+
unless serialized_property.nil?
|
76
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
77
|
+
end
|
78
|
+
output_object['publicIPAddress'] = serialized_property unless serialized_property.nil?
|
79
|
+
|
80
|
+
serialized_property = object.load_balancer_backend_address_pools
|
81
|
+
unless serialized_property.nil?
|
82
|
+
serializedArray = []
|
83
|
+
serialized_property.each do |element|
|
84
|
+
unless element.nil?
|
85
|
+
element = SubResource.serialize_object(element)
|
86
|
+
end
|
87
|
+
serializedArray.push(element)
|
88
|
+
end
|
89
|
+
serialized_property = serializedArray
|
90
|
+
end
|
91
|
+
output_object['loadBalancerBackendAddressPools'] = serialized_property unless serialized_property.nil?
|
92
|
+
|
93
|
+
serialized_property = object.load_balancer_inbound_nat_rules
|
94
|
+
unless serialized_property.nil?
|
95
|
+
serializedArray = []
|
96
|
+
serialized_property.each do |element1|
|
97
|
+
unless element1.nil?
|
98
|
+
element1 = SubResource.serialize_object(element1)
|
99
|
+
end
|
100
|
+
serializedArray.push(element1)
|
101
|
+
end
|
102
|
+
serialized_property = serializedArray
|
103
|
+
end
|
104
|
+
output_object['loadBalancerInboundNatRules'] = serialized_property unless serialized_property.nil?
|
105
|
+
|
106
|
+
serialized_property = object.provisioning_state
|
107
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
108
|
+
|
109
|
+
output_object
|
110
|
+
end
|
111
|
+
|
112
|
+
#
|
113
|
+
# Deserializes given Ruby Hash into Model object.
|
114
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
115
|
+
# @return [NetworkInterfaceIpConfigurationPropertiesFormat] Deserialized
|
116
|
+
# object.
|
117
|
+
#
|
118
|
+
def self.deserialize_object(object)
|
119
|
+
return if object.nil?
|
120
|
+
output_object = NetworkInterfaceIpConfigurationPropertiesFormat.new
|
121
|
+
|
122
|
+
deserialized_property = object['privateIPAddress']
|
123
|
+
output_object.private_ipaddress = deserialized_property
|
124
|
+
|
125
|
+
deserialized_property = object['privateIPAllocationMethod']
|
126
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
127
|
+
enum_is_valid = IpAllocationMethod.constants.any? { |e| IpAllocationMethod.const_get(e).to_s.downcase == deserialized_property.downcase }
|
128
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
129
|
+
end
|
130
|
+
output_object.private_ipallocation_method = deserialized_property
|
131
|
+
|
132
|
+
deserialized_property = object['subnet']
|
133
|
+
unless deserialized_property.nil?
|
134
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
135
|
+
end
|
136
|
+
output_object.subnet = deserialized_property
|
137
|
+
|
138
|
+
deserialized_property = object['publicIPAddress']
|
139
|
+
unless deserialized_property.nil?
|
140
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
141
|
+
end
|
142
|
+
output_object.public_ipaddress = deserialized_property
|
143
|
+
|
144
|
+
deserialized_property = object['loadBalancerBackendAddressPools']
|
145
|
+
unless deserialized_property.nil?
|
146
|
+
deserializedArray = [];
|
147
|
+
deserialized_property.each do |element2|
|
148
|
+
unless element2.nil?
|
149
|
+
element2 = SubResource.deserialize_object(element2)
|
150
|
+
end
|
151
|
+
deserializedArray.push(element2);
|
152
|
+
end
|
153
|
+
deserialized_property = deserializedArray;
|
154
|
+
end
|
155
|
+
output_object.load_balancer_backend_address_pools = deserialized_property
|
156
|
+
|
157
|
+
deserialized_property = object['loadBalancerInboundNatRules']
|
158
|
+
unless deserialized_property.nil?
|
159
|
+
deserializedArray = [];
|
160
|
+
deserialized_property.each do |element3|
|
161
|
+
unless element3.nil?
|
162
|
+
element3 = SubResource.deserialize_object(element3)
|
163
|
+
end
|
164
|
+
deserializedArray.push(element3);
|
165
|
+
end
|
166
|
+
deserialized_property = deserializedArray;
|
167
|
+
end
|
168
|
+
output_object.load_balancer_inbound_nat_rules = deserialized_property
|
169
|
+
|
170
|
+
deserialized_property = object['provisioningState']
|
171
|
+
output_object.provisioning_state = deserialized_property
|
172
|
+
|
173
|
+
output_object.validate
|
174
|
+
|
175
|
+
output_object
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
@@ -0,0 +1,88 @@
|
|
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
|
+
# Response for ListNetworkInterface Api service call
|
10
|
+
#
|
11
|
+
class NetworkInterfaceListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<NetworkInterface>] Gets or sets list of
|
16
|
+
# NetworkInterfaces in a resource group
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets the URL to get the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
#
|
23
|
+
# Validate the object. Throws ValidationError if validation fails.
|
24
|
+
#
|
25
|
+
def validate
|
26
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# Serializes given Model object into Ruby Hash.
|
31
|
+
# @param object Model object to serialize.
|
32
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
33
|
+
#
|
34
|
+
def self.serialize_object(object)
|
35
|
+
object.validate
|
36
|
+
output_object = {}
|
37
|
+
|
38
|
+
serialized_property = object.value
|
39
|
+
unless serialized_property.nil?
|
40
|
+
serializedArray = []
|
41
|
+
serialized_property.each do |element|
|
42
|
+
unless element.nil?
|
43
|
+
element = NetworkInterface.serialize_object(element)
|
44
|
+
end
|
45
|
+
serializedArray.push(element)
|
46
|
+
end
|
47
|
+
serialized_property = serializedArray
|
48
|
+
end
|
49
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
serialized_property = object.next_link
|
52
|
+
output_object['nextLink'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
54
|
+
output_object
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Deserializes given Ruby Hash into Model object.
|
59
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
60
|
+
# @return [NetworkInterfaceListResult] Deserialized object.
|
61
|
+
#
|
62
|
+
def self.deserialize_object(object)
|
63
|
+
return if object.nil?
|
64
|
+
output_object = NetworkInterfaceListResult.new
|
65
|
+
|
66
|
+
deserialized_property = object['value']
|
67
|
+
unless deserialized_property.nil?
|
68
|
+
deserializedArray = [];
|
69
|
+
deserialized_property.each do |element1|
|
70
|
+
unless element1.nil?
|
71
|
+
element1 = NetworkInterface.deserialize_object(element1)
|
72
|
+
end
|
73
|
+
deserializedArray.push(element1);
|
74
|
+
end
|
75
|
+
deserialized_property = deserializedArray;
|
76
|
+
end
|
77
|
+
output_object.value = deserialized_property
|
78
|
+
|
79
|
+
deserialized_property = object['nextLink']
|
80
|
+
output_object.next_link = deserialized_property
|
81
|
+
|
82
|
+
output_object.validate
|
83
|
+
|
84
|
+
output_object
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,158 @@
|
|
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
|
+
# NetworkInterface properties.
|
10
|
+
#
|
11
|
+
class NetworkInterfacePropertiesFormat
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [SubResource] Gets or sets the reference of a VirtualMachine
|
16
|
+
attr_accessor :virtual_machine
|
17
|
+
|
18
|
+
# @return [SubResource] Gets or sets the reference of the
|
19
|
+
# NetworkSecurityGroup resource
|
20
|
+
attr_accessor :network_security_group
|
21
|
+
|
22
|
+
# @return [Array<NetworkInterfaceIpConfiguration>] Gets or sets list of
|
23
|
+
# IPConfigurations of the NetworkInterface
|
24
|
+
attr_accessor :ip_configurations
|
25
|
+
|
26
|
+
# @return [NetworkInterfaceDnsSettings] Gets or sets DNS Settings in
|
27
|
+
# NetworkInterface
|
28
|
+
attr_accessor :dns_settings
|
29
|
+
|
30
|
+
# @return [String] Gets the MAC Address of the network interface
|
31
|
+
attr_accessor :mac_address
|
32
|
+
|
33
|
+
# @return [Boolean] Gets whether this is a primary NIC on a virtual
|
34
|
+
# machine
|
35
|
+
attr_accessor :primary
|
36
|
+
|
37
|
+
# @return [String] Gets or sets Provisioning state of the PublicIP
|
38
|
+
# resource Updating/Deleting/Failed
|
39
|
+
attr_accessor :provisioning_state
|
40
|
+
|
41
|
+
#
|
42
|
+
# Validate the object. Throws ValidationError if validation fails.
|
43
|
+
#
|
44
|
+
def validate
|
45
|
+
@virtual_machine.validate unless @virtual_machine.nil?
|
46
|
+
@network_security_group.validate unless @network_security_group.nil?
|
47
|
+
@ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil?
|
48
|
+
@dns_settings.validate unless @dns_settings.nil?
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Serializes given Model object into Ruby Hash.
|
53
|
+
# @param object Model object to serialize.
|
54
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
55
|
+
#
|
56
|
+
def self.serialize_object(object)
|
57
|
+
object.validate
|
58
|
+
output_object = {}
|
59
|
+
|
60
|
+
serialized_property = object.virtual_machine
|
61
|
+
unless serialized_property.nil?
|
62
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
63
|
+
end
|
64
|
+
output_object['virtualMachine'] = serialized_property unless serialized_property.nil?
|
65
|
+
|
66
|
+
serialized_property = object.network_security_group
|
67
|
+
unless serialized_property.nil?
|
68
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
69
|
+
end
|
70
|
+
output_object['networkSecurityGroup'] = serialized_property unless serialized_property.nil?
|
71
|
+
|
72
|
+
serialized_property = object.ip_configurations
|
73
|
+
unless serialized_property.nil?
|
74
|
+
serializedArray = []
|
75
|
+
serialized_property.each do |element|
|
76
|
+
unless element.nil?
|
77
|
+
element = NetworkInterfaceIpConfiguration.serialize_object(element)
|
78
|
+
end
|
79
|
+
serializedArray.push(element)
|
80
|
+
end
|
81
|
+
serialized_property = serializedArray
|
82
|
+
end
|
83
|
+
output_object['ipConfigurations'] = serialized_property unless serialized_property.nil?
|
84
|
+
|
85
|
+
serialized_property = object.dns_settings
|
86
|
+
unless serialized_property.nil?
|
87
|
+
serialized_property = NetworkInterfaceDnsSettings.serialize_object(serialized_property)
|
88
|
+
end
|
89
|
+
output_object['dnsSettings'] = serialized_property unless serialized_property.nil?
|
90
|
+
|
91
|
+
serialized_property = object.mac_address
|
92
|
+
output_object['macAddress'] = serialized_property unless serialized_property.nil?
|
93
|
+
|
94
|
+
serialized_property = object.primary
|
95
|
+
output_object['primary'] = serialized_property unless serialized_property.nil?
|
96
|
+
|
97
|
+
serialized_property = object.provisioning_state
|
98
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
99
|
+
|
100
|
+
output_object
|
101
|
+
end
|
102
|
+
|
103
|
+
#
|
104
|
+
# Deserializes given Ruby Hash into Model object.
|
105
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
106
|
+
# @return [NetworkInterfacePropertiesFormat] Deserialized object.
|
107
|
+
#
|
108
|
+
def self.deserialize_object(object)
|
109
|
+
return if object.nil?
|
110
|
+
output_object = NetworkInterfacePropertiesFormat.new
|
111
|
+
|
112
|
+
deserialized_property = object['virtualMachine']
|
113
|
+
unless deserialized_property.nil?
|
114
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
115
|
+
end
|
116
|
+
output_object.virtual_machine = deserialized_property
|
117
|
+
|
118
|
+
deserialized_property = object['networkSecurityGroup']
|
119
|
+
unless deserialized_property.nil?
|
120
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
121
|
+
end
|
122
|
+
output_object.network_security_group = deserialized_property
|
123
|
+
|
124
|
+
deserialized_property = object['ipConfigurations']
|
125
|
+
unless deserialized_property.nil?
|
126
|
+
deserializedArray = [];
|
127
|
+
deserialized_property.each do |element1|
|
128
|
+
unless element1.nil?
|
129
|
+
element1 = NetworkInterfaceIpConfiguration.deserialize_object(element1)
|
130
|
+
end
|
131
|
+
deserializedArray.push(element1);
|
132
|
+
end
|
133
|
+
deserialized_property = deserializedArray;
|
134
|
+
end
|
135
|
+
output_object.ip_configurations = deserialized_property
|
136
|
+
|
137
|
+
deserialized_property = object['dnsSettings']
|
138
|
+
unless deserialized_property.nil?
|
139
|
+
deserialized_property = NetworkInterfaceDnsSettings.deserialize_object(deserialized_property)
|
140
|
+
end
|
141
|
+
output_object.dns_settings = deserialized_property
|
142
|
+
|
143
|
+
deserialized_property = object['macAddress']
|
144
|
+
output_object.mac_address = deserialized_property
|
145
|
+
|
146
|
+
deserialized_property = object['primary']
|
147
|
+
output_object.primary = deserialized_property
|
148
|
+
|
149
|
+
deserialized_property = object['provisioningState']
|
150
|
+
output_object.provisioning_state = deserialized_property
|
151
|
+
|
152
|
+
output_object.validate
|
153
|
+
|
154
|
+
output_object
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|