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 SnapshotApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a Snapshot
23
+ # Deletes the specified Snapshot.
24
+ # @param snapshot_id [String] The unique ID of the Snapshot
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 snapshots_delete(snapshot_id, opts = {})
31
+ data, _status_code, _headers = snapshots_delete_with_http_info(snapshot_id, opts)
32
+ data
33
+ end
34
+
35
+ # Delete a Snapshot
36
+ # Deletes the specified Snapshot.
37
+ # @param snapshot_id [String] The unique ID of the Snapshot
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 snapshots_delete_with_http_info(snapshot_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: SnapshotApi.snapshots_delete ...'
46
+ end
47
+ # verify the required parameter 'snapshot_id' is set
48
+ if @api_client.config.client_side_validation && snapshot_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling SnapshotApi.snapshots_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 SnapshotApi.snapshots_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 SnapshotApi.snapshots_delete, must be greater than or equal to 0.'
57
+ end
58
+
59
+ # resource path
60
+ local_var_path = '/snapshots/{snapshotId}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_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 => :"SnapshotApi.snapshots_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: SnapshotApi#snapshots_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Retrieve a Snapshot by its uuid.
103
+ # Retrieves the attributes of a given Snapshot.
104
+ # @param snapshot_id [String] The unique ID of the Snapshot
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 [Snapshot]
110
+ def snapshots_find_by_id(snapshot_id, opts = {})
111
+ data, _status_code, _headers = snapshots_find_by_id_with_http_info(snapshot_id, opts)
112
+ data
113
+ end
114
+
115
+ # Retrieve a Snapshot by its uuid.
116
+ # Retrieves the attributes of a given Snapshot.
117
+ # @param snapshot_id [String] The unique ID of the Snapshot
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<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers
123
+ def snapshots_find_by_id_with_http_info(snapshot_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: SnapshotApi.snapshots_find_by_id ...'
126
+ end
127
+ # verify the required parameter 'snapshot_id' is set
128
+ if @api_client.config.client_side_validation && snapshot_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling SnapshotApi.snapshots_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 SnapshotApi.snapshots_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 SnapshotApi.snapshots_find_by_id, must be greater than or equal to 0.'
137
+ end
138
+
139
+ # resource path
140
+ local_var_path = '/snapshots/{snapshotId}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_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] || 'Snapshot'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"SnapshotApi.snapshots_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: SnapshotApi#snapshots_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 Snapshots
183
+ # Retrieve a list of available snapshots.
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 [Snapshots]
189
+ def snapshots_get(opts = {})
190
+ data, _status_code, _headers = snapshots_get_with_http_info(opts)
191
+ data
192
+ end
193
+
194
+ # List Snapshots
195
+ # Retrieve a list of available snapshots.
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<(Snapshots, Integer, Hash)>] Snapshots data, response status code and response headers
201
+ def snapshots_get_with_http_info(opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: SnapshotApi.snapshots_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 SnapshotApi.snapshots_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 SnapshotApi.snapshots_get, must be greater than or equal to 0.'
211
+ end
212
+
213
+ # resource path
214
+ local_var_path = '/snapshots'
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] || 'Snapshots'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"SnapshotApi.snapshots_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: SnapshotApi#snapshots_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Partially modify a Snapshot
257
+ # You can use this method to update attributes of a Snapshot.
258
+ # @param snapshot_id [String] The unique ID of the Snapshot
259
+ # @param snapshot [SnapshotProperties] Modified Snapshot
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 [Snapshot]
265
+ def snapshots_patch(snapshot_id, snapshot, opts = {})
266
+ data, _status_code, _headers = snapshots_patch_with_http_info(snapshot_id, snapshot, opts)
267
+ data
268
+ end
269
+
270
+ # Partially modify a Snapshot
271
+ # You can use this method to update attributes of a Snapshot.
272
+ # @param snapshot_id [String] The unique ID of the Snapshot
273
+ # @param snapshot [SnapshotProperties] Modified Snapshot
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<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers
279
+ def snapshots_patch_with_http_info(snapshot_id, snapshot, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug 'Calling API: SnapshotApi.snapshots_patch ...'
282
+ end
283
+ # verify the required parameter 'snapshot_id' is set
284
+ if @api_client.config.client_side_validation && snapshot_id.nil?
285
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling SnapshotApi.snapshots_patch"
286
+ end
287
+ # verify the required parameter 'snapshot' is set
288
+ if @api_client.config.client_side_validation && snapshot.nil?
289
+ fail ArgumentError, "Missing the required parameter 'snapshot' when calling SnapshotApi.snapshots_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 SnapshotApi.snapshots_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 SnapshotApi.snapshots_patch, must be greater than or equal to 0.'
297
+ end
298
+
299
+ # resource path
300
+ local_var_path = '/snapshots/{snapshotId}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_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(snapshot)
320
+
321
+ # return_type
322
+ return_type = opts[:debug_return_type] || 'Snapshot'
323
+
324
+ # auth_names
325
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
326
+
327
+ new_options = opts.merge(
328
+ :operation => :"SnapshotApi.snapshots_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: SnapshotApi#snapshots_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
340
+ end
341
+ return data, status_code, headers
342
+ end
343
+
344
+ # Modify a Snapshot
345
+ # You can use update attributes of a resource
346
+ # @param snapshot_id [String] The unique ID of the Snapshot
347
+ # @param snapshot [Snapshot] Modified Snapshot
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 [Snapshot]
353
+ def snapshots_put(snapshot_id, snapshot, opts = {})
354
+ data, _status_code, _headers = snapshots_put_with_http_info(snapshot_id, snapshot, opts)
355
+ data
356
+ end
357
+
358
+ # Modify a Snapshot
359
+ # You can use update attributes of a resource
360
+ # @param snapshot_id [String] The unique ID of the Snapshot
361
+ # @param snapshot [Snapshot] Modified Snapshot
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<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers
367
+ def snapshots_put_with_http_info(snapshot_id, snapshot, opts = {})
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug 'Calling API: SnapshotApi.snapshots_put ...'
370
+ end
371
+ # verify the required parameter 'snapshot_id' is set
372
+ if @api_client.config.client_side_validation && snapshot_id.nil?
373
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling SnapshotApi.snapshots_put"
374
+ end
375
+ # verify the required parameter 'snapshot' is set
376
+ if @api_client.config.client_side_validation && snapshot.nil?
377
+ fail ArgumentError, "Missing the required parameter 'snapshot' when calling SnapshotApi.snapshots_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 SnapshotApi.snapshots_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 SnapshotApi.snapshots_put, must be greater than or equal to 0.'
385
+ end
386
+
387
+ # resource path
388
+ local_var_path = '/snapshots/{snapshotId}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_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(snapshot)
408
+
409
+ # return_type
410
+ return_type = opts[:debug_return_type] || 'Snapshot'
411
+
412
+ # auth_names
413
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
414
+
415
+ new_options = opts.merge(
416
+ :operation => :"SnapshotApi.snapshots_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: SnapshotApi#snapshots_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,2495 @@
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 UserManagementApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a Group
23
+ # Delete a group
24
+ # @param group_id [String] The unique ID of the group
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 um_groups_delete(group_id, opts = {})
31
+ data, _status_code, _headers = um_groups_delete_with_http_info(group_id, opts)
32
+ data
33
+ end
34
+
35
+ # Delete a Group
36
+ # Delete a group
37
+ # @param group_id [String] The unique ID of the group
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 um_groups_delete_with_http_info(group_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_delete ...'
46
+ end
47
+ # verify the required parameter 'group_id' is set
48
+ if @api_client.config.client_side_validation && group_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_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 UserManagementApi.um_groups_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 UserManagementApi.um_groups_delete, must be greater than or equal to 0.'
57
+ end
58
+
59
+ # resource path
60
+ local_var_path = '/um/groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_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 => :"UserManagementApi.um_groups_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: UserManagementApi#um_groups_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Retrieve a Group
103
+ # You can retrieve a group by using the group ID. This value can be found in the response body when a group is created or when you GET a list of groups.
104
+ # @param group_id [String] The unique ID of the group
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 [Group]
110
+ def um_groups_find_by_id(group_id, opts = {})
111
+ data, _status_code, _headers = um_groups_find_by_id_with_http_info(group_id, opts)
112
+ data
113
+ end
114
+
115
+ # Retrieve a Group
116
+ # You can retrieve a group by using the group ID. This value can be found in the response body when a group is created or when you GET a list of groups.
117
+ # @param group_id [String] The unique ID of the group
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<(Group, Integer, Hash)>] Group data, response status code and response headers
123
+ def um_groups_find_by_id_with_http_info(group_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_find_by_id ...'
126
+ end
127
+ # verify the required parameter 'group_id' is set
128
+ if @api_client.config.client_side_validation && group_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_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 UserManagementApi.um_groups_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 UserManagementApi.um_groups_find_by_id, must be greater than or equal to 0.'
137
+ end
138
+
139
+ # resource path
140
+ local_var_path = '/um/groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_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] || 'Group'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"UserManagementApi.um_groups_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: UserManagementApi#um_groups_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 All Groups.
183
+ # You can retrieve a complete list of all groups that you have access to
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 [Groups]
189
+ def um_groups_get(opts = {})
190
+ data, _status_code, _headers = um_groups_get_with_http_info(opts)
191
+ data
192
+ end
193
+
194
+ # List All Groups.
195
+ # You can retrieve a complete list of all groups that you have access to
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<(Groups, Integer, Hash)>] Groups data, response status code and response headers
201
+ def um_groups_get_with_http_info(opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_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 UserManagementApi.um_groups_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 UserManagementApi.um_groups_get, must be greater than or equal to 0.'
211
+ end
212
+
213
+ # resource path
214
+ local_var_path = '/um/groups'
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] || 'Groups'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"UserManagementApi.um_groups_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: UserManagementApi#um_groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Create a Group
257
+ # You can use this POST method to create a group
258
+ # @param group [Group] Group to be created
259
+ # @param [Hash] opts the optional parameters
260
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
261
+ # @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)
262
+ # @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
263
+ # @return [Group]
264
+ def um_groups_post(group, opts = {})
265
+ data, _status_code, _headers = um_groups_post_with_http_info(group, opts)
266
+ data
267
+ end
268
+
269
+ # Create a Group
270
+ # You can use this POST method to create a group
271
+ # @param group [Group] Group to be created
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
274
+ # @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
275
+ # @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
276
+ # @return [Array<(Group, Integer, Hash)>] Group data, response status code and response headers
277
+ def um_groups_post_with_http_info(group, opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_post ...'
280
+ end
281
+ # verify the required parameter 'group' is set
282
+ if @api_client.config.client_side_validation && group.nil?
283
+ fail ArgumentError, "Missing the required parameter 'group' when calling UserManagementApi.um_groups_post"
284
+ end
285
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
286
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_post, must be smaller than or equal to 10.'
287
+ end
288
+
289
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
290
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_post, must be greater than or equal to 0.'
291
+ end
292
+
293
+ # resource path
294
+ local_var_path = '/um/groups'
295
+
296
+ # query parameters
297
+ query_params = opts[:query_params] || {}
298
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
299
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
300
+
301
+ # header parameters
302
+ header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+ # HTTP header 'Content-Type'
306
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
307
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
308
+
309
+ # form parameters
310
+ form_params = opts[:form_params] || {}
311
+
312
+ # http body (model)
313
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(group)
314
+
315
+ # return_type
316
+ return_type = opts[:debug_return_type] || 'Group'
317
+
318
+ # auth_names
319
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
320
+
321
+ new_options = opts.merge(
322
+ :operation => :"UserManagementApi.um_groups_post",
323
+ :header_params => header_params,
324
+ :query_params => query_params,
325
+ :form_params => form_params,
326
+ :body => post_body,
327
+ :auth_names => auth_names,
328
+ :return_type => return_type
329
+ )
330
+
331
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
332
+ if @api_client.config.debugging
333
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
334
+ end
335
+ return data, status_code, headers
336
+ end
337
+
338
+ # Modify a group
339
+ # You can use this method to update properties of the group.
340
+ # @param group_id [String] The unique ID of the group
341
+ # @param group [Group] Modified properties of the Group
342
+ # @param [Hash] opts the optional parameters
343
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
344
+ # @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)
345
+ # @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
346
+ # @return [Group]
347
+ def um_groups_put(group_id, group, opts = {})
348
+ data, _status_code, _headers = um_groups_put_with_http_info(group_id, group, opts)
349
+ data
350
+ end
351
+
352
+ # Modify a group
353
+ # You can use this method to update properties of the group.
354
+ # @param group_id [String] The unique ID of the group
355
+ # @param group [Group] Modified properties of the Group
356
+ # @param [Hash] opts the optional parameters
357
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
358
+ # @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
359
+ # @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
360
+ # @return [Array<(Group, Integer, Hash)>] Group data, response status code and response headers
361
+ def um_groups_put_with_http_info(group_id, group, opts = {})
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_put ...'
364
+ end
365
+ # verify the required parameter 'group_id' is set
366
+ if @api_client.config.client_side_validation && group_id.nil?
367
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_put"
368
+ end
369
+ # verify the required parameter 'group' is set
370
+ if @api_client.config.client_side_validation && group.nil?
371
+ fail ArgumentError, "Missing the required parameter 'group' when calling UserManagementApi.um_groups_put"
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 UserManagementApi.um_groups_put, 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 UserManagementApi.um_groups_put, must be greater than or equal to 0.'
379
+ end
380
+
381
+ # resource path
382
+ local_var_path = '/um/groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
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(group)
402
+
403
+ # return_type
404
+ return_type = opts[:debug_return_type] || 'Group'
405
+
406
+ # auth_names
407
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
408
+
409
+ new_options = opts.merge(
410
+ :operation => :"UserManagementApi.um_groups_put",
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(:PUT, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+
426
+ # Retrieve resources assigned to a group
427
+ # @param group_id [String] The unique ID of the group
428
+ # @param [Hash] opts the optional parameters
429
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
430
+ # @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)
431
+ # @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
432
+ # @return [ResourceGroups]
433
+ def um_groups_resources_get(group_id, opts = {})
434
+ data, _status_code, _headers = um_groups_resources_get_with_http_info(group_id, opts)
435
+ data
436
+ end
437
+
438
+ # Retrieve resources assigned to a group
439
+ # @param group_id [String] The unique ID of the group
440
+ # @param [Hash] opts the optional parameters
441
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
442
+ # @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
443
+ # @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
444
+ # @return [Array<(ResourceGroups, Integer, Hash)>] ResourceGroups data, response status code and response headers
445
+ def um_groups_resources_get_with_http_info(group_id, opts = {})
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_resources_get ...'
448
+ end
449
+ # verify the required parameter 'group_id' is set
450
+ if @api_client.config.client_side_validation && group_id.nil?
451
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_resources_get"
452
+ end
453
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
454
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_resources_get, must be smaller than or equal to 10.'
455
+ end
456
+
457
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
458
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_resources_get, must be greater than or equal to 0.'
459
+ end
460
+
461
+ # resource path
462
+ local_var_path = '/um/groups/{groupId}/resources'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
463
+
464
+ # query parameters
465
+ query_params = opts[:query_params] || {}
466
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
467
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
468
+
469
+ # header parameters
470
+ header_params = opts[:header_params] || {}
471
+ # HTTP header 'Accept' (if needed)
472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
473
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
474
+
475
+ # form parameters
476
+ form_params = opts[:form_params] || {}
477
+
478
+ # http body (model)
479
+ post_body = opts[:debug_body]
480
+
481
+ # return_type
482
+ return_type = opts[:debug_return_type] || 'ResourceGroups'
483
+
484
+ # auth_names
485
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
486
+
487
+ new_options = opts.merge(
488
+ :operation => :"UserManagementApi.um_groups_resources_get",
489
+ :header_params => header_params,
490
+ :query_params => query_params,
491
+ :form_params => form_params,
492
+ :body => post_body,
493
+ :auth_names => auth_names,
494
+ :return_type => return_type
495
+ )
496
+
497
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_resources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
500
+ end
501
+ return data, status_code, headers
502
+ end
503
+
504
+ # Remove a resource from a group
505
+ # This will remove a resource from a group
506
+ # @param group_id [String]
507
+ # @param resource_id [String]
508
+ # @param [Hash] opts the optional parameters
509
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
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 (default to 0)
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 [Object]
513
+ def um_groups_shares_delete(group_id, resource_id, opts = {})
514
+ data, _status_code, _headers = um_groups_shares_delete_with_http_info(group_id, resource_id, opts)
515
+ data
516
+ end
517
+
518
+ # Remove a resource from a group
519
+ # This will remove a resource from a group
520
+ # @param group_id [String]
521
+ # @param resource_id [String]
522
+ # @param [Hash] opts the optional parameters
523
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
524
+ # @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
525
+ # @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
526
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
527
+ def um_groups_shares_delete_with_http_info(group_id, resource_id, opts = {})
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_shares_delete ...'
530
+ end
531
+ # verify the required parameter 'group_id' is set
532
+ if @api_client.config.client_side_validation && group_id.nil?
533
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_shares_delete"
534
+ end
535
+ # verify the required parameter 'resource_id' is set
536
+ if @api_client.config.client_side_validation && resource_id.nil?
537
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling UserManagementApi.um_groups_shares_delete"
538
+ end
539
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
540
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_delete, must be smaller than or equal to 10.'
541
+ end
542
+
543
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
544
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_delete, must be greater than or equal to 0.'
545
+ end
546
+
547
+ # resource path
548
+ local_var_path = '/um/groups/{groupId}/shares/{resourceId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s)).sub('{' + 'resourceId' + '}', CGI.escape(resource_id.to_s))
549
+
550
+ # query parameters
551
+ query_params = opts[:query_params] || {}
552
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
553
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
554
+
555
+ # header parameters
556
+ header_params = opts[:header_params] || {}
557
+ # HTTP header 'Accept' (if needed)
558
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
559
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
560
+
561
+ # form parameters
562
+ form_params = opts[:form_params] || {}
563
+
564
+ # http body (model)
565
+ post_body = opts[:debug_body]
566
+
567
+ # return_type
568
+ return_type = opts[:debug_return_type] || 'Object'
569
+
570
+ # auth_names
571
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
572
+
573
+ new_options = opts.merge(
574
+ :operation => :"UserManagementApi.um_groups_shares_delete",
575
+ :header_params => header_params,
576
+ :query_params => query_params,
577
+ :form_params => form_params,
578
+ :body => post_body,
579
+ :auth_names => auth_names,
580
+ :return_type => return_type
581
+ )
582
+
583
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
584
+ if @api_client.config.debugging
585
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_shares_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
586
+ end
587
+ return data, status_code, headers
588
+ end
589
+
590
+ # Retrieve a group share
591
+ # This will retrieve the properties of a group share.
592
+ # @param group_id [String]
593
+ # @param resource_id [String]
594
+ # @param [Hash] opts the optional parameters
595
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
596
+ # @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)
597
+ # @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
598
+ # @return [GroupShare]
599
+ def um_groups_shares_find_by_resource_id(group_id, resource_id, opts = {})
600
+ data, _status_code, _headers = um_groups_shares_find_by_resource_id_with_http_info(group_id, resource_id, opts)
601
+ data
602
+ end
603
+
604
+ # Retrieve a group share
605
+ # This will retrieve the properties of a group share.
606
+ # @param group_id [String]
607
+ # @param resource_id [String]
608
+ # @param [Hash] opts the optional parameters
609
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
610
+ # @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
611
+ # @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
612
+ # @return [Array<(GroupShare, Integer, Hash)>] GroupShare data, response status code and response headers
613
+ def um_groups_shares_find_by_resource_id_with_http_info(group_id, resource_id, opts = {})
614
+ if @api_client.config.debugging
615
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_shares_find_by_resource_id ...'
616
+ end
617
+ # verify the required parameter 'group_id' is set
618
+ if @api_client.config.client_side_validation && group_id.nil?
619
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_shares_find_by_resource_id"
620
+ end
621
+ # verify the required parameter 'resource_id' is set
622
+ if @api_client.config.client_side_validation && resource_id.nil?
623
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling UserManagementApi.um_groups_shares_find_by_resource_id"
624
+ end
625
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
626
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_find_by_resource_id, must be smaller than or equal to 10.'
627
+ end
628
+
629
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
630
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_find_by_resource_id, must be greater than or equal to 0.'
631
+ end
632
+
633
+ # resource path
634
+ local_var_path = '/um/groups/{groupId}/shares/{resourceId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s)).sub('{' + 'resourceId' + '}', CGI.escape(resource_id.to_s))
635
+
636
+ # query parameters
637
+ query_params = opts[:query_params] || {}
638
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
639
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
640
+
641
+ # header parameters
642
+ header_params = opts[:header_params] || {}
643
+ # HTTP header 'Accept' (if needed)
644
+ header_params['Accept'] = @api_client.select_header_accept(['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]
652
+
653
+ # return_type
654
+ return_type = opts[:debug_return_type] || 'GroupShare'
655
+
656
+ # auth_names
657
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
658
+
659
+ new_options = opts.merge(
660
+ :operation => :"UserManagementApi.um_groups_shares_find_by_resource_id",
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(:GET, local_var_path, new_options)
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_shares_find_by_resource_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ end
673
+ return data, status_code, headers
674
+ end
675
+
676
+ # List Group Shares
677
+ # You can retrieve a list of all resources along with their permissions of the group
678
+ # @param group_id [String]
679
+ # @param [Hash] opts the optional parameters
680
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
681
+ # @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)
682
+ # @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
683
+ # @return [GroupShares]
684
+ def um_groups_shares_get(group_id, opts = {})
685
+ data, _status_code, _headers = um_groups_shares_get_with_http_info(group_id, opts)
686
+ data
687
+ end
688
+
689
+ # List Group Shares
690
+ # You can retrieve a list of all resources along with their permissions of the group
691
+ # @param group_id [String]
692
+ # @param [Hash] opts the optional parameters
693
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
694
+ # @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
695
+ # @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
696
+ # @return [Array<(GroupShares, Integer, Hash)>] GroupShares data, response status code and response headers
697
+ def um_groups_shares_get_with_http_info(group_id, opts = {})
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_shares_get ...'
700
+ end
701
+ # verify the required parameter 'group_id' is set
702
+ if @api_client.config.client_side_validation && group_id.nil?
703
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_shares_get"
704
+ end
705
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
706
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_get, must be smaller than or equal to 10.'
707
+ end
708
+
709
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
710
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_get, must be greater than or equal to 0.'
711
+ end
712
+
713
+ # resource path
714
+ local_var_path = '/um/groups/{groupId}/shares'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
715
+
716
+ # query parameters
717
+ query_params = opts[:query_params] || {}
718
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
719
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
720
+
721
+ # header parameters
722
+ header_params = opts[:header_params] || {}
723
+ # HTTP header 'Accept' (if needed)
724
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
725
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
726
+
727
+ # form parameters
728
+ form_params = opts[:form_params] || {}
729
+
730
+ # http body (model)
731
+ post_body = opts[:debug_body]
732
+
733
+ # return_type
734
+ return_type = opts[:debug_return_type] || 'GroupShares'
735
+
736
+ # auth_names
737
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
738
+
739
+ new_options = opts.merge(
740
+ :operation => :"UserManagementApi.um_groups_shares_get",
741
+ :header_params => header_params,
742
+ :query_params => query_params,
743
+ :form_params => form_params,
744
+ :body => post_body,
745
+ :auth_names => auth_names,
746
+ :return_type => return_type
747
+ )
748
+
749
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_shares_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
752
+ end
753
+ return data, status_code, headers
754
+ end
755
+
756
+ # Add a resource to a group
757
+ # This will add a resource to the group.
758
+ # @param group_id [String]
759
+ # @param resource_id [String]
760
+ # @param resource [GroupShare] Resource to be added
761
+ # @param [Hash] opts the optional parameters
762
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
763
+ # @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)
764
+ # @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
765
+ # @return [GroupShare]
766
+ def um_groups_shares_post(group_id, resource_id, resource, opts = {})
767
+ data, _status_code, _headers = um_groups_shares_post_with_http_info(group_id, resource_id, resource, opts)
768
+ data
769
+ end
770
+
771
+ # Add a resource to a group
772
+ # This will add a resource to the group.
773
+ # @param group_id [String]
774
+ # @param resource_id [String]
775
+ # @param resource [GroupShare] Resource to be added
776
+ # @param [Hash] opts the optional parameters
777
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
778
+ # @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
779
+ # @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
780
+ # @return [Array<(GroupShare, Integer, Hash)>] GroupShare data, response status code and response headers
781
+ def um_groups_shares_post_with_http_info(group_id, resource_id, resource, opts = {})
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_shares_post ...'
784
+ end
785
+ # verify the required parameter 'group_id' is set
786
+ if @api_client.config.client_side_validation && group_id.nil?
787
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_shares_post"
788
+ end
789
+ # verify the required parameter 'resource_id' is set
790
+ if @api_client.config.client_side_validation && resource_id.nil?
791
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling UserManagementApi.um_groups_shares_post"
792
+ end
793
+ # verify the required parameter 'resource' is set
794
+ if @api_client.config.client_side_validation && resource.nil?
795
+ fail ArgumentError, "Missing the required parameter 'resource' when calling UserManagementApi.um_groups_shares_post"
796
+ end
797
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
798
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_post, must be smaller than or equal to 10.'
799
+ end
800
+
801
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
802
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_post, must be greater than or equal to 0.'
803
+ end
804
+
805
+ # resource path
806
+ local_var_path = '/um/groups/{groupId}/shares/{resourceId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s)).sub('{' + 'resourceId' + '}', CGI.escape(resource_id.to_s))
807
+
808
+ # query parameters
809
+ query_params = opts[:query_params] || {}
810
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
811
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
812
+
813
+ # header parameters
814
+ header_params = opts[:header_params] || {}
815
+ # HTTP header 'Accept' (if needed)
816
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
817
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
818
+
819
+ # form parameters
820
+ form_params = opts[:form_params] || {}
821
+
822
+ # http body (model)
823
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(resource)
824
+
825
+ # return_type
826
+ return_type = opts[:debug_return_type] || 'GroupShare'
827
+
828
+ # auth_names
829
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
830
+
831
+ new_options = opts.merge(
832
+ :operation => :"UserManagementApi.um_groups_shares_post",
833
+ :header_params => header_params,
834
+ :query_params => query_params,
835
+ :form_params => form_params,
836
+ :body => post_body,
837
+ :auth_names => auth_names,
838
+ :return_type => return_type
839
+ )
840
+
841
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
842
+ if @api_client.config.debugging
843
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_shares_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
844
+ end
845
+ return data, status_code, headers
846
+ end
847
+
848
+ # Modify resource permissions of a group
849
+ # You can use update resource permissions of a group. If empty body will be provided, no updates will happen, instead you will be returned the current permissions of resource in a group. In this case response code will be 200
850
+ # @param group_id [String]
851
+ # @param resource_id [String]
852
+ # @param resource [GroupShare] Modified Resource
853
+ # @param [Hash] opts the optional parameters
854
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
855
+ # @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)
856
+ # @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
857
+ # @return [GroupShare]
858
+ def um_groups_shares_put(group_id, resource_id, resource, opts = {})
859
+ data, _status_code, _headers = um_groups_shares_put_with_http_info(group_id, resource_id, resource, opts)
860
+ data
861
+ end
862
+
863
+ # Modify resource permissions of a group
864
+ # You can use update resource permissions of a group. If empty body will be provided, no updates will happen, instead you will be returned the current permissions of resource in a group. In this case response code will be 200
865
+ # @param group_id [String]
866
+ # @param resource_id [String]
867
+ # @param resource [GroupShare] Modified Resource
868
+ # @param [Hash] opts the optional parameters
869
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
870
+ # @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
871
+ # @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
872
+ # @return [Array<(GroupShare, Integer, Hash)>] GroupShare data, response status code and response headers
873
+ def um_groups_shares_put_with_http_info(group_id, resource_id, resource, opts = {})
874
+ if @api_client.config.debugging
875
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_shares_put ...'
876
+ end
877
+ # verify the required parameter 'group_id' is set
878
+ if @api_client.config.client_side_validation && group_id.nil?
879
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_shares_put"
880
+ end
881
+ # verify the required parameter 'resource_id' is set
882
+ if @api_client.config.client_side_validation && resource_id.nil?
883
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling UserManagementApi.um_groups_shares_put"
884
+ end
885
+ # verify the required parameter 'resource' is set
886
+ if @api_client.config.client_side_validation && resource.nil?
887
+ fail ArgumentError, "Missing the required parameter 'resource' when calling UserManagementApi.um_groups_shares_put"
888
+ end
889
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
890
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_put, must be smaller than or equal to 10.'
891
+ end
892
+
893
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
894
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_shares_put, must be greater than or equal to 0.'
895
+ end
896
+
897
+ # resource path
898
+ local_var_path = '/um/groups/{groupId}/shares/{resourceId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s)).sub('{' + 'resourceId' + '}', CGI.escape(resource_id.to_s))
899
+
900
+ # query parameters
901
+ query_params = opts[:query_params] || {}
902
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
903
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
904
+
905
+ # header parameters
906
+ header_params = opts[:header_params] || {}
907
+ # HTTP header 'Accept' (if needed)
908
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
909
+ # HTTP header 'Content-Type'
910
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
911
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
912
+
913
+ # form parameters
914
+ form_params = opts[:form_params] || {}
915
+
916
+ # http body (model)
917
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(resource)
918
+
919
+ # return_type
920
+ return_type = opts[:debug_return_type] || 'GroupShare'
921
+
922
+ # auth_names
923
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
924
+
925
+ new_options = opts.merge(
926
+ :operation => :"UserManagementApi.um_groups_shares_put",
927
+ :header_params => header_params,
928
+ :query_params => query_params,
929
+ :form_params => form_params,
930
+ :body => post_body,
931
+ :auth_names => auth_names,
932
+ :return_type => return_type
933
+ )
934
+
935
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_shares_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
938
+ end
939
+ return data, status_code, headers
940
+ end
941
+
942
+ # Remove a user from a group
943
+ # This will remove a user from a group
944
+ # @param group_id [String]
945
+ # @param user_id [String]
946
+ # @param [Hash] opts the optional parameters
947
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
948
+ # @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)
949
+ # @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
950
+ # @return [Object]
951
+ def um_groups_users_delete(group_id, user_id, opts = {})
952
+ data, _status_code, _headers = um_groups_users_delete_with_http_info(group_id, user_id, opts)
953
+ data
954
+ end
955
+
956
+ # Remove a user from a group
957
+ # This will remove a user from a group
958
+ # @param group_id [String]
959
+ # @param user_id [String]
960
+ # @param [Hash] opts the optional parameters
961
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
962
+ # @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
963
+ # @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
964
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
965
+ def um_groups_users_delete_with_http_info(group_id, user_id, opts = {})
966
+ if @api_client.config.debugging
967
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_users_delete ...'
968
+ end
969
+ # verify the required parameter 'group_id' is set
970
+ if @api_client.config.client_side_validation && group_id.nil?
971
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_users_delete"
972
+ end
973
+ # verify the required parameter 'user_id' is set
974
+ if @api_client.config.client_side_validation && user_id.nil?
975
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_groups_users_delete"
976
+ end
977
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
978
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_delete, must be smaller than or equal to 10.'
979
+ end
980
+
981
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
982
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_delete, must be greater than or equal to 0.'
983
+ end
984
+
985
+ # resource path
986
+ local_var_path = '/um/groups/{groupId}/users/{userId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
987
+
988
+ # query parameters
989
+ query_params = opts[:query_params] || {}
990
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
991
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
992
+
993
+ # header parameters
994
+ header_params = opts[:header_params] || {}
995
+ # HTTP header 'Accept' (if needed)
996
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
997
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
998
+
999
+ # form parameters
1000
+ form_params = opts[:form_params] || {}
1001
+
1002
+ # http body (model)
1003
+ post_body = opts[:debug_body]
1004
+
1005
+ # return_type
1006
+ return_type = opts[:debug_return_type] || 'Object'
1007
+
1008
+ # auth_names
1009
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1010
+
1011
+ new_options = opts.merge(
1012
+ :operation => :"UserManagementApi.um_groups_users_delete",
1013
+ :header_params => header_params,
1014
+ :query_params => query_params,
1015
+ :form_params => form_params,
1016
+ :body => post_body,
1017
+ :auth_names => auth_names,
1018
+ :return_type => return_type
1019
+ )
1020
+
1021
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1022
+ if @api_client.config.debugging
1023
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_users_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1024
+ end
1025
+ return data, status_code, headers
1026
+ end
1027
+
1028
+ # List Group Members
1029
+ # You can retrieve a list of users who are members of the group
1030
+ # @param group_id [String]
1031
+ # @param [Hash] opts the optional parameters
1032
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1033
+ # @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)
1034
+ # @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
1035
+ # @return [GroupMembers]
1036
+ def um_groups_users_get(group_id, opts = {})
1037
+ data, _status_code, _headers = um_groups_users_get_with_http_info(group_id, opts)
1038
+ data
1039
+ end
1040
+
1041
+ # List Group Members
1042
+ # You can retrieve a list of users who are members of the group
1043
+ # @param group_id [String]
1044
+ # @param [Hash] opts the optional parameters
1045
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1046
+ # @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
1047
+ # @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
1048
+ # @return [Array<(GroupMembers, Integer, Hash)>] GroupMembers data, response status code and response headers
1049
+ def um_groups_users_get_with_http_info(group_id, opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_users_get ...'
1052
+ end
1053
+ # verify the required parameter 'group_id' is set
1054
+ if @api_client.config.client_side_validation && group_id.nil?
1055
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_users_get"
1056
+ end
1057
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1058
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_get, must be smaller than or equal to 10.'
1059
+ end
1060
+
1061
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1062
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_get, must be greater than or equal to 0.'
1063
+ end
1064
+
1065
+ # resource path
1066
+ local_var_path = '/um/groups/{groupId}/users'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
1067
+
1068
+ # query parameters
1069
+ query_params = opts[:query_params] || {}
1070
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1071
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1072
+
1073
+ # header parameters
1074
+ header_params = opts[:header_params] || {}
1075
+ # HTTP header 'Accept' (if needed)
1076
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1077
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1078
+
1079
+ # form parameters
1080
+ form_params = opts[:form_params] || {}
1081
+
1082
+ # http body (model)
1083
+ post_body = opts[:debug_body]
1084
+
1085
+ # return_type
1086
+ return_type = opts[:debug_return_type] || 'GroupMembers'
1087
+
1088
+ # auth_names
1089
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1090
+
1091
+ new_options = opts.merge(
1092
+ :operation => :"UserManagementApi.um_groups_users_get",
1093
+ :header_params => header_params,
1094
+ :query_params => query_params,
1095
+ :form_params => form_params,
1096
+ :body => post_body,
1097
+ :auth_names => auth_names,
1098
+ :return_type => return_type
1099
+ )
1100
+
1101
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1102
+ if @api_client.config.debugging
1103
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1104
+ end
1105
+ return data, status_code, headers
1106
+ end
1107
+
1108
+ # Add a user to a group
1109
+ # This will attach a pre-existing user to a group.
1110
+ # @param group_id [String]
1111
+ # @param user [User] User to be added
1112
+ # @param [Hash] opts the optional parameters
1113
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1114
+ # @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)
1115
+ # @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
1116
+ # @return [User]
1117
+ def um_groups_users_post(group_id, user, opts = {})
1118
+ data, _status_code, _headers = um_groups_users_post_with_http_info(group_id, user, opts)
1119
+ data
1120
+ end
1121
+
1122
+ # Add a user to a group
1123
+ # This will attach a pre-existing user to a group.
1124
+ # @param group_id [String]
1125
+ # @param user [User] User to be added
1126
+ # @param [Hash] opts the optional parameters
1127
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1128
+ # @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
1129
+ # @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
1130
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1131
+ def um_groups_users_post_with_http_info(group_id, user, opts = {})
1132
+ if @api_client.config.debugging
1133
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_groups_users_post ...'
1134
+ end
1135
+ # verify the required parameter 'group_id' is set
1136
+ if @api_client.config.client_side_validation && group_id.nil?
1137
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling UserManagementApi.um_groups_users_post"
1138
+ end
1139
+ # verify the required parameter 'user' is set
1140
+ if @api_client.config.client_side_validation && user.nil?
1141
+ fail ArgumentError, "Missing the required parameter 'user' when calling UserManagementApi.um_groups_users_post"
1142
+ end
1143
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1144
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_post, must be smaller than or equal to 10.'
1145
+ end
1146
+
1147
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1148
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_groups_users_post, must be greater than or equal to 0.'
1149
+ end
1150
+
1151
+ # resource path
1152
+ local_var_path = '/um/groups/{groupId}/users'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
1153
+
1154
+ # query parameters
1155
+ query_params = opts[:query_params] || {}
1156
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1157
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1158
+
1159
+ # header parameters
1160
+ header_params = opts[:header_params] || {}
1161
+ # HTTP header 'Accept' (if needed)
1162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1163
+ # HTTP header 'Content-Type'
1164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1165
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1166
+
1167
+ # form parameters
1168
+ form_params = opts[:form_params] || {}
1169
+
1170
+ # http body (model)
1171
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
1172
+
1173
+ # return_type
1174
+ return_type = opts[:debug_return_type] || 'User'
1175
+
1176
+ # auth_names
1177
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1178
+
1179
+ new_options = opts.merge(
1180
+ :operation => :"UserManagementApi.um_groups_users_post",
1181
+ :header_params => header_params,
1182
+ :query_params => query_params,
1183
+ :form_params => form_params,
1184
+ :body => post_body,
1185
+ :auth_names => auth_names,
1186
+ :return_type => return_type
1187
+ )
1188
+
1189
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1190
+ if @api_client.config.debugging
1191
+ @api_client.config.logger.debug "API called: UserManagementApi#um_groups_users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1192
+ end
1193
+ return data, status_code, headers
1194
+ end
1195
+
1196
+ # Retrieve a list of Resources by type.
1197
+ # You can retrieve a list of resources by using the type. Allowed values are { datacenter, snapshot, image, ipblock, pcc, backupunit, k8s }. This value of resource type also be found in the response body when you GET a list of all resources.
1198
+ # @param resource_type [String] The resource Type
1199
+ # @param [Hash] opts the optional parameters
1200
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1201
+ # @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)
1202
+ # @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
1203
+ # @return [Resources]
1204
+ def um_resources_find_by_type(resource_type, opts = {})
1205
+ data, _status_code, _headers = um_resources_find_by_type_with_http_info(resource_type, opts)
1206
+ data
1207
+ end
1208
+
1209
+ # Retrieve a list of Resources by type.
1210
+ # You can retrieve a list of resources by using the type. Allowed values are { datacenter, snapshot, image, ipblock, pcc, backupunit, k8s }. This value of resource type also be found in the response body when you GET a list of all resources.
1211
+ # @param resource_type [String] The resource Type
1212
+ # @param [Hash] opts the optional parameters
1213
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1214
+ # @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
1215
+ # @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
1216
+ # @return [Array<(Resources, Integer, Hash)>] Resources data, response status code and response headers
1217
+ def um_resources_find_by_type_with_http_info(resource_type, opts = {})
1218
+ if @api_client.config.debugging
1219
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_resources_find_by_type ...'
1220
+ end
1221
+ # verify the required parameter 'resource_type' is set
1222
+ if @api_client.config.client_side_validation && resource_type.nil?
1223
+ fail ArgumentError, "Missing the required parameter 'resource_type' when calling UserManagementApi.um_resources_find_by_type"
1224
+ end
1225
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1226
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_find_by_type, must be smaller than or equal to 10.'
1227
+ end
1228
+
1229
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1230
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_find_by_type, must be greater than or equal to 0.'
1231
+ end
1232
+
1233
+ # resource path
1234
+ local_var_path = '/um/resources/{resourceType}'.sub('{' + 'resourceType' + '}', CGI.escape(resource_type.to_s))
1235
+
1236
+ # query parameters
1237
+ query_params = opts[:query_params] || {}
1238
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1239
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1240
+
1241
+ # header parameters
1242
+ header_params = opts[:header_params] || {}
1243
+ # HTTP header 'Accept' (if needed)
1244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1245
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1246
+
1247
+ # form parameters
1248
+ form_params = opts[:form_params] || {}
1249
+
1250
+ # http body (model)
1251
+ post_body = opts[:debug_body]
1252
+
1253
+ # return_type
1254
+ return_type = opts[:debug_return_type] || 'Resources'
1255
+
1256
+ # auth_names
1257
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1258
+
1259
+ new_options = opts.merge(
1260
+ :operation => :"UserManagementApi.um_resources_find_by_type",
1261
+ :header_params => header_params,
1262
+ :query_params => query_params,
1263
+ :form_params => form_params,
1264
+ :body => post_body,
1265
+ :auth_names => auth_names,
1266
+ :return_type => return_type
1267
+ )
1268
+
1269
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1270
+ if @api_client.config.debugging
1271
+ @api_client.config.logger.debug "API called: UserManagementApi#um_resources_find_by_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1272
+ end
1273
+ return data, status_code, headers
1274
+ end
1275
+
1276
+ # Retrieve a Resource by type.
1277
+ # You can retrieve a resource by using the type and its uuid. Allowed values for types are { datacenter, snapshot, image, ipblock, pcc, backupunit, k8s }. The value of resource type can also be found in the response body when you GET a list of all resources.
1278
+ # @param resource_type [String] The resource Type
1279
+ # @param resource_id [String] The resource Uuid
1280
+ # @param [Hash] opts the optional parameters
1281
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1282
+ # @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)
1283
+ # @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
1284
+ # @return [Resource]
1285
+ def um_resources_find_by_type_and_id(resource_type, resource_id, opts = {})
1286
+ data, _status_code, _headers = um_resources_find_by_type_and_id_with_http_info(resource_type, resource_id, opts)
1287
+ data
1288
+ end
1289
+
1290
+ # Retrieve a Resource by type.
1291
+ # You can retrieve a resource by using the type and its uuid. Allowed values for types are { datacenter, snapshot, image, ipblock, pcc, backupunit, k8s }. The value of resource type can also be found in the response body when you GET a list of all resources.
1292
+ # @param resource_type [String] The resource Type
1293
+ # @param resource_id [String] The resource Uuid
1294
+ # @param [Hash] opts the optional parameters
1295
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1296
+ # @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
1297
+ # @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
1298
+ # @return [Array<(Resource, Integer, Hash)>] Resource data, response status code and response headers
1299
+ def um_resources_find_by_type_and_id_with_http_info(resource_type, resource_id, opts = {})
1300
+ if @api_client.config.debugging
1301
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_resources_find_by_type_and_id ...'
1302
+ end
1303
+ # verify the required parameter 'resource_type' is set
1304
+ if @api_client.config.client_side_validation && resource_type.nil?
1305
+ fail ArgumentError, "Missing the required parameter 'resource_type' when calling UserManagementApi.um_resources_find_by_type_and_id"
1306
+ end
1307
+ # verify the required parameter 'resource_id' is set
1308
+ if @api_client.config.client_side_validation && resource_id.nil?
1309
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling UserManagementApi.um_resources_find_by_type_and_id"
1310
+ end
1311
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1312
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_find_by_type_and_id, must be smaller than or equal to 10.'
1313
+ end
1314
+
1315
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1316
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_find_by_type_and_id, must be greater than or equal to 0.'
1317
+ end
1318
+
1319
+ # resource path
1320
+ local_var_path = '/um/resources/{resourceType}/{resourceId}'.sub('{' + 'resourceType' + '}', CGI.escape(resource_type.to_s)).sub('{' + 'resourceId' + '}', CGI.escape(resource_id.to_s))
1321
+
1322
+ # query parameters
1323
+ query_params = opts[:query_params] || {}
1324
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1325
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1326
+
1327
+ # header parameters
1328
+ header_params = opts[:header_params] || {}
1329
+ # HTTP header 'Accept' (if needed)
1330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1331
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1332
+
1333
+ # form parameters
1334
+ form_params = opts[:form_params] || {}
1335
+
1336
+ # http body (model)
1337
+ post_body = opts[:debug_body]
1338
+
1339
+ # return_type
1340
+ return_type = opts[:debug_return_type] || 'Resource'
1341
+
1342
+ # auth_names
1343
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1344
+
1345
+ new_options = opts.merge(
1346
+ :operation => :"UserManagementApi.um_resources_find_by_type_and_id",
1347
+ :header_params => header_params,
1348
+ :query_params => query_params,
1349
+ :form_params => form_params,
1350
+ :body => post_body,
1351
+ :auth_names => auth_names,
1352
+ :return_type => return_type
1353
+ )
1354
+
1355
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1356
+ if @api_client.config.debugging
1357
+ @api_client.config.logger.debug "API called: UserManagementApi#um_resources_find_by_type_and_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1358
+ end
1359
+ return data, status_code, headers
1360
+ end
1361
+
1362
+ # List All Resources.
1363
+ # You can retrieve a complete list of all resources that you have access to
1364
+ # @param [Hash] opts the optional parameters
1365
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1366
+ # @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)
1367
+ # @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
1368
+ # @return [Resources]
1369
+ def um_resources_get(opts = {})
1370
+ data, _status_code, _headers = um_resources_get_with_http_info(opts)
1371
+ data
1372
+ end
1373
+
1374
+ # List All Resources.
1375
+ # You can retrieve a complete list of all resources that you have access to
1376
+ # @param [Hash] opts the optional parameters
1377
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1378
+ # @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
1379
+ # @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
1380
+ # @return [Array<(Resources, Integer, Hash)>] Resources data, response status code and response headers
1381
+ def um_resources_get_with_http_info(opts = {})
1382
+ if @api_client.config.debugging
1383
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_resources_get ...'
1384
+ end
1385
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1386
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_get, must be smaller than or equal to 10.'
1387
+ end
1388
+
1389
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1390
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_resources_get, must be greater than or equal to 0.'
1391
+ end
1392
+
1393
+ # resource path
1394
+ local_var_path = '/um/resources'
1395
+
1396
+ # query parameters
1397
+ query_params = opts[:query_params] || {}
1398
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1399
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1400
+
1401
+ # header parameters
1402
+ header_params = opts[:header_params] || {}
1403
+ # HTTP header 'Accept' (if needed)
1404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1405
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1406
+
1407
+ # form parameters
1408
+ form_params = opts[:form_params] || {}
1409
+
1410
+ # http body (model)
1411
+ post_body = opts[:debug_body]
1412
+
1413
+ # return_type
1414
+ return_type = opts[:debug_return_type] || 'Resources'
1415
+
1416
+ # auth_names
1417
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1418
+
1419
+ new_options = opts.merge(
1420
+ :operation => :"UserManagementApi.um_resources_get",
1421
+ :header_params => header_params,
1422
+ :query_params => query_params,
1423
+ :form_params => form_params,
1424
+ :body => post_body,
1425
+ :auth_names => auth_names,
1426
+ :return_type => return_type
1427
+ )
1428
+
1429
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1430
+ if @api_client.config.debugging
1431
+ @api_client.config.logger.debug "API called: UserManagementApi#um_resources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1432
+ end
1433
+ return data, status_code, headers
1434
+ end
1435
+
1436
+ # Delete a User
1437
+ # Delete a user
1438
+ # @param user_id [String] The unique ID of the user
1439
+ # @param [Hash] opts the optional parameters
1440
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1441
+ # @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)
1442
+ # @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
1443
+ # @return [Object]
1444
+ def um_users_delete(user_id, opts = {})
1445
+ data, _status_code, _headers = um_users_delete_with_http_info(user_id, opts)
1446
+ data
1447
+ end
1448
+
1449
+ # Delete a User
1450
+ # Delete a user
1451
+ # @param user_id [String] The unique ID of the user
1452
+ # @param [Hash] opts the optional parameters
1453
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1454
+ # @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
1455
+ # @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
1456
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1457
+ def um_users_delete_with_http_info(user_id, opts = {})
1458
+ if @api_client.config.debugging
1459
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_delete ...'
1460
+ end
1461
+ # verify the required parameter 'user_id' is set
1462
+ if @api_client.config.client_side_validation && user_id.nil?
1463
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_delete"
1464
+ end
1465
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1466
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_delete, must be smaller than or equal to 10.'
1467
+ end
1468
+
1469
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1470
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_delete, must be greater than or equal to 0.'
1471
+ end
1472
+
1473
+ # resource path
1474
+ local_var_path = '/um/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1475
+
1476
+ # query parameters
1477
+ query_params = opts[:query_params] || {}
1478
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1479
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1480
+
1481
+ # header parameters
1482
+ header_params = opts[:header_params] || {}
1483
+ # HTTP header 'Accept' (if needed)
1484
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1485
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1486
+
1487
+ # form parameters
1488
+ form_params = opts[:form_params] || {}
1489
+
1490
+ # http body (model)
1491
+ post_body = opts[:debug_body]
1492
+
1493
+ # return_type
1494
+ return_type = opts[:debug_return_type] || 'Object'
1495
+
1496
+ # auth_names
1497
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1498
+
1499
+ new_options = opts.merge(
1500
+ :operation => :"UserManagementApi.um_users_delete",
1501
+ :header_params => header_params,
1502
+ :query_params => query_params,
1503
+ :form_params => form_params,
1504
+ :body => post_body,
1505
+ :auth_names => auth_names,
1506
+ :return_type => return_type
1507
+ )
1508
+
1509
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1510
+ if @api_client.config.debugging
1511
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1512
+ end
1513
+ return data, status_code, headers
1514
+ end
1515
+
1516
+ # Retrieve a User
1517
+ # You can retrieve user details by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1518
+ # @param user_id [String] The unique ID of the user
1519
+ # @param [Hash] opts the optional parameters
1520
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1521
+ # @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)
1522
+ # @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
1523
+ # @return [User]
1524
+ def um_users_find_by_id(user_id, opts = {})
1525
+ data, _status_code, _headers = um_users_find_by_id_with_http_info(user_id, opts)
1526
+ data
1527
+ end
1528
+
1529
+ # Retrieve a User
1530
+ # You can retrieve user details by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1531
+ # @param user_id [String] The unique ID of the user
1532
+ # @param [Hash] opts the optional parameters
1533
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1534
+ # @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
1535
+ # @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
1536
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1537
+ def um_users_find_by_id_with_http_info(user_id, opts = {})
1538
+ if @api_client.config.debugging
1539
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_find_by_id ...'
1540
+ end
1541
+ # verify the required parameter 'user_id' is set
1542
+ if @api_client.config.client_side_validation && user_id.nil?
1543
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_find_by_id"
1544
+ end
1545
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1546
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_find_by_id, must be smaller than or equal to 10.'
1547
+ end
1548
+
1549
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1550
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_find_by_id, must be greater than or equal to 0.'
1551
+ end
1552
+
1553
+ # resource path
1554
+ local_var_path = '/um/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1555
+
1556
+ # query parameters
1557
+ query_params = opts[:query_params] || {}
1558
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1559
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1560
+
1561
+ # header parameters
1562
+ header_params = opts[:header_params] || {}
1563
+ # HTTP header 'Accept' (if needed)
1564
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1565
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1566
+
1567
+ # form parameters
1568
+ form_params = opts[:form_params] || {}
1569
+
1570
+ # http body (model)
1571
+ post_body = opts[:debug_body]
1572
+
1573
+ # return_type
1574
+ return_type = opts[:debug_return_type] || 'User'
1575
+
1576
+ # auth_names
1577
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1578
+
1579
+ new_options = opts.merge(
1580
+ :operation => :"UserManagementApi.um_users_find_by_id",
1581
+ :header_params => header_params,
1582
+ :query_params => query_params,
1583
+ :form_params => form_params,
1584
+ :body => post_body,
1585
+ :auth_names => auth_names,
1586
+ :return_type => return_type
1587
+ )
1588
+
1589
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1590
+ if @api_client.config.debugging
1591
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1592
+ end
1593
+ return data, status_code, headers
1594
+ end
1595
+
1596
+ # List all Users
1597
+ # You can retrieve a complete list of users under your account
1598
+ # @param [Hash] opts the optional parameters
1599
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1600
+ # @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)
1601
+ # @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
1602
+ # @return [Users]
1603
+ def um_users_get(opts = {})
1604
+ data, _status_code, _headers = um_users_get_with_http_info(opts)
1605
+ data
1606
+ end
1607
+
1608
+ # List all Users
1609
+ # You can retrieve a complete list of users under your account
1610
+ # @param [Hash] opts the optional parameters
1611
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1612
+ # @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
1613
+ # @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
1614
+ # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
1615
+ def um_users_get_with_http_info(opts = {})
1616
+ if @api_client.config.debugging
1617
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_get ...'
1618
+ end
1619
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1620
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_get, must be smaller than or equal to 10.'
1621
+ end
1622
+
1623
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1624
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_get, must be greater than or equal to 0.'
1625
+ end
1626
+
1627
+ # resource path
1628
+ local_var_path = '/um/users'
1629
+
1630
+ # query parameters
1631
+ query_params = opts[:query_params] || {}
1632
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1633
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1634
+
1635
+ # header parameters
1636
+ header_params = opts[:header_params] || {}
1637
+ # HTTP header 'Accept' (if needed)
1638
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1639
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1640
+
1641
+ # form parameters
1642
+ form_params = opts[:form_params] || {}
1643
+
1644
+ # http body (model)
1645
+ post_body = opts[:debug_body]
1646
+
1647
+ # return_type
1648
+ return_type = opts[:debug_return_type] || 'Users'
1649
+
1650
+ # auth_names
1651
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1652
+
1653
+ new_options = opts.merge(
1654
+ :operation => :"UserManagementApi.um_users_get",
1655
+ :header_params => header_params,
1656
+ :query_params => query_params,
1657
+ :form_params => form_params,
1658
+ :body => post_body,
1659
+ :auth_names => auth_names,
1660
+ :return_type => return_type
1661
+ )
1662
+
1663
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1664
+ if @api_client.config.debugging
1665
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1666
+ end
1667
+ return data, status_code, headers
1668
+ end
1669
+
1670
+ # Retrieve a User's group resources
1671
+ # You can retrieve group resources of user by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1672
+ # @param user_id [String] The unique ID of the user
1673
+ # @param [Hash] opts the optional parameters
1674
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1675
+ # @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)
1676
+ # @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
1677
+ # @return [ResourceGroups]
1678
+ def um_users_groups_get(user_id, opts = {})
1679
+ data, _status_code, _headers = um_users_groups_get_with_http_info(user_id, opts)
1680
+ data
1681
+ end
1682
+
1683
+ # Retrieve a User&#39;s group resources
1684
+ # You can retrieve group resources of user by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1685
+ # @param user_id [String] The unique ID of the user
1686
+ # @param [Hash] opts the optional parameters
1687
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1688
+ # @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
1689
+ # @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
1690
+ # @return [Array<(ResourceGroups, Integer, Hash)>] ResourceGroups data, response status code and response headers
1691
+ def um_users_groups_get_with_http_info(user_id, opts = {})
1692
+ if @api_client.config.debugging
1693
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_groups_get ...'
1694
+ end
1695
+ # verify the required parameter 'user_id' is set
1696
+ if @api_client.config.client_side_validation && user_id.nil?
1697
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_groups_get"
1698
+ end
1699
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1700
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_groups_get, must be smaller than or equal to 10.'
1701
+ end
1702
+
1703
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1704
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_groups_get, must be greater than or equal to 0.'
1705
+ end
1706
+
1707
+ # resource path
1708
+ local_var_path = '/um/users/{userId}/groups'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1709
+
1710
+ # query parameters
1711
+ query_params = opts[:query_params] || {}
1712
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1713
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1714
+
1715
+ # header parameters
1716
+ header_params = opts[:header_params] || {}
1717
+ # HTTP header 'Accept' (if needed)
1718
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1719
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1720
+
1721
+ # form parameters
1722
+ form_params = opts[:form_params] || {}
1723
+
1724
+ # http body (model)
1725
+ post_body = opts[:debug_body]
1726
+
1727
+ # return_type
1728
+ return_type = opts[:debug_return_type] || 'ResourceGroups'
1729
+
1730
+ # auth_names
1731
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1732
+
1733
+ new_options = opts.merge(
1734
+ :operation => :"UserManagementApi.um_users_groups_get",
1735
+ :header_params => header_params,
1736
+ :query_params => query_params,
1737
+ :form_params => form_params,
1738
+ :body => post_body,
1739
+ :auth_names => auth_names,
1740
+ :return_type => return_type
1741
+ )
1742
+
1743
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1744
+ if @api_client.config.debugging
1745
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1746
+ end
1747
+ return data, status_code, headers
1748
+ end
1749
+
1750
+ # Retrieve a User's own resources
1751
+ # You can retrieve resources owned by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1752
+ # @param user_id [String] The unique ID of the user
1753
+ # @param [Hash] opts the optional parameters
1754
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1755
+ # @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)
1756
+ # @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
1757
+ # @return [ResourcesUsers]
1758
+ def um_users_owns_get(user_id, opts = {})
1759
+ data, _status_code, _headers = um_users_owns_get_with_http_info(user_id, opts)
1760
+ data
1761
+ end
1762
+
1763
+ # Retrieve a User&#39;s own resources
1764
+ # You can retrieve resources owned by using the users ID. This value can be found in the response body when a user is created or when you GET a list of users.
1765
+ # @param user_id [String] The unique ID of the user
1766
+ # @param [Hash] opts the optional parameters
1767
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1768
+ # @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
1769
+ # @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
1770
+ # @return [Array<(ResourcesUsers, Integer, Hash)>] ResourcesUsers data, response status code and response headers
1771
+ def um_users_owns_get_with_http_info(user_id, opts = {})
1772
+ if @api_client.config.debugging
1773
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_owns_get ...'
1774
+ end
1775
+ # verify the required parameter 'user_id' is set
1776
+ if @api_client.config.client_side_validation && user_id.nil?
1777
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_owns_get"
1778
+ end
1779
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1780
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_owns_get, must be smaller than or equal to 10.'
1781
+ end
1782
+
1783
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1784
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_owns_get, must be greater than or equal to 0.'
1785
+ end
1786
+
1787
+ # resource path
1788
+ local_var_path = '/um/users/{userId}/owns'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1789
+
1790
+ # query parameters
1791
+ query_params = opts[:query_params] || {}
1792
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1793
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1794
+
1795
+ # header parameters
1796
+ header_params = opts[:header_params] || {}
1797
+ # HTTP header 'Accept' (if needed)
1798
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1799
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1800
+
1801
+ # form parameters
1802
+ form_params = opts[:form_params] || {}
1803
+
1804
+ # http body (model)
1805
+ post_body = opts[:debug_body]
1806
+
1807
+ # return_type
1808
+ return_type = opts[:debug_return_type] || 'ResourcesUsers'
1809
+
1810
+ # auth_names
1811
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1812
+
1813
+ new_options = opts.merge(
1814
+ :operation => :"UserManagementApi.um_users_owns_get",
1815
+ :header_params => header_params,
1816
+ :query_params => query_params,
1817
+ :form_params => form_params,
1818
+ :body => post_body,
1819
+ :auth_names => auth_names,
1820
+ :return_type => return_type
1821
+ )
1822
+
1823
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1824
+ if @api_client.config.debugging
1825
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_owns_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1826
+ end
1827
+ return data, status_code, headers
1828
+ end
1829
+
1830
+ # Create a user
1831
+ # You can use this POST method to create a user
1832
+ # @param user [User] User to be created
1833
+ # @param [Hash] opts the optional parameters
1834
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1835
+ # @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)
1836
+ # @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
1837
+ # @return [User]
1838
+ def um_users_post(user, opts = {})
1839
+ data, _status_code, _headers = um_users_post_with_http_info(user, opts)
1840
+ data
1841
+ end
1842
+
1843
+ # Create a user
1844
+ # You can use this POST method to create a user
1845
+ # @param user [User] User to be created
1846
+ # @param [Hash] opts the optional parameters
1847
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1848
+ # @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
1849
+ # @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
1850
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1851
+ def um_users_post_with_http_info(user, opts = {})
1852
+ if @api_client.config.debugging
1853
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_post ...'
1854
+ end
1855
+ # verify the required parameter 'user' is set
1856
+ if @api_client.config.client_side_validation && user.nil?
1857
+ fail ArgumentError, "Missing the required parameter 'user' when calling UserManagementApi.um_users_post"
1858
+ end
1859
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1860
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_post, must be smaller than or equal to 10.'
1861
+ end
1862
+
1863
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1864
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_post, must be greater than or equal to 0.'
1865
+ end
1866
+
1867
+ # resource path
1868
+ local_var_path = '/um/users'
1869
+
1870
+ # query parameters
1871
+ query_params = opts[:query_params] || {}
1872
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1873
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1874
+
1875
+ # header parameters
1876
+ header_params = opts[:header_params] || {}
1877
+ # HTTP header 'Accept' (if needed)
1878
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1879
+ # HTTP header 'Content-Type'
1880
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1881
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1882
+
1883
+ # form parameters
1884
+ form_params = opts[:form_params] || {}
1885
+
1886
+ # http body (model)
1887
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
1888
+
1889
+ # return_type
1890
+ return_type = opts[:debug_return_type] || 'User'
1891
+
1892
+ # auth_names
1893
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1894
+
1895
+ new_options = opts.merge(
1896
+ :operation => :"UserManagementApi.um_users_post",
1897
+ :header_params => header_params,
1898
+ :query_params => query_params,
1899
+ :form_params => form_params,
1900
+ :body => post_body,
1901
+ :auth_names => auth_names,
1902
+ :return_type => return_type
1903
+ )
1904
+
1905
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1906
+ if @api_client.config.debugging
1907
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1908
+ end
1909
+ return data, status_code, headers
1910
+ end
1911
+
1912
+ # Modify a user
1913
+ # You can use update attributes of a User
1914
+ # @param user_id [String]
1915
+ # @param user [User] Modified user
1916
+ # @param [Hash] opts the optional parameters
1917
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1918
+ # @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)
1919
+ # @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
1920
+ # @return [User]
1921
+ def um_users_put(user_id, user, opts = {})
1922
+ data, _status_code, _headers = um_users_put_with_http_info(user_id, user, opts)
1923
+ data
1924
+ end
1925
+
1926
+ # Modify a user
1927
+ # You can use update attributes of a User
1928
+ # @param user_id [String]
1929
+ # @param user [User] Modified user
1930
+ # @param [Hash] opts the optional parameters
1931
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1932
+ # @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
1933
+ # @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
1934
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1935
+ def um_users_put_with_http_info(user_id, user, opts = {})
1936
+ if @api_client.config.debugging
1937
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_put ...'
1938
+ end
1939
+ # verify the required parameter 'user_id' is set
1940
+ if @api_client.config.client_side_validation && user_id.nil?
1941
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_put"
1942
+ end
1943
+ # verify the required parameter 'user' is set
1944
+ if @api_client.config.client_side_validation && user.nil?
1945
+ fail ArgumentError, "Missing the required parameter 'user' when calling UserManagementApi.um_users_put"
1946
+ end
1947
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1948
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_put, must be smaller than or equal to 10.'
1949
+ end
1950
+
1951
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1952
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_put, must be greater than or equal to 0.'
1953
+ end
1954
+
1955
+ # resource path
1956
+ local_var_path = '/um/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1957
+
1958
+ # query parameters
1959
+ query_params = opts[:query_params] || {}
1960
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1961
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1962
+
1963
+ # header parameters
1964
+ header_params = opts[:header_params] || {}
1965
+ # HTTP header 'Accept' (if needed)
1966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1967
+ # HTTP header 'Content-Type'
1968
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1969
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1970
+
1971
+ # form parameters
1972
+ form_params = opts[:form_params] || {}
1973
+
1974
+ # http body (model)
1975
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
1976
+
1977
+ # return_type
1978
+ return_type = opts[:debug_return_type] || 'User'
1979
+
1980
+ # auth_names
1981
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1982
+
1983
+ new_options = opts.merge(
1984
+ :operation => :"UserManagementApi.um_users_put",
1985
+ :header_params => header_params,
1986
+ :query_params => query_params,
1987
+ :form_params => form_params,
1988
+ :body => post_body,
1989
+ :auth_names => auth_names,
1990
+ :return_type => return_type
1991
+ )
1992
+
1993
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1994
+ if @api_client.config.debugging
1995
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1996
+ end
1997
+ return data, status_code, headers
1998
+ end
1999
+
2000
+ # Delete a S3 key
2001
+ # Delete a S3 key
2002
+ # @param user_id [String] The unique ID of the user
2003
+ # @param key_id [String] The unique access key ID of the S3 key
2004
+ # @param [Hash] opts the optional parameters
2005
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2006
+ # @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)
2007
+ # @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
2008
+ # @return [Object]
2009
+ def um_users_s3keys_delete(user_id, key_id, opts = {})
2010
+ data, _status_code, _headers = um_users_s3keys_delete_with_http_info(user_id, key_id, opts)
2011
+ data
2012
+ end
2013
+
2014
+ # Delete a S3 key
2015
+ # Delete a S3 key
2016
+ # @param user_id [String] The unique ID of the user
2017
+ # @param key_id [String] The unique access key ID of the S3 key
2018
+ # @param [Hash] opts the optional parameters
2019
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2020
+ # @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
2021
+ # @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
2022
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
2023
+ def um_users_s3keys_delete_with_http_info(user_id, key_id, opts = {})
2024
+ if @api_client.config.debugging
2025
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_delete ...'
2026
+ end
2027
+ # verify the required parameter 'user_id' is set
2028
+ if @api_client.config.client_side_validation && user_id.nil?
2029
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_delete"
2030
+ end
2031
+ # verify the required parameter 'key_id' is set
2032
+ if @api_client.config.client_side_validation && key_id.nil?
2033
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_delete"
2034
+ end
2035
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
2036
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_delete, must be smaller than or equal to 10.'
2037
+ end
2038
+
2039
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
2040
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_delete, must be greater than or equal to 0.'
2041
+ end
2042
+
2043
+ # resource path
2044
+ local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
2045
+
2046
+ # query parameters
2047
+ query_params = opts[:query_params] || {}
2048
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2049
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
2050
+
2051
+ # header parameters
2052
+ header_params = opts[:header_params] || {}
2053
+ # HTTP header 'Accept' (if needed)
2054
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2055
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2056
+
2057
+ # form parameters
2058
+ form_params = opts[:form_params] || {}
2059
+
2060
+ # http body (model)
2061
+ post_body = opts[:debug_body]
2062
+
2063
+ # return_type
2064
+ return_type = opts[:debug_return_type] || 'Object'
2065
+
2066
+ # auth_names
2067
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2068
+
2069
+ new_options = opts.merge(
2070
+ :operation => :"UserManagementApi.um_users_s3keys_delete",
2071
+ :header_params => header_params,
2072
+ :query_params => query_params,
2073
+ :form_params => form_params,
2074
+ :body => post_body,
2075
+ :auth_names => auth_names,
2076
+ :return_type => return_type
2077
+ )
2078
+
2079
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2080
+ if @api_client.config.debugging
2081
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2082
+ end
2083
+ return data, status_code, headers
2084
+ end
2085
+
2086
+ # Retrieve given S3 key belonging to the given User
2087
+ # You can retrieve S3 key belonging to the given User. This user Id can be found in the response body when a user is created or when you GET a list of users. The key Id can be found in the response body when a S3 key is created or when you GET a list of all S3 keys of a user
2088
+ # @param user_id [String] The unique ID of the user
2089
+ # @param key_id [String] The unique access key ID of the S3 key
2090
+ # @param [Hash] opts the optional parameters
2091
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2092
+ # @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)
2093
+ # @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
2094
+ # @return [S3Key]
2095
+ def um_users_s3keys_find_by_key_id(user_id, key_id, opts = {})
2096
+ data, _status_code, _headers = um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, opts)
2097
+ data
2098
+ end
2099
+
2100
+ # Retrieve given S3 key belonging to the given User
2101
+ # You can retrieve S3 key belonging to the given User. This user Id can be found in the response body when a user is created or when you GET a list of users. The key Id can be found in the response body when a S3 key is created or when you GET a list of all S3 keys of a user
2102
+ # @param user_id [String] The unique ID of the user
2103
+ # @param key_id [String] The unique access key ID of the S3 key
2104
+ # @param [Hash] opts the optional parameters
2105
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2106
+ # @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
2107
+ # @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
2108
+ # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
2109
+ def um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, opts = {})
2110
+ if @api_client.config.debugging
2111
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_find_by_key_id ...'
2112
+ end
2113
+ # verify the required parameter 'user_id' is set
2114
+ if @api_client.config.client_side_validation && user_id.nil?
2115
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_find_by_key_id"
2116
+ end
2117
+ # verify the required parameter 'key_id' is set
2118
+ if @api_client.config.client_side_validation && key_id.nil?
2119
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_find_by_key_id"
2120
+ end
2121
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
2122
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_find_by_key_id, must be smaller than or equal to 10.'
2123
+ end
2124
+
2125
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
2126
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_find_by_key_id, must be greater than or equal to 0.'
2127
+ end
2128
+
2129
+ # resource path
2130
+ local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
2131
+
2132
+ # query parameters
2133
+ query_params = opts[:query_params] || {}
2134
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2135
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
2136
+
2137
+ # header parameters
2138
+ header_params = opts[:header_params] || {}
2139
+ # HTTP header 'Accept' (if needed)
2140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2141
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2142
+
2143
+ # form parameters
2144
+ form_params = opts[:form_params] || {}
2145
+
2146
+ # http body (model)
2147
+ post_body = opts[:debug_body]
2148
+
2149
+ # return_type
2150
+ return_type = opts[:debug_return_type] || 'S3Key'
2151
+
2152
+ # auth_names
2153
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2154
+
2155
+ new_options = opts.merge(
2156
+ :operation => :"UserManagementApi.um_users_s3keys_find_by_key_id",
2157
+ :header_params => header_params,
2158
+ :query_params => query_params,
2159
+ :form_params => form_params,
2160
+ :body => post_body,
2161
+ :auth_names => auth_names,
2162
+ :return_type => return_type
2163
+ )
2164
+
2165
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2166
+ if @api_client.config.debugging
2167
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_find_by_key_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2168
+ end
2169
+ return data, status_code, headers
2170
+ end
2171
+
2172
+ # Retrieve a User's S3 keys
2173
+ # You can retrieve S3 keys owned by a user by using the users ID. This user Id can be found in the response body when a user is created or when you GET a list of users.
2174
+ # @param user_id [String] The unique ID of the user
2175
+ # @param [Hash] opts the optional parameters
2176
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2177
+ # @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)
2178
+ # @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
2179
+ # @return [S3Keys]
2180
+ def um_users_s3keys_get(user_id, opts = {})
2181
+ data, _status_code, _headers = um_users_s3keys_get_with_http_info(user_id, opts)
2182
+ data
2183
+ end
2184
+
2185
+ # Retrieve a User&#39;s S3 keys
2186
+ # You can retrieve S3 keys owned by a user by using the users ID. This user Id can be found in the response body when a user is created or when you GET a list of users.
2187
+ # @param user_id [String] The unique ID of the user
2188
+ # @param [Hash] opts the optional parameters
2189
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2190
+ # @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
2191
+ # @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
2192
+ # @return [Array<(S3Keys, Integer, Hash)>] S3Keys data, response status code and response headers
2193
+ def um_users_s3keys_get_with_http_info(user_id, opts = {})
2194
+ if @api_client.config.debugging
2195
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_get ...'
2196
+ end
2197
+ # verify the required parameter 'user_id' is set
2198
+ if @api_client.config.client_side_validation && user_id.nil?
2199
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_get"
2200
+ end
2201
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
2202
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_get, must be smaller than or equal to 10.'
2203
+ end
2204
+
2205
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
2206
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_get, must be greater than or equal to 0.'
2207
+ end
2208
+
2209
+ # resource path
2210
+ local_var_path = '/um/users/{userId}/s3keys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
2211
+
2212
+ # query parameters
2213
+ query_params = opts[:query_params] || {}
2214
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2215
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
2216
+
2217
+ # header parameters
2218
+ header_params = opts[:header_params] || {}
2219
+ # HTTP header 'Accept' (if needed)
2220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2221
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2222
+
2223
+ # form parameters
2224
+ form_params = opts[:form_params] || {}
2225
+
2226
+ # http body (model)
2227
+ post_body = opts[:debug_body]
2228
+
2229
+ # return_type
2230
+ return_type = opts[:debug_return_type] || 'S3Keys'
2231
+
2232
+ # auth_names
2233
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2234
+
2235
+ new_options = opts.merge(
2236
+ :operation => :"UserManagementApi.um_users_s3keys_get",
2237
+ :header_params => header_params,
2238
+ :query_params => query_params,
2239
+ :form_params => form_params,
2240
+ :body => post_body,
2241
+ :auth_names => auth_names,
2242
+ :return_type => return_type
2243
+ )
2244
+
2245
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2246
+ if @api_client.config.debugging
2247
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2248
+ end
2249
+ return data, status_code, headers
2250
+ end
2251
+
2252
+ # Create a S3 key for the given user
2253
+ # Creates a S3 key for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users. Maximum of 5 keys can be generated for a given user
2254
+ # @param user_id [String] The unique ID of the user
2255
+ # @param [Hash] opts the optional parameters
2256
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2257
+ # @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)
2258
+ # @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
2259
+ # @return [S3Key]
2260
+ def um_users_s3keys_post(user_id, opts = {})
2261
+ data, _status_code, _headers = um_users_s3keys_post_with_http_info(user_id, opts)
2262
+ data
2263
+ end
2264
+
2265
+ # Create a S3 key for the given user
2266
+ # Creates a S3 key for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users. Maximum of 5 keys can be generated for a given user
2267
+ # @param user_id [String] The unique ID of the user
2268
+ # @param [Hash] opts the optional parameters
2269
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2270
+ # @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
2271
+ # @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
2272
+ # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
2273
+ def um_users_s3keys_post_with_http_info(user_id, opts = {})
2274
+ if @api_client.config.debugging
2275
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_post ...'
2276
+ end
2277
+ # verify the required parameter 'user_id' is set
2278
+ if @api_client.config.client_side_validation && user_id.nil?
2279
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_post"
2280
+ end
2281
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
2282
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_post, must be smaller than or equal to 10.'
2283
+ end
2284
+
2285
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
2286
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_post, must be greater than or equal to 0.'
2287
+ end
2288
+
2289
+ # resource path
2290
+ local_var_path = '/um/users/{userId}/s3keys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
2291
+
2292
+ # query parameters
2293
+ query_params = opts[:query_params] || {}
2294
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2295
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
2296
+
2297
+ # header parameters
2298
+ header_params = opts[:header_params] || {}
2299
+ # HTTP header 'Accept' (if needed)
2300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2301
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2302
+
2303
+ # form parameters
2304
+ form_params = opts[:form_params] || {}
2305
+
2306
+ # http body (model)
2307
+ post_body = opts[:debug_body]
2308
+
2309
+ # return_type
2310
+ return_type = opts[:debug_return_type] || 'S3Key'
2311
+
2312
+ # auth_names
2313
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2314
+
2315
+ new_options = opts.merge(
2316
+ :operation => :"UserManagementApi.um_users_s3keys_post",
2317
+ :header_params => header_params,
2318
+ :query_params => query_params,
2319
+ :form_params => form_params,
2320
+ :body => post_body,
2321
+ :auth_names => auth_names,
2322
+ :return_type => return_type
2323
+ )
2324
+
2325
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2326
+ if @api_client.config.debugging
2327
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2328
+ end
2329
+ return data, status_code, headers
2330
+ end
2331
+
2332
+ # Modify a S3 key having the given key id
2333
+ # You can enable or disable a given S3 key
2334
+ # @param user_id [String]
2335
+ # @param key_id [String] The unique access key ID of the S3 key
2336
+ # @param s3_key [S3Key] Modified s3 key
2337
+ # @param [Hash] opts the optional parameters
2338
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2339
+ # @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)
2340
+ # @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
2341
+ # @return [S3Key]
2342
+ def um_users_s3keys_put(user_id, key_id, s3_key, opts = {})
2343
+ data, _status_code, _headers = um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, opts)
2344
+ data
2345
+ end
2346
+
2347
+ # Modify a S3 key having the given key id
2348
+ # You can enable or disable a given S3 key
2349
+ # @param user_id [String]
2350
+ # @param key_id [String] The unique access key ID of the S3 key
2351
+ # @param s3_key [S3Key] Modified s3 key
2352
+ # @param [Hash] opts the optional parameters
2353
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2354
+ # @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
2355
+ # @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
2356
+ # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
2357
+ def um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, opts = {})
2358
+ if @api_client.config.debugging
2359
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_put ...'
2360
+ end
2361
+ # verify the required parameter 'user_id' is set
2362
+ if @api_client.config.client_side_validation && user_id.nil?
2363
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_put"
2364
+ end
2365
+ # verify the required parameter 'key_id' is set
2366
+ if @api_client.config.client_side_validation && key_id.nil?
2367
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_put"
2368
+ end
2369
+ # verify the required parameter 's3_key' is set
2370
+ if @api_client.config.client_side_validation && s3_key.nil?
2371
+ fail ArgumentError, "Missing the required parameter 's3_key' when calling UserManagementApi.um_users_s3keys_put"
2372
+ end
2373
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
2374
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_put, must be smaller than or equal to 10.'
2375
+ end
2376
+
2377
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
2378
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_put, must be greater than or equal to 0.'
2379
+ end
2380
+
2381
+ # resource path
2382
+ local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
2383
+
2384
+ # query parameters
2385
+ query_params = opts[:query_params] || {}
2386
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2387
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
2388
+
2389
+ # header parameters
2390
+ header_params = opts[:header_params] || {}
2391
+ # HTTP header 'Accept' (if needed)
2392
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2393
+ # HTTP header 'Content-Type'
2394
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2395
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2396
+
2397
+ # form parameters
2398
+ form_params = opts[:form_params] || {}
2399
+
2400
+ # http body (model)
2401
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(s3_key)
2402
+
2403
+ # return_type
2404
+ return_type = opts[:debug_return_type] || 'S3Key'
2405
+
2406
+ # auth_names
2407
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2408
+
2409
+ new_options = opts.merge(
2410
+ :operation => :"UserManagementApi.um_users_s3keys_put",
2411
+ :header_params => header_params,
2412
+ :query_params => query_params,
2413
+ :form_params => form_params,
2414
+ :body => post_body,
2415
+ :auth_names => auth_names,
2416
+ :return_type => return_type
2417
+ )
2418
+
2419
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2420
+ if @api_client.config.debugging
2421
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2422
+ end
2423
+ return data, status_code, headers
2424
+ end
2425
+
2426
+ # Retrieve S3 object storage single signon URL for the given user
2427
+ # You can retrieve S3 object storage single signon URL for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users.
2428
+ # @param user_id [String] The unique ID of the user
2429
+ # @param [Hash] opts the optional parameters
2430
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
2431
+ # @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
2432
+ # @return [S3ObjectStorageSSO]
2433
+ def um_users_s3ssourl_get(user_id, opts = {})
2434
+ data, _status_code, _headers = um_users_s3ssourl_get_with_http_info(user_id, opts)
2435
+ data
2436
+ end
2437
+
2438
+ # Retrieve S3 object storage single signon URL for the given user
2439
+ # You can retrieve S3 object storage single signon URL for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users.
2440
+ # @param user_id [String] The unique ID of the user
2441
+ # @param [Hash] opts the optional parameters
2442
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
2443
+ # @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
2444
+ # @return [Array<(S3ObjectStorageSSO, Integer, Hash)>] S3ObjectStorageSSO data, response status code and response headers
2445
+ def um_users_s3ssourl_get_with_http_info(user_id, opts = {})
2446
+ if @api_client.config.debugging
2447
+ @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3ssourl_get ...'
2448
+ end
2449
+ # verify the required parameter 'user_id' is set
2450
+ if @api_client.config.client_side_validation && user_id.nil?
2451
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3ssourl_get"
2452
+ end
2453
+ # resource path
2454
+ local_var_path = '/um/users/{userId}/s3ssourl'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
2455
+
2456
+ # query parameters
2457
+ query_params = opts[:query_params] || {}
2458
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
2459
+
2460
+ # header parameters
2461
+ header_params = opts[:header_params] || {}
2462
+ # HTTP header 'Accept' (if needed)
2463
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2464
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
2465
+
2466
+ # form parameters
2467
+ form_params = opts[:form_params] || {}
2468
+
2469
+ # http body (model)
2470
+ post_body = opts[:debug_body]
2471
+
2472
+ # return_type
2473
+ return_type = opts[:debug_return_type] || 'S3ObjectStorageSSO'
2474
+
2475
+ # auth_names
2476
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
2477
+
2478
+ new_options = opts.merge(
2479
+ :operation => :"UserManagementApi.um_users_s3ssourl_get",
2480
+ :header_params => header_params,
2481
+ :query_params => query_params,
2482
+ :form_params => form_params,
2483
+ :body => post_body,
2484
+ :auth_names => auth_names,
2485
+ :return_type => return_type
2486
+ )
2487
+
2488
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2489
+ if @api_client.config.debugging
2490
+ @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3ssourl_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2491
+ end
2492
+ return data, status_code, headers
2493
+ end
2494
+ end
2495
+ end