nightona_api_client 0.191.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/.openapi-generator/FILES +212 -0
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.openapi-generator-ignore +31 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +148 -0
  8. data/Rakefile +10 -0
  9. data/fix-gemspec.sh +11 -0
  10. data/lib/nightona_api_client/api/admin_api.rb +1449 -0
  11. data/lib/nightona_api_client/api/api_keys_api.rb +401 -0
  12. data/lib/nightona_api_client/api/audit_api.rb +110 -0
  13. data/lib/nightona_api_client/api/config_api.rb +77 -0
  14. data/lib/nightona_api_client/api/docker_registry_api.rb +411 -0
  15. data/lib/nightona_api_client/api/health_api.rb +126 -0
  16. data/lib/nightona_api_client/api/jobs_api.rb +299 -0
  17. data/lib/nightona_api_client/api/object_storage_api.rb +80 -0
  18. data/lib/nightona_api_client/api/organizations_api.rb +2615 -0
  19. data/lib/nightona_api_client/api/preview_api.rb +278 -0
  20. data/lib/nightona_api_client/api/regions_api.rb +77 -0
  21. data/lib/nightona_api_client/api/runners_api.rb +711 -0
  22. data/lib/nightona_api_client/api/sandbox_api.rb +3064 -0
  23. data/lib/nightona_api_client/api/snapshots_api.rb +567 -0
  24. data/lib/nightona_api_client/api/toolbox_api.rb +5108 -0
  25. data/lib/nightona_api_client/api/users_api.rb +316 -0
  26. data/lib/nightona_api_client/api/volumes_api.rb +342 -0
  27. data/lib/nightona_api_client/api/webhooks_api.rb +276 -0
  28. data/lib/nightona_api_client/api_client.rb +397 -0
  29. data/lib/nightona_api_client/api_error.rb +58 -0
  30. data/lib/nightona_api_client/api_model_base.rb +88 -0
  31. data/lib/nightona_api_client/configuration.rb +309 -0
  32. data/lib/nightona_api_client/models/account_provider.rb +190 -0
  33. data/lib/nightona_api_client/models/admin_create_runner.rb +326 -0
  34. data/lib/nightona_api_client/models/admin_get_webhook_status200_response.rb +147 -0
  35. data/lib/nightona_api_client/models/announcement.rb +175 -0
  36. data/lib/nightona_api_client/models/api_key_list.rb +313 -0
  37. data/lib/nightona_api_client/models/api_key_response.rb +273 -0
  38. data/lib/nightona_api_client/models/audit_log.rb +369 -0
  39. data/lib/nightona_api_client/models/build_info.rb +241 -0
  40. data/lib/nightona_api_client/models/command.rb +202 -0
  41. data/lib/nightona_api_client/models/completion_context.rb +173 -0
  42. data/lib/nightona_api_client/models/completion_item.rb +218 -0
  43. data/lib/nightona_api_client/models/completion_list.rb +192 -0
  44. data/lib/nightona_api_client/models/compressed_screenshot_response.rb +185 -0
  45. data/lib/nightona_api_client/models/computer_use_start_response.rb +192 -0
  46. data/lib/nightona_api_client/models/computer_use_status_response.rb +189 -0
  47. data/lib/nightona_api_client/models/computer_use_stop_response.rb +192 -0
  48. data/lib/nightona_api_client/models/create_api_key.rb +217 -0
  49. data/lib/nightona_api_client/models/create_build_info.rb +177 -0
  50. data/lib/nightona_api_client/models/create_docker_registry.rb +256 -0
  51. data/lib/nightona_api_client/models/create_linked_account.rb +192 -0
  52. data/lib/nightona_api_client/models/create_organization.rb +192 -0
  53. data/lib/nightona_api_client/models/create_organization_invitation.rb +255 -0
  54. data/lib/nightona_api_client/models/create_organization_quota.rb +219 -0
  55. data/lib/nightona_api_client/models/create_organization_region_quota.rb +372 -0
  56. data/lib/nightona_api_client/models/create_organization_role.rb +233 -0
  57. data/lib/nightona_api_client/models/create_region.rb +198 -0
  58. data/lib/nightona_api_client/models/create_region_response.rb +209 -0
  59. data/lib/nightona_api_client/models/create_runner.rb +202 -0
  60. data/lib/nightona_api_client/models/create_runner_response.rb +192 -0
  61. data/lib/nightona_api_client/models/create_sandbox.rb +356 -0
  62. data/lib/nightona_api_client/models/create_sandbox_snapshot.rb +177 -0
  63. data/lib/nightona_api_client/models/create_session_request.rb +165 -0
  64. data/lib/nightona_api_client/models/create_snapshot.rb +291 -0
  65. data/lib/nightona_api_client/models/create_user.rb +269 -0
  66. data/lib/nightona_api_client/models/create_volume.rb +164 -0
  67. data/lib/nightona_api_client/models/display_info_response.rb +167 -0
  68. data/lib/nightona_api_client/models/docker_registry.rb +378 -0
  69. data/lib/nightona_api_client/models/download_files.rb +167 -0
  70. data/lib/nightona_api_client/models/execute_request.rb +184 -0
  71. data/lib/nightona_api_client/models/execute_response.rb +192 -0
  72. data/lib/nightona_api_client/models/file_info.rb +346 -0
  73. data/lib/nightona_api_client/models/file_status.rb +242 -0
  74. data/lib/nightona_api_client/models/fork_sandbox.rb +148 -0
  75. data/lib/nightona_api_client/models/git_add_request.rb +193 -0
  76. data/lib/nightona_api_client/models/git_branch_request.rb +190 -0
  77. data/lib/nightona_api_client/models/git_checkout_request.rb +190 -0
  78. data/lib/nightona_api_client/models/git_clone_request.rb +226 -0
  79. data/lib/nightona_api_client/models/git_commit_info.rb +268 -0
  80. data/lib/nightona_api_client/models/git_commit_request.rb +254 -0
  81. data/lib/nightona_api_client/models/git_commit_response.rb +164 -0
  82. data/lib/nightona_api_client/models/git_delete_branch_request.rb +190 -0
  83. data/lib/nightona_api_client/models/git_repo_request.rb +182 -0
  84. data/lib/nightona_api_client/models/git_status.rb +219 -0
  85. data/lib/nightona_api_client/models/gpu_type.rb +41 -0
  86. data/lib/nightona_api_client/models/health_controller_check200_response.rb +182 -0
  87. data/lib/nightona_api_client/models/health_controller_check200_response_info_value.rb +164 -0
  88. data/lib/nightona_api_client/models/health_controller_check503_response.rb +182 -0
  89. data/lib/nightona_api_client/models/job.rb +366 -0
  90. data/lib/nightona_api_client/models/job_status.rb +43 -0
  91. data/lib/nightona_api_client/models/job_type.rb +54 -0
  92. data/lib/nightona_api_client/models/keyboard_hotkey_request.rb +165 -0
  93. data/lib/nightona_api_client/models/keyboard_press_request.rb +177 -0
  94. data/lib/nightona_api_client/models/keyboard_type_request.rb +175 -0
  95. data/lib/nightona_api_client/models/list_branch_response.rb +166 -0
  96. data/lib/nightona_api_client/models/list_sandboxes_response.rb +180 -0
  97. data/lib/nightona_api_client/models/log_entry.rb +334 -0
  98. data/lib/nightona_api_client/models/lsp_completion_params.rb +254 -0
  99. data/lib/nightona_api_client/models/lsp_document_request.rb +219 -0
  100. data/lib/nightona_api_client/models/lsp_location.rb +190 -0
  101. data/lib/nightona_api_client/models/lsp_server_request.rb +192 -0
  102. data/lib/nightona_api_client/models/lsp_symbol.rb +216 -0
  103. data/lib/nightona_api_client/models/match.rb +216 -0
  104. data/lib/nightona_api_client/models/metric_data_point.rb +192 -0
  105. data/lib/nightona_api_client/models/metric_series.rb +194 -0
  106. data/lib/nightona_api_client/models/metrics_response.rb +167 -0
  107. data/lib/nightona_api_client/models/mouse_click_request.rb +212 -0
  108. data/lib/nightona_api_client/models/mouse_click_response.rb +192 -0
  109. data/lib/nightona_api_client/models/mouse_drag_request.rb +256 -0
  110. data/lib/nightona_api_client/models/mouse_drag_response.rb +192 -0
  111. data/lib/nightona_api_client/models/mouse_move_request.rb +192 -0
  112. data/lib/nightona_api_client/models/mouse_move_response.rb +192 -0
  113. data/lib/nightona_api_client/models/mouse_position.rb +192 -0
  114. data/lib/nightona_api_client/models/mouse_scroll_request.rb +229 -0
  115. data/lib/nightona_api_client/models/mouse_scroll_response.rb +165 -0
  116. data/lib/nightona_api_client/models/nightona_configuration.rb +507 -0
  117. data/lib/nightona_api_client/models/oidc_config.rb +219 -0
  118. data/lib/nightona_api_client/models/organization.rb +698 -0
  119. data/lib/nightona_api_client/models/organization_invitation.rb +463 -0
  120. data/lib/nightona_api_client/models/organization_role.rb +341 -0
  121. data/lib/nightona_api_client/models/organization_sandbox_default_limited_network_egress.rb +165 -0
  122. data/lib/nightona_api_client/models/organization_suspension.rb +221 -0
  123. data/lib/nightona_api_client/models/organization_usage_overview.rb +270 -0
  124. data/lib/nightona_api_client/models/organization_user.rb +380 -0
  125. data/lib/nightona_api_client/models/otel_config.rb +178 -0
  126. data/lib/nightona_api_client/models/paginated_audit_logs.rb +254 -0
  127. data/lib/nightona_api_client/models/paginated_jobs.rb +244 -0
  128. data/lib/nightona_api_client/models/paginated_logs.rb +248 -0
  129. data/lib/nightona_api_client/models/paginated_sandboxes_deprecated.rb +244 -0
  130. data/lib/nightona_api_client/models/paginated_snapshots.rb +244 -0
  131. data/lib/nightona_api_client/models/paginated_traces.rb +248 -0
  132. data/lib/nightona_api_client/models/poll_jobs_response.rb +167 -0
  133. data/lib/nightona_api_client/models/port_preview_url.rb +219 -0
  134. data/lib/nightona_api_client/models/position.rb +190 -0
  135. data/lib/nightona_api_client/models/posthog_config.rb +192 -0
  136. data/lib/nightona_api_client/models/process_errors_response.rb +192 -0
  137. data/lib/nightona_api_client/models/process_logs_response.rb +192 -0
  138. data/lib/nightona_api_client/models/process_restart_response.rb +192 -0
  139. data/lib/nightona_api_client/models/process_status_response.rb +192 -0
  140. data/lib/nightona_api_client/models/project_dir_response.rb +147 -0
  141. data/lib/nightona_api_client/models/pty_create_request.rb +217 -0
  142. data/lib/nightona_api_client/models/pty_create_response.rb +165 -0
  143. data/lib/nightona_api_client/models/pty_list_response.rb +167 -0
  144. data/lib/nightona_api_client/models/pty_resize_request.rb +192 -0
  145. data/lib/nightona_api_client/models/pty_session_info.rb +354 -0
  146. data/lib/nightona_api_client/models/range.rb +190 -0
  147. data/lib/nightona_api_client/models/rate_limit_config.rb +178 -0
  148. data/lib/nightona_api_client/models/rate_limit_entry.rb +158 -0
  149. data/lib/nightona_api_client/models/regenerate_api_key_response.rb +165 -0
  150. data/lib/nightona_api_client/models/region.rb +339 -0
  151. data/lib/nightona_api_client/models/region_quota.rb +437 -0
  152. data/lib/nightona_api_client/models/region_screenshot_response.rb +185 -0
  153. data/lib/nightona_api_client/models/region_type.rb +42 -0
  154. data/lib/nightona_api_client/models/region_usage_overview.rb +515 -0
  155. data/lib/nightona_api_client/models/registry_push_access_dto.rb +300 -0
  156. data/lib/nightona_api_client/models/replace_request.rb +218 -0
  157. data/lib/nightona_api_client/models/replace_result.rb +165 -0
  158. data/lib/nightona_api_client/models/resize_sandbox.rb +225 -0
  159. data/lib/nightona_api_client/models/runner.rb +710 -0
  160. data/lib/nightona_api_client/models/runner_class.rb +40 -0
  161. data/lib/nightona_api_client/models/runner_full.rb +747 -0
  162. data/lib/nightona_api_client/models/runner_health_metrics.rb +482 -0
  163. data/lib/nightona_api_client/models/runner_healthcheck.rb +217 -0
  164. data/lib/nightona_api_client/models/runner_service_health.rb +202 -0
  165. data/lib/nightona_api_client/models/runner_snapshot_dto.rb +202 -0
  166. data/lib/nightona_api_client/models/runner_state.rb +44 -0
  167. data/lib/nightona_api_client/models/sandbox.rb +788 -0
  168. data/lib/nightona_api_client/models/sandbox_class.rb +43 -0
  169. data/lib/nightona_api_client/models/sandbox_desired_state.rb +45 -0
  170. data/lib/nightona_api_client/models/sandbox_labels.rb +167 -0
  171. data/lib/nightona_api_client/models/sandbox_list_item.rb +658 -0
  172. data/lib/nightona_api_client/models/sandbox_list_sort_direction.rb +41 -0
  173. data/lib/nightona_api_client/models/sandbox_list_sort_field.rb +45 -0
  174. data/lib/nightona_api_client/models/sandbox_state.rb +61 -0
  175. data/lib/nightona_api_client/models/sandbox_volume.rb +202 -0
  176. data/lib/nightona_api_client/models/screenshot_response.rb +185 -0
  177. data/lib/nightona_api_client/models/search_files_response.rb +166 -0
  178. data/lib/nightona_api_client/models/send_webhook_dto.rb +224 -0
  179. data/lib/nightona_api_client/models/session.rb +180 -0
  180. data/lib/nightona_api_client/models/session_execute_request.rb +185 -0
  181. data/lib/nightona_api_client/models/session_execute_response.rb +168 -0
  182. data/lib/nightona_api_client/models/set_snapshot_general_status_dto.rb +165 -0
  183. data/lib/nightona_api_client/models/signed_port_preview_url.rb +246 -0
  184. data/lib/nightona_api_client/models/snapshot_dto.rb +562 -0
  185. data/lib/nightona_api_client/models/snapshot_manager_credentials.rb +192 -0
  186. data/lib/nightona_api_client/models/snapshot_state.rb +47 -0
  187. data/lib/nightona_api_client/models/ssh_access_dto.rb +327 -0
  188. data/lib/nightona_api_client/models/ssh_access_validation_dto.rb +192 -0
  189. data/lib/nightona_api_client/models/storage_access_dto.rb +300 -0
  190. data/lib/nightona_api_client/models/toolbox_proxy_url.rb +165 -0
  191. data/lib/nightona_api_client/models/trace_span.rb +332 -0
  192. data/lib/nightona_api_client/models/trace_summary.rb +310 -0
  193. data/lib/nightona_api_client/models/update_docker_registry.rb +239 -0
  194. data/lib/nightona_api_client/models/update_job_status.rb +207 -0
  195. data/lib/nightona_api_client/models/update_organization_default_region.rb +165 -0
  196. data/lib/nightona_api_client/models/update_organization_invitation.rb +228 -0
  197. data/lib/nightona_api_client/models/update_organization_member_access.rb +218 -0
  198. data/lib/nightona_api_client/models/update_organization_quota.rb +295 -0
  199. data/lib/nightona_api_client/models/update_organization_region_quota.rb +299 -0
  200. data/lib/nightona_api_client/models/update_organization_role.rb +233 -0
  201. data/lib/nightona_api_client/models/update_region.rb +171 -0
  202. data/lib/nightona_api_client/models/update_sandbox_network_settings.rb +168 -0
  203. data/lib/nightona_api_client/models/update_sandbox_state_dto.rb +209 -0
  204. data/lib/nightona_api_client/models/url.rb +165 -0
  205. data/lib/nightona_api_client/models/user.rb +275 -0
  206. data/lib/nightona_api_client/models/user_home_dir_response.rb +147 -0
  207. data/lib/nightona_api_client/models/user_public_key.rb +192 -0
  208. data/lib/nightona_api_client/models/volume_dto.rb +346 -0
  209. data/lib/nightona_api_client/models/volume_state.rb +46 -0
  210. data/lib/nightona_api_client/models/webhook_app_portal_access.rb +192 -0
  211. data/lib/nightona_api_client/models/webhook_event.rb +46 -0
  212. data/lib/nightona_api_client/models/webhook_initialization_status.rb +272 -0
  213. data/lib/nightona_api_client/models/windows_response.rb +194 -0
  214. data/lib/nightona_api_client/models/work_dir_response.rb +147 -0
  215. data/lib/nightona_api_client/version.rb +15 -0
  216. data/lib/nightona_api_client.rb +241 -0
  217. data/nightona_api_client.gemspec +39 -0
  218. data/project.json +68 -0
  219. metadata +299 -0
