ionoscloud 5.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +7 -0
  2. data/DOCS.md +14618 -0
  3. data/Gemfile +9 -0
  4. data/README.md +55 -0
  5. data/Rakefile +10 -0
  6. data/git_push.sh +58 -0
  7. data/ionoscloud.gemspec +38 -0
  8. data/lib/ionoscloud.rb +181 -0
  9. data/lib/ionoscloud/api/_api.rb +96 -0
  10. data/lib/ionoscloud/api/backup_unit_api.rb +583 -0
  11. data/lib/ionoscloud/api/contract_api.rb +96 -0
  12. data/lib/ionoscloud/api/data_center_api.rb +532 -0
  13. data/lib/ionoscloud/api/image_api.rb +432 -0
  14. data/lib/ionoscloud/api/ip_blocks_api.rb +514 -0
  15. data/lib/ionoscloud/api/kubernetes_api.rb +1479 -0
  16. data/lib/ionoscloud/api/label_api.rb +2460 -0
  17. data/lib/ionoscloud/api/lan_api.rb +858 -0
  18. data/lib/ionoscloud/api/load_balancer_api.rb +950 -0
  19. data/lib/ionoscloud/api/location_api.rb +262 -0
  20. data/lib/ionoscloud/api/nic_api.rb +1222 -0
  21. data/lib/ionoscloud/api/private_cross_connect_api.rb +426 -0
  22. data/lib/ionoscloud/api/request_api.rb +283 -0
  23. data/lib/ionoscloud/api/server_api.rb +1679 -0
  24. data/lib/ionoscloud/api/snapshot_api.rb +432 -0
  25. data/lib/ionoscloud/api/user_management_api.rb +2495 -0
  26. data/lib/ionoscloud/api/volume_api.rb +763 -0
  27. data/lib/ionoscloud/api_client.rb +521 -0
  28. data/lib/ionoscloud/api_error.rb +57 -0
  29. data/lib/ionoscloud/configuration.rb +291 -0
  30. data/lib/ionoscloud/models/attached_volumes.rb +278 -0
  31. data/lib/ionoscloud/models/backup_unit.rb +294 -0
  32. data/lib/ionoscloud/models/backup_unit_properties.rb +242 -0
  33. data/lib/ionoscloud/models/backup_unit_sso.rb +217 -0
  34. data/lib/ionoscloud/models/backup_units.rb +283 -0
  35. data/lib/ionoscloud/models/balanced_nics.rb +278 -0
  36. data/lib/ionoscloud/models/cdroms.rb +278 -0
  37. data/lib/ionoscloud/models/connectable_datacenter.rb +234 -0
  38. data/lib/ionoscloud/models/contract.rb +231 -0
  39. data/lib/ionoscloud/models/contract_properties.rb +256 -0
  40. data/lib/ionoscloud/models/data_center_entities.rb +243 -0
  41. data/lib/ionoscloud/models/datacenter.rb +269 -0
  42. data/lib/ionoscloud/models/datacenter_element_metadata.rb +321 -0
  43. data/lib/ionoscloud/models/datacenter_properties.rb +296 -0
  44. data/lib/ionoscloud/models/datacenters.rb +278 -0
  45. data/lib/ionoscloud/models/error.rb +228 -0
  46. data/lib/ionoscloud/models/error_message.rb +227 -0
  47. data/lib/ionoscloud/models/firewall_rule.rb +260 -0
  48. data/lib/ionoscloud/models/firewall_rules.rb +278 -0
  49. data/lib/ionoscloud/models/firewallrule_properties.rb +468 -0
  50. data/lib/ionoscloud/models/group.rb +260 -0
  51. data/lib/ionoscloud/models/group_entities.rb +225 -0
  52. data/lib/ionoscloud/models/group_members.rb +249 -0
  53. data/lib/ionoscloud/models/group_properties.rb +307 -0
  54. data/lib/ionoscloud/models/group_share.rb +251 -0
  55. data/lib/ionoscloud/models/group_share_properties.rb +227 -0
  56. data/lib/ionoscloud/models/group_shares.rb +249 -0
  57. data/lib/ionoscloud/models/group_users.rb +250 -0
  58. data/lib/ionoscloud/models/groups.rb +249 -0
  59. data/lib/ionoscloud/models/image.rb +260 -0
  60. data/lib/ionoscloud/models/image_properties.rb +428 -0
  61. data/lib/ionoscloud/models/images.rb +249 -0
  62. data/lib/ionoscloud/models/info.rb +237 -0
  63. data/lib/ionoscloud/models/ip_block.rb +260 -0
  64. data/lib/ionoscloud/models/ip_block_properties.rb +271 -0
  65. data/lib/ionoscloud/models/ip_blocks.rb +249 -0
  66. data/lib/ionoscloud/models/ip_consumer.rb +270 -0
  67. data/lib/ionoscloud/models/ip_failover.rb +225 -0
  68. data/lib/ionoscloud/models/kubernetes_auto_scaling.rb +227 -0
  69. data/lib/ionoscloud/models/kubernetes_cluster.rb +303 -0
  70. data/lib/ionoscloud/models/kubernetes_cluster_entities.rb +216 -0
  71. data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +265 -0
  72. data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post_and_put.rb +241 -0
  73. data/lib/ionoscloud/models/kubernetes_clusters.rb +283 -0
  74. data/lib/ionoscloud/models/kubernetes_config.rb +285 -0
  75. data/lib/ionoscloud/models/kubernetes_config_properties.rb +217 -0
  76. data/lib/ionoscloud/models/kubernetes_maintenance_window.rb +261 -0
  77. data/lib/ionoscloud/models/kubernetes_node.rb +294 -0
  78. data/lib/ionoscloud/models/kubernetes_node_metadata.rb +291 -0
  79. data/lib/ionoscloud/models/kubernetes_node_pool.rb +294 -0
  80. data/lib/ionoscloud/models/kubernetes_node_pool_for_put.rb +294 -0
  81. data/lib/ionoscloud/models/kubernetes_node_pool_lan.rb +217 -0
  82. data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +476 -0
  83. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +464 -0
  84. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +464 -0
  85. data/lib/ionoscloud/models/kubernetes_node_pools.rb +283 -0
  86. data/lib/ionoscloud/models/kubernetes_node_properties.rb +252 -0
  87. data/lib/ionoscloud/models/kubernetes_nodes.rb +283 -0
  88. data/lib/ionoscloud/models/label.rb +294 -0
  89. data/lib/ionoscloud/models/label_properties.rb +257 -0
  90. data/lib/ionoscloud/models/label_resource.rb +294 -0
  91. data/lib/ionoscloud/models/label_resource_properties.rb +227 -0
  92. data/lib/ionoscloud/models/label_resources.rb +312 -0
  93. data/lib/ionoscloud/models/labels.rb +283 -0
  94. data/lib/ionoscloud/models/lan.rb +269 -0
  95. data/lib/ionoscloud/models/lan_entities.rb +216 -0
  96. data/lib/ionoscloud/models/lan_nics.rb +278 -0
  97. data/lib/ionoscloud/models/lan_post.rb +269 -0
  98. data/lib/ionoscloud/models/lan_properties.rb +249 -0
  99. data/lib/ionoscloud/models/lan_properties_post.rb +249 -0
  100. data/lib/ionoscloud/models/lans.rb +278 -0
  101. data/lib/ionoscloud/models/loadbalancer.rb +269 -0
  102. data/lib/ionoscloud/models/loadbalancer_entities.rb +216 -0
  103. data/lib/ionoscloud/models/loadbalancer_properties.rb +271 -0
  104. data/lib/ionoscloud/models/loadbalancers.rb +278 -0
  105. data/lib/ionoscloud/models/location.rb +260 -0
  106. data/lib/ionoscloud/models/location_properties.rb +263 -0
  107. data/lib/ionoscloud/models/locations.rb +249 -0
  108. data/lib/ionoscloud/models/nic.rb +269 -0
  109. data/lib/ionoscloud/models/nic_entities.rb +216 -0
  110. data/lib/ionoscloud/models/nic_properties.rb +284 -0
  111. data/lib/ionoscloud/models/nics.rb +278 -0
  112. data/lib/ionoscloud/models/no_state_meta_data.rb +277 -0
  113. data/lib/ionoscloud/models/pagination_links.rb +237 -0
  114. data/lib/ionoscloud/models/peer.rb +252 -0
  115. data/lib/ionoscloud/models/private_cross_connect.rb +260 -0
  116. data/lib/ionoscloud/models/private_cross_connect_properties.rb +251 -0
  117. data/lib/ionoscloud/models/private_cross_connects.rb +249 -0
  118. data/lib/ionoscloud/models/request.rb +260 -0
  119. data/lib/ionoscloud/models/request_metadata.rb +246 -0
  120. data/lib/ionoscloud/models/request_properties.rb +245 -0
  121. data/lib/ionoscloud/models/request_status.rb +246 -0
  122. data/lib/ionoscloud/models/request_status_metadata.rb +280 -0
  123. data/lib/ionoscloud/models/request_target.rb +259 -0
  124. data/lib/ionoscloud/models/requests.rb +293 -0
  125. data/lib/ionoscloud/models/resource.rb +265 -0
  126. data/lib/ionoscloud/models/resource_entities.rb +216 -0
  127. data/lib/ionoscloud/models/resource_groups.rb +250 -0
  128. data/lib/ionoscloud/models/resource_limits.rb +462 -0
  129. data/lib/ionoscloud/models/resource_properties.rb +227 -0
  130. data/lib/ionoscloud/models/resource_reference.rb +242 -0
  131. data/lib/ionoscloud/models/resources.rb +250 -0
  132. data/lib/ionoscloud/models/resources_users.rb +250 -0
  133. data/lib/ionoscloud/models/s3_key.rb +260 -0
  134. data/lib/ionoscloud/models/s3_key_metadata.rb +227 -0
  135. data/lib/ionoscloud/models/s3_key_properties.rb +227 -0
  136. data/lib/ionoscloud/models/s3_keys.rb +249 -0
  137. data/lib/ionoscloud/models/s3_object_storage_sso.rb +217 -0
  138. data/lib/ionoscloud/models/server.rb +269 -0
  139. data/lib/ionoscloud/models/server_entities.rb +234 -0
  140. data/lib/ionoscloud/models/server_properties.rb +341 -0
  141. data/lib/ionoscloud/models/servers.rb +278 -0
  142. data/lib/ionoscloud/models/snapshot.rb +260 -0
  143. data/lib/ionoscloud/models/snapshot_properties.rb +401 -0
  144. data/lib/ionoscloud/models/snapshots.rb +249 -0
  145. data/lib/ionoscloud/models/type.rb +59 -0
  146. data/lib/ionoscloud/models/user.rb +269 -0
  147. data/lib/ionoscloud/models/user_metadata.rb +237 -0
  148. data/lib/ionoscloud/models/user_properties.rb +297 -0
  149. data/lib/ionoscloud/models/users.rb +249 -0
  150. data/lib/ionoscloud/models/users_entities.rb +225 -0
  151. data/lib/ionoscloud/models/volume.rb +260 -0
  152. data/lib/ionoscloud/models/volume_properties.rb +463 -0
  153. data/lib/ionoscloud/models/volumes.rb +278 -0
  154. data/lib/ionoscloud/version.rb +15 -0
  155. data/spec/api/_api_spec.rb +49 -0
  156. data/spec/api/backup_unit_api_spec.rb +140 -0
  157. data/spec/api/contract_api_spec.rb +49 -0
  158. data/spec/api/data_center_api_spec.rb +128 -0
  159. data/spec/api/image_api_spec.rb +111 -0
  160. data/spec/api/ip_blocks_api_spec.rb +126 -0
  161. data/spec/api/kubernetes_api_spec.rb +306 -0
  162. data/spec/api/label_api_spec.rb +480 -0
  163. data/spec/api/lan_api_spec.rb +186 -0
  164. data/spec/api/load_balancer_api_spec.rb +203 -0
  165. data/spec/api/location_api_spec.rb +80 -0
  166. data/spec/api/nic_api_spec.rb +251 -0
  167. data/spec/api/private_cross_connect_api_spec.rb +110 -0
  168. data/spec/api/request_api_spec.rb +84 -0
  169. data/spec/api/server_api_spec.rb +337 -0
  170. data/spec/api/snapshot_api_spec.rb +111 -0
  171. data/spec/api/user_management_api_spec.rb +495 -0
  172. data/spec/api/volume_api_spec.rb +171 -0
  173. data/spec/api_client_spec.rb +226 -0
  174. data/spec/configuration_spec.rb +42 -0
  175. data/spec/models/attached_volumes_spec.rb +70 -0
  176. data/spec/models/backup_unit_properties_spec.rb +46 -0
  177. data/spec/models/backup_unit_spec.rb +62 -0
  178. data/spec/models/backup_unit_sso_spec.rb +34 -0
  179. data/spec/models/backup_units_spec.rb +56 -0
  180. data/spec/models/balanced_nics_spec.rb +70 -0
  181. data/spec/models/cdroms_spec.rb +70 -0
  182. data/spec/models/connectable_datacenter_spec.rb +46 -0
  183. data/spec/models/contract_properties_spec.rb +58 -0
  184. data/spec/models/contract_spec.rb +40 -0
  185. data/spec/models/data_center_entities_spec.rb +52 -0
  186. data/spec/models/datacenter_element_metadata_spec.rb +80 -0
  187. data/spec/models/datacenter_properties_spec.rb +68 -0
  188. data/spec/models/datacenter_spec.rb +64 -0
  189. data/spec/models/datacenters_spec.rb +70 -0
  190. data/spec/models/error_message_spec.rb +40 -0
  191. data/spec/models/error_spec.rb +40 -0
  192. data/spec/models/firewall_rule_spec.rb +58 -0
  193. data/spec/models/firewall_rules_spec.rb +70 -0
  194. data/spec/models/firewallrule_properties_spec.rb +98 -0
  195. data/spec/models/group_entities_spec.rb +40 -0
  196. data/spec/models/group_members_spec.rb +52 -0
  197. data/spec/models/group_properties_spec.rb +88 -0
  198. data/spec/models/group_share_properties_spec.rb +40 -0
  199. data/spec/models/group_share_spec.rb +52 -0
  200. data/spec/models/group_shares_spec.rb +52 -0
  201. data/spec/models/group_spec.rb +58 -0
  202. data/spec/models/group_users_spec.rb +52 -0
  203. data/spec/models/groups_spec.rb +52 -0
  204. data/spec/models/image_properties_spec.rb +138 -0
  205. data/spec/models/image_spec.rb +58 -0
  206. data/spec/models/images_spec.rb +52 -0
  207. data/spec/models/info_spec.rb +46 -0
  208. data/spec/models/ip_block_properties_spec.rb +58 -0
  209. data/spec/models/ip_block_spec.rb +58 -0
  210. data/spec/models/ip_blocks_spec.rb +52 -0
  211. data/spec/models/ip_consumer_spec.rb +70 -0
  212. data/spec/models/ip_failover_spec.rb +40 -0
  213. data/spec/models/kubernetes_auto_scaling_spec.rb +40 -0
  214. data/spec/models/kubernetes_cluster_entities_spec.rb +34 -0
  215. data/spec/models/kubernetes_cluster_properties_for_post_and_put_spec.rb +46 -0
  216. data/spec/models/kubernetes_cluster_properties_spec.rb +58 -0
  217. data/spec/models/kubernetes_cluster_spec.rb +68 -0
  218. data/spec/models/kubernetes_clusters_spec.rb +56 -0
  219. data/spec/models/kubernetes_config_properties_spec.rb +34 -0
  220. data/spec/models/kubernetes_config_spec.rb +56 -0
  221. data/spec/models/kubernetes_maintenance_window_spec.rb +44 -0
  222. data/spec/models/kubernetes_node_metadata_spec.rb +62 -0
  223. data/spec/models/kubernetes_node_pool_for_put_spec.rb +62 -0
  224. data/spec/models/kubernetes_node_pool_lan_spec.rb +34 -0
  225. data/spec/models/kubernetes_node_pool_properties_for_post_spec.rb +132 -0
  226. data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +132 -0
  227. data/spec/models/kubernetes_node_pool_properties_spec.rb +138 -0
  228. data/spec/models/kubernetes_node_pool_spec.rb +62 -0
  229. data/spec/models/kubernetes_node_pools_spec.rb +56 -0
  230. data/spec/models/kubernetes_node_properties_spec.rb +46 -0
  231. data/spec/models/kubernetes_node_spec.rb +62 -0
  232. data/spec/models/kubernetes_nodes_spec.rb +56 -0
  233. data/spec/models/label_properties_spec.rb +58 -0
  234. data/spec/models/label_resource_properties_spec.rb +40 -0
  235. data/spec/models/label_resource_spec.rb +62 -0
  236. data/spec/models/label_resources_spec.rb +74 -0
  237. data/spec/models/label_spec.rb +62 -0
  238. data/spec/models/labels_spec.rb +56 -0
  239. data/spec/models/lan_entities_spec.rb +34 -0
  240. data/spec/models/lan_nics_spec.rb +70 -0
  241. data/spec/models/lan_post_spec.rb +64 -0
  242. data/spec/models/lan_properties_post_spec.rb +52 -0
  243. data/spec/models/lan_properties_spec.rb +52 -0
  244. data/spec/models/lan_spec.rb +64 -0
  245. data/spec/models/lans_spec.rb +70 -0
  246. data/spec/models/loadbalancer_entities_spec.rb +34 -0
  247. data/spec/models/loadbalancer_properties_spec.rb +50 -0
  248. data/spec/models/loadbalancer_spec.rb +64 -0
  249. data/spec/models/loadbalancers_spec.rb +70 -0
  250. data/spec/models/location_properties_spec.rb +50 -0
  251. data/spec/models/location_spec.rb +58 -0
  252. data/spec/models/locations_spec.rb +52 -0
  253. data/spec/models/nic_entities_spec.rb +34 -0
  254. data/spec/models/nic_properties_spec.rb +70 -0
  255. data/spec/models/nic_spec.rb +64 -0
  256. data/spec/models/nics_spec.rb +70 -0
  257. data/spec/models/no_state_meta_data_spec.rb +70 -0
  258. data/spec/models/pagination_links_spec.rb +46 -0
  259. data/spec/models/peer_spec.rb +58 -0
  260. data/spec/models/private_cross_connect_properties_spec.rb +52 -0
  261. data/spec/models/private_cross_connect_spec.rb +58 -0
  262. data/spec/models/private_cross_connects_spec.rb +52 -0
  263. data/spec/models/request_metadata_spec.rb +52 -0
  264. data/spec/models/request_properties_spec.rb +52 -0
  265. data/spec/models/request_spec.rb +58 -0
  266. data/spec/models/request_status_metadata_spec.rb +56 -0
  267. data/spec/models/request_status_spec.rb +52 -0
  268. data/spec/models/request_target_spec.rb +44 -0
  269. data/spec/models/requests_spec.rb +70 -0
  270. data/spec/models/resource_entities_spec.rb +34 -0
  271. data/spec/models/resource_groups_spec.rb +52 -0
  272. data/spec/models/resource_limits_spec.rb +130 -0
  273. data/spec/models/resource_properties_spec.rb +40 -0
  274. data/spec/models/resource_reference_spec.rb +46 -0
  275. data/spec/models/resource_spec.rb +64 -0
  276. data/spec/models/resources_spec.rb +52 -0
  277. data/spec/models/resources_users_spec.rb +52 -0
  278. data/spec/models/s3_key_metadata_spec.rb +40 -0
  279. data/spec/models/s3_key_properties_spec.rb +40 -0
  280. data/spec/models/s3_key_spec.rb +58 -0
  281. data/spec/models/s3_keys_spec.rb +52 -0
  282. data/spec/models/s3_object_storage_sso_spec.rb +34 -0
  283. data/spec/models/server_entities_spec.rb +46 -0
  284. data/spec/models/server_properties_spec.rb +84 -0
  285. data/spec/models/server_spec.rb +64 -0
  286. data/spec/models/servers_spec.rb +70 -0
  287. data/spec/models/snapshot_properties_spec.rb +128 -0
  288. data/spec/models/snapshot_spec.rb +58 -0
  289. data/spec/models/snapshots_spec.rb +52 -0
  290. data/spec/models/type_spec.rb +28 -0
  291. data/spec/models/user_metadata_spec.rb +46 -0
  292. data/spec/models/user_properties_spec.rb +82 -0
  293. data/spec/models/user_spec.rb +64 -0
  294. data/spec/models/users_entities_spec.rb +40 -0
  295. data/spec/models/users_spec.rb +52 -0
  296. data/spec/models/volume_properties_spec.rb +152 -0
  297. data/spec/models/volume_spec.rb +58 -0
  298. data/spec/models/volumes_spec.rb +70 -0
  299. data/spec/spec_helper.rb +111 -0
  300. metadata +532 -0
