ibm_watson 1.4.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -6
  3. data/lib/ibm_watson/assistant_v1.rb +213 -195
  4. data/lib/ibm_watson/assistant_v2.rb +221 -20
  5. data/lib/ibm_watson/compare_comply_v1.rb +35 -21
  6. data/lib/ibm_watson/discovery_v1.rb +132 -13
  7. data/lib/ibm_watson/discovery_v2.rb +734 -21
  8. data/lib/ibm_watson/language_translator_v3.rb +205 -67
  9. data/lib/ibm_watson/natural_language_classifier_v1.rb +4 -2
  10. data/lib/ibm_watson/natural_language_understanding_v1.rb +21 -21
  11. data/lib/ibm_watson/personality_insights_v3.rb +27 -18
  12. data/lib/ibm_watson/speech_to_text_v1.rb +65 -53
  13. data/lib/ibm_watson/text_to_speech_v1.rb +124 -140
  14. data/lib/ibm_watson/tone_analyzer_v3.rb +12 -13
  15. data/lib/ibm_watson/version.rb +1 -1
  16. data/lib/ibm_watson/visual_recognition_v3.rb +33 -16
  17. data/lib/ibm_watson/visual_recognition_v4.rb +103 -17
  18. data/test/integration/test_assistant_v1.rb +9 -0
  19. data/test/integration/test_assistant_v2.rb +34 -0
  20. data/test/integration/test_discovery_v2.rb +132 -6
  21. data/test/integration/test_language_translator_v3.rb +5 -0
  22. data/test/integration/test_text_to_speech_v1.rb +3 -3
  23. data/test/integration/test_visual_recognition_v4.rb +9 -0
  24. data/test/unit/test_assistant_v1.rb +150 -99
  25. data/test/unit/test_assistant_v2.rb +153 -8
  26. data/test/unit/test_compare_comply_v1.rb +20 -20
  27. data/test/unit/test_discovery_v1.rb +125 -125
  28. data/test/unit/test_discovery_v2.rb +262 -29
  29. data/test/unit/test_language_translator_v3.rb +85 -24
  30. data/test/unit/test_natural_language_classifier_v1.rb +17 -17
  31. data/test/unit/test_natural_language_understanding_v1.rb +10 -10
  32. data/test/unit/test_personality_insights_v3.rb +14 -14
  33. data/test/unit/test_speech_to_text_v1.rb +97 -97
  34. data/test/unit/test_text_to_speech_v1.rb +48 -48
  35. data/test/unit/test_tone_analyzer_v3.rb +12 -12
  36. data/test/unit/test_visual_recognition_v3.rb +16 -16
  37. data/test/unit/test_visual_recognition_v4.rb +56 -38
  38. metadata +8 -7
@@ -13,7 +13,9 @@
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
-
16
+ #
17
+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18
+ #
17
19
  # The IBM Watson™ Assistant service combines machine learning, natural language
18
20
  # understanding, and an integrated dialog editor to create conversation flows between your
19
21
  # apps and your users.
@@ -34,22 +36,15 @@ module IBMWatson
34
36
  class AssistantV2 < IBMCloudSdkCore::BaseService
35
37
  include Concurrent::Async
36
38
  DEFAULT_SERVICE_NAME = "assistant"
37
- DEFAULT_SERVICE_URL = "https://gateway.watsonplatform.net/assistant/api"
39
+ DEFAULT_SERVICE_URL = "https://api.us-south.assistant.watson.cloud.ibm.com"
40
+ attr_accessor :version
38
41
  ##
39
42
  # @!method initialize(args)
40
43
  # Construct a new client for the Assistant service.
41
44
  #
42
45
  # @param args [Hash] The args to initialize with
43
- # @option args version [String] The API version date to use with the service, in
44
- # "YYYY-MM-DD" format. Whenever the API is changed in a backwards
45
- # incompatible way, a new minor version of the API is released.
46
- # The service uses the API version for the date you specify, or
47
- # the most recent version before that date. Note that you should
48
- # not programmatically specify the current date at runtime, in
49
- # case the API has been updated since your application's release.
50
- # Instead, specify a version date that is compatible with your
51
- # application, and don't change it until your application is
52
- # ready for a later version.
46
+ # @option args version [String] Release date of the API version you want to use. Specify dates in YYYY-MM-DD
47
+ # format. The current version is `2020-04-01`.
53
48
  # @option args service_url [String] The base service URL to use when contacting the service.
