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,432 @@
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 ImageApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete an Image
23
+ # Deletes the specified image. This operation is permitted on private image only.
24
+ # @param image_id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
27
+ # @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)
28
+ # @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
29
+ # @return [Object]
30
+ def images_delete(image_id, opts = {})
31
+ data, _status_code, _headers = images_delete_with_http_info(image_id, opts)
32
+ data
33
+ end
34
+
35
+ # Delete an Image
36
+ # Deletes the specified image. This operation is permitted on private image only.
37
+ # @param image_id [String]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
40
+ # @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
41
+ # @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
42
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
43
+ def images_delete_with_http_info(image_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ImageApi.images_delete ...'
46
+ end
47
+ # verify the required parameter 'image_id' is set
48
+ if @api_client.config.client_side_validation && image_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'image_id' when calling ImageApi.images_delete"
50
+ end
51
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
52
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_delete, must be smaller than or equal to 10.'
53
+ end
54
+
55
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
56
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_delete, must be greater than or equal to 0.'
57
+ end
58
+
59
+ # resource path
60
+ local_var_path = '/images/{imageId}'.sub('{' + 'imageId' + '}', CGI.escape(image_id.to_s))
61
+
62
+ # query parameters
63
+ query_params = opts[:query_params] || {}
64
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
65
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
71
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body]
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'Object'
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"ImageApi.images_delete",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: ImageApi#images_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Retrieve an Image
103
+ # Retrieves the attributes of a given image.
104
+ # @param image_id [String]
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
107
+ # @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)
108
+ # @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
109
+ # @return [Image]
110
+ def images_find_by_id(image_id, opts = {})
111
+ data, _status_code, _headers = images_find_by_id_with_http_info(image_id, opts)
112
+ data
113
+ end
114
+
115
+ # Retrieve an Image
116
+ # Retrieves the attributes of a given image.
117
+ # @param image_id [String]
118
+ # @param [Hash] opts the optional parameters
119
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
120
+ # @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
121
+ # @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
122
+ # @return [Array<(Image, Integer, Hash)>] Image data, response status code and response headers
123
+ def images_find_by_id_with_http_info(image_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: ImageApi.images_find_by_id ...'
126
+ end
127
+ # verify the required parameter 'image_id' is set
128
+ if @api_client.config.client_side_validation && image_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'image_id' when calling ImageApi.images_find_by_id"
130
+ end
131
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
132
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_find_by_id, must be smaller than or equal to 10.'
133
+ end
134
+
135
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
136
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_find_by_id, must be greater than or equal to 0.'
137
+ end
138
+
139
+ # resource path
140
+ local_var_path = '/images/{imageId}'.sub('{' + 'imageId' + '}', CGI.escape(image_id.to_s))
141
+
142
+ # query parameters
143
+ query_params = opts[:query_params] || {}
144
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
145
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body]
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type] || 'Image'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"ImageApi.images_find_by_id",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: ImageApi#images_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
182
+ # List Images
183
+ # Retrieve a list of images within the datacenter
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
186
+ # @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)
187
+ # @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
188
+ # @return [Images]
189
+ def images_get(opts = {})
190
+ data, _status_code, _headers = images_get_with_http_info(opts)
191
+ data
192
+ end
193
+
194
+ # List Images
195
+ # Retrieve a list of images within the datacenter
196
+ # @param [Hash] opts the optional parameters
197
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
198
+ # @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
199
+ # @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
200
+ # @return [Array<(Images, Integer, Hash)>] Images data, response status code and response headers
201
+ def images_get_with_http_info(opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: ImageApi.images_get ...'
204
+ end
205
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
206
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_get, must be smaller than or equal to 10.'
207
+ end
208
+
209
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
210
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_get, must be greater than or equal to 0.'
211
+ end
212
+
213
+ # resource path
214
+ local_var_path = '/images'
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
219
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
220
+
221
+ # header parameters
222
+ header_params = opts[:header_params] || {}
223
+ # HTTP header 'Accept' (if needed)
224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
226
+
227
+ # form parameters
228
+ form_params = opts[:form_params] || {}
229
+
230
+ # http body (model)
231
+ post_body = opts[:debug_body]
232
+
233
+ # return_type
234
+ return_type = opts[:debug_return_type] || 'Images'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"ImageApi.images_get",
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type
247
+ )
248
+
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: ImageApi#images_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Partially modify an Image
257
+ # You can use update attributes of a resource
258
+ # @param image_id [String]
259
+ # @param image [ImageProperties] Modified Image
260
+ # @param [Hash] opts the optional parameters
261
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
262
+ # @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)
263
+ # @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
264
+ # @return [Image]
265
+ def images_patch(image_id, image, opts = {})
266
+ data, _status_code, _headers = images_patch_with_http_info(image_id, image, opts)
267
+ data
268
+ end
269
+
270
+ # Partially modify an Image
271
+ # You can use update attributes of a resource
272
+ # @param image_id [String]
273
+ # @param image [ImageProperties] Modified Image
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
276
+ # @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
277
+ # @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
278
+ # @return [Array<(Image, Integer, Hash)>] Image data, response status code and response headers
279
+ def images_patch_with_http_info(image_id, image, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug 'Calling API: ImageApi.images_patch ...'
282
+ end
283
+ # verify the required parameter 'image_id' is set
284
+ if @api_client.config.client_side_validation && image_id.nil?
285
+ fail ArgumentError, "Missing the required parameter 'image_id' when calling ImageApi.images_patch"
286
+ end
287
+ # verify the required parameter 'image' is set
288
+ if @api_client.config.client_side_validation && image.nil?
289
+ fail ArgumentError, "Missing the required parameter 'image' when calling ImageApi.images_patch"
290
+ end
291
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
292
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_patch, must be smaller than or equal to 10.'
293
+ end
294
+
295
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
296
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_patch, must be greater than or equal to 0.'
297
+ end
298
+
299
+ # resource path
300
+ local_var_path = '/images/{imageId}'.sub('{' + 'imageId' + '}', CGI.escape(image_id.to_s))
301
+
302
+ # query parameters
303
+ query_params = opts[:query_params] || {}
304
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
305
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+ # HTTP header 'Content-Type'
312
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
313
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
314
+
315
+ # form parameters
316
+ form_params = opts[:form_params] || {}
317
+
318
+ # http body (model)
319
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(image)
320
+
321
+ # return_type
322
+ return_type = opts[:debug_return_type] || 'Image'
323
+
324
+ # auth_names
325
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
326
+
327
+ new_options = opts.merge(
328
+ :operation => :"ImageApi.images_patch",
329
+ :header_params => header_params,
330
+ :query_params => query_params,
331
+ :form_params => form_params,
332
+ :body => post_body,
333
+ :auth_names => auth_names,
334
+ :return_type => return_type
335
+ )
336
+
337
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
338
+ if @api_client.config.debugging
339
+ @api_client.config.logger.debug "API called: ImageApi#images_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
340
+ end
341
+ return data, status_code, headers
342
+ end
343
+
344
+ # Modify an Image
345
+ # You can use update attributes of a resource
346
+ # @param image_id [String]
347
+ # @param image [Image] Modified Image
348
+ # @param [Hash] opts the optional parameters
349
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
350
+ # @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)
351
+ # @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
352
+ # @return [Image]
353
+ def images_put(image_id, image, opts = {})
354
+ data, _status_code, _headers = images_put_with_http_info(image_id, image, opts)
355
+ data
356
+ end
357
+
358
+ # Modify an Image
359
+ # You can use update attributes of a resource
360
+ # @param image_id [String]
361
+ # @param image [Image] Modified Image
362
+ # @param [Hash] opts the optional parameters
363
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
364
+ # @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
365
+ # @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
366
+ # @return [Array<(Image, Integer, Hash)>] Image data, response status code and response headers
367
+ def images_put_with_http_info(image_id, image, opts = {})
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug 'Calling API: ImageApi.images_put ...'
370
+ end
371
+ # verify the required parameter 'image_id' is set
372
+ if @api_client.config.client_side_validation && image_id.nil?
373
+ fail ArgumentError, "Missing the required parameter 'image_id' when calling ImageApi.images_put"
374
+ end
375
+ # verify the required parameter 'image' is set
376
+ if @api_client.config.client_side_validation && image.nil?
377
+ fail ArgumentError, "Missing the required parameter 'image' when calling ImageApi.images_put"
378
+ end
379
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
380
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_put, must be smaller than or equal to 10.'
381
+ end
382
+
383
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
384
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling ImageApi.images_put, must be greater than or equal to 0.'
385
+ end
386
+
387
+ # resource path
388
+ local_var_path = '/images/{imageId}'.sub('{' + 'imageId' + '}', CGI.escape(image_id.to_s))
389
+
390
+ # query parameters
391
+ query_params = opts[:query_params] || {}
392
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
393
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+ # HTTP header 'Content-Type'
400
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
401
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
402
+
403
+ # form parameters
404
+ form_params = opts[:form_params] || {}
405
+
406
+ # http body (model)
407
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(image)
408
+
409
+ # return_type
410
+ return_type = opts[:debug_return_type] || 'Image'
411
+
412
+ # auth_names
413
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
414
+
415
+ new_options = opts.merge(
416
+ :operation => :"ImageApi.images_put",
417
+ :header_params => header_params,
418
+ :query_params => query_params,
419
+ :form_params => form_params,
420
+ :body => post_body,
421
+ :auth_names => auth_names,
422
+ :return_type => return_type
423
+ )
424
+
425
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
426
+ if @api_client.config.debugging
427
+ @api_client.config.logger.debug "API called: ImageApi#images_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
428
+ end
429
+ return data, status_code, headers
430
+ end
431
+ end
432
+ end
@@ -0,0 +1,514 @@
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 IPBlocksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete IP Block
23
+ # Removes the specific IP Block
24
+ # @param ipblock_id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
27
+ # @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)
28
+ # @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
29
+ # @return [Object]
30
+ def ipblocks_delete(ipblock_id, opts = {})
31
+ data, _status_code, _headers = ipblocks_delete_with_http_info(ipblock_id, opts)
32
+ data
33
+ end
34
+
35
+ # Delete IP Block
36
+ # Removes the specific IP Block
37
+ # @param ipblock_id [String]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
40
+ # @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
41
+ # @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
42
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
43
+ def ipblocks_delete_with_http_info(ipblock_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_delete ...'
46
+ end
47
+ # verify the required parameter 'ipblock_id' is set
48
+ if @api_client.config.client_side_validation && ipblock_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling IPBlocksApi.ipblocks_delete"
50
+ end
51
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
52
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_delete, must be smaller than or equal to 10.'
53
+ end
54
+
55
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
56
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_delete, must be greater than or equal to 0.'
57
+ end
58
+
59
+ # resource path
60
+ local_var_path = '/ipblocks/{ipblockId}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
61
+
62
+ # query parameters
63
+ query_params = opts[:query_params] || {}
64
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
65
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
71
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body]
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'Object'
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"IPBlocksApi.ipblocks_delete",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Retrieve an IP Block
103
+ # Retrieves the attributes of a given IP Block.
104
+ # @param ipblock_id [String]
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
107
+ # @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)
108
+ # @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
109
+ # @return [IpBlock]
110
+ def ipblocks_find_by_id(ipblock_id, opts = {})
111
+ data, _status_code, _headers = ipblocks_find_by_id_with_http_info(ipblock_id, opts)
112
+ data
113
+ end
114
+
115
+ # Retrieve an IP Block
116
+ # Retrieves the attributes of a given IP Block.
117
+ # @param ipblock_id [String]
118
+ # @param [Hash] opts the optional parameters
119
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
120
+ # @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
121
+ # @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
122
+ # @return [Array<(IpBlock, Integer, Hash)>] IpBlock data, response status code and response headers
123
+ def ipblocks_find_by_id_with_http_info(ipblock_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_find_by_id ...'
126
+ end
127
+ # verify the required parameter 'ipblock_id' is set
128
+ if @api_client.config.client_side_validation && ipblock_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling IPBlocksApi.ipblocks_find_by_id"
130
+ end
131
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
132
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_find_by_id, must be smaller than or equal to 10.'
133
+ end
134
+
135
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
136
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_find_by_id, must be greater than or equal to 0.'
137
+ end
138
+
139
+ # resource path
140
+ local_var_path = '/ipblocks/{ipblockId}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
141
+
142
+ # query parameters
143
+ query_params = opts[:query_params] || {}
144
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
145
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body]
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type] || 'IpBlock'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"IPBlocksApi.ipblocks_find_by_id",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
182
+ # List IP Blocks
183
+ # Retrieve a list of all reserved IP Blocks
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
186
+ # @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)
187
+ # @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
188
+ # @return [IpBlocks]
189
+ def ipblocks_get(opts = {})
190
+ data, _status_code, _headers = ipblocks_get_with_http_info(opts)
191
+ data
192
+ end
193
+
194
+ # List IP Blocks
195
+ # Retrieve a list of all reserved IP Blocks
196
+ # @param [Hash] opts the optional parameters
197
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
198
+ # @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
199
+ # @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
200
+ # @return [Array<(IpBlocks, Integer, Hash)>] IpBlocks data, response status code and response headers
201
+ def ipblocks_get_with_http_info(opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_get ...'
204
+ end
205
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
206
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_get, must be smaller than or equal to 10.'
207
+ end
208
+
209
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
210
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_get, must be greater than or equal to 0.'
211
+ end
212
+
213
+ # resource path
214
+ local_var_path = '/ipblocks'
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
219
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
220
+
221
+ # header parameters
222
+ header_params = opts[:header_params] || {}
223
+ # HTTP header 'Accept' (if needed)
224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
226
+
227
+ # form parameters
228
+ form_params = opts[:form_params] || {}
229
+
230
+ # http body (model)
231
+ post_body = opts[:debug_body]
232
+
233
+ # return_type
234
+ return_type = opts[:debug_return_type] || 'IpBlocks'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"IPBlocksApi.ipblocks_get",
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type
247
+ )
248
+
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Partially modify IP Block
257
+ # You can use update attributes of a resource
258
+ # @param ipblock_id [String]
259
+ # @param ipblock [IpBlockProperties] IP Block to be modified
260
+ # @param [Hash] opts the optional parameters
261
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
262
+ # @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)
263
+ # @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
264
+ # @return [IpBlock]
265
+ def ipblocks_patch(ipblock_id, ipblock, opts = {})
266
+ data, _status_code, _headers = ipblocks_patch_with_http_info(ipblock_id, ipblock, opts)
267
+ data
268
+ end
269
+
270
+ # Partially modify IP Block
271
+ # You can use update attributes of a resource
272
+ # @param ipblock_id [String]
273
+ # @param ipblock [IpBlockProperties] IP Block to be modified
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
276
+ # @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
277
+ # @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
278
+ # @return [Array<(IpBlock, Integer, Hash)>] IpBlock data, response status code and response headers
279
+ def ipblocks_patch_with_http_info(ipblock_id, ipblock, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_patch ...'
282
+ end
283
+ # verify the required parameter 'ipblock_id' is set
284
+ if @api_client.config.client_side_validation && ipblock_id.nil?
285
+ fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling IPBlocksApi.ipblocks_patch"
286
+ end
287
+ # verify the required parameter 'ipblock' is set
288
+ if @api_client.config.client_side_validation && ipblock.nil?
289
+ fail ArgumentError, "Missing the required parameter 'ipblock' when calling IPBlocksApi.ipblocks_patch"
290
+ end
291
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
292
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_patch, must be smaller than or equal to 10.'
293
+ end
294
+
295
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
296
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_patch, must be greater than or equal to 0.'
297
+ end
298
+
299
+ # resource path
300
+ local_var_path = '/ipblocks/{ipblockId}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
301
+
302
+ # query parameters
303
+ query_params = opts[:query_params] || {}
304
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
305
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+ # HTTP header 'Content-Type'
312
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
313
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
314
+
315
+ # form parameters
316
+ form_params = opts[:form_params] || {}
317
+
318
+ # http body (model)
319
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ipblock)
320
+
321
+ # return_type
322
+ return_type = opts[:debug_return_type] || 'IpBlock'
323
+
324
+ # auth_names
325
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
326
+
327
+ new_options = opts.merge(
328
+ :operation => :"IPBlocksApi.ipblocks_patch",
329
+ :header_params => header_params,
330
+ :query_params => query_params,
331
+ :form_params => form_params,
332
+ :body => post_body,
333
+ :auth_names => auth_names,
334
+ :return_type => return_type
335
+ )
336
+
337
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
338
+ if @api_client.config.debugging
339
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
340
+ end
341
+ return data, status_code, headers
342
+ end
343
+
344
+ # Reserve IP Block
345
+ # This will reserve a new IP Block
346
+ # @param ipblock [IpBlock] IP Block to be reserved
347
+ # @param [Hash] opts the optional parameters
348
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
349
+ # @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)
350
+ # @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
351
+ # @return [IpBlock]
352
+ def ipblocks_post(ipblock, opts = {})
353
+ data, _status_code, _headers = ipblocks_post_with_http_info(ipblock, opts)
354
+ data
355
+ end
356
+
357
+ # Reserve IP Block
358
+ # This will reserve a new IP Block
359
+ # @param ipblock [IpBlock] IP Block to be reserved
360
+ # @param [Hash] opts the optional parameters
361
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
362
+ # @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
363
+ # @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
364
+ # @return [Array<(IpBlock, Integer, Hash)>] IpBlock data, response status code and response headers
365
+ def ipblocks_post_with_http_info(ipblock, opts = {})
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_post ...'
368
+ end
369
+ # verify the required parameter 'ipblock' is set
370
+ if @api_client.config.client_side_validation && ipblock.nil?
371
+ fail ArgumentError, "Missing the required parameter 'ipblock' when calling IPBlocksApi.ipblocks_post"
372
+ end
373
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
374
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_post, must be smaller than or equal to 10.'
375
+ end
376
+
377
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
378
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_post, must be greater than or equal to 0.'
379
+ end
380
+
381
+ # resource path
382
+ local_var_path = '/ipblocks'
383
+
384
+ # query parameters
385
+ query_params = opts[:query_params] || {}
386
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
387
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
388
+
389
+ # header parameters
390
+ header_params = opts[:header_params] || {}
391
+ # HTTP header 'Accept' (if needed)
392
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
393
+ # HTTP header 'Content-Type'
394
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
395
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
396
+
397
+ # form parameters
398
+ form_params = opts[:form_params] || {}
399
+
400
+ # http body (model)
401
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ipblock)
402
+
403
+ # return_type
404
+ return_type = opts[:debug_return_type] || 'IpBlock'
405
+
406
+ # auth_names
407
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
408
+
409
+ new_options = opts.merge(
410
+ :operation => :"IPBlocksApi.ipblocks_post",
411
+ :header_params => header_params,
412
+ :query_params => query_params,
413
+ :form_params => form_params,
414
+ :body => post_body,
415
+ :auth_names => auth_names,
416
+ :return_type => return_type
417
+ )
418
+
419
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+
426
+ # Modify IP Block
427
+ # You can use update attributes of a resource
428
+ # @param ipblock_id [String]
429
+ # @param ipblock [IpBlock] IP Block to be modified
430
+ # @param [Hash] opts the optional parameters
431
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
432
+ # @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)
433
+ # @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
434
+ # @return [IpBlock]
435
+ def ipblocks_put(ipblock_id, ipblock, opts = {})
436
+ data, _status_code, _headers = ipblocks_put_with_http_info(ipblock_id, ipblock, opts)
437
+ data
438
+ end
439
+
440
+ # Modify IP Block
441
+ # You can use update attributes of a resource
442
+ # @param ipblock_id [String]
443
+ # @param ipblock [IpBlock] IP Block to be modified
444
+ # @param [Hash] opts the optional parameters
445
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
446
+ # @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
447
+ # @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
448
+ # @return [Array<(IpBlock, Integer, Hash)>] IpBlock data, response status code and response headers
449
+ def ipblocks_put_with_http_info(ipblock_id, ipblock, opts = {})
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ipblocks_put ...'
452
+ end
453
+ # verify the required parameter 'ipblock_id' is set
454
+ if @api_client.config.client_side_validation && ipblock_id.nil?
455
+ fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling IPBlocksApi.ipblocks_put"
456
+ end
457
+ # verify the required parameter 'ipblock' is set
458
+ if @api_client.config.client_side_validation && ipblock.nil?
459
+ fail ArgumentError, "Missing the required parameter 'ipblock' when calling IPBlocksApi.ipblocks_put"
460
+ end
461
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
462
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_put, must be smaller than or equal to 10.'
463
+ end
464
+
465
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
466
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling IPBlocksApi.ipblocks_put, must be greater than or equal to 0.'
467
+ end
468
+
469
+ # resource path
470
+ local_var_path = '/ipblocks/{ipblockId}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))
471
+
472
+ # query parameters
473
+ query_params = opts[:query_params] || {}
474
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
475
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
476
+
477
+ # header parameters
478
+ header_params = opts[:header_params] || {}
479
+ # HTTP header 'Accept' (if needed)
480
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
481
+ # HTTP header 'Content-Type'
482
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
483
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+
488
+ # http body (model)
489
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ipblock)
490
+
491
+ # return_type
492
+ return_type = opts[:debug_return_type] || 'IpBlock'
493
+
494
+ # auth_names
495
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
496
+
497
+ new_options = opts.merge(
498
+ :operation => :"IPBlocksApi.ipblocks_put",
499
+ :header_params => header_params,
500
+ :query_params => query_params,
501
+ :form_params => form_params,
502
+ :body => post_body,
503
+ :auth_names => auth_names,
504
+ :return_type => return_type
505
+ )
506
+
507
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: IPBlocksApi#ipblocks_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+ end
514
+ end