azure_mgmt_network 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +3 -0
  5. data/Gemfile +15 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +131 -0
  8. data/Rakefile +5 -0
  9. data/azure_mgmt_network.gemspec +39 -0
  10. data/lib/azure_mgmt_network.rb +139 -0
  11. data/lib/azure_mgmt_network/Models/address_space.rb +60 -0
  12. data/lib/azure_mgmt_network/Models/application_gateway.rb +104 -0
  13. data/lib/azure_mgmt_network/Models/application_gateway_backend_address.rb +67 -0
  14. data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool.rb +90 -0
  15. data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool_properties_format.rb +121 -0
  16. data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings.rb +90 -0
  17. data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings_properties_format.rb +98 -0
  18. data/lib/azure_mgmt_network/Models/application_gateway_cookie_based_affinity.rb +16 -0
  19. data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration.rb +91 -0
  20. data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration_properties_format.rb +117 -0
  21. data/lib/azure_mgmt_network/Models/application_gateway_frontend_port.rb +90 -0
  22. data/lib/azure_mgmt_network/Models/application_gateway_frontend_port_properties_format.rb +70 -0
  23. data/lib/azure_mgmt_network/Models/application_gateway_http_listener.rb +90 -0
  24. data/lib/azure_mgmt_network/Models/application_gateway_http_listener_properties_format.rb +124 -0
  25. data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration.rb +90 -0
  26. data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration_properties_format.rb +77 -0
  27. data/lib/azure_mgmt_network/Models/application_gateway_list_result.rb +88 -0
  28. data/lib/azure_mgmt_network/Models/application_gateway_operational_state.rb +18 -0
  29. data/lib/azure_mgmt_network/Models/application_gateway_properties_format.rb +338 -0
  30. data/lib/azure_mgmt_network/Models/application_gateway_protocol.rb +16 -0
  31. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule.rb +90 -0
  32. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_properties_format.rb +124 -0
  33. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_type.rb +15 -0
  34. data/lib/azure_mgmt_network/Models/application_gateway_sku.rb +88 -0
  35. data/lib/azure_mgmt_network/Models/application_gateway_sku_name.rb +17 -0
  36. data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate.rb +90 -0
  37. data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate_properties_format.rb +87 -0
  38. data/lib/azure_mgmt_network/Models/application_gateway_tier.rb +15 -0
  39. data/lib/azure_mgmt_network/Models/azure_async_operation_result.rb +85 -0
  40. data/lib/azure_mgmt_network/Models/backend_address_pool.rb +90 -0
  41. data/lib/azure_mgmt_network/Models/backend_address_pool_properties_format.rb +120 -0
  42. data/lib/azure_mgmt_network/Models/connection_reset_shared_key.rb +64 -0
  43. data/lib/azure_mgmt_network/Models/connection_reset_shared_key_properties_format.rb +60 -0
  44. data/lib/azure_mgmt_network/Models/connection_shared_key.rb +58 -0
  45. data/lib/azure_mgmt_network/Models/dhcp_options.rb +60 -0
  46. data/lib/azure_mgmt_network/Models/dns_name_availability_result.rb +58 -0
  47. data/lib/azure_mgmt_network/Models/error.rb +114 -0
  48. data/lib/azure_mgmt_network/Models/error_details.rb +76 -0
  49. data/lib/azure_mgmt_network/Models/frontend_ip_configuration.rb +90 -0
  50. data/lib/azure_mgmt_network/Models/frontend_ip_configuration_properties_format.rb +181 -0
  51. data/lib/azure_mgmt_network/Models/inbound_nat_rule.rb +90 -0
  52. data/lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb +163 -0
  53. data/lib/azure_mgmt_network/Models/ip_allocation_method.rb +16 -0
  54. data/lib/azure_mgmt_network/Models/load_balancer.rb +104 -0
  55. data/lib/azure_mgmt_network/Models/load_balancer_list_result.rb +88 -0
  56. data/lib/azure_mgmt_network/Models/load_balancer_properties_format.rb +210 -0
  57. data/lib/azure_mgmt_network/Models/load_balancing_rule.rb +90 -0
  58. data/lib/azure_mgmt_network/Models/load_balancing_rule_properties_format.rb +195 -0
  59. data/lib/azure_mgmt_network/Models/load_distribution.rb +17 -0
  60. data/lib/azure_mgmt_network/Models/local_network_gateway.rb +104 -0
  61. data/lib/azure_mgmt_network/Models/local_network_gateway_list_result.rb +88 -0
  62. data/lib/azure_mgmt_network/Models/local_network_gateway_properties_format.rb +83 -0
  63. data/lib/azure_mgmt_network/Models/network_interface.rb +104 -0
  64. data/lib/azure_mgmt_network/Models/network_interface_dns_settings.rb +89 -0
  65. data/lib/azure_mgmt_network/Models/network_interface_ip_configuration.rb +90 -0
  66. data/lib/azure_mgmt_network/Models/network_interface_ip_configuration_properties_format.rb +179 -0
  67. data/lib/azure_mgmt_network/Models/network_interface_list_result.rb +88 -0
  68. data/lib/azure_mgmt_network/Models/network_interface_properties_format.rb +158 -0
  69. data/lib/azure_mgmt_network/Models/network_security_group.rb +104 -0
  70. data/lib/azure_mgmt_network/Models/network_security_group_list_result.rb +88 -0
  71. data/lib/azure_mgmt_network/Models/network_security_group_properties_format.rb +181 -0
  72. data/lib/azure_mgmt_network/Models/operation_status.rb +17 -0
  73. data/lib/azure_mgmt_network/Models/probe.rb +90 -0
  74. data/lib/azure_mgmt_network/Models/probe_properties_format.rb +157 -0
  75. data/lib/azure_mgmt_network/Models/probe_protocol.rb +16 -0
  76. data/lib/azure_mgmt_network/Models/public_ip_address.rb +104 -0
  77. data/lib/azure_mgmt_network/Models/public_ip_address_dns_settings.rb +85 -0
  78. data/lib/azure_mgmt_network/Models/public_ip_address_list_result.rb +88 -0
  79. data/lib/azure_mgmt_network/Models/public_ip_address_properties_format.rb +126 -0
  80. data/lib/azure_mgmt_network/Models/security_rule.rb +90 -0
  81. data/lib/azure_mgmt_network/Models/security_rule_access.rb +16 -0
  82. data/lib/azure_mgmt_network/Models/security_rule_direction.rb +16 -0
  83. data/lib/azure_mgmt_network/Models/security_rule_list_result.rb +89 -0
  84. data/lib/azure_mgmt_network/Models/security_rule_properties_format.rb +174 -0
  85. data/lib/azure_mgmt_network/Models/security_rule_protocol.rb +17 -0
  86. data/lib/azure_mgmt_network/Models/subnet.rb +90 -0
  87. data/lib/azure_mgmt_network/Models/subnet_list_result.rb +88 -0
  88. data/lib/azure_mgmt_network/Models/subnet_properties_format.rb +115 -0
  89. data/lib/azure_mgmt_network/Models/transport_protocol.rb +16 -0
  90. data/lib/azure_mgmt_network/Models/usage.rb +98 -0
  91. data/lib/azure_mgmt_network/Models/usage_name.rb +68 -0
  92. data/lib/azure_mgmt_network/Models/usage_unit.rb +15 -0
  93. data/lib/azure_mgmt_network/Models/usages_list_result.rb +78 -0
  94. data/lib/azure_mgmt_network/Models/virtual_network.rb +104 -0
  95. data/lib/azure_mgmt_network/Models/virtual_network_gateway.rb +104 -0
  96. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection.rb +104 -0
  97. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_list_result.rb +89 -0
  98. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb +141 -0
  99. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_type.rb +18 -0
  100. data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration.rb +90 -0
  101. data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration_properties_format.rb +117 -0
  102. data/lib/azure_mgmt_network/Models/virtual_network_gateway_list_result.rb +88 -0
  103. data/lib/azure_mgmt_network/Models/virtual_network_gateway_properties_format.rb +126 -0
  104. data/lib/azure_mgmt_network/Models/virtual_network_gateway_type.rb +15 -0
  105. data/lib/azure_mgmt_network/Models/virtual_network_list_result.rb +88 -0
  106. data/lib/azure_mgmt_network/Models/virtual_network_properties_format.rb +123 -0
  107. data/lib/azure_mgmt_network/Models/vpn_type.rb +16 -0
  108. data/lib/azure_mgmt_network/application_gateways.rb +915 -0
  109. data/lib/azure_mgmt_network/load_balancers.rb +709 -0
  110. data/lib/azure_mgmt_network/local_network_gateways.rb +550 -0
  111. data/lib/azure_mgmt_network/module_definition.rb +6 -0
  112. data/lib/azure_mgmt_network/network_interfaces.rb +709 -0
  113. data/lib/azure_mgmt_network/network_resource_provider_client.rb +195 -0
  114. data/lib/azure_mgmt_network/network_security_groups.rb +718 -0
  115. data/lib/azure_mgmt_network/public_ip_addresses.rb +711 -0
  116. data/lib/azure_mgmt_network/security_rules.rb +563 -0
  117. data/lib/azure_mgmt_network/subnets.rb +552 -0
  118. data/lib/azure_mgmt_network/usages.rb +113 -0
  119. data/lib/azure_mgmt_network/version.rb +6 -0
  120. data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +945 -0
  121. data/lib/azure_mgmt_network/virtual_network_gateways.rb +686 -0
  122. data/lib/azure_mgmt_network/virtual_networks.rb +707 -0
  123. metadata +311 -0