54
49
  # The base service_url may differ between IBM Cloud regions.
55
50
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
@@ -58,10 +53,10 @@ module IBMWatson
58
53
  def initialize(args = {})
59
54
  @__async_initialized__ = false
60
55
  defaults = {}
61
- defaults[:version] = nil
62
56
  defaults[:service_url] = DEFAULT_SERVICE_URL
63
57
  defaults[:service_name] = DEFAULT_SERVICE_NAME
64
58
  defaults[:authenticator] = nil
59
+ defaults[:version] = nil
65
60
  user_service_url = args[:service_url] unless args[:service_url].nil?
66
61
  args = defaults.merge(args)
67
62
  @version = args[:version]
@@ -94,6 +89,8 @@ module IBMWatson
94
89
  def create_session(assistant_id:)
95
90
  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
96
91
 
92
+ raise ArgumentError.new("version must be provided") if version.nil?
93
+
97
94
  headers = {
98
95
  }
99
96
  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "create_session")
@@ -132,6 +129,8 @@ module IBMWatson
132
129
  def delete_session(assistant_id:, session_id:)
133
130
  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
134
131
 
132
+ raise ArgumentError.new("version must be provided") if version.nil?
133
+
135
134
  raise ArgumentError.new("session_id must be provided") if session_id.nil?
136
135
 
137
136
  headers = {
@@ -160,10 +159,10 @@ module IBMWatson
160
159
 
161
160
  ##
162
161
  # @!method message(assistant_id:, session_id:, input: nil, context: nil)
163
- # Send user input to assistant.
164
- # Send user input to an assistant and receive a response.
165
- #
166
- # There is no rate limit for this operation.
162
+ # Send user input to assistant (stateful).
163
+ # Send user input to an assistant and receive a response, with conversation state
164
+ # (including context data) stored by Watson Assistant for the duration of the
165
+ # session.
167
166
  # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
168
167
  # Assistant user interface, open the assistant settings and click **API Details**.
169
168
  # For information about creating assistants, see the
@@ -172,15 +171,20 @@ module IBMWatson
172
171
  # **Note:** Currently, the v2 API does not support creating assistants.
173
172
  # @param session_id [String] Unique identifier of the session.
174
173
  # @param input [MessageInput] An input object that includes the input text.
175
- # @param context [MessageContext] State information for the conversation. The context is stored by the assistant on
176
- # a per-session basis. You can use this property to set or modify context variables,
177
- # which can also be accessed by dialog nodes.
174
+ # @param context [MessageContext] Context data for the conversation. You can use this property to set or modify
175
+ # context variables, which can also be accessed by dialog nodes. The context is
176
+ # stored by the assistant on a per-session basis.
177
+ #
178
+ # **Note:** The total size of the context data stored for a stateful session cannot
179
+ # exceed 100KB.
178
180
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
179
181
  def message(assistant_id:, session_id:, input: nil, context: nil)
180
182
  raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
181
183
 
182
184
  raise ArgumentError.new("session_id must be provided") if session_id.nil?
183
185
 
186
+ raise ArgumentError.new("version must be provided") if version.nil?
187
+
184
188
  headers = {
185
189
  }
186
190
  sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "message")
@@ -207,5 +211,202 @@ module IBMWatson
207
211
  )
208
212
  response
209
213
  end
