moderation_api 1.2.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 (175) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +144 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +74 -0
  6. data/docs/AccountGet200Response.md +26 -0
  7. data/docs/AccountGet200ResponseCurrentProject.md +20 -0
  8. data/docs/ActionsCreateRequest.md +36 -0
  9. data/docs/ActionsCreateRequestWebhooksInner.md +24 -0
  10. data/docs/ActionsDelete200Response.md +20 -0
  11. data/docs/ActionsExecute200Response.md +22 -0
  12. data/docs/ActionsExecuteDeprecatedRequest.md +22 -0
  13. data/docs/ActionsExecuteRequest.md +24 -0
  14. data/docs/ActionsGet200Response.md +40 -0
  15. data/docs/ActionsGet200ResponseWebhooksInner.md +26 -0
  16. data/docs/ActionsList200ResponseInner.md +38 -0
  17. data/docs/ActionsList200ResponseInnerPossibleValuesInner.md +18 -0
  18. data/docs/ActionsList400Response.md +22 -0
  19. data/docs/ActionsList400ResponseIssuesInner.md +18 -0
  20. data/docs/ActionsUpdateRequest.md +36 -0
  21. data/docs/ModerateApi.md +357 -0
  22. data/docs/ModerationAudioRequest.md +28 -0
  23. data/docs/ModerationImage200Response.md +28 -0
  24. data/docs/ModerationImage200ResponseLabelsInner.md +20 -0
  25. data/docs/ModerationImageRequest.md +28 -0
  26. data/docs/ModerationObject200Response.md +36 -0
  27. data/docs/ModerationObject200ResponseAllOfEntitiesInner.md +22 -0
  28. data/docs/ModerationObject200ResponseAllOfFieldsInner.md +22 -0
  29. data/docs/ModerationObject200ResponseAllOfLabelsInner.md +22 -0
  30. data/docs/ModerationObjectRequest.md +28 -0
  31. data/docs/ModerationObjectRequestValue.md +20 -0
  32. data/docs/ModerationObjectRequestValueDataValue.md +22 -0
  33. data/docs/ModerationText200Response.md +64 -0
  34. data/docs/ModerationText200ResponseAllOfAddress.md +28 -0
  35. data/docs/ModerationText200ResponseAllOfEmail.md +28 -0
  36. data/docs/ModerationText200ResponseAllOfName.md +28 -0
  37. data/docs/ModerationText200ResponseAllOfNsfw.md +26 -0
  38. data/docs/ModerationText200ResponseAllOfNsfwLabelScores.md +22 -0
  39. data/docs/ModerationText200ResponseAllOfPhone.md +28 -0
  40. data/docs/ModerationText200ResponseAllOfProfanity.md +28 -0
  41. data/docs/ModerationText200ResponseAllOfPropriety.md +26 -0
  42. data/docs/ModerationText200ResponseAllOfProprietyLabelScores.md +22 -0
  43. data/docs/ModerationText200ResponseAllOfQuality.md +26 -0
  44. data/docs/ModerationText200ResponseAllOfQualityLabelScores.md +24 -0
  45. data/docs/ModerationText200ResponseAllOfRequest.md +20 -0
  46. data/docs/ModerationText200ResponseAllOfSensitive.md +28 -0
  47. data/docs/ModerationText200ResponseAllOfSentiment.md +26 -0
  48. data/docs/ModerationText200ResponseAllOfSentimentLabelScores.md +22 -0
  49. data/docs/ModerationText200ResponseAllOfToxicity.md +26 -0
  50. data/docs/ModerationText200ResponseAllOfToxicityLabelScores.md +30 -0
  51. data/docs/ModerationText200ResponseAllOfUrl.md +28 -0
  52. data/docs/ModerationText200ResponseAllOfUsername.md +28 -0
  53. data/docs/ModerationText200ResponseAllOfWordlist.md +28 -0
  54. data/docs/ModerationText200ResponseAllOfWordlistsInner.md +36 -0
  55. data/docs/ModerationTextRequest.md +28 -0
  56. data/docs/ModerationVideo200Response.md +24 -0
  57. data/docs/ModerationVideoRequest.md +28 -0
  58. data/docs/QueueActionsApi.md +503 -0
  59. data/git_push.sh +57 -0
  60. data/lib/moderation_api/api/account_api.rb +79 -0
  61. data/lib/moderation_api/api/moderate_api.rb +362 -0
  62. data/lib/moderation_api/api/queue_actions_api.rb +492 -0
  63. data/lib/moderation_api/api_client.rb +437 -0
  64. data/lib/moderation_api/api_error.rb +58 -0
  65. data/lib/moderation_api/configuration.rb +392 -0
  66. data/lib/moderation_api/models/account_get200_response.rb +278 -0
  67. data/lib/moderation_api/models/account_get200_response_current_project.rb +237 -0
  68. data/lib/moderation_api/models/actions_create_request.rb +374 -0
  69. data/lib/moderation_api/models/actions_create_request_webhooks_inner.rb +260 -0
  70. data/lib/moderation_api/models/actions_delete200_response.rb +239 -0
  71. data/lib/moderation_api/models/actions_execute200_response.rb +258 -0
  72. data/lib/moderation_api/models/actions_execute_deprecated_request.rb +244 -0
  73. data/lib/moderation_api/models/actions_execute_request.rb +261 -0
  74. data/lib/moderation_api/models/actions_get200_response.rb +408 -0
  75. data/lib/moderation_api/models/actions_get200_response_webhooks_inner.rb +278 -0
  76. data/lib/moderation_api/models/actions_list200_response_inner.rb +396 -0
  77. data/lib/moderation_api/models/actions_list200_response_inner_possible_values_inner.rb +222 -0
  78. data/lib/moderation_api/models/actions_list400_response.rb +248 -0
  79. data/lib/moderation_api/models/actions_list400_response_issues_inner.rb +221 -0
  80. data/lib/moderation_api/models/actions_update_request.rb +367 -0
  81. data/lib/moderation_api/models/moderation_audio_request.rb +302 -0
  82. data/lib/moderation_api/models/moderation_image200_response.rb +296 -0
  83. data/lib/moderation_api/models/moderation_image200_response_labels_inner.rb +301 -0
  84. data/lib/moderation_api/models/moderation_image_request.rb +302 -0
  85. data/lib/moderation_api/models/moderation_object200_response.rb +368 -0
  86. data/lib/moderation_api/models/moderation_object200_response_all_of_entities_inner.rb +251 -0
  87. data/lib/moderation_api/models/moderation_object200_response_all_of_fields_inner.rb +258 -0
  88. data/lib/moderation_api/models/moderation_object200_response_all_of_labels_inner.rb +284 -0
  89. data/lib/moderation_api/models/moderation_object_request.rb +301 -0
  90. data/lib/moderation_api/models/moderation_object_request_value.rb +275 -0
  91. data/lib/moderation_api/models/moderation_object_request_value_data_value.rb +285 -0
  92. data/lib/moderation_api/models/moderation_text200_response.rb +488 -0
  93. data/lib/moderation_api/models/moderation_text200_response_all_of_address.rb +303 -0
  94. data/lib/moderation_api/models/moderation_text200_response_all_of_email.rb +303 -0
  95. data/lib/moderation_api/models/moderation_text200_response_all_of_name.rb +303 -0
  96. data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw.rb +255 -0
  97. data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw_label_scores.rb +235 -0
  98. data/lib/moderation_api/models/moderation_text200_response_all_of_phone.rb +303 -0
  99. data/lib/moderation_api/models/moderation_text200_response_all_of_profanity.rb +303 -0
  100. data/lib/moderation_api/models/moderation_text200_response_all_of_propriety.rb +255 -0
  101. data/lib/moderation_api/models/moderation_text200_response_all_of_propriety_label_scores.rb +235 -0
  102. data/lib/moderation_api/models/moderation_text200_response_all_of_quality.rb +255 -0
  103. data/lib/moderation_api/models/moderation_text200_response_all_of_quality_label_scores.rb +245 -0
  104. data/lib/moderation_api/models/moderation_text200_response_all_of_request.rb +240 -0
  105. data/lib/moderation_api/models/moderation_text200_response_all_of_sensitive.rb +303 -0
  106. data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment.rb +255 -0
  107. data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment_label_scores.rb +235 -0
  108. data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity.rb +262 -0
  109. data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity_label_scores.rb +275 -0
  110. data/lib/moderation_api/models/moderation_text200_response_all_of_url.rb +303 -0
  111. data/lib/moderation_api/models/moderation_text200_response_all_of_username.rb +303 -0
  112. data/lib/moderation_api/models/moderation_text200_response_all_of_wordlist.rb +303 -0
  113. data/lib/moderation_api/models/moderation_text200_response_all_of_wordlists_inner.rb +377 -0
  114. data/lib/moderation_api/models/moderation_text_request.rb +330 -0
  115. data/lib/moderation_api/models/moderation_video200_response.rb +265 -0
  116. data/lib/moderation_api/models/moderation_video_request.rb +302 -0
  117. data/lib/moderation_api/version.rb +15 -0
  118. data/lib/moderation_api.rb +93 -0
  119. data/moderation_api.gemspec +45 -0
  120. data/spec/api/account_api_spec.rb +46 -0
  121. data/spec/api/moderate_api_spec.rb +95 -0
  122. data/spec/api/queue_actions_api_spec.rb +121 -0
  123. data/spec/models/account_get200_response_current_project_spec.rb +42 -0
  124. data/spec/models/account_get200_response_spec.rb +60 -0
  125. data/spec/models/actions_create_request_spec.rb +98 -0
  126. data/spec/models/actions_create_request_webhooks_inner_spec.rb +54 -0
  127. data/spec/models/actions_delete200_response_spec.rb +42 -0
  128. data/spec/models/actions_execute200_response_spec.rb +48 -0
  129. data/spec/models/actions_execute_deprecated_request_spec.rb +48 -0
  130. data/spec/models/actions_execute_request_spec.rb +54 -0
  131. data/spec/models/actions_get200_response_spec.rb +110 -0
  132. data/spec/models/actions_get200_response_webhooks_inner_spec.rb +60 -0
  133. data/spec/models/actions_list200_response_inner_possible_values_inner_spec.rb +36 -0
  134. data/spec/models/actions_list200_response_inner_spec.rb +104 -0
  135. data/spec/models/actions_list400_response_issues_inner_spec.rb +36 -0
  136. data/spec/models/actions_list400_response_spec.rb +48 -0
  137. data/spec/models/actions_update_request_spec.rb +98 -0
  138. data/spec/models/moderation_audio_request_spec.rb +66 -0
  139. data/spec/models/moderation_image200_response_labels_inner_spec.rb +46 -0
  140. data/spec/models/moderation_image200_response_spec.rb +66 -0
  141. data/spec/models/moderation_image_request_spec.rb +66 -0
  142. data/spec/models/moderation_object200_response_all_of_entities_inner_spec.rb +48 -0
  143. data/spec/models/moderation_object200_response_all_of_fields_inner_spec.rb +48 -0
  144. data/spec/models/moderation_object200_response_all_of_labels_inner_spec.rb +48 -0
  145. data/spec/models/moderation_object200_response_spec.rb +90 -0
  146. data/spec/models/moderation_object_request_spec.rb +66 -0
  147. data/spec/models/moderation_object_request_value_data_value_spec.rb +52 -0
  148. data/spec/models/moderation_object_request_value_spec.rb +46 -0
  149. data/spec/models/moderation_text200_response_all_of_address_spec.rb +70 -0
  150. data/spec/models/moderation_text200_response_all_of_email_spec.rb +70 -0
  151. data/spec/models/moderation_text200_response_all_of_name_spec.rb +70 -0
  152. data/spec/models/moderation_text200_response_all_of_nsfw_label_scores_spec.rb +48 -0
  153. data/spec/models/moderation_text200_response_all_of_nsfw_spec.rb +60 -0
  154. data/spec/models/moderation_text200_response_all_of_phone_spec.rb +70 -0
  155. data/spec/models/moderation_text200_response_all_of_profanity_spec.rb +70 -0
  156. data/spec/models/moderation_text200_response_all_of_propriety_label_scores_spec.rb +48 -0
  157. data/spec/models/moderation_text200_response_all_of_propriety_spec.rb +60 -0
  158. data/spec/models/moderation_text200_response_all_of_quality_label_scores_spec.rb +54 -0
  159. data/spec/models/moderation_text200_response_all_of_quality_spec.rb +60 -0
  160. data/spec/models/moderation_text200_response_all_of_request_spec.rb +42 -0
  161. data/spec/models/moderation_text200_response_all_of_sensitive_spec.rb +70 -0
  162. data/spec/models/moderation_text200_response_all_of_sentiment_label_scores_spec.rb +48 -0
  163. data/spec/models/moderation_text200_response_all_of_sentiment_spec.rb +60 -0
  164. data/spec/models/moderation_text200_response_all_of_toxicity_label_scores_spec.rb +72 -0
  165. data/spec/models/moderation_text200_response_all_of_toxicity_spec.rb +60 -0
  166. data/spec/models/moderation_text200_response_all_of_url_spec.rb +70 -0
  167. data/spec/models/moderation_text200_response_all_of_username_spec.rb +70 -0
  168. data/spec/models/moderation_text200_response_all_of_wordlist_spec.rb +70 -0
  169. data/spec/models/moderation_text200_response_all_of_wordlists_inner_spec.rb +94 -0
  170. data/spec/models/moderation_text200_response_spec.rb +174 -0
  171. data/spec/models/moderation_text_request_spec.rb +66 -0
  172. data/spec/models/moderation_video200_response_spec.rb +54 -0
  173. data/spec/models/moderation_video_request_spec.rb +66 -0
  174. data/spec/spec_helper.rb +111 -0
  175. metadata +340 -0