@@ -0,0 +1,2615 @@
1
+ =begin
2
+ #Nightona
3
+
4
+ #Nightona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: amaraaamka0404@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module NightonaApiClient
16
+ class OrganizationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Accept organization invitation
23
+ # @param invitation_id [String] Invitation ID
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [OrganizationInvitation]
26
+ def accept_organization_invitation(invitation_id, opts = {})
27
+ data, _status_code, _headers = accept_organization_invitation_with_http_info(invitation_id, opts)
28
+ data
29
+ end
30
+
31
+ # Accept organization invitation
32
+ # @param invitation_id [String] Invitation ID
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
35
+ def accept_organization_invitation_with_http_info(invitation_id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.accept_organization_invitation ...'
38
+ end
39
+ # verify the required parameter 'invitation_id' is set
40
+ if @api_client.config.client_side_validation && invitation_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.accept_organization_invitation"
42
+ end
43
+ # resource path
44
+ local_var_path = '/organizations/invitations/{invitationId}/accept'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"OrganizationsApi.accept_organization_invitation",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: OrganizationsApi#accept_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Cancel organization invitation
84
+ # @param organization_id [String] Organization ID
85
+ # @param invitation_id [String] Invitation ID
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ def cancel_organization_invitation(organization_id, invitation_id, opts = {})
89
+ cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts)
90
+ nil
91
+ end
92
+
93
+ # Cancel organization invitation
94
+ # @param organization_id [String] Organization ID
95
+ # @param invitation_id [String] Invitation ID
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
98
+ def cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.cancel_organization_invitation ...'
101
+ end
102
+ # verify the required parameter 'organization_id' is set
103
+ if @api_client.config.client_side_validation && organization_id.nil?
104
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.cancel_organization_invitation"
105
+ end
106
+ # verify the required parameter 'invitation_id' is set
107
+ if @api_client.config.client_side_validation && invitation_id.nil?
108
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.cancel_organization_invitation"
109
+ end
110
+ # resource path
111
+ local_var_path = '/organizations/{organizationId}/invitations/{invitationId}/cancel'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type]
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"OrganizationsApi.cancel_organization_invitation",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: OrganizationsApi#cancel_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Create organization
149
+ # @param create_organization [CreateOrganization]
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Organization]
152
+ def create_organization(create_organization, opts = {})
153
+ data, _status_code, _headers = create_organization_with_http_info(create_organization, opts)
154
+ data
155
+ end
156
+
157
+ # Create organization
158
+ # @param create_organization [CreateOrganization]
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
161
+ def create_organization_with_http_info(create_organization, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
164
+ end
165
+ # verify the required parameter 'create_organization' is set
166
+ if @api_client.config.client_side_validation && create_organization.nil?
167
+ fail ArgumentError, "Missing the required parameter 'create_organization' when calling OrganizationsApi.create_organization"
168
+ end
169
+ # resource path
170
+ local_var_path = '/organizations'
171
+
172
+ # query parameters
173
+ query_params = opts[:query_params] || {}
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
179
+ # HTTP header 'Content-Type'
180
+ content_type = @api_client.select_header_content_type(['application/json'])
181
+ if !content_type.nil?
182
+ header_params['Content-Type'] = content_type
183
+ end
184
+
185
+ # form parameters
186
+ form_params = opts[:form_params] || {}
187
+
188
+ # http body (model)
189
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization)
190
+
191
+ # return_type
192
+ return_type = opts[:debug_return_type] || 'Organization'
193
+
194
+ # auth_names
195
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
196
+
197
+ new_options = opts.merge(
198
+ :operation => :"OrganizationsApi.create_organization",
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => return_type
205
+ )
206
+
207
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # Create organization invitation
215
+ # @param organization_id [String] Organization ID
216
+ # @param create_organization_invitation [CreateOrganizationInvitation]
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [OrganizationInvitation]
219
+ def create_organization_invitation(organization_id, create_organization_invitation, opts = {})
220
+ data, _status_code, _headers = create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts)
221
+ data
222
+ end
223
+
224
+ # Create organization invitation
225
+ # @param organization_id [String] Organization ID
226
+ # @param create_organization_invitation [CreateOrganizationInvitation]
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
229
+ def create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts = {})
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_invitation ...'
232
+ end
233
+ # verify the required parameter 'organization_id' is set
234
+ if @api_client.config.client_side_validation && organization_id.nil?
235
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_invitation"
236
+ end
237
+ # verify the required parameter 'create_organization_invitation' is set
238
+ if @api_client.config.client_side_validation && create_organization_invitation.nil?
239
+ fail ArgumentError, "Missing the required parameter 'create_organization_invitation' when calling OrganizationsApi.create_organization_invitation"
240
+ end
241
+ # resource path
242
+ local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+
247
+ # header parameters
248
+ header_params = opts[:header_params] || {}
249
+ # HTTP header 'Accept' (if needed)
250
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
251
+ # HTTP header 'Content-Type'
252
+ content_type = @api_client.select_header_content_type(['application/json'])
253
+ if !content_type.nil?
254
+ header_params['Content-Type'] = content_type
255
+ end
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_invitation)
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"OrganizationsApi.create_organization_invitation",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Create organization role
287
+ # @param organization_id [String] Organization ID
288
+ # @param create_organization_role [CreateOrganizationRole]
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [OrganizationRole]
291
+ def create_organization_role(organization_id, create_organization_role, opts = {})
292
+ data, _status_code, _headers = create_organization_role_with_http_info(organization_id, create_organization_role, opts)
293
+ data
294
+ end
295
+
296
+ # Create organization role
297
+ # @param organization_id [String] Organization ID
298
+ # @param create_organization_role [CreateOrganizationRole]
299
+ # @param [Hash] opts the optional parameters
300
+ # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
301
+ def create_organization_role_with_http_info(organization_id, create_organization_role, opts = {})
302
+ if @api_client.config.debugging
303
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_role ...'
304
+ end
305
+ # verify the required parameter 'organization_id' is set
306
+ if @api_client.config.client_side_validation && organization_id.nil?
307
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_role"
308
+ end
309
+ # verify the required parameter 'create_organization_role' is set
310
+ if @api_client.config.client_side_validation && create_organization_role.nil?
311
+ fail ArgumentError, "Missing the required parameter 'create_organization_role' when calling OrganizationsApi.create_organization_role"
312
+ end
313
+ # resource path
314
+ local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+ # HTTP header 'Accept' (if needed)
322
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
323
+ # HTTP header 'Content-Type'
324
+ content_type = @api_client.select_header_content_type(['application/json'])
325
+ if !content_type.nil?
326
+ header_params['Content-Type'] = content_type
327
+ end
328
+
329
+ # form parameters
330
+ form_params = opts[:form_params] || {}
331
+
332
+ # http body (model)
333
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_role)
334
+
335
+ # return_type
336
+ return_type = opts[:debug_return_type] || 'OrganizationRole'
337
+
338
+ # auth_names
339
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
340
+
341
+ new_options = opts.merge(
342
+ :operation => :"OrganizationsApi.create_organization_role",
343
+ :header_params => header_params,
344
+ :query_params => query_params,
345
+ :form_params => form_params,
346
+ :body => post_body,
347
+ :auth_names => auth_names,
348
+ :return_type => return_type
349
+ )
350
+
351
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
354
+ end
355
+ return data, status_code, headers
356
+ end
357
+
358
+ # Create a new region
359
+ # @param create_region [CreateRegion]
360
+ # @param [Hash] opts the optional parameters
361
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
362
+ # @return [CreateRegionResponse]
363
+ def create_region(create_region, opts = {})
364
+ data, _status_code, _headers = create_region_with_http_info(create_region, opts)
365
+ data
366
+ end
367
+
368
+ # Create a new region
369
+ # @param create_region [CreateRegion]
370
+ # @param [Hash] opts the optional parameters
371
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
372
+ # @return [Array<(CreateRegionResponse, Integer, Hash)>] CreateRegionResponse data, response status code and response headers
373
+ def create_region_with_http_info(create_region, opts = {})
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_region ...'
376
+ end
377
+ # verify the required parameter 'create_region' is set
378
+ if @api_client.config.client_side_validation && create_region.nil?
379
+ fail ArgumentError, "Missing the required parameter 'create_region' when calling OrganizationsApi.create_region"
380
+ end
381
+ # resource path
382
+ local_var_path = '/regions'
383
+
384
+ # query parameters
385
+ query_params = opts[:query_params] || {}
386
+
387
+ # header parameters
388
+ header_params = opts[:header_params] || {}
389
+ # HTTP header 'Accept' (if needed)
390
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
391
+ # HTTP header 'Content-Type'
392
+ content_type = @api_client.select_header_content_type(['application/json'])
393
+ if !content_type.nil?
394
+ header_params['Content-Type'] = content_type
395
+ end
396
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
397
+
398
+ # form parameters
399
+ form_params = opts[:form_params] || {}
400
+
401
+ # http body (model)
402
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_region)
403
+
404
+ # return_type
405
+ return_type = opts[:debug_return_type] || 'CreateRegionResponse'
406
+
407
+ # auth_names
408
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
409
+
410
+ new_options = opts.merge(
411
+ :operation => :"OrganizationsApi.create_region",
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => return_type
418
+ )
419
+
420
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
+ end
424
+ return data, status_code, headers
425
+ end
426
+
427
+ # Decline organization invitation
428
+ # @param invitation_id [String] Invitation ID
429
+ # @param [Hash] opts the optional parameters
430
+ # @return [nil]
431
+ def decline_organization_invitation(invitation_id, opts = {})
432
+ decline_organization_invitation_with_http_info(invitation_id, opts)
433
+ nil
434
+ end
435
+
436
+ # Decline organization invitation
437
+ # @param invitation_id [String] Invitation ID
438
+ # @param [Hash] opts the optional parameters
439
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
440
+ def decline_organization_invitation_with_http_info(invitation_id, opts = {})
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.decline_organization_invitation ...'
443
+ end
444
+ # verify the required parameter 'invitation_id' is set
445
+ if @api_client.config.client_side_validation && invitation_id.nil?
446
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.decline_organization_invitation"
447
+ end
448
+ # resource path
449
+ local_var_path = '/organizations/invitations/{invitationId}/decline'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
450
+
451
+ # query parameters
452
+ query_params = opts[:query_params] || {}
453
+
454
+ # header parameters
455
+ header_params = opts[:header_params] || {}
456
+
457
+ # form parameters
458
+ form_params = opts[:form_params] || {}
459
+
460
+ # http body (model)
461
+ post_body = opts[:debug_body]
462
+
463
+ # return_type
464
+ return_type = opts[:debug_return_type]
465
+
466
+ # auth_names
467
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
468
+
469
+ new_options = opts.merge(
470
+ :operation => :"OrganizationsApi.decline_organization_invitation",
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: OrganizationsApi#decline_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
486
+ # Delete organization
487
+ # @param organization_id [String] Organization ID
488
+ # @param [Hash] opts the optional parameters
489
+ # @return [nil]
490
+ def delete_organization(organization_id, opts = {})
491
+ delete_organization_with_http_info(organization_id, opts)
492
+ nil
493
+ end
494
+
495
+ # Delete organization
496
+ # @param organization_id [String] Organization ID
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
499
+ def delete_organization_with_http_info(organization_id, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization ...'
502
+ end
503
+ # verify the required parameter 'organization_id' is set
504
+ if @api_client.config.client_side_validation && organization_id.nil?
505
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization"
506
+ end
507
+ # resource path
508
+ local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
509
+
510
+ # query parameters
511
+ query_params = opts[:query_params] || {}
512
+
513
+ # header parameters
514
+ header_params = opts[:header_params] || {}
515
+
516
+ # form parameters
517
+ form_params = opts[:form_params] || {}
518
+
519
+ # http body (model)
520
+ post_body = opts[:debug_body]
521
+
522
+ # return_type
523
+ return_type = opts[:debug_return_type]
524
+
525
+ # auth_names
526
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
527
+
528
+ new_options = opts.merge(
529
+ :operation => :"OrganizationsApi.delete_organization",
530
+ :header_params => header_params,
531
+ :query_params => query_params,
532
+ :form_params => form_params,
533
+ :body => post_body,
534
+ :auth_names => auth_names,
535
+ :return_type => return_type
536
+ )
537
+
538
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
539
+ if @api_client.config.debugging
540
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
541
+ end
542
+ return data, status_code, headers
543
+ end
544
+
545
+ # Delete organization member
546
+ # @param organization_id [String] Organization ID
547
+ # @param user_id [String] User ID
548
+ # @param [Hash] opts the optional parameters
549
+ # @return [nil]
550
+ def delete_organization_member(organization_id, user_id, opts = {})
551
+ delete_organization_member_with_http_info(organization_id, user_id, opts)
552
+ nil
553
+ end
554
+
555
+ # Delete organization member
556
+ # @param organization_id [String] Organization ID
557
+ # @param user_id [String] User ID
558
+ # @param [Hash] opts the optional parameters
559
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
560
+ def delete_organization_member_with_http_info(organization_id, user_id, opts = {})
561
+ if @api_client.config.debugging
562
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_member ...'
563
+ end
564
+ # verify the required parameter 'organization_id' is set
565
+ if @api_client.config.client_side_validation && organization_id.nil?
566
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_member"
567
+ end
568
+ # verify the required parameter 'user_id' is set
569
+ if @api_client.config.client_side_validation && user_id.nil?
570
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.delete_organization_member"
571
+ end
572
+ # resource path
573
+ local_var_path = '/organizations/{organizationId}/users/{userId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
574
+
575
+ # query parameters
576
+ query_params = opts[:query_params] || {}
577
+
578
+ # header parameters
579
+ header_params = opts[:header_params] || {}
580
+
581
+ # form parameters
582
+ form_params = opts[:form_params] || {}
583
+
584
+ # http body (model)
585
+ post_body = opts[:debug_body]
586
+
587
+ # return_type
588
+ return_type = opts[:debug_return_type]
589
+
590
+ # auth_names
591
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
592
+
593
+ new_options = opts.merge(
594
+ :operation => :"OrganizationsApi.delete_organization_member",
595
+ :header_params => header_params,
596
+ :query_params => query_params,
597
+ :form_params => form_params,
598
+ :body => post_body,
599
+ :auth_names => auth_names,
600
+ :return_type => return_type
601
+ )
602
+
603
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
604
+ if @api_client.config.debugging
605
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
606
+ end
607
+ return data, status_code, headers
608
+ end
609
+
610
+ # Delete organization OpenTelemetry configuration
611
+ # @param organization_id [String] Organization ID
612
+ # @param [Hash] opts the optional parameters
613
+ # @return [nil]
614
+ def delete_organization_otel_config(organization_id, opts = {})
615
+ delete_organization_otel_config_with_http_info(organization_id, opts)
616
+ nil
617
+ end
618
+
619
+ # Delete organization OpenTelemetry configuration
620
+ # @param organization_id [String] Organization ID
621
+ # @param [Hash] opts the optional parameters
622
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
623
+ def delete_organization_otel_config_with_http_info(organization_id, opts = {})
624
+ if @api_client.config.debugging
625
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_otel_config ...'
626
+ end
627
+ # verify the required parameter 'organization_id' is set
628
+ if @api_client.config.client_side_validation && organization_id.nil?
629
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_otel_config"
630
+ end
631
+ # resource path
632
+ local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
633
+
634
+ # query parameters
635
+ query_params = opts[:query_params] || {}
636
+
637
+ # header parameters
638
+ header_params = opts[:header_params] || {}
639
+
640
+ # form parameters
641
+ form_params = opts[:form_params] || {}
642
+
643
+ # http body (model)
644
+ post_body = opts[:debug_body]
645
+
646
+ # return_type
647
+ return_type = opts[:debug_return_type]
648
+
649
+ # auth_names
650
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
651
+
652
+ new_options = opts.merge(
653
+ :operation => :"OrganizationsApi.delete_organization_otel_config",
654
+ :header_params => header_params,
655
+ :query_params => query_params,
656
+ :form_params => form_params,
657
+ :body => post_body,
658
+ :auth_names => auth_names,
659
+ :return_type => return_type
660
+ )
661
+
662
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
663
+ if @api_client.config.debugging
664
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
665
+ end
666
+ return data, status_code, headers
667
+ end
668
+
669
+ # Delete organization role
670
+ # @param organization_id [String] Organization ID
671
+ # @param role_id [String] Role ID
672
+ # @param [Hash] opts the optional parameters
673
+ # @return [nil]
674
+ def delete_organization_role(organization_id, role_id, opts = {})
675
+ delete_organization_role_with_http_info(organization_id, role_id, opts)
676
+ nil
677
+ end
678
+
679
+ # Delete organization role
680
+ # @param organization_id [String] Organization ID
681
+ # @param role_id [String] Role ID
682
+ # @param [Hash] opts the optional parameters
683
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
684
+ def delete_organization_role_with_http_info(organization_id, role_id, opts = {})
685
+ if @api_client.config.debugging
686
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_role ...'
687
+ end
688
+ # verify the required parameter 'organization_id' is set
689
+ if @api_client.config.client_side_validation && organization_id.nil?
690
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_role"
691
+ end
692
+ # verify the required parameter 'role_id' is set
693
+ if @api_client.config.client_side_validation && role_id.nil?
694
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.delete_organization_role"
695
+ end
696
+ # resource path
697
+ local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))
698
+
699
+ # query parameters
700
+ query_params = opts[:query_params] || {}
701
+
702
+ # header parameters
703
+ header_params = opts[:header_params] || {}
704
+
705
+ # form parameters
706
+ form_params = opts[:form_params] || {}
707
+
708
+ # http body (model)
709
+ post_body = opts[:debug_body]
710
+
711
+ # return_type
712
+ return_type = opts[:debug_return_type]
713
+
714
+ # auth_names
715
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
716
+
717
+ new_options = opts.merge(
718
+ :operation => :"OrganizationsApi.delete_organization_role",
719
+ :header_params => header_params,
720
+ :query_params => query_params,
721
+ :form_params => form_params,
722
+ :body => post_body,
723
+ :auth_names => auth_names,
724
+ :return_type => return_type
725
+ )
726
+
727
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
728
+ if @api_client.config.debugging
729
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
730
+ end
731
+ return data, status_code, headers
732
+ end
733
+
734
+ # Delete a region
735
+ # @param id [String] Region ID
736
+ # @param [Hash] opts the optional parameters
737
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
738
+ # @return [nil]
739
+ def delete_region(id, opts = {})
740
+ delete_region_with_http_info(id, opts)
741
+ nil
742
+ end
743
+
744
+ # Delete a region
745
+ # @param id [String] Region ID
746
+ # @param [Hash] opts the optional parameters
747
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
748
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
749
+ def delete_region_with_http_info(id, opts = {})
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_region ...'
752
+ end
753
+ # verify the required parameter 'id' is set
754
+ if @api_client.config.client_side_validation && id.nil?
755
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.delete_region"
756
+ end
757
+ # resource path
758
+ local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
759
+
760
+ # query parameters
761
+ query_params = opts[:query_params] || {}
762
+
763
+ # header parameters
764
+ header_params = opts[:header_params] || {}
765
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
766
+
767
+ # form parameters
768
+ form_params = opts[:form_params] || {}
769
+
770
+ # http body (model)
771
+ post_body = opts[:debug_body]
772
+
773
+ # return_type
774
+ return_type = opts[:debug_return_type]
775
+
776
+ # auth_names
777
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
778
+
779
+ new_options = opts.merge(
780
+ :operation => :"OrganizationsApi.delete_region",
781
+ :header_params => header_params,
782
+ :query_params => query_params,
783
+ :form_params => form_params,
784
+ :body => post_body,
785
+ :auth_names => auth_names,
786
+ :return_type => return_type
787
+ )
788
+
789
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
790
+ if @api_client.config.debugging
791
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
792
+ end
793
+ return data, status_code, headers
794
+ end
795
+
796
+ # Get organization by ID
797
+ # @param organization_id [String] Organization ID
798
+ # @param [Hash] opts the optional parameters
799
+ # @return [Organization]
800
+ def get_organization(organization_id, opts = {})
801
+ data, _status_code, _headers = get_organization_with_http_info(organization_id, opts)
802
+ data
803
+ end
804
+
805
+ # Get organization by ID
806
+ # @param organization_id [String] Organization ID
807
+ # @param [Hash] opts the optional parameters
808
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
809
+ def get_organization_with_http_info(organization_id, opts = {})
810
+ if @api_client.config.debugging
811
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization ...'
812
+ end
813
+ # verify the required parameter 'organization_id' is set
814
+ if @api_client.config.client_side_validation && organization_id.nil?
815
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization"
816
+ end
817
+ # resource path
818
+ local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
819
+
820
+ # query parameters
821
+ query_params = opts[:query_params] || {}
822
+
823
+ # header parameters
824
+ header_params = opts[:header_params] || {}
825
+ # HTTP header 'Accept' (if needed)
826
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
827
+
828
+ # form parameters
829
+ form_params = opts[:form_params] || {}
830
+
831
+ # http body (model)
832
+ post_body = opts[:debug_body]
833
+
834
+ # return_type
835
+ return_type = opts[:debug_return_type] || 'Organization'
836
+
837
+ # auth_names
838
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
839
+
840
+ new_options = opts.merge(
841
+ :operation => :"OrganizationsApi.get_organization",
842
+ :header_params => header_params,
843
+ :query_params => query_params,
844
+ :form_params => form_params,
845
+ :body => post_body,
846
+ :auth_names => auth_names,
847
+ :return_type => return_type
848
+ )
849
+
850
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
851
+ if @api_client.config.debugging
852
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
853
+ end
854
+ return data, status_code, headers
855
+ end
856
+
857
+ # Get count of organization invitations for authenticated user
858
+ # @param [Hash] opts the optional parameters
859
+ # @return [Float]
860
+ def get_organization_invitations_count_for_authenticated_user(opts = {})
861
+ data, _status_code, _headers = get_organization_invitations_count_for_authenticated_user_with_http_info(opts)
862
+ data
863
+ end
864
+
865
+ # Get count of organization invitations for authenticated user
866
+ # @param [Hash] opts the optional parameters
867
+ # @return [Array<(Float, Integer, Hash)>] Float data, response status code and response headers
868
+ def get_organization_invitations_count_for_authenticated_user_with_http_info(opts = {})
869
+ if @api_client.config.debugging
870
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_invitations_count_for_authenticated_user ...'
871
+ end
872
+ # resource path
873
+ local_var_path = '/organizations/invitations/count'
874
+
875
+ # query parameters
876
+ query_params = opts[:query_params] || {}
877
+
878
+ # header parameters
879
+ header_params = opts[:header_params] || {}
880
+ # HTTP header 'Accept' (if needed)
881
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
882
+
883
+ # form parameters
884
+ form_params = opts[:form_params] || {}
885
+
886
+ # http body (model)
887
+ post_body = opts[:debug_body]
888
+
889
+ # return_type
890
+ return_type = opts[:debug_return_type] || 'Float'
891
+
892
+ # auth_names
893
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
894
+
895
+ new_options = opts.merge(
896
+ :operation => :"OrganizationsApi.get_organization_invitations_count_for_authenticated_user",
897
+ :header_params => header_params,
898
+ :query_params => query_params,
899
+ :form_params => form_params,
900
+ :body => post_body,
901
+ :auth_names => auth_names,
902
+ :return_type => return_type
903
+ )
904
+
905
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
906
+ if @api_client.config.debugging
907
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_invitations_count_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
908
+ end
909
+ return data, status_code, headers
910
+ end
911
+
912
+ # Get organization OTEL config by organization ID
913
+ # @param organization_id [String] Organization ID
914
+ # @param [Hash] opts the optional parameters
915
+ # @return [OtelConfig]
916
+ def get_organization_otel_config(organization_id, opts = {})
917
+ data, _status_code, _headers = get_organization_otel_config_with_http_info(organization_id, opts)
918
+ data
919
+ end
920
+
921
+ # Get organization OTEL config by organization ID
922
+ # @param organization_id [String] Organization ID
923
+ # @param [Hash] opts the optional parameters
924
+ # @return [Array<(OtelConfig, Integer, Hash)>] OtelConfig data, response status code and response headers
925
+ def get_organization_otel_config_with_http_info(organization_id, opts = {})
926
+ if @api_client.config.debugging
927
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_otel_config ...'
928
+ end
929
+ # verify the required parameter 'organization_id' is set
930
+ if @api_client.config.client_side_validation && organization_id.nil?
931
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_otel_config"
932
+ end
933
+ # resource path
934
+ local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
935
+
936
+ # query parameters
937
+ query_params = opts[:query_params] || {}
938
+
939
+ # header parameters
940
+ header_params = opts[:header_params] || {}
941
+ # HTTP header 'Accept' (if needed)
942
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
943
+
944
+ # form parameters
945
+ form_params = opts[:form_params] || {}
946
+
947
+ # http body (model)
948
+ post_body = opts[:debug_body]
949
+
950
+ # return_type
951
+ return_type = opts[:debug_return_type] || 'OtelConfig'
952
+
953
+ # auth_names
954
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
955
+
956
+ new_options = opts.merge(
957
+ :operation => :"OrganizationsApi.get_organization_otel_config",
958
+ :header_params => header_params,
959
+ :query_params => query_params,
960
+ :form_params => form_params,
961
+ :body => post_body,
962
+ :auth_names => auth_names,
963
+ :return_type => return_type
964
+ )
965
+
966
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
967
+ if @api_client.config.debugging
968
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
969
+ end
970
+ return data, status_code, headers
971
+ end
972
+
973
+ # Get organization OTEL config by sandbox auth token
974
+ # @param auth_token [String] Sandbox Auth Token
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [OtelConfig]
977
+ def get_organization_otel_config_by_sandbox_auth_token(auth_token, opts = {})
978
+ data, _status_code, _headers = get_organization_otel_config_by_sandbox_auth_token_with_http_info(auth_token, opts)
979
+ data
980
+ end
981
+
982
+ # Get organization OTEL config by sandbox auth token
983
+ # @param auth_token [String] Sandbox Auth Token
984
+ # @param [Hash] opts the optional parameters
985
+ # @return [Array<(OtelConfig, Integer, Hash)>] OtelConfig data, response status code and response headers
986
+ def get_organization_otel_config_by_sandbox_auth_token_with_http_info(auth_token, opts = {})
987
+ if @api_client.config.debugging
988
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token ...'
989
+ end
990
+ # verify the required parameter 'auth_token' is set
991
+ if @api_client.config.client_side_validation && auth_token.nil?
992
+ fail ArgumentError, "Missing the required parameter 'auth_token' when calling OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token"
993
+ end
994
+ # resource path
995
+ local_var_path = '/organizations/otel-config/by-sandbox-auth-token/{authToken}'.sub('{' + 'authToken' + '}', CGI.escape(auth_token.to_s))
996
+
997
+ # query parameters
998
+ query_params = opts[:query_params] || {}
999
+
1000
+ # header parameters
1001
+ header_params = opts[:header_params] || {}
1002
+ # HTTP header 'Accept' (if needed)
1003
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1004
+
1005
+ # form parameters
1006
+ form_params = opts[:form_params] || {}
1007
+
1008
+ # http body (model)
1009
+ post_body = opts[:debug_body]
1010
+
1011
+ # return_type
1012
+ return_type = opts[:debug_return_type] || 'OtelConfig'
1013
+
1014
+ # auth_names
1015
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1016
+
1017
+ new_options = opts.merge(
1018
+ :operation => :"OrganizationsApi.get_organization_otel_config_by_sandbox_auth_token",
1019
+ :header_params => header_params,
1020
+ :query_params => query_params,
1021
+ :form_params => form_params,
1022
+ :body => post_body,
1023
+ :auth_names => auth_names,
1024
+ :return_type => return_type
1025
+ )
1026
+
1027
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1028
+ if @api_client.config.debugging
1029
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_otel_config_by_sandbox_auth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1030
+ end
1031
+ return data, status_code, headers
1032
+ end
1033
+
1034
+ # Get organization current usage overview
1035
+ # @param organization_id [String] Organization ID
1036
+ # @param [Hash] opts the optional parameters
1037
+ # @return [OrganizationUsageOverview]
1038
+ def get_organization_usage_overview(organization_id, opts = {})
1039
+ data, _status_code, _headers = get_organization_usage_overview_with_http_info(organization_id, opts)
1040
+ data
1041
+ end
1042
+
1043
+ # Get organization current usage overview
1044
+ # @param organization_id [String] Organization ID
1045
+ # @param [Hash] opts the optional parameters
1046
+ # @return [Array<(OrganizationUsageOverview, Integer, Hash)>] OrganizationUsageOverview data, response status code and response headers
1047
+ def get_organization_usage_overview_with_http_info(organization_id, opts = {})
1048
+ if @api_client.config.debugging
1049
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_usage_overview ...'
1050
+ end
1051
+ # verify the required parameter 'organization_id' is set
1052
+ if @api_client.config.client_side_validation && organization_id.nil?
1053
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_usage_overview"
1054
+ end
1055
+ # resource path
1056
+ local_var_path = '/organizations/{organizationId}/usage'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1057
+
1058
+ # query parameters
1059
+ query_params = opts[:query_params] || {}
1060
+
1061
+ # header parameters
1062
+ header_params = opts[:header_params] || {}
1063
+ # HTTP header 'Accept' (if needed)
1064
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1065
+
1066
+ # form parameters
1067
+ form_params = opts[:form_params] || {}
1068
+
1069
+ # http body (model)
1070
+ post_body = opts[:debug_body]
1071
+
1072
+ # return_type
1073
+ return_type = opts[:debug_return_type] || 'OrganizationUsageOverview'
1074
+
1075
+ # auth_names
1076
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1077
+
1078
+ new_options = opts.merge(
1079
+ :operation => :"OrganizationsApi.get_organization_usage_overview",
1080
+ :header_params => header_params,
1081
+ :query_params => query_params,
1082
+ :form_params => form_params,
1083
+ :body => post_body,
1084
+ :auth_names => auth_names,
1085
+ :return_type => return_type
1086
+ )
1087
+
1088
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1089
+ if @api_client.config.debugging
1090
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_usage_overview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1091
+ end
1092
+ return data, status_code, headers
1093
+ end
1094
+
1095
+ # Get region by ID
1096
+ # @param id [String] Region ID
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1099
+ # @return [Region]
1100
+ def get_region_by_id(id, opts = {})
1101
+ data, _status_code, _headers = get_region_by_id_with_http_info(id, opts)
1102
+ data
1103
+ end
1104
+
1105
+ # Get region by ID
1106
+ # @param id [String] Region ID
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1109
+ # @return [Array<(Region, Integer, Hash)>] Region data, response status code and response headers
1110
+ def get_region_by_id_with_http_info(id, opts = {})
1111
+ if @api_client.config.debugging
1112
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_region_by_id ...'
1113
+ end
1114
+ # verify the required parameter 'id' is set
1115
+ if @api_client.config.client_side_validation && id.nil?
1116
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.get_region_by_id"
1117
+ end
1118
+ # resource path
1119
+ local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1120
+
1121
+ # query parameters
1122
+ query_params = opts[:query_params] || {}
1123
+
1124
+ # header parameters
1125
+ header_params = opts[:header_params] || {}
1126
+ # HTTP header 'Accept' (if needed)
1127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1128
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
1129
+
1130
+ # form parameters
1131
+ form_params = opts[:form_params] || {}
1132
+
1133
+ # http body (model)
1134
+ post_body = opts[:debug_body]
1135
+
1136
+ # return_type
1137
+ return_type = opts[:debug_return_type] || 'Region'
1138
+
1139
+ # auth_names
1140
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1141
+
1142
+ new_options = opts.merge(
1143
+ :operation => :"OrganizationsApi.get_region_by_id",
1144
+ :header_params => header_params,
1145
+ :query_params => query_params,
1146
+ :form_params => form_params,
1147
+ :body => post_body,
1148
+ :auth_names => auth_names,
1149
+ :return_type => return_type
1150
+ )
1151
+
1152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1153
+ if @api_client.config.debugging
1154
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1155
+ end
1156
+ return data, status_code, headers
1157
+ end
1158
+
1159
+ # Leave organization
1160
+ # @param organization_id [String] Organization ID
1161
+ # @param [Hash] opts the optional parameters
1162
+ # @return [nil]
1163
+ def leave_organization(organization_id, opts = {})
1164
+ leave_organization_with_http_info(organization_id, opts)
1165
+ nil
1166
+ end
1167
+
1168
+ # Leave organization
1169
+ # @param organization_id [String] Organization ID
1170
+ # @param [Hash] opts the optional parameters
1171
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1172
+ def leave_organization_with_http_info(organization_id, opts = {})
1173
+ if @api_client.config.debugging
1174
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.leave_organization ...'
1175
+ end
1176
+ # verify the required parameter 'organization_id' is set
1177
+ if @api_client.config.client_side_validation && organization_id.nil?
1178
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.leave_organization"
1179
+ end
1180
+ # resource path
1181
+ local_var_path = '/organizations/{organizationId}/leave'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1182
+
1183
+ # query parameters
1184
+ query_params = opts[:query_params] || {}
1185
+
1186
+ # header parameters
1187
+ header_params = opts[:header_params] || {}
1188
+
1189
+ # form parameters
1190
+ form_params = opts[:form_params] || {}
1191
+
1192
+ # http body (model)
1193
+ post_body = opts[:debug_body]
1194
+
1195
+ # return_type
1196
+ return_type = opts[:debug_return_type]
1197
+
1198
+ # auth_names
1199
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1200
+
1201
+ new_options = opts.merge(
1202
+ :operation => :"OrganizationsApi.leave_organization",
1203
+ :header_params => header_params,
1204
+ :query_params => query_params,
1205
+ :form_params => form_params,
1206
+ :body => post_body,
1207
+ :auth_names => auth_names,
1208
+ :return_type => return_type
1209
+ )
1210
+
1211
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1212
+ if @api_client.config.debugging
1213
+ @api_client.config.logger.debug "API called: OrganizationsApi#leave_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1214
+ end
1215
+ return data, status_code, headers
1216
+ end
1217
+
1218
+ # List all available regions for the organization
1219
+ # @param [Hash] opts the optional parameters
1220
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1221
+ # @return [Array<Region>]
1222
+ def list_available_regions(opts = {})
1223
+ data, _status_code, _headers = list_available_regions_with_http_info(opts)
1224
+ data
1225
+ end
1226
+
1227
+ # List all available regions for the organization
1228
+ # @param [Hash] opts the optional parameters
1229
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1230
+ # @return [Array<(Array<Region>, Integer, Hash)>] Array<Region> data, response status code and response headers
1231
+ def list_available_regions_with_http_info(opts = {})
1232
+ if @api_client.config.debugging
1233
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_available_regions ...'
1234
+ end
1235
+ # resource path
1236
+ local_var_path = '/regions'
1237
+
1238
+ # query parameters
1239
+ query_params = opts[:query_params] || {}
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']) unless header_params['Accept']
1245
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].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] || 'Array<Region>'
1255
+
1256
+ # auth_names
1257
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1258
+
1259
+ new_options = opts.merge(
1260
+ :operation => :"OrganizationsApi.list_available_regions",
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: OrganizationsApi#list_available_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1272
+ end
1273
+ return data, status_code, headers
1274
+ end
1275
+
1276
+ # List pending organization invitations
1277
+ # @param organization_id [String] Organization ID
1278
+ # @param [Hash] opts the optional parameters
1279
+ # @return [Array<OrganizationInvitation>]
1280
+ def list_organization_invitations(organization_id, opts = {})
1281
+ data, _status_code, _headers = list_organization_invitations_with_http_info(organization_id, opts)
1282
+ data
1283
+ end
1284
+
1285
+ # List pending organization invitations
1286
+ # @param organization_id [String] Organization ID
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
1289
+ def list_organization_invitations_with_http_info(organization_id, opts = {})
1290
+ if @api_client.config.debugging
1291
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations ...'
1292
+ end
1293
+ # verify the required parameter 'organization_id' is set
1294
+ if @api_client.config.client_side_validation && organization_id.nil?
1295
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_invitations"
1296
+ end
1297
+ # resource path
1298
+ local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1299
+
1300
+ # query parameters
1301
+ query_params = opts[:query_params] || {}
1302
+
1303
+ # header parameters
1304
+ header_params = opts[:header_params] || {}
1305
+ # HTTP header 'Accept' (if needed)
1306
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1307
+
1308
+ # form parameters
1309
+ form_params = opts[:form_params] || {}
1310
+
1311
+ # http body (model)
1312
+ post_body = opts[:debug_body]
1313
+
1314
+ # return_type
1315
+ return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'
1316
+
1317
+ # auth_names
1318
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1319
+
1320
+ new_options = opts.merge(
1321
+ :operation => :"OrganizationsApi.list_organization_invitations",
1322
+ :header_params => header_params,
1323
+ :query_params => query_params,
1324
+ :form_params => form_params,
1325
+ :body => post_body,
1326
+ :auth_names => auth_names,
1327
+ :return_type => return_type
1328
+ )
1329
+
1330
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1331
+ if @api_client.config.debugging
1332
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1333
+ end
1334
+ return data, status_code, headers
1335
+ end
1336
+
1337
+ # List organization invitations for authenticated user
1338
+ # @param [Hash] opts the optional parameters
1339
+ # @return [Array<OrganizationInvitation>]
1340
+ def list_organization_invitations_for_authenticated_user(opts = {})
1341
+ data, _status_code, _headers = list_organization_invitations_for_authenticated_user_with_http_info(opts)
1342
+ data
1343
+ end
1344
+
1345
+ # List organization invitations for authenticated user
1346
+ # @param [Hash] opts the optional parameters
1347
+ # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
1348
+ def list_organization_invitations_for_authenticated_user_with_http_info(opts = {})
1349
+ if @api_client.config.debugging
1350
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations_for_authenticated_user ...'
1351
+ end
1352
+ # resource path
1353
+ local_var_path = '/organizations/invitations'
1354
+
1355
+ # query parameters
1356
+ query_params = opts[:query_params] || {}
1357
+
1358
+ # header parameters
1359
+ header_params = opts[:header_params] || {}
1360
+ # HTTP header 'Accept' (if needed)
1361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1362
+
1363
+ # form parameters
1364
+ form_params = opts[:form_params] || {}
1365
+
1366
+ # http body (model)
1367
+ post_body = opts[:debug_body]
1368
+
1369
+ # return_type
1370
+ return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'
1371
+
1372
+ # auth_names
1373
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1374
+
1375
+ new_options = opts.merge(
1376
+ :operation => :"OrganizationsApi.list_organization_invitations_for_authenticated_user",
1377
+ :header_params => header_params,
1378
+ :query_params => query_params,
1379
+ :form_params => form_params,
1380
+ :body => post_body,
1381
+ :auth_names => auth_names,
1382
+ :return_type => return_type
1383
+ )
1384
+
1385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1386
+ if @api_client.config.debugging
1387
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1388
+ end
1389
+ return data, status_code, headers
1390
+ end
1391
+
1392
+ # List organization members
1393
+ # @param organization_id [String] Organization ID
1394
+ # @param [Hash] opts the optional parameters
1395
+ # @return [Array<OrganizationUser>]
1396
+ def list_organization_members(organization_id, opts = {})
1397
+ data, _status_code, _headers = list_organization_members_with_http_info(organization_id, opts)
1398
+ data
1399
+ end
1400
+
1401
+ # List organization members
1402
+ # @param organization_id [String] Organization ID
1403
+ # @param [Hash] opts the optional parameters
1404
+ # @return [Array<(Array<OrganizationUser>, Integer, Hash)>] Array<OrganizationUser> data, response status code and response headers
1405
+ def list_organization_members_with_http_info(organization_id, opts = {})
1406
+ if @api_client.config.debugging
1407
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_members ...'
1408
+ end
1409
+ # verify the required parameter 'organization_id' is set
1410
+ if @api_client.config.client_side_validation && organization_id.nil?
1411
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_members"
1412
+ end
1413
+ # resource path
1414
+ local_var_path = '/organizations/{organizationId}/users'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1415
+
1416
+ # query parameters
1417
+ query_params = opts[:query_params] || {}
1418
+
1419
+ # header parameters
1420
+ header_params = opts[:header_params] || {}
1421
+ # HTTP header 'Accept' (if needed)
1422
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1423
+
1424
+ # form parameters
1425
+ form_params = opts[:form_params] || {}
1426
+
1427
+ # http body (model)
1428
+ post_body = opts[:debug_body]
1429
+
1430
+ # return_type
1431
+ return_type = opts[:debug_return_type] || 'Array<OrganizationUser>'
1432
+
1433
+ # auth_names
1434
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1435
+
1436
+ new_options = opts.merge(
1437
+ :operation => :"OrganizationsApi.list_organization_members",
1438
+ :header_params => header_params,
1439
+ :query_params => query_params,
1440
+ :form_params => form_params,
1441
+ :body => post_body,
1442
+ :auth_names => auth_names,
1443
+ :return_type => return_type
1444
+ )
1445
+
1446
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1447
+ if @api_client.config.debugging
1448
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1449
+ end
1450
+ return data, status_code, headers
1451
+ end
1452
+
1453
+ # List organization roles
1454
+ # @param organization_id [String] Organization ID
1455
+ # @param [Hash] opts the optional parameters
1456
+ # @return [Array<OrganizationRole>]
1457
+ def list_organization_roles(organization_id, opts = {})
1458
+ data, _status_code, _headers = list_organization_roles_with_http_info(organization_id, opts)
1459
+ data
1460
+ end
1461
+
1462
+ # List organization roles
1463
+ # @param organization_id [String] Organization ID
1464
+ # @param [Hash] opts the optional parameters
1465
+ # @return [Array<(Array<OrganizationRole>, Integer, Hash)>] Array<OrganizationRole> data, response status code and response headers
1466
+ def list_organization_roles_with_http_info(organization_id, opts = {})
1467
+ if @api_client.config.debugging
1468
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_roles ...'
1469
+ end
1470
+ # verify the required parameter 'organization_id' is set
1471
+ if @api_client.config.client_side_validation && organization_id.nil?
1472
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_roles"
1473
+ end
1474
+ # resource path
1475
+ local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1476
+
1477
+ # query parameters
1478
+ query_params = opts[:query_params] || {}
1479
+
1480
+ # header parameters
1481
+ header_params = opts[:header_params] || {}
1482
+ # HTTP header 'Accept' (if needed)
1483
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1484
+
1485
+ # form parameters
1486
+ form_params = opts[:form_params] || {}
1487
+
1488
+ # http body (model)
1489
+ post_body = opts[:debug_body]
1490
+
1491
+ # return_type
1492
+ return_type = opts[:debug_return_type] || 'Array<OrganizationRole>'
1493
+
1494
+ # auth_names
1495
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1496
+
1497
+ new_options = opts.merge(
1498
+ :operation => :"OrganizationsApi.list_organization_roles",
1499
+ :header_params => header_params,
1500
+ :query_params => query_params,
1501
+ :form_params => form_params,
1502
+ :body => post_body,
1503
+ :auth_names => auth_names,
1504
+ :return_type => return_type
1505
+ )
1506
+
1507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1508
+ if @api_client.config.debugging
1509
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1510
+ end
1511
+ return data, status_code, headers
1512
+ end
1513
+
1514
+ # List organizations
1515
+ # @param [Hash] opts the optional parameters
1516
+ # @return [Array<Organization>]
1517
+ def list_organizations(opts = {})
1518
+ data, _status_code, _headers = list_organizations_with_http_info(opts)
1519
+ data
1520
+ end
1521
+
1522
+ # List organizations
1523
+ # @param [Hash] opts the optional parameters
1524
+ # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
1525
+ def list_organizations_with_http_info(opts = {})
1526
+ if @api_client.config.debugging
1527
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organizations ...'
1528
+ end
1529
+ # resource path
1530
+ local_var_path = '/organizations'
1531
+
1532
+ # query parameters
1533
+ query_params = opts[:query_params] || {}
1534
+
1535
+ # header parameters
1536
+ header_params = opts[:header_params] || {}
1537
+ # HTTP header 'Accept' (if needed)
1538
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1539
+
1540
+ # form parameters
1541
+ form_params = opts[:form_params] || {}
1542
+
1543
+ # http body (model)
1544
+ post_body = opts[:debug_body]
1545
+
1546
+ # return_type
1547
+ return_type = opts[:debug_return_type] || 'Array<Organization>'
1548
+
1549
+ # auth_names
1550
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1551
+
1552
+ new_options = opts.merge(
1553
+ :operation => :"OrganizationsApi.list_organizations",
1554
+ :header_params => header_params,
1555
+ :query_params => query_params,
1556
+ :form_params => form_params,
1557
+ :body => post_body,
1558
+ :auth_names => auth_names,
1559
+ :return_type => return_type
1560
+ )
1561
+
1562
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1563
+ if @api_client.config.debugging
1564
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1565
+ end
1566
+ return data, status_code, headers
1567
+ end
1568
+
1569
+ # Regenerate proxy API key for a region
1570
+ # @param id [String] Region ID
1571
+ # @param [Hash] opts the optional parameters
1572
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1573
+ # @return [RegenerateApiKeyResponse]
1574
+ def regenerate_proxy_api_key(id, opts = {})
1575
+ data, _status_code, _headers = regenerate_proxy_api_key_with_http_info(id, opts)
1576
+ data
1577
+ end
1578
+
1579
+ # Regenerate proxy API key for a region
1580
+ # @param id [String] Region ID
1581
+ # @param [Hash] opts the optional parameters
1582
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1583
+ # @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
1584
+ def regenerate_proxy_api_key_with_http_info(id, opts = {})
1585
+ if @api_client.config.debugging
1586
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_proxy_api_key ...'
1587
+ end
1588
+ # verify the required parameter 'id' is set
1589
+ if @api_client.config.client_side_validation && id.nil?
1590
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_proxy_api_key"
1591
+ end
1592
+ # resource path
1593
+ local_var_path = '/regions/{id}/regenerate-proxy-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1594
+
1595
+ # query parameters
1596
+ query_params = opts[:query_params] || {}
1597
+
1598
+ # header parameters
1599
+ header_params = opts[:header_params] || {}
1600
+ # HTTP header 'Accept' (if needed)
1601
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1602
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
1603
+
1604
+ # form parameters
1605
+ form_params = opts[:form_params] || {}
1606
+
1607
+ # http body (model)
1608
+ post_body = opts[:debug_body]
1609
+
1610
+ # return_type
1611
+ return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'
1612
+
1613
+ # auth_names
1614
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1615
+
1616
+ new_options = opts.merge(
1617
+ :operation => :"OrganizationsApi.regenerate_proxy_api_key",
1618
+ :header_params => header_params,
1619
+ :query_params => query_params,
1620
+ :form_params => form_params,
1621
+ :body => post_body,
1622
+ :auth_names => auth_names,
1623
+ :return_type => return_type
1624
+ )
1625
+
1626
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1627
+ if @api_client.config.debugging
1628
+ @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_proxy_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1629
+ end
1630
+ return data, status_code, headers
1631
+ end
1632
+
1633
+ # Regenerate snapshot manager credentials for a region
1634
+ # @param id [String] Region ID
1635
+ # @param [Hash] opts the optional parameters
1636
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1637
+ # @return [SnapshotManagerCredentials]
1638
+ def regenerate_snapshot_manager_credentials(id, opts = {})
1639
+ data, _status_code, _headers = regenerate_snapshot_manager_credentials_with_http_info(id, opts)
1640
+ data
1641
+ end
1642
+
1643
+ # Regenerate snapshot manager credentials for a region
1644
+ # @param id [String] Region ID
1645
+ # @param [Hash] opts the optional parameters
1646
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1647
+ # @return [Array<(SnapshotManagerCredentials, Integer, Hash)>] SnapshotManagerCredentials data, response status code and response headers
1648
+ def regenerate_snapshot_manager_credentials_with_http_info(id, opts = {})
1649
+ if @api_client.config.debugging
1650
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_snapshot_manager_credentials ...'
1651
+ end
1652
+ # verify the required parameter 'id' is set
1653
+ if @api_client.config.client_side_validation && id.nil?
1654
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_snapshot_manager_credentials"
1655
+ end
1656
+ # resource path
1657
+ local_var_path = '/regions/{id}/regenerate-snapshot-manager-credentials'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1658
+
1659
+ # query parameters
1660
+ query_params = opts[:query_params] || {}
1661
+
1662
+ # header parameters
1663
+ header_params = opts[:header_params] || {}
1664
+ # HTTP header 'Accept' (if needed)
1665
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1666
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
1667
+
1668
+ # form parameters
1669
+ form_params = opts[:form_params] || {}
1670
+
1671
+ # http body (model)
1672
+ post_body = opts[:debug_body]
1673
+
1674
+ # return_type
1675
+ return_type = opts[:debug_return_type] || 'SnapshotManagerCredentials'
1676
+
1677
+ # auth_names
1678
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1679
+
1680
+ new_options = opts.merge(
1681
+ :operation => :"OrganizationsApi.regenerate_snapshot_manager_credentials",
1682
+ :header_params => header_params,
1683
+ :query_params => query_params,
1684
+ :form_params => form_params,
1685
+ :body => post_body,
1686
+ :auth_names => auth_names,
1687
+ :return_type => return_type
1688
+ )
1689
+
1690
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1691
+ if @api_client.config.debugging
1692
+ @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_snapshot_manager_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1693
+ end
1694
+ return data, status_code, headers
1695
+ end
1696
+
1697
+ # Regenerate SSH gateway API key for a region
1698
+ # @param id [String] Region ID
1699
+ # @param [Hash] opts the optional parameters
1700
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1701
+ # @return [RegenerateApiKeyResponse]
1702
+ def regenerate_ssh_gateway_api_key(id, opts = {})
1703
+ data, _status_code, _headers = regenerate_ssh_gateway_api_key_with_http_info(id, opts)
1704
+ data
1705
+ end
1706
+
1707
+ # Regenerate SSH gateway API key for a region
1708
+ # @param id [String] Region ID
1709
+ # @param [Hash] opts the optional parameters
1710
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
1711
+ # @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
1712
+ def regenerate_ssh_gateway_api_key_with_http_info(id, opts = {})
1713
+ if @api_client.config.debugging
1714
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_ssh_gateway_api_key ...'
1715
+ end
1716
+ # verify the required parameter 'id' is set
1717
+ if @api_client.config.client_side_validation && id.nil?
1718
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_ssh_gateway_api_key"
1719
+ end
1720
+ # resource path
1721
+ local_var_path = '/regions/{id}/regenerate-ssh-gateway-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1722
+
1723
+ # query parameters
1724
+ query_params = opts[:query_params] || {}
1725
+
1726
+ # header parameters
1727
+ header_params = opts[:header_params] || {}
1728
+ # HTTP header 'Accept' (if needed)
1729
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1730
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
1731
+
1732
+ # form parameters
1733
+ form_params = opts[:form_params] || {}
1734
+
1735
+ # http body (model)
1736
+ post_body = opts[:debug_body]
1737
+
1738
+ # return_type
1739
+ return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'
1740
+
1741
+ # auth_names
1742
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1743
+
1744
+ new_options = opts.merge(
1745
+ :operation => :"OrganizationsApi.regenerate_ssh_gateway_api_key",
1746
+ :header_params => header_params,
1747
+ :query_params => query_params,
1748
+ :form_params => form_params,
1749
+ :body => post_body,
1750
+ :auth_names => auth_names,
1751
+ :return_type => return_type
1752
+ )
1753
+
1754
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1755
+ if @api_client.config.debugging
1756
+ @api_client.config.logger.debug "API called: OrganizationsApi#regenerate_ssh_gateway_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1757
+ end
1758
+ return data, status_code, headers
1759
+ end
1760
+
1761
+ # Set default region for organization
1762
+ # @param organization_id [String] Organization ID
1763
+ # @param update_organization_default_region [UpdateOrganizationDefaultRegion]
1764
+ # @param [Hash] opts the optional parameters
1765
+ # @return [nil]
1766
+ def set_organization_default_region(organization_id, update_organization_default_region, opts = {})
1767
+ set_organization_default_region_with_http_info(organization_id, update_organization_default_region, opts)
1768
+ nil
1769
+ end
1770
+
1771
+ # Set default region for organization
1772
+ # @param organization_id [String] Organization ID
1773
+ # @param update_organization_default_region [UpdateOrganizationDefaultRegion]
1774
+ # @param [Hash] opts the optional parameters
1775
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1776
+ def set_organization_default_region_with_http_info(organization_id, update_organization_default_region, opts = {})
1777
+ if @api_client.config.debugging
1778
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.set_organization_default_region ...'
1779
+ end
1780
+ # verify the required parameter 'organization_id' is set
1781
+ if @api_client.config.client_side_validation && organization_id.nil?
1782
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.set_organization_default_region"
1783
+ end
1784
+ # verify the required parameter 'update_organization_default_region' is set
1785
+ if @api_client.config.client_side_validation && update_organization_default_region.nil?
1786
+ fail ArgumentError, "Missing the required parameter 'update_organization_default_region' when calling OrganizationsApi.set_organization_default_region"
1787
+ end
1788
+ # resource path
1789
+ local_var_path = '/organizations/{organizationId}/default-region'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1790
+
1791
+ # query parameters
1792
+ query_params = opts[:query_params] || {}
1793
+
1794
+ # header parameters
1795
+ header_params = opts[:header_params] || {}
1796
+ # HTTP header 'Content-Type'
1797
+ content_type = @api_client.select_header_content_type(['application/json'])
1798
+ if !content_type.nil?
1799
+ header_params['Content-Type'] = content_type
1800
+ end
1801
+
1802
+ # form parameters
1803
+ form_params = opts[:form_params] || {}
1804
+
1805
+ # http body (model)
1806
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_default_region)
1807
+
1808
+ # return_type
1809
+ return_type = opts[:debug_return_type]
1810
+
1811
+ # auth_names
1812
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1813
+
1814
+ new_options = opts.merge(
1815
+ :operation => :"OrganizationsApi.set_organization_default_region",
1816
+ :header_params => header_params,
1817
+ :query_params => query_params,
1818
+ :form_params => form_params,
1819
+ :body => post_body,
1820
+ :auth_names => auth_names,
1821
+ :return_type => return_type
1822
+ )
1823
+
1824
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1825
+ if @api_client.config.debugging
1826
+ @api_client.config.logger.debug "API called: OrganizationsApi#set_organization_default_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1827
+ end
1828
+ return data, status_code, headers
1829
+ end
1830
+
1831
+ # Suspend organization
1832
+ # @param organization_id [String] Organization ID
1833
+ # @param [Hash] opts the optional parameters
1834
+ # @option opts [OrganizationSuspension] :organization_suspension
1835
+ # @return [nil]
1836
+ def suspend_organization(organization_id, opts = {})
1837
+ suspend_organization_with_http_info(organization_id, opts)
1838
+ nil
1839
+ end
1840
+
1841
+ # Suspend organization
1842
+ # @param organization_id [String] Organization ID
1843
+ # @param [Hash] opts the optional parameters
1844
+ # @option opts [OrganizationSuspension] :organization_suspension
1845
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1846
+ def suspend_organization_with_http_info(organization_id, opts = {})
1847
+ if @api_client.config.debugging
1848
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.suspend_organization ...'
1849
+ end
1850
+ # verify the required parameter 'organization_id' is set
1851
+ if @api_client.config.client_side_validation && organization_id.nil?
1852
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.suspend_organization"
1853
+ end
1854
+ # resource path
1855
+ local_var_path = '/organizations/{organizationId}/suspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1856
+
1857
+ # query parameters
1858
+ query_params = opts[:query_params] || {}
1859
+
1860
+ # header parameters
1861
+ header_params = opts[:header_params] || {}
1862
+ # HTTP header 'Content-Type'
1863
+ content_type = @api_client.select_header_content_type(['application/json'])
1864
+ if !content_type.nil?
1865
+ header_params['Content-Type'] = content_type
1866
+ end
1867
+
1868
+ # form parameters
1869
+ form_params = opts[:form_params] || {}
1870
+
1871
+ # http body (model)
1872
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'organization_suspension'])
1873
+
1874
+ # return_type
1875
+ return_type = opts[:debug_return_type]
1876
+
1877
+ # auth_names
1878
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1879
+
1880
+ new_options = opts.merge(
1881
+ :operation => :"OrganizationsApi.suspend_organization",
1882
+ :header_params => header_params,
1883
+ :query_params => query_params,
1884
+ :form_params => form_params,
1885
+ :body => post_body,
1886
+ :auth_names => auth_names,
1887
+ :return_type => return_type
1888
+ )
1889
+
1890
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1891
+ if @api_client.config.debugging
1892
+ @api_client.config.logger.debug "API called: OrganizationsApi#suspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1893
+ end
1894
+ return data, status_code, headers
1895
+ end
1896
+
1897
+ # Unsuspend organization
1898
+ # @param organization_id [String] Organization ID
1899
+ # @param [Hash] opts the optional parameters
1900
+ # @return [nil]
1901
+ def unsuspend_organization(organization_id, opts = {})
1902
+ unsuspend_organization_with_http_info(organization_id, opts)
1903
+ nil
1904
+ end
1905
+
1906
+ # Unsuspend organization
1907
+ # @param organization_id [String] Organization ID
1908
+ # @param [Hash] opts the optional parameters
1909
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1910
+ def unsuspend_organization_with_http_info(organization_id, opts = {})
1911
+ if @api_client.config.debugging
1912
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.unsuspend_organization ...'
1913
+ end
1914
+ # verify the required parameter 'organization_id' is set
1915
+ if @api_client.config.client_side_validation && organization_id.nil?
1916
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.unsuspend_organization"
1917
+ end
1918
+ # resource path
1919
+ local_var_path = '/organizations/{organizationId}/unsuspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1920
+
1921
+ # query parameters
1922
+ query_params = opts[:query_params] || {}
1923
+
1924
+ # header parameters
1925
+ header_params = opts[:header_params] || {}
1926
+
1927
+ # form parameters
1928
+ form_params = opts[:form_params] || {}
1929
+
1930
+ # http body (model)
1931
+ post_body = opts[:debug_body]
1932
+
1933
+ # return_type
1934
+ return_type = opts[:debug_return_type]
1935
+
1936
+ # auth_names
1937
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1938
+
1939
+ new_options = opts.merge(
1940
+ :operation => :"OrganizationsApi.unsuspend_organization",
1941
+ :header_params => header_params,
1942
+ :query_params => query_params,
1943
+ :form_params => form_params,
1944
+ :body => post_body,
1945
+ :auth_names => auth_names,
1946
+ :return_type => return_type
1947
+ )
1948
+
1949
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1950
+ if @api_client.config.debugging
1951
+ @api_client.config.logger.debug "API called: OrganizationsApi#unsuspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1952
+ end
1953
+ return data, status_code, headers
1954
+ end
1955
+
1956
+ # Update access for organization member
1957
+ # @param organization_id [String] Organization ID
1958
+ # @param user_id [String] User ID
1959
+ # @param update_organization_member_access [UpdateOrganizationMemberAccess]
1960
+ # @param [Hash] opts the optional parameters
1961
+ # @return [OrganizationUser]
1962
+ def update_access_for_organization_member(organization_id, user_id, update_organization_member_access, opts = {})
1963
+ data, _status_code, _headers = update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts)
1964
+ data
1965
+ end
1966
+
1967
+ # Update access for organization member
1968
+ # @param organization_id [String] Organization ID
1969
+ # @param user_id [String] User ID
1970
+ # @param update_organization_member_access [UpdateOrganizationMemberAccess]
1971
+ # @param [Hash] opts the optional parameters
1972
+ # @return [Array<(OrganizationUser, Integer, Hash)>] OrganizationUser data, response status code and response headers
1973
+ def update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts = {})
1974
+ if @api_client.config.debugging
1975
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_access_for_organization_member ...'
1976
+ end
1977
+ # verify the required parameter 'organization_id' is set
1978
+ if @api_client.config.client_side_validation && organization_id.nil?
1979
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_access_for_organization_member"
1980
+ end
1981
+ # verify the required parameter 'user_id' is set
1982
+ if @api_client.config.client_side_validation && user_id.nil?
1983
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.update_access_for_organization_member"
1984
+ end
1985
+ # verify the required parameter 'update_organization_member_access' is set
1986
+ if @api_client.config.client_side_validation && update_organization_member_access.nil?
1987
+ fail ArgumentError, "Missing the required parameter 'update_organization_member_access' when calling OrganizationsApi.update_access_for_organization_member"
1988
+ end
1989
+ # resource path
1990
+ local_var_path = '/organizations/{organizationId}/users/{userId}/access'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1991
+
1992
+ # query parameters
1993
+ query_params = opts[:query_params] || {}
1994
+
1995
+ # header parameters
1996
+ header_params = opts[:header_params] || {}
1997
+ # HTTP header 'Accept' (if needed)
1998
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1999
+ # HTTP header 'Content-Type'
2000
+ content_type = @api_client.select_header_content_type(['application/json'])
2001
+ if !content_type.nil?
2002
+ header_params['Content-Type'] = content_type
2003
+ end
2004
+
2005
+ # form parameters
2006
+ form_params = opts[:form_params] || {}
2007
+
2008
+ # http body (model)
2009
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_member_access)
2010
+
2011
+ # return_type
2012
+ return_type = opts[:debug_return_type] || 'OrganizationUser'
2013
+
2014
+ # auth_names
2015
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2016
+
2017
+ new_options = opts.merge(
2018
+ :operation => :"OrganizationsApi.update_access_for_organization_member",
2019
+ :header_params => header_params,
2020
+ :query_params => query_params,
2021
+ :form_params => form_params,
2022
+ :body => post_body,
2023
+ :auth_names => auth_names,
2024
+ :return_type => return_type
2025
+ )
2026
+
2027
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2028
+ if @api_client.config.debugging
2029
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_access_for_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2030
+ end
2031
+ return data, status_code, headers
2032
+ end
2033
+
2034
+ # Update experimental configuration
2035
+ # @param organization_id [String] Organization ID
2036
+ # @param [Hash] opts the optional parameters
2037
+ # @option opts [Hash<String, Object>] :request_body Experimental configuration as a JSON object. Set to null to clear the configuration.
2038
+ # @return [nil]
2039
+ def update_experimental_config(organization_id, opts = {})
2040
+ update_experimental_config_with_http_info(organization_id, opts)
2041
+ nil
2042
+ end
2043
+
2044
+ # Update experimental configuration
2045
+ # @param organization_id [String] Organization ID
2046
+ # @param [Hash] opts the optional parameters
2047
+ # @option opts [Hash<String, Object>] :request_body Experimental configuration as a JSON object. Set to null to clear the configuration.
2048
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2049
+ def update_experimental_config_with_http_info(organization_id, opts = {})
2050
+ if @api_client.config.debugging
2051
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_experimental_config ...'
2052
+ end
2053
+ # verify the required parameter 'organization_id' is set
2054
+ if @api_client.config.client_side_validation && organization_id.nil?
2055
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_experimental_config"
2056
+ end
2057
+ # resource path
2058
+ local_var_path = '/organizations/{organizationId}/experimental-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
2059
+
2060
+ # query parameters
2061
+ query_params = opts[:query_params] || {}
2062
+
2063
+ # header parameters
2064
+ header_params = opts[:header_params] || {}
2065
+ # HTTP header 'Content-Type'
2066
+ content_type = @api_client.select_header_content_type(['application/json'])
2067
+ if !content_type.nil?
2068
+ header_params['Content-Type'] = content_type
2069
+ end
2070
+
2071
+ # form parameters
2072
+ form_params = opts[:form_params] || {}
2073
+
2074
+ # http body (model)
2075
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
2076
+
2077
+ # return_type
2078
+ return_type = opts[:debug_return_type]
2079
+
2080
+ # auth_names
2081
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2082
+
2083
+ new_options = opts.merge(
2084
+ :operation => :"OrganizationsApi.update_experimental_config",
2085
+ :header_params => header_params,
2086
+ :query_params => query_params,
2087
+ :form_params => form_params,
2088
+ :body => post_body,
2089
+ :auth_names => auth_names,
2090
+ :return_type => return_type
2091
+ )
2092
+
2093
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2094
+ if @api_client.config.debugging
2095
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_experimental_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2096
+ end
2097
+ return data, status_code, headers
2098
+ end
2099
+
2100
+ # Update organization invitation
2101
+ # @param organization_id [String] Organization ID
2102
+ # @param invitation_id [String] Invitation ID
2103
+ # @param update_organization_invitation [UpdateOrganizationInvitation]
2104
+ # @param [Hash] opts the optional parameters
2105
+ # @return [OrganizationInvitation]
2106
+ def update_organization_invitation(organization_id, invitation_id, update_organization_invitation, opts = {})
2107
+ data, _status_code, _headers = update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts)
2108
+ data
2109
+ end
2110
+
2111
+ # Update organization invitation
2112
+ # @param organization_id [String] Organization ID
2113
+ # @param invitation_id [String] Invitation ID
2114
+ # @param update_organization_invitation [UpdateOrganizationInvitation]
2115
+ # @param [Hash] opts the optional parameters
2116
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
2117
+ def update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts = {})
2118
+ if @api_client.config.debugging
2119
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_invitation ...'
2120
+ end
2121
+ # verify the required parameter 'organization_id' is set
2122
+ if @api_client.config.client_side_validation && organization_id.nil?
2123
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_invitation"
2124
+ end
2125
+ # verify the required parameter 'invitation_id' is set
2126
+ if @api_client.config.client_side_validation && invitation_id.nil?
2127
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.update_organization_invitation"
2128
+ end
2129
+ # verify the required parameter 'update_organization_invitation' is set
2130
+ if @api_client.config.client_side_validation && update_organization_invitation.nil?
2131
+ fail ArgumentError, "Missing the required parameter 'update_organization_invitation' when calling OrganizationsApi.update_organization_invitation"
2132
+ end
2133
+ # resource path
2134
+ local_var_path = '/organizations/{organizationId}/invitations/{invitationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
2135
+
2136
+ # query parameters
2137
+ query_params = opts[:query_params] || {}
2138
+
2139
+ # header parameters
2140
+ header_params = opts[:header_params] || {}
2141
+ # HTTP header 'Accept' (if needed)
2142
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2143
+ # HTTP header 'Content-Type'
2144
+ content_type = @api_client.select_header_content_type(['application/json'])
2145
+ if !content_type.nil?
2146
+ header_params['Content-Type'] = content_type
2147
+ end
2148
+
2149
+ # form parameters
2150
+ form_params = opts[:form_params] || {}
2151
+
2152
+ # http body (model)
2153
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_invitation)
2154
+
2155
+ # return_type
2156
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
2157
+
2158
+ # auth_names
2159
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2160
+
2161
+ new_options = opts.merge(
2162
+ :operation => :"OrganizationsApi.update_organization_invitation",
2163
+ :header_params => header_params,
2164
+ :query_params => query_params,
2165
+ :form_params => form_params,
2166
+ :body => post_body,
2167
+ :auth_names => auth_names,
2168
+ :return_type => return_type
2169
+ )
2170
+
2171
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2172
+ if @api_client.config.debugging
2173
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2174
+ end
2175
+ return data, status_code, headers
2176
+ end
2177
+
2178
+ # Update organization OpenTelemetry configuration
2179
+ # @param organization_id [String] Organization ID
2180
+ # @param otel_config [OtelConfig]
2181
+ # @param [Hash] opts the optional parameters
2182
+ # @return [nil]
2183
+ def update_organization_otel_config(organization_id, otel_config, opts = {})
2184
+ update_organization_otel_config_with_http_info(organization_id, otel_config, opts)
2185
+ nil
2186
+ end
2187
+
2188
+ # Update organization OpenTelemetry configuration
2189
+ # @param organization_id [String] Organization ID
2190
+ # @param otel_config [OtelConfig]
2191
+ # @param [Hash] opts the optional parameters
2192
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2193
+ def update_organization_otel_config_with_http_info(organization_id, otel_config, opts = {})
2194
+ if @api_client.config.debugging
2195
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_otel_config ...'
2196
+ end
2197
+ # verify the required parameter 'organization_id' is set
2198
+ if @api_client.config.client_side_validation && organization_id.nil?
2199
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_otel_config"
2200
+ end
2201
+ # verify the required parameter 'otel_config' is set
2202
+ if @api_client.config.client_side_validation && otel_config.nil?
2203
+ fail ArgumentError, "Missing the required parameter 'otel_config' when calling OrganizationsApi.update_organization_otel_config"
2204
+ end
2205
+ # resource path
2206
+ local_var_path = '/organizations/{organizationId}/otel-config'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
2207
+
2208
+ # query parameters
2209
+ query_params = opts[:query_params] || {}
2210
+
2211
+ # header parameters
2212
+ header_params = opts[:header_params] || {}
2213
+ # HTTP header 'Content-Type'
2214
+ content_type = @api_client.select_header_content_type(['application/json'])
2215
+ if !content_type.nil?
2216
+ header_params['Content-Type'] = content_type
2217
+ end
2218
+
2219
+ # form parameters
2220
+ form_params = opts[:form_params] || {}
2221
+
2222
+ # http body (model)
2223
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(otel_config)
2224
+
2225
+ # return_type
2226
+ return_type = opts[:debug_return_type]
2227
+
2228
+ # auth_names
2229
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2230
+
2231
+ new_options = opts.merge(
2232
+ :operation => :"OrganizationsApi.update_organization_otel_config",
2233
+ :header_params => header_params,
2234
+ :query_params => query_params,
2235
+ :form_params => form_params,
2236
+ :body => post_body,
2237
+ :auth_names => auth_names,
2238
+ :return_type => return_type
2239
+ )
2240
+
2241
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2242
+ if @api_client.config.debugging
2243
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_otel_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2244
+ end
2245
+ return data, status_code, headers
2246
+ end
2247
+
2248
+ # Update organization quota
2249
+ # @param organization_id [String] Organization ID
2250
+ # @param update_organization_quota [UpdateOrganizationQuota]
2251
+ # @param [Hash] opts the optional parameters
2252
+ # @return [nil]
2253
+ def update_organization_quota(organization_id, update_organization_quota, opts = {})
2254
+ update_organization_quota_with_http_info(organization_id, update_organization_quota, opts)
2255
+ nil
2256
+ end
2257
+
2258
+ # Update organization quota
2259
+ # @param organization_id [String] Organization ID
2260
+ # @param update_organization_quota [UpdateOrganizationQuota]
2261
+ # @param [Hash] opts the optional parameters
2262
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2263
+ def update_organization_quota_with_http_info(organization_id, update_organization_quota, opts = {})
2264
+ if @api_client.config.debugging
2265
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_quota ...'
2266
+ end
2267
+ # verify the required parameter 'organization_id' is set
2268
+ if @api_client.config.client_side_validation && organization_id.nil?
2269
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_quota"
2270
+ end
2271
+ # verify the required parameter 'update_organization_quota' is set
2272
+ if @api_client.config.client_side_validation && update_organization_quota.nil?
2273
+ fail ArgumentError, "Missing the required parameter 'update_organization_quota' when calling OrganizationsApi.update_organization_quota"
2274
+ end
2275
+ # resource path
2276
+ local_var_path = '/organizations/{organizationId}/quota'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
2277
+
2278
+ # query parameters
2279
+ query_params = opts[:query_params] || {}
2280
+
2281
+ # header parameters
2282
+ header_params = opts[:header_params] || {}
2283
+ # HTTP header 'Content-Type'
2284
+ content_type = @api_client.select_header_content_type(['application/json'])
2285
+ if !content_type.nil?
2286
+ header_params['Content-Type'] = content_type
2287
+ end
2288
+
2289
+ # form parameters
2290
+ form_params = opts[:form_params] || {}
2291
+
2292
+ # http body (model)
2293
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_quota)
2294
+
2295
+ # return_type
2296
+ return_type = opts[:debug_return_type]
2297
+
2298
+ # auth_names
2299
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2300
+
2301
+ new_options = opts.merge(
2302
+ :operation => :"OrganizationsApi.update_organization_quota",
2303
+ :header_params => header_params,
2304
+ :query_params => query_params,
2305
+ :form_params => form_params,
2306
+ :body => post_body,
2307
+ :auth_names => auth_names,
2308
+ :return_type => return_type
2309
+ )
2310
+
2311
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2312
+ if @api_client.config.debugging
2313
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2314
+ end
2315
+ return data, status_code, headers
2316
+ end
2317
+
2318
+ # Update organization region quota
2319
+ # @param organization_id [String] Organization ID
2320
+ # @param region_id [String] ID of the region where the updated quota will be applied
2321
+ # @param update_organization_region_quota [UpdateOrganizationRegionQuota]
2322
+ # @param [Hash] opts the optional parameters
2323
+ # @return [nil]
2324
+ def update_organization_region_quota(organization_id, region_id, update_organization_region_quota, opts = {})
2325
+ update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts)
2326
+ nil
2327
+ end
2328
+
2329
+ # Update organization region quota
2330
+ # @param organization_id [String] Organization ID
2331
+ # @param region_id [String] ID of the region where the updated quota will be applied
2332
+ # @param update_organization_region_quota [UpdateOrganizationRegionQuota]
2333
+ # @param [Hash] opts the optional parameters
2334
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2335
+ def update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts = {})
2336
+ if @api_client.config.debugging
2337
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_region_quota ...'
2338
+ end
2339
+ # verify the required parameter 'organization_id' is set
2340
+ if @api_client.config.client_side_validation && organization_id.nil?
2341
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_region_quota"
2342
+ end
2343
+ # verify the required parameter 'region_id' is set
2344
+ if @api_client.config.client_side_validation && region_id.nil?
2345
+ fail ArgumentError, "Missing the required parameter 'region_id' when calling OrganizationsApi.update_organization_region_quota"
2346
+ end
2347
+ # verify the required parameter 'update_organization_region_quota' is set
2348
+ if @api_client.config.client_side_validation && update_organization_region_quota.nil?
2349
+ fail ArgumentError, "Missing the required parameter 'update_organization_region_quota' when calling OrganizationsApi.update_organization_region_quota"
2350
+ end
2351
+ # resource path
2352
+ local_var_path = '/organizations/{organizationId}/quota/{regionId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s))
2353
+
2354
+ # query parameters
2355
+ query_params = opts[:query_params] || {}
2356
+
2357
+ # header parameters
2358
+ header_params = opts[:header_params] || {}
2359
+ # HTTP header 'Content-Type'
2360
+ content_type = @api_client.select_header_content_type(['application/json'])
2361
+ if !content_type.nil?
2362
+ header_params['Content-Type'] = content_type
2363
+ end
2364
+
2365
+ # form parameters
2366
+ form_params = opts[:form_params] || {}
2367
+
2368
+ # http body (model)
2369
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_region_quota)
2370
+
2371
+ # return_type
2372
+ return_type = opts[:debug_return_type]
2373
+
2374
+ # auth_names
2375
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2376
+
2377
+ new_options = opts.merge(
2378
+ :operation => :"OrganizationsApi.update_organization_region_quota",
2379
+ :header_params => header_params,
2380
+ :query_params => query_params,
2381
+ :form_params => form_params,
2382
+ :body => post_body,
2383
+ :auth_names => auth_names,
2384
+ :return_type => return_type
2385
+ )
2386
+
2387
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2388
+ if @api_client.config.debugging
2389
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2390
+ end
2391
+ return data, status_code, headers
2392
+ end
2393
+
2394
+ # Update organization role
2395
+ # @param organization_id [String] Organization ID
2396
+ # @param role_id [String] Role ID
2397
+ # @param update_organization_role [UpdateOrganizationRole]
2398
+ # @param [Hash] opts the optional parameters
2399
+ # @return [OrganizationRole]
2400
+ def update_organization_role(organization_id, role_id, update_organization_role, opts = {})
2401
+ data, _status_code, _headers = update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts)
2402
+ data
2403
+ end
2404
+
2405
+ # Update organization role
2406
+ # @param organization_id [String] Organization ID
2407
+ # @param role_id [String] Role ID
2408
+ # @param update_organization_role [UpdateOrganizationRole]
2409
+ # @param [Hash] opts the optional parameters
2410
+ # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
2411
+ def update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts = {})
2412
+ if @api_client.config.debugging
2413
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_role ...'
2414
+ end
2415
+ # verify the required parameter 'organization_id' is set
2416
+ if @api_client.config.client_side_validation && organization_id.nil?
2417
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_role"
2418
+ end
2419
+ # verify the required parameter 'role_id' is set
2420
+ if @api_client.config.client_side_validation && role_id.nil?
2421
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.update_organization_role"
2422
+ end
2423
+ # verify the required parameter 'update_organization_role' is set
2424
+ if @api_client.config.client_side_validation && update_organization_role.nil?
2425
+ fail ArgumentError, "Missing the required parameter 'update_organization_role' when calling OrganizationsApi.update_organization_role"
2426
+ end
2427
+ # resource path
2428
+ local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))
2429
+
2430
+ # query parameters
2431
+ query_params = opts[:query_params] || {}
2432
+
2433
+ # header parameters
2434
+ header_params = opts[:header_params] || {}
2435
+ # HTTP header 'Accept' (if needed)
2436
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2437
+ # HTTP header 'Content-Type'
2438
+ content_type = @api_client.select_header_content_type(['application/json'])
2439
+ if !content_type.nil?
2440
+ header_params['Content-Type'] = content_type
2441
+ end
2442
+
2443
+ # form parameters
2444
+ form_params = opts[:form_params] || {}
2445
+
2446
+ # http body (model)
2447
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_role)
2448
+
2449
+ # return_type
2450
+ return_type = opts[:debug_return_type] || 'OrganizationRole'
2451
+
2452
+ # auth_names
2453
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2454
+
2455
+ new_options = opts.merge(
2456
+ :operation => :"OrganizationsApi.update_organization_role",
2457
+ :header_params => header_params,
2458
+ :query_params => query_params,
2459
+ :form_params => form_params,
2460
+ :body => post_body,
2461
+ :auth_names => auth_names,
2462
+ :return_type => return_type
2463
+ )
2464
+
2465
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2466
+ if @api_client.config.debugging
2467
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2468
+ end
2469
+ return data, status_code, headers
2470
+ end
2471
+
2472
+ # Update region configuration
2473
+ # @param id [String] Region ID
2474
+ # @param update_region [UpdateRegion]
2475
+ # @param [Hash] opts the optional parameters
2476
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
2477
+ # @return [nil]
2478
+ def update_region(id, update_region, opts = {})
2479
+ update_region_with_http_info(id, update_region, opts)
2480
+ nil
2481
+ end
2482
+
2483
+ # Update region configuration
2484
+ # @param id [String] Region ID
2485
+ # @param update_region [UpdateRegion]
2486
+ # @param [Hash] opts the optional parameters
2487
+ # @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
2488
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2489
+ def update_region_with_http_info(id, update_region, opts = {})
2490
+ if @api_client.config.debugging
2491
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_region ...'
2492
+ end
2493
+ # verify the required parameter 'id' is set
2494
+ if @api_client.config.client_side_validation && id.nil?
2495
+ fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.update_region"
2496
+ end
2497
+ # verify the required parameter 'update_region' is set
2498
+ if @api_client.config.client_side_validation && update_region.nil?
2499
+ fail ArgumentError, "Missing the required parameter 'update_region' when calling OrganizationsApi.update_region"
2500
+ end
2501
+ # resource path
2502
+ local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2503
+
2504
+ # query parameters
2505
+ query_params = opts[:query_params] || {}
2506
+
2507
+ # header parameters
2508
+ header_params = opts[:header_params] || {}
2509
+ # HTTP header 'Content-Type'
2510
+ content_type = @api_client.select_header_content_type(['application/json'])
2511
+ if !content_type.nil?
2512
+ header_params['Content-Type'] = content_type
2513
+ end
2514
+ header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
2515
+
2516
+ # form parameters
2517
+ form_params = opts[:form_params] || {}
2518
+
2519
+ # http body (model)
2520
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_region)
2521
+
2522
+ # return_type
2523
+ return_type = opts[:debug_return_type]
2524
+
2525
+ # auth_names
2526
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2527
+
2528
+ new_options = opts.merge(
2529
+ :operation => :"OrganizationsApi.update_region",
2530
+ :header_params => header_params,
2531
+ :query_params => query_params,
2532
+ :form_params => form_params,
2533
+ :body => post_body,
2534
+ :auth_names => auth_names,
2535
+ :return_type => return_type
2536
+ )
2537
+
2538
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2539
+ if @api_client.config.debugging
2540
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2541
+ end
2542
+ return data, status_code, headers
2543
+ end
2544
+
2545
+ # Update sandbox default limited network egress
2546
+ # @param organization_id [String] Organization ID
2547
+ # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress]
2548
+ # @param [Hash] opts the optional parameters
2549
+ # @return [nil]
2550
+ def update_sandbox_default_limited_network_egress(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
2551
+ update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts)
2552
+ nil
2553
+ end
2554
+
2555
+ # Update sandbox default limited network egress
2556
+ # @param organization_id [String] Organization ID
2557
+ # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress]
2558
+ # @param [Hash] opts the optional parameters
2559
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2560
+ def update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
2561
+ if @api_client.config.debugging
2562
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_sandbox_default_limited_network_egress ...'
2563
+ end
2564
+ # verify the required parameter 'organization_id' is set
2565
+ if @api_client.config.client_side_validation && organization_id.nil?
2566
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
2567
+ end
2568
+ # verify the required parameter 'organization_sandbox_default_limited_network_egress' is set
2569
+ if @api_client.config.client_side_validation && organization_sandbox_default_limited_network_egress.nil?
2570
+ fail ArgumentError, "Missing the required parameter 'organization_sandbox_default_limited_network_egress' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
2571
+ end
2572
+ # resource path
2573
+ local_var_path = '/organizations/{organizationId}/sandbox-default-limited-network-egress'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
2574
+
2575
+ # query parameters
2576
+ query_params = opts[:query_params] || {}
2577
+
2578
+ # header parameters
2579
+ header_params = opts[:header_params] || {}
2580
+ # HTTP header 'Content-Type'
2581
+ content_type = @api_client.select_header_content_type(['application/json'])
2582
+ if !content_type.nil?
2583
+ header_params['Content-Type'] = content_type
2584
+ end
2585
+
2586
+ # form parameters
2587
+ form_params = opts[:form_params] || {}
2588
+
2589
+ # http body (model)
2590
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_sandbox_default_limited_network_egress)
2591
+
2592
+ # return_type
2593
+ return_type = opts[:debug_return_type]
2594
+
2595
+ # auth_names
2596
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2597
+
2598
+ new_options = opts.merge(
2599
+ :operation => :"OrganizationsApi.update_sandbox_default_limited_network_egress",
2600
+ :header_params => header_params,
2601
+ :query_params => query_params,
2602
+ :form_params => form_params,
2603
+ :body => post_body,
2604
+ :auth_names => auth_names,
2605
+ :return_type => return_type
2606
+ )
2607
+
2608
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2609
+ if @api_client.config.debugging
2610
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_sandbox_default_limited_network_egress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2611
+ end
2612
+ return data, status_code, headers
2613
+ end
2614
+ end
2615
+ end