214
+
215
+ ##
216
+ # @!method message_stateless(assistant_id:, input: nil, context: nil)
217
+ # Send user input to assistant (stateless).
218
+ # Send user input to an assistant and receive a response, with conversation state
219
+ # (including context data) managed by your application.
220
+ # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
221
+ # Assistant user interface, open the assistant settings and click **API Details**.
222
+ # For information about creating assistants, see the
223
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
224
+ #
225
+ # **Note:** Currently, the v2 API does not support creating assistants.
226
+ # @param input [MessageInputStateless] An input object that includes the input text.
227
+ # @param context [MessageContextStateless] Context data for the conversation. You can use this property to set or modify
228
+ # context variables, which can also be accessed by dialog nodes. The context is not
229
+ # stored by the assistant. To maintain session state, include the context from the
230
+ # previous response.
231
+ #
232
+ # **Note:** The total size of the context data for a stateless session cannot exceed
233
+ # 250KB.
234
+ # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
235
+ def message_stateless(assistant_id:, input: nil, context: nil)
236
+ raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
237
+
238
+ raise ArgumentError.new("version must be provided") if version.nil?
239
+
240
+ headers = {
241
+ }
242
+ sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "message_stateless")
243
+ headers.merge!(sdk_headers)
244
+
245
+ params = {
246
+ "version" => @version
247
+ }
248
+
249
+ data = {
250
+ "input" => input,
251
+ "context" => context
252
+ }
253
+
254
+ method_url = "/v2/assistants/%s/message" % [ERB::Util.url_encode(assistant_id)]
255
+
256
+ response = request(
257
+ method: "POST",
258
+ url: method_url,
259
+ headers: headers,
260
+ params: params,
261
+ json: data,
262
+ accept_json: true
263
+ )
264
+ response
265
+ end
266
+ #########################
267
+ # Logs
268
+ #########################
269
+
270
+ ##
271
+ # @!method list_logs(assistant_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
272
+ # List log events for an assistant.
273
+ # List the events from the log of an assistant.
274
+ #
275
+ # This method is available only with Premium plans.
276
+ # @param assistant_id [String] Unique identifier of the assistant. To find the assistant ID in the Watson
277
+ # Assistant user interface, open the assistant settings and click **API Details**.
278
+ # For information about creating assistants, see the
279
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-add#assistant-add-task).
280
+ #
281
+ # **Note:** Currently, the v2 API does not support creating assistants.
282
+ # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
283
+ # reverse the sort order, prefix the parameter value with a minus sign (`-`).
284
+ # @param filter [String] A cacheable parameter that limits the results to those matching the specified
285
+ # filter. For more information, see the
286
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
287
+ # @param page_limit [Fixnum] The number of records to return in each page of results.
288
+ # @param cursor [String] A token identifying the page of results to retrieve.
289
+ # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
290
+ def list_logs(assistant_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
291
+ raise ArgumentError.new("assistant_id must be provided") if assistant_id.nil?
292
+
293
+ raise ArgumentError.new("version must be provided") if version.nil?
294
+
295
+ headers = {
296
+ }
297
+ sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "list_logs")
298
+ headers.merge!(sdk_headers)
299
+
300
+ params = {
301
+ "version" => @version,
302
+ "sort" => sort,
303
+ "filter" => filter,
304
+ "page_limit" => page_limit,
305
+ "cursor" => cursor
306
+ }
307
+
308
+ method_url = "/v2/assistants/%s/logs" % [ERB::Util.url_encode(assistant_id)]
309
+
310
+ response = request(
311
+ method: "GET",
312
+ url: method_url,
313
+ headers: headers,
314
+ params: params,
315
+ accept_json: true
316
+ )
317
+ response
318
+ end
319
+ #########################
320
+ # User data
321
+ #########################
322
+
323
+ ##
324
+ # @!method delete_user_data(customer_id:)
325
+ # Delete labeled data.
326
+ # Deletes all data associated with a specified customer ID. The method has no effect
327
+ # if no data is associated with the customer ID.
328
+ #
329
+ # You associate a customer ID with data by passing the `X-Watson-Metadata` header
330
+ # with a request that passes data. For more information about personal data and
331
+ # customer IDs, see [Information
332
+ # security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
333
+ #
334
+ # This operation is limited to 4 requests per minute. For more information, see
335
+ # **Rate limiting**.
336
+ # @param customer_id [String] The customer ID for which all data is to be deleted.
337
+ # @return [nil]
338
+ def delete_user_data(customer_id:)
339
+ raise ArgumentError.new("version must be provided") if version.nil?
340
+
341
+ raise ArgumentError.new("customer_id must be provided") if customer_id.nil?
342
+
343
+ headers = {
344
+ }
345
+ sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "delete_user_data")
346
+ headers.merge!(sdk_headers)
347
+
348
+ params = {
349
+ "version" => @version,
350
+ "customer_id" => customer_id
351
+ }
352
+
353
+ method_url = "/v2/user_data"
354
+
355
+ request(
356
+ method: "DELETE",
357
+ url: method_url,
358
+ headers: headers,
359
+ params: params,
360
+ accept_json: true
361
+ )
362
+ nil
363
+ end
364
+ #########################
365
+ # bulkClassify
366
+ #########################
367
+
368
+ ##
369
+ # @!method bulk_classify(skill_id:, input: nil)
370
+ # Identify intents and entities in multiple user utterances.
371
+ # Send multiple user inputs to a dialog skill in a single request and receive
372
+ # information about the intents and entities recognized in each input. This method
373
+ # is useful for testing and comparing the performance of different skills or skill
374
+ # versions.
375
+ #
376
+ # This method is available only with Premium plans.
377
+ # @param skill_id [String] Unique identifier of the skill. To find the skill ID in the Watson Assistant user
378
+ # interface, open the skill settings and click **API Details**.
379
+ # @param input [Array[BulkClassifyUtterance]] An array of input utterances to classify.
380
+ # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
381
+ def bulk_classify(skill_id:, input: nil)
382
+ raise ArgumentError.new("skill_id must be provided") if skill_id.nil?
383
+
384
+ raise ArgumentError.new("version must be provided") if version.nil?
385
+
386
+ headers = {
387
+ }
388
+ sdk_headers = Common.new.get_sdk_headers("conversation", "V2", "bulk_classify")
389
+ headers.merge!(sdk_headers)
390
+
391
+ params = {
392
+ "version" => @version
393
+ }
394
+
395
+ data = {
396
+ "input" => input
397
+ }
398
+
399
+ method_url = "/v2/skills/%s/workspace/bulk_classify" % [ERB::Util.url_encode(skill_id)]
400
+
401
+ response = request(
402
+ method: "POST",
403
+ url: method_url,
404
+ headers: headers,
405
+ params: params,
406
+ json: data,
407
+ accept_json: true
408
+ )
409
+ response
410
+ end
210
411
  end