@@ -0,0 +1,492 @@
1
+ =begin
2
+ #Moderation API
3
+
4
+ #API for automated content moderation
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ModerationAPI
16
+ class QueueActionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an action
23
+ # Create an action.
24
+ # @param actions_create_request [ActionsCreateRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ActionsList200ResponseInner]
27
+ def actions_create(actions_create_request, opts = {})
28
+ data, _status_code, _headers = actions_create_with_http_info(actions_create_request, opts)
29
+ data
30
+ end
31
+
32
+ # Create an action
33
+ # Create an action.
34
+ # @param actions_create_request [ActionsCreateRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ActionsList200ResponseInner, Integer, Hash)>] ActionsList200ResponseInner data, response status code and response headers
37
+ def actions_create_with_http_info(actions_create_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_create ...'
40
+ end
41
+ # verify the required parameter 'actions_create_request' is set
42
+ if @api_client.config.client_side_validation && actions_create_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'actions_create_request' when calling QueueActionsApi.actions_create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/actions'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(actions_create_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'ActionsList200ResponseInner'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['Authorization']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"QueueActionsApi.actions_create",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete an action
91
+ # Delete an action and all of its webhooks.
92
+ # @param id [String] The ID of the action to delete.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [ActionsDelete200Response]
95
+ def actions_delete(id, opts = {})
96
+ data, _status_code, _headers = actions_delete_with_http_info(id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete an action
101
+ # Delete an action and all of its webhooks.
102
+ # @param id [String] The ID of the action to delete.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ActionsDelete200Response, Integer, Hash)>] ActionsDelete200Response data, response status code and response headers
105
+ def actions_delete_with_http_info(id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_delete ...'
108
+ end
109
+ # verify the required parameter 'id' is set
110
+ if @api_client.config.client_side_validation && id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling QueueActionsApi.actions_delete"
112
+ end
113
+ # resource path
114
+ local_var_path = '/actions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type] || 'ActionsDelete200Response'
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['Authorization']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"QueueActionsApi.actions_delete",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Execute an action
154
+ # Execute an action on a set of content items in a queue.
155
+ # @param actions_execute_request [ActionsExecuteRequest]
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [ActionsExecute200Response]
158
+ def actions_execute(actions_execute_request, opts = {})
159
+ data, _status_code, _headers = actions_execute_with_http_info(actions_execute_request, opts)
160
+ data
161
+ end
162
+
163
+ # Execute an action
164
+ # Execute an action on a set of content items in a queue.
165
+ # @param actions_execute_request [ActionsExecuteRequest]
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(ActionsExecute200Response, Integer, Hash)>] ActionsExecute200Response data, response status code and response headers
168
+ def actions_execute_with_http_info(actions_execute_request, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_execute ...'
171
+ end
172
+ # verify the required parameter 'actions_execute_request' is set
173
+ if @api_client.config.client_side_validation && actions_execute_request.nil?
174
+ fail ArgumentError, "Missing the required parameter 'actions_execute_request' when calling QueueActionsApi.actions_execute"
175
+ end
176
+ # resource path
177
+ local_var_path = '/actions/execute'
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
186
+ # HTTP header 'Content-Type'
187
+ content_type = @api_client.select_header_content_type(['application/json'])
188
+ if !content_type.nil?
189
+ header_params['Content-Type'] = content_type
190
+ end
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(actions_execute_request)
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type] || 'ActionsExecute200Response'
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['Authorization']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"QueueActionsApi.actions_execute",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+
221
+ # Execute an action
222
+ # Execute an action on a set of content items in a queue.
223
+ # @param action_id [String] The ID or key of the action to execute.
224
+ # @param actions_execute_deprecated_request [ActionsExecuteDeprecatedRequest]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [ActionsExecute200Response]
227
+ def actions_execute_deprecated(action_id, actions_execute_deprecated_request, opts = {})
228
+ data, _status_code, _headers = actions_execute_deprecated_with_http_info(action_id, actions_execute_deprecated_request, opts)
229
+ data
230
+ end
231
+
232
+ # Execute an action
233
+ # Execute an action on a set of content items in a queue.
234
+ # @param action_id [String] The ID or key of the action to execute.
235
+ # @param actions_execute_deprecated_request [ActionsExecuteDeprecatedRequest]
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [Array<(ActionsExecute200Response, Integer, Hash)>] ActionsExecute200Response data, response status code and response headers
238
+ def actions_execute_deprecated_with_http_info(action_id, actions_execute_deprecated_request, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_execute_deprecated ...'
241
+ end
242
+ # verify the required parameter 'action_id' is set
243
+ if @api_client.config.client_side_validation && action_id.nil?
244
+ fail ArgumentError, "Missing the required parameter 'action_id' when calling QueueActionsApi.actions_execute_deprecated"
245
+ end
246
+ # verify the required parameter 'actions_execute_deprecated_request' is set
247
+ if @api_client.config.client_side_validation && actions_execute_deprecated_request.nil?
248
+ fail ArgumentError, "Missing the required parameter 'actions_execute_deprecated_request' when calling QueueActionsApi.actions_execute_deprecated"
249
+ end
250
+ # resource path
251
+ local_var_path = '/actions/{actionId}/execute'.sub('{' + 'actionId' + '}', CGI.escape(action_id.to_s))
252
+
253
+ # query parameters
254
+ query_params = opts[:query_params] || {}
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
260
+ # HTTP header 'Content-Type'
261
+ content_type = @api_client.select_header_content_type(['application/json'])
262
+ if !content_type.nil?
263
+ header_params['Content-Type'] = content_type
264
+ end
265
+
266
+ # form parameters
267
+ form_params = opts[:form_params] || {}
268
+
269
+ # http body (model)
270
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(actions_execute_deprecated_request)
271
+
272
+ # return_type
273
+ return_type = opts[:debug_return_type] || 'ActionsExecute200Response'
274
+
275
+ # auth_names
276
+ auth_names = opts[:debug_auth_names] || ['Authorization']
277
+
278
+ new_options = opts.merge(
279
+ :operation => :"QueueActionsApi.actions_execute_deprecated",
280
+ :header_params => header_params,
281
+ :query_params => query_params,
282
+ :form_params => form_params,
283
+ :body => post_body,
284
+ :auth_names => auth_names,
285
+ :return_type => return_type
286
+ )
287
+
288
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_execute_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+
295
+ # Get an action
296
+ # Get an action by ID.
297
+ # @param id [String] The ID of the action to get.
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [ActionsGet200Response]
300
+ def actions_get(id, opts = {})
301
+ data, _status_code, _headers = actions_get_with_http_info(id, opts)
302
+ data
303
+ end
304
+
305
+ # Get an action
306
+ # Get an action by ID.
307
+ # @param id [String] The ID of the action to get.
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(ActionsGet200Response, Integer, Hash)>] ActionsGet200Response data, response status code and response headers
310
+ def actions_get_with_http_info(id, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_get ...'
313
+ end
314
+ # verify the required parameter 'id' is set
315
+ if @api_client.config.client_side_validation && id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'id' when calling QueueActionsApi.actions_get"
317
+ end
318
+ # resource path
319
+ local_var_path = '/actions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
320
+
321
+ # query parameters
322
+ query_params = opts[:query_params] || {}
323
+
324
+ # header parameters
325
+ header_params = opts[:header_params] || {}
326
+ # HTTP header 'Accept' (if needed)
327
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
328
+
329
+ # form parameters
330
+ form_params = opts[:form_params] || {}
331
+
332
+ # http body (model)
333
+ post_body = opts[:debug_body]
334
+
335
+ # return_type
336
+ return_type = opts[:debug_return_type] || 'ActionsGet200Response'
337
+
338
+ # auth_names
339
+ auth_names = opts[:debug_auth_names] || ['Authorization']
340
+
341
+ new_options = opts.merge(
342
+ :operation => :"QueueActionsApi.actions_get",
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(:GET, local_var_path, new_options)
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
354
+ end
355
+ return data, status_code, headers
356
+ end
357
+
358
+ # List actions
359
+ # List actions for the current user.
360
+ # @param [Hash] opts the optional parameters
361
+ # @option opts [String] :queue_id Only return actions available in this queue.
362
+ # @return [Array<ActionsList200ResponseInner>]
363
+ def actions_list(opts = {})
364
+ data, _status_code, _headers = actions_list_with_http_info(opts)
365
+ data
366
+ end
367
+
368
+ # List actions
369
+ # List actions for the current user.
370
+ # @param [Hash] opts the optional parameters
371
+ # @option opts [String] :queue_id Only return actions available in this queue.
372
+ # @return [Array<(Array<ActionsList200ResponseInner>, Integer, Hash)>] Array<ActionsList200ResponseInner> data, response status code and response headers
373
+ def actions_list_with_http_info(opts = {})
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_list ...'
376
+ end
377
+ # resource path
378
+ local_var_path = '/actions'
379
+
380
+ # query parameters
381
+ query_params = opts[:query_params] || {}
382
+ query_params[:'queueId'] = opts[:'queue_id'] if !opts[:'queue_id'].nil?
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:debug_body]
394
+
395
+ # return_type
396
+ return_type = opts[:debug_return_type] || 'Array<ActionsList200ResponseInner>'
397
+
398
+ # auth_names
399
+ auth_names = opts[:debug_auth_names] || ['Authorization']
400
+
401
+ new_options = opts.merge(
402
+ :operation => :"QueueActionsApi.actions_list",
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # Update an action
419
+ # Update an action.
420
+ # @param id [String] The ID of the action to update.
421
+ # @param actions_update_request [ActionsUpdateRequest]
422
+ # @param [Hash] opts the optional parameters
423
+ # @return [ActionsList200ResponseInner]
424
+ def actions_update(id, actions_update_request, opts = {})
425
+ data, _status_code, _headers = actions_update_with_http_info(id, actions_update_request, opts)
426
+ data
427
+ end
428
+
429
+ # Update an action
430
+ # Update an action.
431
+ # @param id [String] The ID of the action to update.
432
+ # @param actions_update_request [ActionsUpdateRequest]
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [Array<(ActionsList200ResponseInner, Integer, Hash)>] ActionsList200ResponseInner data, response status code and response headers
435
+ def actions_update_with_http_info(id, actions_update_request, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: QueueActionsApi.actions_update ...'
438
+ end
439
+ # verify the required parameter 'id' is set
440
+ if @api_client.config.client_side_validation && id.nil?
441
+ fail ArgumentError, "Missing the required parameter 'id' when calling QueueActionsApi.actions_update"
442
+ end
443
+ # verify the required parameter 'actions_update_request' is set
444
+ if @api_client.config.client_side_validation && actions_update_request.nil?
445
+ fail ArgumentError, "Missing the required parameter 'actions_update_request' when calling QueueActionsApi.actions_update"
446
+ end
447
+ # resource path
448
+ local_var_path = '/actions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
449
+
450
+ # query parameters
451
+ query_params = opts[:query_params] || {}
452
+
453
+ # header parameters
454
+ header_params = opts[:header_params] || {}
455
+ # HTTP header 'Accept' (if needed)
456
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
457
+ # HTTP header 'Content-Type'
458
+ content_type = @api_client.select_header_content_type(['application/json'])
459
+ if !content_type.nil?
460
+ header_params['Content-Type'] = content_type
461
+ end
462
+
463
+ # form parameters
464
+ form_params = opts[:form_params] || {}
465
+
466
+ # http body (model)
467
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(actions_update_request)
468
+
469
+ # return_type
470
+ return_type = opts[:debug_return_type] || 'ActionsList200ResponseInner'
471
+
472
+ # auth_names
473
+ auth_names = opts[:debug_auth_names] || ['Authorization']
474
+
475
+ new_options = opts.merge(
476
+ :operation => :"QueueActionsApi.actions_update",
477
+ :header_params => header_params,
478
+ :query_params => query_params,
479
+ :form_params => form_params,
480
+ :body => post_body,
481
+ :auth_names => auth_names,
482
+ :return_type => return_type
483
+ )
484
+
485
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
486
+ if @api_client.config.debugging
487
+ @api_client.config.logger.debug "API called: QueueActionsApi#actions_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
488
+ end
489
+ return data, status_code, headers
490
+ end
491
+ end
492
+ end