@@ -0,0 +1,17 @@
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
+ # Defines values for LoadDistribution
10
+ #
11
+ module LoadDistribution
12
+ Default = "Default"
13
+ SourceIP = "SourceIP"
14
+ SourceIPProtocol = "SourceIPProtocol"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,104 @@
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
+ # A common class for general resource information
10
+ #
11
+ class LocalNetworkGateway < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [LocalNetworkGatewayPropertiesFormat]
16
+ attr_accessor :properties
17
+
18
+ # @return [String] Gets a unique read-only string that changes whenever
19
+ # the resource is updated
20
+ attr_accessor :etag
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @properties.validate unless @properties.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.location
39
+ output_object['location'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.id
42
+ output_object['id'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.name
45
+ output_object['name'] = serialized_property unless serialized_property.nil?
46
+
47
+ serialized_property = object.type
48
+ output_object['type'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.tags
51
+ output_object['tags'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.properties
54
+ unless serialized_property.nil?
55
+ serialized_property = LocalNetworkGatewayPropertiesFormat.serialize_object(serialized_property)
56
+ end
57
+ output_object['properties'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.etag
60
+ output_object['etag'] = serialized_property unless serialized_property.nil?
61
+
62
+ output_object
63
+ end
64
+
65
+ #
66
+ # Deserializes given Ruby Hash into Model object.
67
+ # @param object [Hash] Ruby Hash object to deserialize.
68
+ # @return [LocalNetworkGateway] Deserialized object.
69
+ #
70
+ def self.deserialize_object(object)
71
+ return if object.nil?
72
+ output_object = LocalNetworkGateway.new
73
+
74
+ deserialized_property = object['location']
75
+ output_object.location = deserialized_property
76
+
77
+ deserialized_property = object['id']
78
+ output_object.id = deserialized_property
79
+
80
+ deserialized_property = object['name']
81
+ output_object.name = deserialized_property
82
+
83
+ deserialized_property = object['type']
84
+ output_object.type = deserialized_property
85
+
86
+ deserialized_property = object['tags']
87
+ output_object.tags = deserialized_property
88
+
89
+ deserialized_property = object['properties']
90
+ unless deserialized_property.nil?
91
+ deserialized_property = LocalNetworkGatewayPropertiesFormat.deserialize_object(deserialized_property)
92
+ end
93
+ output_object.properties = deserialized_property
94
+
95
+ deserialized_property = object['etag']
96
+ output_object.etag = deserialized_property
97
+
98
+ output_object.validate
99
+
100
+ output_object
101
+ end
102
+ end
103
+ end
104
+ 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 ListLocalNetworkGateways Api service call
10
+ #
11
+ class LocalNetworkGatewayListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<LocalNetworkGateway>] Gets List of LocalNetworkGateways
16
+ # that exists 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 = LocalNetworkGateway.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 [LocalNetworkGatewayListResult] Deserialized object.
61
+ #
62
+ def self.deserialize_object(object)
63
+ return if object.nil?
64
+ output_object = LocalNetworkGatewayListResult.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 = LocalNetworkGateway.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,83 @@
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
+ # LocalNetworkGateway properties
10
+ #
11
+ class LocalNetworkGatewayPropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [AddressSpace] Local network site Address space
16
+ attr_accessor :local_network_address_space
17
+
18
+ # @return [String] IP address of local network gateway.
19
+ attr_accessor :gateway_ip_address
20
+
21
+ # @return [String] Gets or sets Provisioning state of the
22
+ # LocalNetworkGateway resource Updating/Deleting/Failed
23
+ attr_accessor :provisioning_state
24
+
25
+ #
26
+ # Validate the object. Throws ValidationError if validation fails.
27
+ #
28
+ def validate
29
+ @local_network_address_space.validate unless @local_network_address_space.nil?
30
+ end
31
+
32
+ #
33
+ # Serializes given Model object into Ruby Hash.
34
+ # @param object Model object to serialize.
35
+ # @return [Hash] Serialized object in form of Ruby Hash.
36
+ #
37
+ def self.serialize_object(object)
38
+ object.validate
39
+ output_object = {}
40
+
41
+ serialized_property = object.local_network_address_space
42
+ unless serialized_property.nil?
43
+ serialized_property = AddressSpace.serialize_object(serialized_property)
44
+ end
45
+ output_object['localNetworkAddressSpace'] = serialized_property unless serialized_property.nil?
46
+
47
+ serialized_property = object.gateway_ip_address
48
+ output_object['gatewayIpAddress'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.provisioning_state
51
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
52
+
53
+ output_object
54
+ end
55
+
56
+ #
57
+ # Deserializes given Ruby Hash into Model object.
58
+ # @param object [Hash] Ruby Hash object to deserialize.
59
+ # @return [LocalNetworkGatewayPropertiesFormat] Deserialized object.
60
+ #
61
+ def self.deserialize_object(object)
62
+ return if object.nil?
63
+ output_object = LocalNetworkGatewayPropertiesFormat.new
64
+
65
+ deserialized_property = object['localNetworkAddressSpace']
66
+ unless deserialized_property.nil?
67
+ deserialized_property = AddressSpace.deserialize_object(deserialized_property)
68
+ end
69
+ output_object.local_network_address_space = deserialized_property
70
+
71
+ deserialized_property = object['gatewayIpAddress']
72
+ output_object.gateway_ip_address = deserialized_property
73
+
74
+ deserialized_property = object['provisioningState']
75
+ output_object.provisioning_state = deserialized_property
76
+
77
+ output_object.validate
78
+
79
+ output_object
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,104 @@
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
+ # A NetworkInterface in a resource group
10
+ #
11
+ class NetworkInterface < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [NetworkInterfacePropertiesFormat]
16
+ attr_accessor :properties
17
+
18
+ # @return [String] Gets a unique read-only string that changes whenever
19
+ # the resource is updated
20
+ attr_accessor :etag
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @properties.validate unless @properties.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.location
39
+ output_object['location'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.id
42
+ output_object['id'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.name
45
+ output_object['name'] = serialized_property unless serialized_property.nil?
46
+
47
+ serialized_property = object.type
48
+ output_object['type'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.tags
51
+ output_object['tags'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.properties
54
+ unless serialized_property.nil?
55
+ serialized_property = NetworkInterfacePropertiesFormat.serialize_object(serialized_property)
56
+ end
57
+ output_object['properties'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.etag
60
+ output_object['etag'] = serialized_property unless serialized_property.nil?
61
+
62
+ output_object
63
+ end
64
+
65
+ #
66
+ # Deserializes given Ruby Hash into Model object.
67
+ # @param object [Hash] Ruby Hash object to deserialize.
68
+ # @return [NetworkInterface] Deserialized object.
69
+ #
70
+ def self.deserialize_object(object)
71
+ return if object.nil?
72
+ output_object = NetworkInterface.new
73
+
74
+ deserialized_property = object['location']
75
+ output_object.location = deserialized_property
76
+
77
+ deserialized_property = object['id']
78
+ output_object.id = deserialized_property
79
+
80
+ deserialized_property = object['name']
81
+ output_object.name = deserialized_property
82
+
83
+ deserialized_property = object['type']
84
+ output_object.type = deserialized_property
85
+
86
+ deserialized_property = object['tags']
87
+ output_object.tags = deserialized_property
88
+
89
+ deserialized_property = object['properties']
90
+ unless deserialized_property.nil?
91
+ deserialized_property = NetworkInterfacePropertiesFormat.deserialize_object(deserialized_property)
92
+ end
93
+ output_object.properties = deserialized_property
94
+
95
+ deserialized_property = object['etag']
96
+ output_object.etag = deserialized_property
97
+
98
+ output_object.validate
99
+
100
+ output_object
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,89 @@
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
+ # Dns Settings of a network interface
10
+ #
11
+ class NetworkInterfaceDnsSettings
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Gets or sets list of DNS servers IP addresses
16
+ attr_accessor :dns_servers
17
+
18
+ # @return [Array<String>] Gets or sets list of Applied DNS servers IP
19
+ # addresses
20
+ attr_accessor :applied_dns_servers
21
+
22
+ # @return [String] Gets or sets the Internal DNS name
23
+ attr_accessor :internal_dns_name_label
24
+
25
+ # @return [String] Gets or sets full IDNS name in the form,
26
+ # DnsName.VnetId.ZoneId.TopleveSuffix. This is set when the NIC is
27
+ # associated to a VM
28
+ attr_accessor :internal_fqdn
29
+
30
+ #
31
+ # Validate the object. Throws ValidationError if validation fails.
32
+ #
33
+ def validate
34
+ @dns_servers.each{ |e| e.validate if e.respond_to?(:validate) } unless @dns_servers.nil?
35
+ @applied_dns_servers.each{ |e| e.validate if e.respond_to?(:validate) } unless @applied_dns_servers.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.dns_servers
48
+ output_object['dnsServers'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.applied_dns_servers
51
+ output_object['appliedDnsServers'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.internal_dns_name_label
54
+ output_object['internalDnsNameLabel'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.internal_fqdn
57
+ output_object['internalFqdn'] = 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 [NetworkInterfaceDnsSettings] Deserialized object.
66
+ #
67
+ def self.deserialize_object(object)
68
+ return if object.nil?
69
+ output_object = NetworkInterfaceDnsSettings.new
70
+
71
+ deserialized_property = object['dnsServers']
72
+ output_object.dns_servers = deserialized_property
73
+
74
+ deserialized_property = object['appliedDnsServers']
75
+ output_object.applied_dns_servers = deserialized_property
76
+
77
+ deserialized_property = object['internalDnsNameLabel']
78
+ output_object.internal_dns_name_label = deserialized_property
79
+
80
+ deserialized_property = object['internalFqdn']
81
+ output_object.internal_fqdn = deserialized_property
82
+
83
+ output_object.validate
84
+
85
+ output_object
86
+ end
87
+ end
88
+ end
89
+ end