211
412
  end
@@ -13,7 +13,9 @@
13
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
-
16
+ #
17
+ # IBM OpenAPI SDK Code Generator Version: 3.19.0-be3b4618-20201113-200858
18
+ #
17
19
  # IBM Watson&trade; Compare and Comply analyzes governing documents to provide details
18
20
  # about critical aspects of the documents.
19
21
 
@@ -30,34 +32,28 @@ module IBMWatson
30
32
  class CompareComplyV1 < IBMCloudSdkCore::BaseService
31
33
  include Concurrent::Async
32
34
  DEFAULT_SERVICE_NAME = "compare_comply"
33
- DEFAULT_SERVICE_URL = "https://gateway.watsonplatform.net/compare-comply/api"
35
+ DEFAULT_SERVICE_URL = "https://api.us-south.compare-comply.watson.cloud.ibm.com"
36
+ attr_accessor :version
34
37
  ##
35
38
  # @!method initialize(args)
36
39
  # Construct a new client for the Compare Comply service.
37
40
  #
38
41
  # @param args [Hash] The args to initialize with
39
- # @option args version [String] The API version date to use with the service, in
40
- # "YYYY-MM-DD" format. Whenever the API is changed in a backwards
41
- # incompatible way, a new minor version of the API is released.
42
- # The service uses the API version for the date you specify, or
43
- # the most recent version before that date. Note that you should
44
- # not programmatically specify the current date at runtime, in
45
- # case the API has been updated since your application's release.
46
- # Instead, specify a version date that is compatible with your
47
- # application, and don't change it until your application is
48
- # ready for a later version.
42
+ # @option args version [String] Release date of the version of the API you want to use. Specify dates in
43
+ # YYYY-MM-DD format. The current version is `2018-10-15`.
49
44
  # @option args service_url [String] The base service URL to use when contacting the service.