@@ -0,0 +1,858 @@
1
+ =begin
2
+ #CLOUD API
3
+
4
+ #An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
5
+
6
+ The version of the OpenAPI document: 5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Ionoscloud
16
+ class LanApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a Lan.
23
+ # Removes the specific Lan
24
+ # @param datacenter_id [String] The unique ID of the datacenter
25
+ # @param lan_id [String] The unique ID of the LAN
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
28
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
29
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
30
+ # @return [Object]
31
+ def datacenters_lans_delete(datacenter_id, lan_id, opts = {})
32
+ data, _status_code, _headers = datacenters_lans_delete_with_http_info(datacenter_id, lan_id, opts)
33
+ data
34
+ end
35
+
36
+ # Delete a Lan.
37
+ # Removes the specific Lan
38
+ # @param datacenter_id [String] The unique ID of the datacenter
39
+ # @param lan_id [String] The unique ID of the LAN
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
42
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
43
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
44
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
45
+ def datacenters_lans_delete_with_http_info(datacenter_id, lan_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_delete ...'
48
+ end
49
+ # verify the required parameter 'datacenter_id' is set
50
+ if @api_client.config.client_side_validation && datacenter_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_delete"
52
+ end
53
+ # verify the required parameter 'lan_id' is set
54
+ if @api_client.config.client_side_validation && lan_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_delete"
56
+ end
57
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
58
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_delete, must be smaller than or equal to 10.'
59
+ end
60
+
61
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
62
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_delete, must be greater than or equal to 0.'
63
+ end
64
+
65
+ # resource path
66
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
67
+
68
+ # query parameters
69
+ query_params = opts[:query_params] || {}
70
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
71
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
77
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
78
+
79
+ # form parameters
80
+ form_params = opts[:form_params] || {}
81
+
82
+ # http body (model)
83
+ post_body = opts[:debug_body]
84
+
85
+ # return_type
86
+ return_type = opts[:debug_return_type] || 'Object'
87
+
88
+ # auth_names
89
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
90
+
91
+ new_options = opts.merge(
92
+ :operation => :"LanApi.datacenters_lans_delete",
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => return_type
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Retrieve a Lan
109
+ # Retrieves the attributes of a given LAN
110
+ # @param datacenter_id [String] The unique ID of the datacenter
111
+ # @param lan_id [String] The unique ID of the LAN
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
114
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
115
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
116
+ # @return [Lan]
117
+ def datacenters_lans_find_by_id(datacenter_id, lan_id, opts = {})
118
+ data, _status_code, _headers = datacenters_lans_find_by_id_with_http_info(datacenter_id, lan_id, opts)
119
+ data
120
+ end
121
+
122
+ # Retrieve a Lan
123
+ # Retrieves the attributes of a given LAN
124
+ # @param datacenter_id [String] The unique ID of the datacenter
125
+ # @param lan_id [String] The unique ID of the LAN
126
+ # @param [Hash] opts the optional parameters
127
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
128
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
129
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
130
+ # @return [Array<(Lan, Integer, Hash)>] Lan data, response status code and response headers
131
+ def datacenters_lans_find_by_id_with_http_info(datacenter_id, lan_id, opts = {})
132
+ if @api_client.config.debugging
133
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_find_by_id ...'
134
+ end
135
+ # verify the required parameter 'datacenter_id' is set
136
+ if @api_client.config.client_side_validation && datacenter_id.nil?
137
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_find_by_id"
138
+ end
139
+ # verify the required parameter 'lan_id' is set
140
+ if @api_client.config.client_side_validation && lan_id.nil?
141
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_find_by_id"
142
+ end
143
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
144
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_find_by_id, must be smaller than or equal to 10.'
145
+ end
146
+
147
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
148
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_find_by_id, must be greater than or equal to 0.'
149
+ end
150
+
151
+ # resource path
152
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
153
+
154
+ # query parameters
155
+ query_params = opts[:query_params] || {}
156
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
157
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
158
+
159
+ # header parameters
160
+ header_params = opts[:header_params] || {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
163
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
164
+
165
+ # form parameters
166
+ form_params = opts[:form_params] || {}
167
+
168
+ # http body (model)
169
+ post_body = opts[:debug_body]
170
+
171
+ # return_type
172
+ return_type = opts[:debug_return_type] || 'Lan'
173
+
174
+ # auth_names
175
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
176
+
177
+ new_options = opts.merge(
178
+ :operation => :"LanApi.datacenters_lans_find_by_id",
179
+ :header_params => header_params,
180
+ :query_params => query_params,
181
+ :form_params => form_params,
182
+ :body => post_body,
183
+ :auth_names => auth_names,
184
+ :return_type => return_type
185
+ )
186
+
187
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
190
+ end
191
+ return data, status_code, headers
192
+ end
193
+
194
+ # List Lans
195
+ # Retrieve a list of LANs within the datacenter
196
+ # @param datacenter_id [String] The unique ID of the datacenter
197
+ # @param [Hash] opts the optional parameters
198
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
199
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
200
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
201
+ # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) (default to 0)
202
+ # @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) (default to 1000)
203
+ # @return [Lans]
204
+ def datacenters_lans_get(datacenter_id, opts = {})
205
+ data, _status_code, _headers = datacenters_lans_get_with_http_info(datacenter_id, opts)
206
+ data
207
+ end
208
+
209
+ # List Lans
210
+ # Retrieve a list of LANs within the datacenter
211
+ # @param datacenter_id [String] The unique ID of the datacenter
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
214
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
215
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
216
+ # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination)
217
+ # @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination)
218
+ # @return [Array<(Lans, Integer, Hash)>] Lans data, response status code and response headers
219
+ def datacenters_lans_get_with_http_info(datacenter_id, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_get ...'
222
+ end
223
+ # verify the required parameter 'datacenter_id' is set
224
+ if @api_client.config.client_side_validation && datacenter_id.nil?
225
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_get"
226
+ end
227
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
228
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_get, must be smaller than or equal to 10.'
229
+ end
230
+
231
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
232
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_get, must be greater than or equal to 0.'
233
+ end
234
+
235
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
236
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LanApi.datacenters_lans_get, must be greater than or equal to 0.'
237
+ end
238
+
239
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
240
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LanApi.datacenters_lans_get, must be smaller than or equal to 10000.'
241
+ end
242
+
243
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
244
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LanApi.datacenters_lans_get, must be greater than or equal to 1.'
245
+ end
246
+
247
+ # resource path
248
+ local_var_path = '/datacenters/{datacenterId}/lans'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
253
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
254
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
255
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
256
+
257
+ # header parameters
258
+ header_params = opts[:header_params] || {}
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
262
+
263
+ # form parameters
264
+ form_params = opts[:form_params] || {}
265
+
266
+ # http body (model)
267
+ post_body = opts[:debug_body]
268
+
269
+ # return_type
270
+ return_type = opts[:debug_return_type] || 'Lans'
271
+
272
+ # auth_names
273
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
274
+
275
+ new_options = opts.merge(
276
+ :operation => :"LanApi.datacenters_lans_get",
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => return_type
283
+ )
284
+
285
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
288
+ end
289
+ return data, status_code, headers
290
+ end
291
+
292
+ # Retrieve a nic attached to lan
293
+ # This will retrieve the properties of an attached nic.
294
+ # @param datacenter_id [String] The unique ID of the datacenter
295
+ # @param lan_id [String] The unique ID of the LAN
296
+ # @param nic_id [String] The unique ID of the NIC
297
+ # @param [Hash] opts the optional parameters
298
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
299
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
300
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
301
+ # @return [Nic]
302
+ def datacenters_lans_nics_find_by_id(datacenter_id, lan_id, nic_id, opts = {})
303
+ data, _status_code, _headers = datacenters_lans_nics_find_by_id_with_http_info(datacenter_id, lan_id, nic_id, opts)
304
+ data
305
+ end
306
+
307
+ # Retrieve a nic attached to lan
308
+ # This will retrieve the properties of an attached nic.
309
+ # @param datacenter_id [String] The unique ID of the datacenter
310
+ # @param lan_id [String] The unique ID of the LAN
311
+ # @param nic_id [String] The unique ID of the NIC
312
+ # @param [Hash] opts the optional parameters
313
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
314
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
315
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
316
+ # @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
317
+ def datacenters_lans_nics_find_by_id_with_http_info(datacenter_id, lan_id, nic_id, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_nics_find_by_id ...'
320
+ end
321
+ # verify the required parameter 'datacenter_id' is set
322
+ if @api_client.config.client_side_validation && datacenter_id.nil?
323
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_nics_find_by_id"
324
+ end
325
+ # verify the required parameter 'lan_id' is set
326
+ if @api_client.config.client_side_validation && lan_id.nil?
327
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_nics_find_by_id"
328
+ end
329
+ # verify the required parameter 'nic_id' is set
330
+ if @api_client.config.client_side_validation && nic_id.nil?
331
+ fail ArgumentError, "Missing the required parameter 'nic_id' when calling LanApi.datacenters_lans_nics_find_by_id"
332
+ end
333
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
334
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_find_by_id, must be smaller than or equal to 10.'
335
+ end
336
+
337
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
338
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_find_by_id, must be greater than or equal to 0.'
339
+ end
340
+
341
+ # resource path
342
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s))
343
+
344
+ # query parameters
345
+ query_params = opts[:query_params] || {}
346
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
347
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
348
+
349
+ # header parameters
350
+ header_params = opts[:header_params] || {}
351
+ # HTTP header 'Accept' (if needed)
352
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
353
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
354
+
355
+ # form parameters
356
+ form_params = opts[:form_params] || {}
357
+
358
+ # http body (model)
359
+ post_body = opts[:debug_body]
360
+
361
+ # return_type
362
+ return_type = opts[:debug_return_type] || 'Nic'
363
+
364
+ # auth_names
365
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
366
+
367
+ new_options = opts.merge(
368
+ :operation => :"LanApi.datacenters_lans_nics_find_by_id",
369
+ :header_params => header_params,
370
+ :query_params => query_params,
371
+ :form_params => form_params,
372
+ :body => post_body,
373
+ :auth_names => auth_names,
374
+ :return_type => return_type
375
+ )
376
+
377
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_nics_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
380
+ end
381
+ return data, status_code, headers
382
+ end
383
+
384
+ # List Lan Members
385
+ # You can retrieve a list of nics attached to a lan
386
+ # @param datacenter_id [String] The unique ID of the datacenter
387
+ # @param lan_id [String] The unique ID of the LAN
388
+ # @param [Hash] opts the optional parameters
389
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
390
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
391
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
392
+ # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) (default to 0)
393
+ # @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) (default to 1000)
394
+ # @return [LanNics]
395
+ def datacenters_lans_nics_get(datacenter_id, lan_id, opts = {})
396
+ data, _status_code, _headers = datacenters_lans_nics_get_with_http_info(datacenter_id, lan_id, opts)
397
+ data
398
+ end
399
+
400
+ # List Lan Members
401
+ # You can retrieve a list of nics attached to a lan
402
+ # @param datacenter_id [String] The unique ID of the datacenter
403
+ # @param lan_id [String] The unique ID of the LAN
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
406
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
407
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
408
+ # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination)
409
+ # @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination)
410
+ # @return [Array<(LanNics, Integer, Hash)>] LanNics data, response status code and response headers
411
+ def datacenters_lans_nics_get_with_http_info(datacenter_id, lan_id, opts = {})
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_nics_get ...'
414
+ end
415
+ # verify the required parameter 'datacenter_id' is set
416
+ if @api_client.config.client_side_validation && datacenter_id.nil?
417
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_nics_get"
418
+ end
419
+ # verify the required parameter 'lan_id' is set
420
+ if @api_client.config.client_side_validation && lan_id.nil?
421
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_nics_get"
422
+ end
423
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
424
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_get, must be smaller than or equal to 10.'
425
+ end
426
+
427
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
428
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_get, must be greater than or equal to 0.'
429
+ end
430
+
431
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
432
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LanApi.datacenters_lans_nics_get, must be greater than or equal to 0.'
433
+ end
434
+
435
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
436
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LanApi.datacenters_lans_nics_get, must be smaller than or equal to 10000.'
437
+ end
438
+
439
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
440
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LanApi.datacenters_lans_nics_get, must be greater than or equal to 1.'
441
+ end
442
+
443
+ # resource path
444
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
449
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
450
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
451
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
452
+
453
+ # header parameters
454
+ header_params = opts[:header_params] || {}
455
+ # HTTP header 'Accept' (if needed)
456
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
457
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
458
+
459
+ # form parameters
460
+ form_params = opts[:form_params] || {}
461
+
462
+ # http body (model)
463
+ post_body = opts[:debug_body]
464
+
465
+ # return_type
466
+ return_type = opts[:debug_return_type] || 'LanNics'
467
+
468
+ # auth_names
469
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
470
+
471
+ new_options = opts.merge(
472
+ :operation => :"LanApi.datacenters_lans_nics_get",
473
+ :header_params => header_params,
474
+ :query_params => query_params,
475
+ :form_params => form_params,
476
+ :body => post_body,
477
+ :auth_names => auth_names,
478
+ :return_type => return_type
479
+ )
480
+
481
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
482
+ if @api_client.config.debugging
483
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_nics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
484
+ end
485
+ return data, status_code, headers
486
+ end
487
+
488
+ # Attach a nic
489
+ # This will attach a pre-existing nic to a lan.
490
+ # @param datacenter_id [String] The unique ID of the datacenter
491
+ # @param lan_id [String] The unique ID of the LAN
492
+ # @param nic [Nic] Nic to be attached
493
+ # @param [Hash] opts the optional parameters
494
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
495
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
496
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
497
+ # @return [Nic]
498
+ def datacenters_lans_nics_post(datacenter_id, lan_id, nic, opts = {})
499
+ data, _status_code, _headers = datacenters_lans_nics_post_with_http_info(datacenter_id, lan_id, nic, opts)
500
+ data
501
+ end
502
+
503
+ # Attach a nic
504
+ # This will attach a pre-existing nic to a lan.
505
+ # @param datacenter_id [String] The unique ID of the datacenter
506
+ # @param lan_id [String] The unique ID of the LAN
507
+ # @param nic [Nic] Nic to be attached
508
+ # @param [Hash] opts the optional parameters
509
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
510
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
511
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
512
+ # @return [Array<(Nic, Integer, Hash)>] Nic data, response status code and response headers
513
+ def datacenters_lans_nics_post_with_http_info(datacenter_id, lan_id, nic, opts = {})
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_nics_post ...'
516
+ end
517
+ # verify the required parameter 'datacenter_id' is set
518
+ if @api_client.config.client_side_validation && datacenter_id.nil?
519
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_nics_post"
520
+ end
521
+ # verify the required parameter 'lan_id' is set
522
+ if @api_client.config.client_side_validation && lan_id.nil?
523
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_nics_post"
524
+ end
525
+ # verify the required parameter 'nic' is set
526
+ if @api_client.config.client_side_validation && nic.nil?
527
+ fail ArgumentError, "Missing the required parameter 'nic' when calling LanApi.datacenters_lans_nics_post"
528
+ end
529
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
530
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_post, must be smaller than or equal to 10.'
531
+ end
532
+
533
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
534
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_nics_post, must be greater than or equal to 0.'
535
+ end
536
+
537
+ # resource path
538
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
539
+
540
+ # query parameters
541
+ query_params = opts[:query_params] || {}
542
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
543
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
544
+
545
+ # header parameters
546
+ header_params = opts[:header_params] || {}
547
+ # HTTP header 'Accept' (if needed)
548
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
549
+ # HTTP header 'Content-Type'
550
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
551
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
552
+
553
+ # form parameters
554
+ form_params = opts[:form_params] || {}
555
+
556
+ # http body (model)
557
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nic)
558
+
559
+ # return_type
560
+ return_type = opts[:debug_return_type] || 'Nic'
561
+
562
+ # auth_names
563
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
564
+
565
+ new_options = opts.merge(
566
+ :operation => :"LanApi.datacenters_lans_nics_post",
567
+ :header_params => header_params,
568
+ :query_params => query_params,
569
+ :form_params => form_params,
570
+ :body => post_body,
571
+ :auth_names => auth_names,
572
+ :return_type => return_type
573
+ )
574
+
575
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
576
+ if @api_client.config.debugging
577
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_nics_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
578
+ end
579
+ return data, status_code, headers
580
+ end
581
+
582
+ # Partially modify a Lan
583
+ # You can use update attributes of a resource
584
+ # @param datacenter_id [String] The unique ID of the datacenter
585
+ # @param lan_id [String] The unique ID of the LAN
586
+ # @param lan [LanProperties] Modified Lan
587
+ # @param [Hash] opts the optional parameters
588
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
589
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
590
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
591
+ # @return [Lan]
592
+ def datacenters_lans_patch(datacenter_id, lan_id, lan, opts = {})
593
+ data, _status_code, _headers = datacenters_lans_patch_with_http_info(datacenter_id, lan_id, lan, opts)
594
+ data
595
+ end
596
+
597
+ # Partially modify a Lan
598
+ # You can use update attributes of a resource
599
+ # @param datacenter_id [String] The unique ID of the datacenter
600
+ # @param lan_id [String] The unique ID of the LAN
601
+ # @param lan [LanProperties] Modified Lan
602
+ # @param [Hash] opts the optional parameters
603
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
604
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
605
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
606
+ # @return [Array<(Lan, Integer, Hash)>] Lan data, response status code and response headers
607
+ def datacenters_lans_patch_with_http_info(datacenter_id, lan_id, lan, opts = {})
608
+ if @api_client.config.debugging
609
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_patch ...'
610
+ end
611
+ # verify the required parameter 'datacenter_id' is set
612
+ if @api_client.config.client_side_validation && datacenter_id.nil?
613
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_patch"
614
+ end
615
+ # verify the required parameter 'lan_id' is set
616
+ if @api_client.config.client_side_validation && lan_id.nil?
617
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_patch"
618
+ end
619
+ # verify the required parameter 'lan' is set
620
+ if @api_client.config.client_side_validation && lan.nil?
621
+ fail ArgumentError, "Missing the required parameter 'lan' when calling LanApi.datacenters_lans_patch"
622
+ end
623
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
624
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_patch, must be smaller than or equal to 10.'
625
+ end
626
+
627
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
628
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_patch, must be greater than or equal to 0.'
629
+ end
630
+
631
+ # resource path
632
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
633
+
634
+ # query parameters
635
+ query_params = opts[:query_params] || {}
636
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
637
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
638
+
639
+ # header parameters
640
+ header_params = opts[:header_params] || {}
641
+ # HTTP header 'Accept' (if needed)
642
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
643
+ # HTTP header 'Content-Type'
644
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
645
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
646
+
647
+ # form parameters
648
+ form_params = opts[:form_params] || {}
649
+
650
+ # http body (model)
651
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lan)
652
+
653
+ # return_type
654
+ return_type = opts[:debug_return_type] || 'Lan'
655
+
656
+ # auth_names
657
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
658
+
659
+ new_options = opts.merge(
660
+ :operation => :"LanApi.datacenters_lans_patch",
661
+ :header_params => header_params,
662
+ :query_params => query_params,
663
+ :form_params => form_params,
664
+ :body => post_body,
665
+ :auth_names => auth_names,
666
+ :return_type => return_type
667
+ )
668
+
669
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ end
673
+ return data, status_code, headers
674
+ end
675
+
676
+ # Create a Lan
677
+ # Creates a LAN within the datacenter
678
+ # @param datacenter_id [String] The unique ID of the datacenter
679
+ # @param lan [LanPost] Lan to be created
680
+ # @param [Hash] opts the optional parameters
681
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
682
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
683
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
684
+ # @return [LanPost]
685
+ def datacenters_lans_post(datacenter_id, lan, opts = {})
686
+ data, _status_code, _headers = datacenters_lans_post_with_http_info(datacenter_id, lan, opts)
687
+ data
688
+ end
689
+
690
+ # Create a Lan
691
+ # Creates a LAN within the datacenter
692
+ # @param datacenter_id [String] The unique ID of the datacenter
693
+ # @param lan [LanPost] Lan to be created
694
+ # @param [Hash] opts the optional parameters
695
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
696
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
697
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
698
+ # @return [Array<(LanPost, Integer, Hash)>] LanPost data, response status code and response headers
699
+ def datacenters_lans_post_with_http_info(datacenter_id, lan, opts = {})
700
+ if @api_client.config.debugging
701
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_post ...'
702
+ end
703
+ # verify the required parameter 'datacenter_id' is set
704
+ if @api_client.config.client_side_validation && datacenter_id.nil?
705
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_post"
706
+ end
707
+ # verify the required parameter 'lan' is set
708
+ if @api_client.config.client_side_validation && lan.nil?
709
+ fail ArgumentError, "Missing the required parameter 'lan' when calling LanApi.datacenters_lans_post"
710
+ end
711
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
712
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_post, must be smaller than or equal to 10.'
713
+ end
714
+
715
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
716
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_post, must be greater than or equal to 0.'
717
+ end
718
+
719
+ # resource path
720
+ local_var_path = '/datacenters/{datacenterId}/lans'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))
721
+
722
+ # query parameters
723
+ query_params = opts[:query_params] || {}
724
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
725
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
726
+
727
+ # header parameters
728
+ header_params = opts[:header_params] || {}
729
+ # HTTP header 'Accept' (if needed)
730
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
731
+ # HTTP header 'Content-Type'
732
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
733
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
734
+
735
+ # form parameters
736
+ form_params = opts[:form_params] || {}
737
+
738
+ # http body (model)
739
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lan)
740
+
741
+ # return_type
742
+ return_type = opts[:debug_return_type] || 'LanPost'
743
+
744
+ # auth_names
745
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
746
+
747
+ new_options = opts.merge(
748
+ :operation => :"LanApi.datacenters_lans_post",
749
+ :header_params => header_params,
750
+ :query_params => query_params,
751
+ :form_params => form_params,
752
+ :body => post_body,
753
+ :auth_names => auth_names,
754
+ :return_type => return_type
755
+ )
756
+
757
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
758
+ if @api_client.config.debugging
759
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
760
+ end
761
+ return data, status_code, headers
762
+ end
763
+
764
+ # Modify a Lan
765
+ # You can use update attributes of a resource
766
+ # @param datacenter_id [String] The unique ID of the datacenter
767
+ # @param lan_id [String] The unique ID of the LAN
768
+ # @param lan [Lan] Modified Lan
769
+ # @param [Hash] opts the optional parameters
770
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
771
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0)
772
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
773
+ # @return [Lan]
774
+ def datacenters_lans_put(datacenter_id, lan_id, lan, opts = {})
775
+ data, _status_code, _headers = datacenters_lans_put_with_http_info(datacenter_id, lan_id, lan, opts)
776
+ data
777
+ end
778
+
779
+ # Modify a Lan
780
+ # You can use update attributes of a resource
781
+ # @param datacenter_id [String] The unique ID of the datacenter
782
+ # @param lan_id [String] The unique ID of the LAN
783
+ # @param lan [Lan] Modified Lan
784
+ # @param [Hash] opts the optional parameters
785
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
786
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on
787
+ # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
788
+ # @return [Array<(Lan, Integer, Hash)>] Lan data, response status code and response headers
789
+ def datacenters_lans_put_with_http_info(datacenter_id, lan_id, lan, opts = {})
790
+ if @api_client.config.debugging
791
+ @api_client.config.logger.debug 'Calling API: LanApi.datacenters_lans_put ...'
792
+ end
793
+ # verify the required parameter 'datacenter_id' is set
794
+ if @api_client.config.client_side_validation && datacenter_id.nil?
795
+ fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LanApi.datacenters_lans_put"
796
+ end
797
+ # verify the required parameter 'lan_id' is set
798
+ if @api_client.config.client_side_validation && lan_id.nil?
799
+ fail ArgumentError, "Missing the required parameter 'lan_id' when calling LanApi.datacenters_lans_put"
800
+ end
801
+ # verify the required parameter 'lan' is set
802
+ if @api_client.config.client_side_validation && lan.nil?
803
+ fail ArgumentError, "Missing the required parameter 'lan' when calling LanApi.datacenters_lans_put"
804
+ end
805
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
806
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_put, must be smaller than or equal to 10.'
807
+ end
808
+
809
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
810
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LanApi.datacenters_lans_put, must be greater than or equal to 0.'
811
+ end
812
+
813
+ # resource path
814
+ local_var_path = '/datacenters/{datacenterId}/lans/{lanId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'lanId' + '}', CGI.escape(lan_id.to_s))
815
+
816
+ # query parameters
817
+ query_params = opts[:query_params] || {}
818
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
819
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
820
+
821
+ # header parameters
822
+ header_params = opts[:header_params] || {}
823
+ # HTTP header 'Accept' (if needed)
824
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
825
+ # HTTP header 'Content-Type'
826
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
827
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
828
+
829
+ # form parameters
830
+ form_params = opts[:form_params] || {}
831
+
832
+ # http body (model)
833
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lan)
834
+
835
+ # return_type
836
+ return_type = opts[:debug_return_type] || 'Lan'
837
+
838
+ # auth_names
839
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
840
+
841
+ new_options = opts.merge(
842
+ :operation => :"LanApi.datacenters_lans_put",
843
+ :header_params => header_params,
844
+ :query_params => query_params,
845
+ :form_params => form_params,
846
+ :body => post_body,
847
+ :auth_names => auth_names,
848
+ :return_type => return_type
849
+ )
850
+
851
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
852
+ if @api_client.config.debugging
853
+ @api_client.config.logger.debug "API called: LanApi#datacenters_lans_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
854
+ end
855
+ return data, status_code, headers
856
+ end
857
+ end
858
+ end