50
45
  # The base service_url may differ between IBM Cloud regions.
51
46
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
52
47
  # @option args service_name [String] The name of the service to configure. Will be used as the key to load
53
48
  # any external configuration, if applicable.
54
49
  def initialize(args = {})
50
+ warn "On 30 November 2021, Compare and Comply will no longer be available. For more information, see https://github.com/watson-developer-cloud/ruby-sdk#compare-and-comply-deprecation."
55
51
  @__async_initialized__ = false
56
52
  defaults = {}
57
- defaults[:version] = nil
58
53
  defaults[:service_url] = DEFAULT_SERVICE_URL
59
54
  defaults[:service_name] = DEFAULT_SERVICE_NAME
60
55
  defaults[:authenticator] = nil
56
+ defaults[:version] = nil
61
57
  user_service_url = args[:service_url] unless args[:service_url].nil?
62
58
  args = defaults.merge(args)
63
59
  @version = args[:version]
@@ -84,6 +80,8 @@ module IBMWatson
84
80
  # standalone methods as well as to the methods' use in batch-processing requests.
85
81
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
86
82
  def convert_to_html(file:, file_content_type: nil, model: nil)
83
+ raise ArgumentError.new("version must be provided") if version.nil?
84
+
87
85
  raise ArgumentError.new("file must be provided") if file.nil?
88
86
 
89
87
  headers = {
@@ -131,6 +129,8 @@ module IBMWatson
131
129
  # standalone methods as well as to the methods' use in batch-processing requests.
132
130
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
133
131
  def classify_elements(file:, file_content_type: nil, model: nil)
132
+ raise ArgumentError.new("version must be provided") if version.nil?
133
+
134
134
  raise ArgumentError.new("file must be provided") if file.nil?
135
135
 
136
136
  headers = {
@@ -178,6 +178,8 @@ module IBMWatson
178
178
  # standalone methods as well as to the methods' use in batch-processing requests.
179
179
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
180
180
  def extract_tables(file:, file_content_type: nil, model: nil)
181
+ raise ArgumentError.new("version must be provided") if version.nil?
182
+
181
183
  raise ArgumentError.new("file must be provided") if file.nil?
182
184
 
183
185
  headers = {
@@ -229,6 +231,8 @@ module IBMWatson
229
231
  # standalone methods as well as to the methods' use in batch-processing requests.
230
232
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
231
233
  def compare_documents(file_1:, file_2:, file_1_content_type: nil, file_2_content_type: nil, file_1_label: nil, file_2_label: nil, model: nil)
234
+ raise ArgumentError.new("version must be provided") if version.nil?
235
+
232
236
  raise ArgumentError.new("file_1 must be provided") if file_1.nil?
233
237
 
234
238
  raise ArgumentError.new("file_2 must be provided") if file_2.nil?
@@ -286,6 +290,8 @@ module IBMWatson
286
290
  # @param comment [String] An optional comment on or description of the feedback.
287
291
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
288
292
  def add_feedback(feedback_data:, user_id: nil, comment: nil)
293
+ raise ArgumentError.new("version must be provided") if version.nil?
294
+
289
295
  raise ArgumentError.new("feedback_data must be provided") if feedback_data.nil?
290
296
 
291
297
  headers = {
@@ -317,15 +323,11 @@ module IBMWatson
317
323
  end
318
324
 
319
325
  ##
320
- # @!method list_feedback(feedback_type: nil, before: nil, after: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
326
+ # @!method list_feedback(feedback_type: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
321
327
  # List the feedback in a document.
322
328
  # Lists the feedback in a document.
323
329
  # @param feedback_type [String] An optional string that filters the output to include only feedback with the
324
330
  # specified feedback type. The only permitted value is `element_classification`.
325
- # @param before [Time] An optional string in the format `YYYY-MM-DD` that filters the output to include
326
- # only feedback that was added before the specified date.
327
- # @param after [Time] An optional string in the format `YYYY-MM-DD` that filters the output to include
328
- # only feedback that was added after the specified date.
329
331
  # @param document_title [String] An optional string that filters the output to include only feedback from the
330
332
  # document with the specified `document_title`.
331
333
  # @param model_id [String] An optional string that filters the output to include only feedback with the
@@ -362,7 +364,9 @@ module IBMWatson
362
364
  # output includes a value called `total` that gives the total count of feedback
363
365
  # created.
364
366
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
365
- def list_feedback(feedback_type: nil, before: nil, after: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
367
+ def list_feedback(feedback_type: nil, document_title: nil, model_id: nil, model_version: nil, category_removed: nil, category_added: nil, category_not_changed: nil, type_removed: nil, type_added: nil, type_not_changed: nil, page_limit: nil, cursor: nil, sort: nil, include_total: nil)
368
+ raise ArgumentError.new("version must be provided") if version.nil?
369
+
366
370
  headers = {
367
371
  }
368
372
  sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "list_feedback")
@@ -371,8 +375,6 @@ module IBMWatson
371
375
  params = {
372
376
  "version" => @version,
373
377
  "feedback_type" => feedback_type,
374
- "before" => before,
375
- "after" => after,
376
378
  "document_title" => document_title,
377
379
  "model_id" => model_id,
378
380
  "model_version" => model_version,
@@ -411,6 +413,8 @@ module IBMWatson
411
413
  # standalone methods as well as to the methods' use in batch-processing requests.
412
414
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
413
415
  def get_feedback(feedback_id:, model: nil)
416
+ raise ArgumentError.new("version must be provided") if version.nil?
417
+
414
418
  raise ArgumentError.new("feedback_id must be provided") if feedback_id.nil?
415
419
 
416
420
  headers = {
@@ -446,6 +450,8 @@ module IBMWatson
446
450
  # standalone methods as well as to the methods' use in batch-processing requests.
447
451
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
448
452
  def delete_feedback(feedback_id:, model: nil)
453
+ raise ArgumentError.new("version must be provided") if version.nil?
454
+
449
455
  raise ArgumentError.new("feedback_id must be provided") if feedback_id.nil?
450
456
 
451
457
  headers = {
@@ -504,6 +510,8 @@ module IBMWatson
504
510
  # standalone methods as well as to the methods' use in batch-processing requests.
505
511
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
506
512
  def create_batch(function:, input_credentials_file:, input_bucket_location:, input_bucket_name:, output_credentials_file:, output_bucket_location:, output_bucket_name:, model: nil)
513
+ raise ArgumentError.new("version must be provided") if version.nil?
514
+
507
515
  raise ArgumentError.new("function must be provided") if function.nil?
508
516
 
509
517
  raise ArgumentError.new("input_credentials_file must be provided") if input_credentials_file.nil?
@@ -568,6 +576,8 @@ module IBMWatson
568
576
  # Lists batch-processing jobs submitted by users.
569
577
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
570
578
  def list_batches
579
+ raise ArgumentError.new("version must be provided") if version.nil?
580
+
571
581
  headers = {
572
582
  }
573
583
  sdk_headers = Common.new.get_sdk_headers("compare-comply", "V1", "list_batches")
@@ -596,6 +606,8 @@ module IBMWatson
596
606
  # @param batch_id [String] The ID of the batch-processing job whose information you want to retrieve.
597
607
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
598
608
  def get_batch(batch_id:)
609
+ raise ArgumentError.new("version must be provided") if version.nil?
610
+
599
611
  raise ArgumentError.new("batch_id must be provided") if batch_id.nil?
600
612
 
601
613
  headers = {
@@ -632,6 +644,8 @@ module IBMWatson
632
644
  # standalone methods as well as to the methods' use in batch-processing requests.
633
645
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
634
646
  def update_batch(batch_id:, action:, model: nil)
647
+ raise ArgumentError.new("version must be provided") if version.nil?
648
+
635
649
  raise ArgumentError.new("batch_id must be provided") if batch_id.nil?
636
650
 
637
651
  raise ArgumentError.new("action must be provided") if action.nil?