ibm_watson 1.2.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -5
  3. data/lib/ibm_watson/assistant_v1.rb +153 -209
  4. data/lib/ibm_watson/assistant_v2.rb +168 -15
  5. data/lib/ibm_watson/compare_comply_v1.rb +11 -5
  6. data/lib/ibm_watson/discovery_v1.rb +14 -8
  7. data/lib/ibm_watson/discovery_v2.rb +605 -12
  8. data/lib/ibm_watson/language_translator_v3.rb +166 -47
  9. data/lib/ibm_watson/natural_language_classifier_v1.rb +10 -4
  10. data/lib/ibm_watson/natural_language_understanding_v1.rb +19 -15
  11. data/lib/ibm_watson/personality_insights_v3.rb +17 -11
  12. data/lib/ibm_watson/speech_to_text_v1.rb +323 -195
  13. data/lib/ibm_watson/text_to_speech_v1.rb +75 -59
  14. data/lib/ibm_watson/tone_analyzer_v3.rb +11 -5
  15. data/lib/ibm_watson/version.rb +1 -1
  16. data/lib/ibm_watson/visual_recognition_v3.rb +11 -5
  17. data/lib/ibm_watson/visual_recognition_v4.rb +199 -4
  18. data/test/integration/test_assistant_v2.rb +25 -0
  19. data/test/integration/test_compare_comply_v1.rb +1 -12
  20. data/test/integration/test_discovery_v2.rb +118 -6
  21. data/test/integration/test_language_translator_v3.rb +5 -0
  22. data/test/integration/test_speech_to_text_v1.rb +2 -0
  23. data/test/integration/test_visual_recognition_v4.rb +9 -0
  24. data/test/unit/test_assistant_v1.rb +98 -98
  25. data/test/unit/test_assistant_v2.rb +102 -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 -10
  33. data/test/unit/test_speech_to_text_v1.rb +97 -97
  34. data/test/unit/test_text_to_speech_v1.rb +41 -41
  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 +117 -30
  38. metadata +5 -6
  39. data/test/unit/test_vcap_using_personality_insights.rb +0 -161
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c6d7f5a377f215adb0729cf0382278e5ffaab799600af790f34ccbdfc23c9bc
4
- data.tar.gz: 2bcd42b40f431dd384e98ed4bb2189f31bc9f2e3079d3e6f99616c04dac0058e
3
+ metadata.gz: 409d6967d2bafb4da4062a2f5f5e6db07a110094af4ebb021782349907066d80
4
+ data.tar.gz: a4ec07dda5cf80e87b24f13c430d042cdced5805b40001aa8cd94052fd5b2c8f
5
5
  SHA512:
6
- metadata.gz: 0c596c85d58113d53c16e02d146efd8a8dcad0e182b09b5be788cd0f407270b8cdb74dc367cfd970843d29bd698e94123769322da23c35a044426b8a6e039cef
7
- data.tar.gz: c36a5db2c61384052d8d1df6cbacaae5eec21a8acf6050c8bb3bf7eac419ccb60b34028b870d4b88845e0750698c1bb0dc08e04730265a6c30066c138428d3b6
6
+ metadata.gz: c27789e4c9a650579efe3547833dbb329394ca3b3db339bb5b36c4203e973915f6be60142e55ea35a034be47627200a9d4e5387edd0fcbb75491e7a5122b3c78
7
+ data.tar.gz: 7c5b71128abfaff86e6f648bf07932357f01f6574d5ca3f27553ff17a851ed6e0abc037af56a9be4e64d4aa8a1d7ef645d534a852fd2653b54f5e0d9c343723c
data/README.md CHANGED
@@ -129,7 +129,7 @@ IBM Cloud is migrating to token-based Identity and Access Management (IAM) authe
129
129
  You supply either an IAM service **API key** or an **access token**:
130
130
 
131
131
  * Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.
132
- * Use the access token if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/services/watson?topic=watson-iam).
132
+ * Use the access token if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/watson?topic=watson-iam).
133
133
 
134
134
  #### Supplying the IAM API key
135
135
 
@@ -267,6 +267,28 @@ Headers: "<http response headers>"
267
267
  Result: "<response returned by service>"
268
268
  ```
269
269
 
270
+ ### Transaction IDs
271
+
272
+ Every SDK call will return a response which will contain a transaction ID, accessible via the `x-global-transaction-id` header. This transaction ID is useful for troubleshooting and accessing relevant logs from your service instance.
273
+
274
+ ```ruby
275
+ require "ibm_watson"
276
+ include IBMWatson
277
+
278
+ assistant = AssistantV1.new(
279
+ authenticator: "<authenticator>"
280
+ version: "2017-04-21"
281
+ )
282
+
283
+ begin
284
+ response = assistant.list_workspaces
285
+ p "Global transaction id: #{response.headers["X-Global-Transaction-Id"]}"
286
+ rescue IBMCloudSdkCore::ApiException => e
287
+ # Global transaction on failed api call is contained in the error message
288
+ print "Error: ##{e}"
289
+ end
290
+ ```
291
+
270
292
  ## Configuring the HTTP client
271
293
 
272
294
  To set client configs like timeout or proxy use the `configure_http_client` function and pass in the configurations.
@@ -368,12 +390,18 @@ assistant = IBMWatson::AssistantV1.new(
368
390
 
369
391
  ```
370
392
 
393
+ ## Questions
394
+
395
+ If you have issues with the APIs or have a question about the Watson services, see [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-watson+ruby).
396
+
371
397
  ## Ruby version
372
398
 
373
399
  Tested on:
374
400
 
375
- * MRI Ruby (RVM): 2.3.7, 2.4.4, 2.5.1
376
- * RubyInstaller (Windows x64): 2.3.3, 2.4.4, 2.5.1
401
+ * MRI Ruby (RVM): 2.5.1, 2.6.1
402
+ * RubyInstaller (Windows x64): 2.5.1, 2.6.1
403
+
404
+ 2.3.7 and 2.4.4 should still work but support will be deprecated in next major release.
377
405
 
378
406
  ## Contributing
379
407
 
@@ -397,6 +425,6 @@ We'd love to highlight cool open-source projects that use this SDK! If you'd lik
397
425
  [examples]: https://github.com/watson-developer-cloud/ruby-sdk/tree/master/examples
398
426
  [CONTRIBUTING]: https://github.com/watson-developer-cloud/ruby-sdk/blob/master/CONTRIBUTING.md
399
427
  [license]: http://www.apache.org/licenses/LICENSE-2.0
400
- [vcap_services]: https://cloud.ibm.com/docs/services/watson?topic=watson-vcapServices
428
+ [vcap_services]: https://cloud.ibm.com/docs/watson?topic=watson-vcapServices
401
429
  [ibm-cloud-onboarding]: http://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Ruby
402
- [ivar]: http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html
430
+ [ivar]: http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # (C) Copyright IBM Corp. 2020.
3
+ # (C) Copyright IBM Corp. 2018, 2020.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@ module IBMWatson
33
33
  # The Assistant V1 service.
34
34
  class AssistantV1 < IBMCloudSdkCore::BaseService
35
35
  include Concurrent::Async
36
+ DEFAULT_SERVICE_NAME = "assistant"
37
+ DEFAULT_SERVICE_URL = "https://api.us-south.assistant.watson.cloud.ibm.com"
36
38
  ##
37
39
  # @!method initialize(args)
38
40
  # Construct a new client for the Assistant service.
@@ -51,19 +53,23 @@ module IBMWatson
51
53
  # @option args service_url [String] The base service URL to use when contacting the service.
52
54
  # The base service_url may differ between IBM Cloud regions.
53
55
  # @option args authenticator [Object] The Authenticator instance to be configured for this service.
56
+ # @option args service_name [String] The name of the service to configure. Will be used as the key to load
57
+ # any external configuration, if applicable.
54
58
  def initialize(args = {})
55
59
  @__async_initialized__ = false
56
60
  defaults = {}
57
61
  defaults[:version] = nil
58
- defaults[:service_url] = "https://gateway.watsonplatform.net/assistant/api"
62
+ defaults[:service_url] = DEFAULT_SERVICE_URL
63
+ defaults[:service_name] = DEFAULT_SERVICE_NAME
59
64
  defaults[:authenticator] = nil
65
+ user_service_url = args[:service_url] unless args[:service_url].nil?
60
66
  args = defaults.merge(args)
61
67
  @version = args[:version]
62
68
  raise ArgumentError.new("version must be provided") if @version.nil?
63
69
 
64
- args[:service_name] = "assistant"
65
70
  args[:authenticator] = IBMCloudSdkCore::ConfigBasedAuthenticatorFactory.new.get_authenticator(service_name: args[:service_name]) if args[:authenticator].nil?
66
71
  super
72
+ @service_url = user_service_url unless user_service_url.nil?
67
73
  end
68
74
 
69
75
  #########################
@@ -78,9 +84,7 @@ module IBMWatson
78
84
  # **Important:** This method has been superseded by the new v2 runtime API. The v2
79
85
  # API offers significant advantages, including ease of deployment, automatic state
80
86
  # management, versioning, and search capabilities. For more information, see the
81
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
82
- #
83
- # There is no rate limit for this operation.
87
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).
84
88
  # @param workspace_id [String] Unique identifier of the workspace.
85
89
  # @param input [MessageInput] An input object that includes the input text.
86
90
  # @param intents [Array[RuntimeIntent]] Intents to use when evaluating the user input. Include intents from the previous
@@ -140,9 +144,6 @@ module IBMWatson
140
144
  # @!method list_workspaces(page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
141
145
  # List workspaces.
142
146
  # List the workspaces associated with a Watson Assistant service instance.
143
- #
144
- # This operation is limited to 500 requests per 30 minutes. For more information,
145
- # see **Rate limiting**.
146
147
  # @param page_limit [Fixnum] The number of records to return in each page of results.
147
148
  # @param sort [String] The attribute by which returned workspaces will be sorted. To reverse the sort
148
149
  # order, prefix the value with a minus sign (`-`).
@@ -177,13 +178,10 @@ module IBMWatson
177
178
  end
178
179
 
179
180
  ##
180
- # @!method create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil)
181
+ # @!method create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, include_audit: nil)
181
182
  # Create workspace.
182
183
  # Create a workspace based on component objects. You must provide workspace
183
184
  # components defining the content of the new workspace.
184
- #
185
- # This operation is limited to 30 requests per 30 minutes. For more information, see
186
- # **Rate limiting**.
187
185
  # @param name [String] The name of the workspace. This string cannot contain carriage return, newline, or
188
186
  # tab characters.
189
187
  # @param description [String] The description of the workspace. This string cannot contain carriage return,
@@ -200,15 +198,18 @@ module IBMWatson
200
198
  # @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
201
199
  # input.
202
200
  # @param webhooks [Array[Webhook]]
201
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
202
+ # the response.
203
203
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
204
- def create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil)
204
+ def create_workspace(name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, include_audit: nil)
205
205
  headers = {
206
206
  }
207
207
  sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_workspace")
208
208
  headers.merge!(sdk_headers)
209
209
 
210
210
  params = {
211
- "version" => @version
211
+ "version" => @version,
212
+ "include_audit" => include_audit
212
213
  }
213
214
 
214
215
  data = {
@@ -242,10 +243,6 @@ module IBMWatson
242
243
  # @!method get_workspace(workspace_id:, export: nil, include_audit: nil, sort: nil)
243
244
  # Get information about a workspace.
244
245
  # Get information about a workspace, optionally including all workspace content.
245
- #
246
- # With **export**=`false`, this operation is limited to 6000 requests per 5 minutes.
247
- # With **export**=`true`, the limit is 20 requests per 30 minutes. For more
248
- # information, see **Rate limiting**.
249
246
  # @param workspace_id [String] Unique identifier of the workspace.
250
247
  # @param export [Boolean] Whether to include all element content in the returned data. If
251
248
  # **export**=`false`, the returned data includes only information about the element
@@ -284,13 +281,10 @@ module IBMWatson
284
281
  end
285
282
 
286
283
  ##
287
- # @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil)
284
+ # @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil, include_audit: nil)
288
285
  # Update workspace.
289
286
  # Update an existing workspace with new or modified data. You must provide component
290
287
  # objects defining the content of the updated workspace.
291
- #
292
- # This operation is limited to 30 request per 30 minutes. For more information, see
293
- # **Rate limiting**.
294
288
  # @param workspace_id [String] Unique identifier of the workspace.
295
289
  # @param name [String] The name of the workspace. This string cannot contain carriage return, newline, or
296
290
  # tab characters.
@@ -308,17 +302,20 @@ module IBMWatson
308
302
  # @param counterexamples [Array[Counterexample]] An array of objects defining input examples that have been marked as irrelevant
309
303
  # input.
310
304
  # @param webhooks [Array[Webhook]]
311
- # @param append [Boolean] Whether the new data is to be appended to the existing data in the workspace. If
305
+ # @param append [Boolean] Whether the new data is to be appended to the existing data in the object. If
312
306
  # **append**=`false`, elements included in the new data completely replace the
313
307
  # corresponding existing elements, including all subelements. For example, if the
314
- # new data includes **entities** and **append**=`false`, all existing entities in
315
- # the workspace are discarded and replaced with the new entities.
308
+ # new data for a workspace includes **entities** and **append**=`false`, all
309
+ # existing entities in the workspace are discarded and replaced with the new
310
+ # entities.
316
311
  #
317
312
  # If **append**=`true`, existing elements are preserved, and the new elements are
318
313
  # added. If any elements in the new data collide with existing elements, the update
319
314
  # request fails.
315
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
316
+ # the response.
320
317
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
321
- def update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil)
318
+ def update_workspace(workspace_id:, name: nil, description: nil, language: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, webhooks: nil, append: nil, include_audit: nil)
322
319
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
323
320
 
324
321
  headers = {
@@ -328,7 +325,8 @@ module IBMWatson
328
325
 
329
326
  params = {
330
327
  "version" => @version,
331
- "append" => append
328
+ "append" => append,
329
+ "include_audit" => include_audit
332
330
  }
333
331
 
334
332
  data = {
@@ -362,9 +360,6 @@ module IBMWatson
362
360
  # @!method delete_workspace(workspace_id:)
363
361
  # Delete workspace.
364
362
  # Delete a workspace from the service instance.
365
- #
366
- # This operation is limited to 30 requests per 30 minutes. For more information, see
367
- # **Rate limiting**.
368
363
  # @param workspace_id [String] Unique identifier of the workspace.
369
364
  # @return [nil]
370
365
  def delete_workspace(workspace_id:)
@@ -398,10 +393,6 @@ module IBMWatson
398
393
  # @!method list_intents(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
399
394
  # List intents.
400
395
  # List the intents for a workspace.
401
- #
402
- # With **export**=`false`, this operation is limited to 2000 requests per 30
403
- # minutes. With **export**=`true`, the limit is 400 requests per 30 minutes. For
404
- # more information, see **Rate limiting**.
405
396
  # @param workspace_id [String] Unique identifier of the workspace.
406
397
  # @param export [Boolean] Whether to include all element content in the returned data. If
407
398
  # **export**=`false`, the returned data includes only information about the element
@@ -443,15 +434,12 @@ module IBMWatson
443
434
  end
444
435
 
445
436
  ##
446
- # @!method create_intent(workspace_id:, intent:, description: nil, examples: nil)
437
+ # @!method create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil)
447
438
  # Create intent.
448
439
  # Create a new intent.
449
440
  #
450
441
  # If you want to create multiple intents with a single API call, consider using the
451
442
  # **[Update workspace](#update-workspace)** method instead.
452
- #
453
- # This operation is limited to 2000 requests per 30 minutes. For more information,
454
- # see **Rate limiting**.
455
443
  # @param workspace_id [String] Unique identifier of the workspace.
456
444
  # @param intent [String] The name of the intent. This string must conform to the following restrictions:
457
445
  # - It can contain only Unicode alphanumeric, underscore, hyphen, and dot
@@ -460,8 +448,10 @@ module IBMWatson
460
448
  # @param description [String] The description of the intent. This string cannot contain carriage return,
461
449
  # newline, or tab characters.
462
450
  # @param examples [Array[Example]] An array of user input examples for the intent.
451
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
452
+ # the response.
463
453
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
464
- def create_intent(workspace_id:, intent:, description: nil, examples: nil)
454
+ def create_intent(workspace_id:, intent:, description: nil, examples: nil, include_audit: nil)
465
455
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
466
456
 
467
457
  raise ArgumentError.new("intent must be provided") if intent.nil?
@@ -472,7 +462,8 @@ module IBMWatson
472
462
  headers.merge!(sdk_headers)
473
463
 
474
464
  params = {
475
- "version" => @version
465
+ "version" => @version,
466
+ "include_audit" => include_audit
476
467
  }
477
468
 
478
469
  data = {
@@ -498,10 +489,6 @@ module IBMWatson
498
489
  # @!method get_intent(workspace_id:, intent:, export: nil, include_audit: nil)
499
490
  # Get intent.
500
491
  # Get information about an intent, optionally including all intent content.
501
- #
502
- # With **export**=`false`, this operation is limited to 6000 requests per 5 minutes.
503
- # With **export**=`true`, the limit is 400 requests per 30 minutes. For more
504
- # information, see **Rate limiting**.
505
492
  # @param workspace_id [String] Unique identifier of the workspace.
506
493
  # @param intent [String] The intent name.
507
494
  # @param export [Boolean] Whether to include all element content in the returned data. If
@@ -539,16 +526,13 @@ module IBMWatson
539
526
  end
540
527
 
541
528
  ##
542
- # @!method update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil)
529
+ # @!method update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil)
543
530
  # Update intent.
544
531
  # Update an existing intent with new or modified data. You must provide component
545
532
  # objects defining the content of the updated intent.
546
533
  #
547
534
  # If you want to update multiple intents with a single API call, consider using the
548
535
  # **[Update workspace](#update-workspace)** method instead.
549
- #
550
- # This operation is limited to 2000 requests per 30 minutes. For more information,
551
- # see **Rate limiting**.
552
536
  # @param workspace_id [String] Unique identifier of the workspace.
553
537
  # @param intent [String] The intent name.
554
538
  # @param new_intent [String] The name of the intent. This string must conform to the following restrictions:
@@ -558,8 +542,19 @@ module IBMWatson
558
542
  # @param new_description [String] The description of the intent. This string cannot contain carriage return,
559
543
  # newline, or tab characters.
560
544
  # @param new_examples [Array[Example]] An array of user input examples for the intent.
545
+ # @param append [Boolean] Whether the new data is to be appended to the existing data in the object. If
546
+ # **append**=`false`, elements included in the new data completely replace the
547
+ # corresponding existing elements, including all subelements. For example, if the
548
+ # new data for the intent includes **examples** and **append**=`false`, all existing
549
+ # examples for the intent are discarded and replaced with the new examples.
550
+ #
551
+ # If **append**=`true`, existing elements are preserved, and the new elements are
552
+ # added. If any elements in the new data collide with existing elements, the update
553
+ # request fails.
554
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
555
+ # the response.
561
556
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
562
- def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil)
557
+ def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil, append: nil, include_audit: nil)
563
558
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
564
559
 
565
560
  raise ArgumentError.new("intent must be provided") if intent.nil?
@@ -570,7 +565,9 @@ module IBMWatson
570
565
  headers.merge!(sdk_headers)
571
566
 
572
567
  params = {
573
- "version" => @version
568
+ "version" => @version,
569
+ "append" => append,
570
+ "include_audit" => include_audit
574
571
  }
575
572
 
576
573
  data = {
@@ -596,9 +593,6 @@ module IBMWatson
596
593
  # @!method delete_intent(workspace_id:, intent:)
597
594
  # Delete intent.
598
595
  # Delete an intent from a workspace.
599
- #
600
- # This operation is limited to 2000 requests per 30 minutes. For more information,
601
- # see **Rate limiting**.
602
596
  # @param workspace_id [String] Unique identifier of the workspace.
603
597
  # @param intent [String] The intent name.
604
598
  # @return [nil]
@@ -636,9 +630,6 @@ module IBMWatson
636
630
  # List user input examples.
637
631
  # List the user input examples for an intent, optionally including contextual entity
638
632
  # mentions.
639
- #
640
- # This operation is limited to 2500 requests per 30 minutes. For more information,
641
- # see **Rate limiting**.
642
633
  # @param workspace_id [String] Unique identifier of the workspace.
643
634
  # @param intent [String] The intent name.
644
635
  # @param page_limit [Fixnum] The number of records to return in each page of results.
@@ -679,15 +670,12 @@ module IBMWatson
679
670
  end
680
671
 
681
672
  ##
682
- # @!method create_example(workspace_id:, intent:, text:, mentions: nil)
673
+ # @!method create_example(workspace_id:, intent:, text:, mentions: nil, include_audit: nil)
683
674
  # Create user input example.
684
675
  # Add a new user input example to an intent.
685
676
  #
686
- # If you want to add multiple exaples with a single API call, consider using the
677
+ # If you want to add multiple examples with a single API call, consider using the
687
678
  # **[Update intent](#update-intent)** method instead.
688
- #
689
- # This operation is limited to 1000 requests per 30 minutes. For more information,
690
- # see **Rate limiting**.
691
679
  # @param workspace_id [String] Unique identifier of the workspace.
692
680
  # @param intent [String] The intent name.
693
681
  # @param text [String] The text of a user input example. This string must conform to the following
@@ -695,8 +683,10 @@ module IBMWatson
695
683
  # - It cannot contain carriage return, newline, or tab characters.
696
684
  # - It cannot consist of only whitespace characters.
697
685
  # @param mentions [Array[Mention]] An array of contextual entity mentions.
686
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
687
+ # the response.
698
688
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
699
- def create_example(workspace_id:, intent:, text:, mentions: nil)
689
+ def create_example(workspace_id:, intent:, text:, mentions: nil, include_audit: nil)
700
690
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
701
691
 
702
692
  raise ArgumentError.new("intent must be provided") if intent.nil?
@@ -709,7 +699,8 @@ module IBMWatson
709
699
  headers.merge!(sdk_headers)
710
700
 
711
701
  params = {
712
- "version" => @version
702
+ "version" => @version,
703
+ "include_audit" => include_audit
713
704
  }
714
705
 
715
706
  data = {
@@ -734,9 +725,6 @@ module IBMWatson
734
725
  # @!method get_example(workspace_id:, intent:, text:, include_audit: nil)
735
726
  # Get user input example.
736
727
  # Get information about a user input example.
737
- #
738
- # This operation is limited to 6000 requests per 5 minutes. For more information,
739
- # see **Rate limiting**.
740
728
  # @param workspace_id [String] Unique identifier of the workspace.
741
729
  # @param intent [String] The intent name.
742
730
  # @param text [String] The text of the user input example.
@@ -773,15 +761,12 @@ module IBMWatson
773
761
  end
774
762
 
775
763
  ##
776
- # @!method update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil)
764
+ # @!method update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil, include_audit: nil)
777
765
  # Update user input example.
778
766
  # Update the text of a user input example.
779
767
  #
780
768
  # If you want to update multiple examples with a single API call, consider using the
781
769
  # **[Update intent](#update-intent)** method instead.
782
- #
783
- # This operation is limited to 1000 requests per 30 minutes. For more information,
784
- # see **Rate limiting**.
785
770
  # @param workspace_id [String] Unique identifier of the workspace.
786
771
  # @param intent [String] The intent name.
787
772
  # @param text [String] The text of the user input example.
@@ -790,8 +775,10 @@ module IBMWatson
790
775
  # - It cannot contain carriage return, newline, or tab characters.
791
776
  # - It cannot consist of only whitespace characters.
792
777
  # @param new_mentions [Array[Mention]] An array of contextual entity mentions.
778
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
779
+ # the response.
793
780
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
794
- def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil)
781
+ def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil, include_audit: nil)
795
782
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
796
783
 
797
784
  raise ArgumentError.new("intent must be provided") if intent.nil?
@@ -804,7 +791,8 @@ module IBMWatson
804
791
  headers.merge!(sdk_headers)
805
792
 
806
793
  params = {
807
- "version" => @version
794
+ "version" => @version,
795
+ "include_audit" => include_audit
808
796
  }
809
797
 
810
798
  data = {
@@ -829,9 +817,6 @@ module IBMWatson
829
817
  # @!method delete_example(workspace_id:, intent:, text:)
830
818
  # Delete user input example.
831
819
  # Delete a user input example from an intent.
832
- #
833
- # This operation is limited to 1000 requests per 30 minutes. For more information,
834
- # see **Rate limiting**.
835
820
  # @param workspace_id [String] Unique identifier of the workspace.
836
821
  # @param intent [String] The intent name.
837
822
  # @param text [String] The text of the user input example.
@@ -872,9 +857,6 @@ module IBMWatson
872
857
  # List counterexamples.
873
858
  # List the counterexamples for a workspace. Counterexamples are examples that have
874
859
  # been marked as irrelevant input.
875
- #
876
- # This operation is limited to 2500 requests per 30 minutes. For more information,
877
- # see **Rate limiting**.
878
860
  # @param workspace_id [String] Unique identifier of the workspace.
879
861
  # @param page_limit [Fixnum] The number of records to return in each page of results.
880
862
  # @param sort [String] The attribute by which returned counterexamples will be sorted. To reverse the
@@ -912,23 +894,22 @@ module IBMWatson
912
894
  end
913
895
 
914
896
  ##
915
- # @!method create_counterexample(workspace_id:, text:)
897
+ # @!method create_counterexample(workspace_id:, text:, include_audit: nil)
916
898
  # Create counterexample.
917
899
  # Add a new counterexample to a workspace. Counterexamples are examples that have
918
900
  # been marked as irrelevant input.
919
901
  #
920
902
  # If you want to add multiple counterexamples with a single API call, consider using
921
903
  # the **[Update workspace](#update-workspace)** method instead.
922
- #
923
- # This operation is limited to 1000 requests per 30 minutes. For more information,
924
- # see **Rate limiting**.
925
904
  # @param workspace_id [String] Unique identifier of the workspace.
926
905
  # @param text [String] The text of a user input marked as irrelevant input. This string must conform to
927
906
  # the following restrictions:
928
907
  # - It cannot contain carriage return, newline, or tab characters.
929
908
  # - It cannot consist of only whitespace characters.
909
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
910
+ # the response.
930
911
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
931
- def create_counterexample(workspace_id:, text:)
912
+ def create_counterexample(workspace_id:, text:, include_audit: nil)
932
913
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
933
914
 
934
915
  raise ArgumentError.new("text must be provided") if text.nil?
@@ -939,7 +920,8 @@ module IBMWatson
939
920
  headers.merge!(sdk_headers)
940
921
 
941
922
  params = {
942
- "version" => @version
923
+ "version" => @version,
924
+ "include_audit" => include_audit
943
925
  }
944
926
 
945
927
  data = {
@@ -964,9 +946,6 @@ module IBMWatson
964
946
  # Get counterexample.
965
947
  # Get information about a counterexample. Counterexamples are examples that have
966
948
  # been marked as irrelevant input.
967
- #
968
- # This operation is limited to 6000 requests per 5 minutes. For more information,
969
- # see **Rate limiting**.
970
949
  # @param workspace_id [String] Unique identifier of the workspace.
971
950
  # @param text [String] The text of a user input counterexample (for example, `What are you wearing?`).
972
951
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
@@ -1000,24 +979,20 @@ module IBMWatson
1000
979
  end
1001
980
 
1002
981
  ##
1003
- # @!method update_counterexample(workspace_id:, text:, new_text: nil)
982
+ # @!method update_counterexample(workspace_id:, text:, new_text: nil, include_audit: nil)
1004
983
  # Update counterexample.
1005
984
  # Update the text of a counterexample. Counterexamples are examples that have been
1006
985
  # marked as irrelevant input.
1007
- #
1008
- # If you want to update multiple counterexamples with a single API call, consider
1009
- # using the **[Update workspace](#update-workspace)** method instead.
1010
- #
1011
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1012
- # see **Rate limiting**.
1013
986
  # @param workspace_id [String] Unique identifier of the workspace.
1014
987
  # @param text [String] The text of a user input counterexample (for example, `What are you wearing?`).
1015
988
  # @param new_text [String] The text of a user input marked as irrelevant input. This string must conform to
1016
989
  # the following restrictions:
1017
990
  # - It cannot contain carriage return, newline, or tab characters.
1018
991
  # - It cannot consist of only whitespace characters.
992
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
993
+ # the response.
1019
994
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1020
- def update_counterexample(workspace_id:, text:, new_text: nil)
995
+ def update_counterexample(workspace_id:, text:, new_text: nil, include_audit: nil)
1021
996
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1022
997
 
1023
998
  raise ArgumentError.new("text must be provided") if text.nil?
@@ -1028,7 +1003,8 @@ module IBMWatson
1028
1003
  headers.merge!(sdk_headers)
1029
1004
 
1030
1005
  params = {
1031
- "version" => @version
1006
+ "version" => @version,
1007
+ "include_audit" => include_audit
1032
1008
  }
1033
1009
 
1034
1010
  data = {
@@ -1053,9 +1029,6 @@ module IBMWatson
1053
1029
  # Delete counterexample.
1054
1030
  # Delete a counterexample from a workspace. Counterexamples are examples that have
1055
1031
  # been marked as irrelevant input.
1056
- #
1057
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1058
- # see **Rate limiting**.
1059
1032
  # @param workspace_id [String] Unique identifier of the workspace.
1060
1033
  # @param text [String] The text of a user input counterexample (for example, `What are you wearing?`).
1061
1034
  # @return [nil]
@@ -1092,10 +1065,6 @@ module IBMWatson
1092
1065
  # @!method list_entities(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1093
1066
  # List entities.
1094
1067
  # List the entities for a workspace.
1095
- #
1096
- # With **export**=`false`, this operation is limited to 1000 requests per 30
1097
- # minutes. With **export**=`true`, the limit is 200 requests per 30 minutes. For
1098
- # more information, see **Rate limiting**.
1099
1068
  # @param workspace_id [String] Unique identifier of the workspace.
1100
1069
  # @param export [Boolean] Whether to include all element content in the returned data. If
1101
1070
  # **export**=`false`, the returned data includes only information about the element
@@ -1137,15 +1106,12 @@ module IBMWatson
1137
1106
  end
1138
1107
 
1139
1108
  ##
1140
- # @!method create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil)
1109
+ # @!method create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil)
1141
1110
  # Create entity.
1142
1111
  # Create a new entity, or enable a system entity.
1143
1112
  #
1144
1113
  # If you want to create multiple entities with a single API call, consider using the
1145
1114
  # **[Update workspace](#update-workspace)** method instead.
1146
- #
1147
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1148
- # see **Rate limiting**.
1149
1115
  # @param workspace_id [String] Unique identifier of the workspace.
1150
1116
  # @param entity [String] The name of the entity. This string must conform to the following restrictions:
1151
1117
  # - It can contain only Unicode alphanumeric, underscore, and hyphen characters.
@@ -1157,8 +1123,10 @@ module IBMWatson
1157
1123
  # @param metadata [Hash] Any metadata related to the entity.
1158
1124
  # @param fuzzy_match [Boolean] Whether to use fuzzy matching for the entity.
1159
1125
  # @param values [Array[CreateValue]] An array of objects describing the entity values.
1126
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1127
+ # the response.
1160
1128
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1161
- def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil)
1129
+ def create_entity(workspace_id:, entity:, description: nil, metadata: nil, fuzzy_match: nil, values: nil, include_audit: nil)
1162
1130
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1163
1131
 
1164
1132
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1169,7 +1137,8 @@ module IBMWatson
1169
1137
  headers.merge!(sdk_headers)
1170
1138
 
1171
1139
  params = {
1172
- "version" => @version
1140
+ "version" => @version,
1141
+ "include_audit" => include_audit
1173
1142
  }
1174
1143
 
1175
1144
  data = {
@@ -1197,10 +1166,6 @@ module IBMWatson
1197
1166
  # @!method get_entity(workspace_id:, entity:, export: nil, include_audit: nil)
1198
1167
  # Get entity.
1199
1168
  # Get information about an entity, optionally including all entity content.
1200
- #
1201
- # With **export**=`false`, this operation is limited to 6000 requests per 5 minutes.
1202
- # With **export**=`true`, the limit is 200 requests per 30 minutes. For more
1203
- # information, see **Rate limiting**.
1204
1169
  # @param workspace_id [String] Unique identifier of the workspace.
1205
1170
  # @param entity [String] The name of the entity.
1206
1171
  # @param export [Boolean] Whether to include all element content in the returned data. If
@@ -1238,16 +1203,13 @@ module IBMWatson
1238
1203
  end
1239
1204
 
1240
1205
  ##
1241
- # @!method update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil)
1206
+ # @!method update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil, append: nil, include_audit: nil)
1242
1207
  # Update entity.
1243
1208
  # Update an existing entity with new or modified data. You must provide component
1244
1209
  # objects defining the content of the updated entity.
1245
1210
  #
1246
1211
  # If you want to update multiple entities with a single API call, consider using the
1247
1212
  # **[Update workspace](#update-workspace)** method instead.
1248
- #
1249
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1250
- # see **Rate limiting**.
1251
1213
  # @param workspace_id [String] Unique identifier of the workspace.
1252
1214
  # @param entity [String] The name of the entity.
1253
1215
  # @param new_entity [String] The name of the entity. This string must conform to the following restrictions:
@@ -1258,8 +1220,19 @@ module IBMWatson
1258
1220
  # @param new_metadata [Hash] Any metadata related to the entity.
1259
1221
  # @param new_fuzzy_match [Boolean] Whether to use fuzzy matching for the entity.
1260
1222
  # @param new_values [Array[CreateValue]] An array of objects describing the entity values.
1223
+ # @param append [Boolean] Whether the new data is to be appended to the existing data in the entity. If
1224
+ # **append**=`false`, elements included in the new data completely replace the
1225
+ # corresponding existing elements, including all subelements. For example, if the
1226
+ # new data for the entity includes **values** and **append**=`false`, all existing
1227
+ # values for the entity are discarded and replaced with the new values.
1228
+ #
1229
+ # If **append**=`true`, existing elements are preserved, and the new elements are
1230
+ # added. If any elements in the new data collide with existing elements, the update
1231
+ # request fails.
1232
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1233
+ # the response.
1261
1234
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1262
- def update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil)
1235
+ def update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil, append: nil, include_audit: nil)
1263
1236
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1264
1237
 
1265
1238
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1270,7 +1243,9 @@ module IBMWatson
1270
1243
  headers.merge!(sdk_headers)
1271
1244
 
1272
1245
  params = {
1273
- "version" => @version
1246
+ "version" => @version,
1247
+ "append" => append,
1248
+ "include_audit" => include_audit
1274
1249
  }
1275
1250
 
1276
1251
  data = {
@@ -1298,9 +1273,6 @@ module IBMWatson
1298
1273
  # @!method delete_entity(workspace_id:, entity:)
1299
1274
  # Delete entity.
1300
1275
  # Delete an entity from a workspace, or disable a system entity.
1301
- #
1302
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1303
- # see **Rate limiting**.
1304
1276
  # @param workspace_id [String] Unique identifier of the workspace.
1305
1277
  # @param entity [String] The name of the entity.
1306
1278
  # @return [nil]
@@ -1338,9 +1310,6 @@ module IBMWatson
1338
1310
  # List entity mentions.
1339
1311
  # List mentions for a contextual entity. An entity mention is an occurrence of a
1340
1312
  # contextual entity in the context of an intent user input example.
1341
- #
1342
- # This operation is limited to 200 requests per 30 minutes. For more information,
1343
- # see **Rate limiting**.
1344
1313
  # @param workspace_id [String] Unique identifier of the workspace.
1345
1314
  # @param entity [String] The name of the entity.
1346
1315
  # @param export [Boolean] Whether to include all element content in the returned data. If
@@ -1384,9 +1353,6 @@ module IBMWatson
1384
1353
  # @!method list_values(workspace_id:, entity:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1385
1354
  # List entity values.
1386
1355
  # List the values for an entity.
1387
- #
1388
- # This operation is limited to 2500 requests per 30 minutes. For more information,
1389
- # see **Rate limiting**.
1390
1356
  # @param workspace_id [String] Unique identifier of the workspace.
1391
1357
  # @param entity [String] The name of the entity.
1392
1358
  # @param export [Boolean] Whether to include all element content in the returned data. If
@@ -1431,15 +1397,12 @@ module IBMWatson
1431
1397
  end
1432
1398
 
1433
1399
  ##
1434
- # @!method create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
1400
+ # @!method create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil)
1435
1401
  # Create entity value.
1436
1402
  # Create a new value for an entity.
1437
1403
  #
1438
1404
  # If you want to create multiple entity values with a single API call, consider
1439
1405
  # using the **[Update entity](#update-entity)** method instead.
1440
- #
1441
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1442
- # see **Rate limiting**.
1443
1406
  # @param workspace_id [String] Unique identifier of the workspace.
1444
1407
  # @param entity [String] The name of the entity.
1445
1408
  # @param value [String] The text of the entity value. This string must conform to the following
@@ -1456,9 +1419,11 @@ module IBMWatson
1456
1419
  # @param patterns [Array[String]] An array of patterns for the entity value. A value can specify either synonyms or
1457
1420
  # patterns (depending on the value type), but not both. A pattern is a regular
1458
1421
  # expression; for more information about how to specify a pattern, see the
1459
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
1422
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
1423
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1424
+ # the response.
1460
1425
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1461
- def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
1426
+ def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil, include_audit: nil)
1462
1427
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1463
1428
 
1464
1429
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1471,7 +1436,8 @@ module IBMWatson
1471
1436
  headers.merge!(sdk_headers)
1472
1437
 
1473
1438
  params = {
1474
- "version" => @version
1439
+ "version" => @version,
1440
+ "include_audit" => include_audit
1475
1441
  }
1476
1442
 
1477
1443
  data = {
@@ -1499,9 +1465,6 @@ module IBMWatson
1499
1465
  # @!method get_value(workspace_id:, entity:, value:, export: nil, include_audit: nil)
1500
1466
  # Get entity value.
1501
1467
  # Get information about an entity value.
1502
- #
1503
- # This operation is limited to 6000 requests per 5 minutes. For more information,
1504
- # see **Rate limiting**.
1505
1468
  # @param workspace_id [String] Unique identifier of the workspace.
1506
1469
  # @param entity [String] The name of the entity.
1507
1470
  # @param value [String] The text of the entity value.
@@ -1542,16 +1505,13 @@ module IBMWatson
1542
1505
  end
1543
1506
 
1544
1507
  ##
1545
- # @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
1508
+ # @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil, append: nil, include_audit: nil)
1546
1509
  # Update entity value.
1547
1510
  # Update an existing entity value with new or modified data. You must provide
1548
1511
  # component objects defining the content of the updated entity value.
1549
1512
  #
1550
1513
  # If you want to update multiple entity values with a single API call, consider
1551
1514
  # using the **[Update entity](#update-entity)** method instead.
1552
- #
1553
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1554
- # see **Rate limiting**.
1555
1515
  # @param workspace_id [String] Unique identifier of the workspace.
1556
1516
  # @param entity [String] The name of the entity.
1557
1517
  # @param value [String] The text of the entity value.
@@ -1569,9 +1529,21 @@ module IBMWatson
1569
1529
  # @param new_patterns [Array[String]] An array of patterns for the entity value. A value can specify either synonyms or
1570
1530
  # patterns (depending on the value type), but not both. A pattern is a regular
1571
1531
  # expression; for more information about how to specify a pattern, see the
1572
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
1532
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based).
1533
+ # @param append [Boolean] Whether the new data is to be appended to the existing data in the entity value.
1534
+ # If **append**=`false`, elements included in the new data completely replace the
1535
+ # corresponding existing elements, including all subelements. For example, if the
1536
+ # new data for the entity value includes **synonyms** and **append**=`false`, all
1537
+ # existing synonyms for the entity value are discarded and replaced with the new
1538
+ # synonyms.
1539
+ #
1540
+ # If **append**=`true`, existing elements are preserved, and the new elements are
1541
+ # added. If any elements in the new data collide with existing elements, the update
1542
+ # request fails.
1543
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1544
+ # the response.
1573
1545
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1574
- def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
1546
+ def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil, append: nil, include_audit: nil)
1575
1547
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1576
1548
 
1577
1549
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1584,7 +1556,9 @@ module IBMWatson
1584
1556
  headers.merge!(sdk_headers)
1585
1557
 
1586
1558
  params = {
1587
- "version" => @version
1559
+ "version" => @version,
1560
+ "append" => append,
1561
+ "include_audit" => include_audit
1588
1562
  }
1589
1563
 
1590
1564
  data = {
@@ -1612,9 +1586,6 @@ module IBMWatson
1612
1586
  # @!method delete_value(workspace_id:, entity:, value:)
1613
1587
  # Delete entity value.
1614
1588
  # Delete a value from an entity.
1615
- #
1616
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1617
- # see **Rate limiting**.
1618
1589
  # @param workspace_id [String] Unique identifier of the workspace.
1619
1590
  # @param entity [String] The name of the entity.
1620
1591
  # @param value [String] The text of the entity value.
@@ -1654,9 +1625,6 @@ module IBMWatson
1654
1625
  # @!method list_synonyms(workspace_id:, entity:, value:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1655
1626
  # List entity value synonyms.
1656
1627
  # List the synonyms for an entity value.
1657
- #
1658
- # This operation is limited to 2500 requests per 30 minutes. For more information,
1659
- # see **Rate limiting**.
1660
1628
  # @param workspace_id [String] Unique identifier of the workspace.
1661
1629
  # @param entity [String] The name of the entity.
1662
1630
  # @param value [String] The text of the entity value.
@@ -1700,24 +1668,23 @@ module IBMWatson
1700
1668
  end
1701
1669
 
1702
1670
  ##
1703
- # @!method create_synonym(workspace_id:, entity:, value:, synonym:)
1671
+ # @!method create_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
1704
1672
  # Create entity value synonym.
1705
1673
  # Add a new synonym to an entity value.
1706
1674
  #
1707
1675
  # If you want to create multiple synonyms with a single API call, consider using the
1708
1676
  # **[Update entity](#update-entity)** or **[Update entity
1709
1677
  # value](#update-entity-value)** method instead.
1710
- #
1711
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1712
- # see **Rate limiting**.
1713
1678
  # @param workspace_id [String] Unique identifier of the workspace.
1714
1679
  # @param entity [String] The name of the entity.
1715
1680
  # @param value [String] The text of the entity value.
1716
1681
  # @param synonym [String] The text of the synonym. This string must conform to the following restrictions:
1717
1682
  # - It cannot contain carriage return, newline, or tab characters.
1718
1683
  # - It cannot consist of only whitespace characters.
1684
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1685
+ # the response.
1719
1686
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1720
- def create_synonym(workspace_id:, entity:, value:, synonym:)
1687
+ def create_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
1721
1688
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1722
1689
 
1723
1690
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1732,7 +1699,8 @@ module IBMWatson
1732
1699
  headers.merge!(sdk_headers)
1733
1700
 
1734
1701
  params = {
1735
- "version" => @version
1702
+ "version" => @version,
1703
+ "include_audit" => include_audit
1736
1704
  }
1737
1705
 
1738
1706
  data = {
@@ -1756,9 +1724,6 @@ module IBMWatson
1756
1724
  # @!method get_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
1757
1725
  # Get entity value synonym.
1758
1726
  # Get information about a synonym of an entity value.
1759
- #
1760
- # This operation is limited to 6000 requests per 5 minutes. For more information,
1761
- # see **Rate limiting**.
1762
1727
  # @param workspace_id [String] Unique identifier of the workspace.
1763
1728
  # @param entity [String] The name of the entity.
1764
1729
  # @param value [String] The text of the entity value.
@@ -1798,16 +1763,13 @@ module IBMWatson
1798
1763
  end
1799
1764
 
1800
1765
  ##
1801
- # @!method update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil)
1766
+ # @!method update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil, include_audit: nil)
1802
1767
  # Update entity value synonym.
1803
1768
  # Update an existing entity value synonym with new text.
1804
1769
  #
1805
1770
  # If you want to update multiple synonyms with a single API call, consider using the
1806
1771
  # **[Update entity](#update-entity)** or **[Update entity
1807
1772
  # value](#update-entity-value)** method instead.
1808
- #
1809
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1810
- # see **Rate limiting**.
1811
1773
  # @param workspace_id [String] Unique identifier of the workspace.
1812
1774
  # @param entity [String] The name of the entity.
1813
1775
  # @param value [String] The text of the entity value.
@@ -1815,8 +1777,10 @@ module IBMWatson
1815
1777
  # @param new_synonym [String] The text of the synonym. This string must conform to the following restrictions:
1816
1778
  # - It cannot contain carriage return, newline, or tab characters.
1817
1779
  # - It cannot consist of only whitespace characters.
1780
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1781
+ # the response.
1818
1782
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1819
- def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil)
1783
+ def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil, include_audit: nil)
1820
1784
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1821
1785
 
1822
1786
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1831,7 +1795,8 @@ module IBMWatson
1831
1795
  headers.merge!(sdk_headers)
1832
1796
 
1833
1797
  params = {
1834
- "version" => @version
1798
+ "version" => @version,
1799
+ "include_audit" => include_audit
1835
1800
  }
1836
1801
 
1837
1802
  data = {
@@ -1855,9 +1820,6 @@ module IBMWatson
1855
1820
  # @!method delete_synonym(workspace_id:, entity:, value:, synonym:)
1856
1821
  # Delete entity value synonym.
1857
1822
  # Delete a synonym from an entity value.
1858
- #
1859
- # This operation is limited to 1000 requests per 30 minutes. For more information,
1860
- # see **Rate limiting**.
1861
1823
  # @param workspace_id [String] Unique identifier of the workspace.
1862
1824
  # @param entity [String] The name of the entity.
1863
1825
  # @param value [String] The text of the entity value.
@@ -1900,9 +1862,6 @@ module IBMWatson
1900
1862
  # @!method list_dialog_nodes(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1901
1863
  # List dialog nodes.
1902
1864
  # List the dialog nodes for a workspace.
1903
- #
1904
- # This operation is limited to 2500 requests per 30 minutes. For more information,
1905
- # see **Rate limiting**.
1906
1865
  # @param workspace_id [String] Unique identifier of the workspace.
1907
1866
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1908
1867
  # @param sort [String] The attribute by which returned dialog nodes will be sorted. To reverse the sort
@@ -1940,15 +1899,12 @@ module IBMWatson
1940
1899
  end
1941
1900
 
1942
1901
  ##
1943
- # @!method create_dialog_node(workspace_id:, dialog_node:, description: nil, conditions: nil, parent: nil, previous_sibling: nil, output: nil, context: nil, metadata: nil, next_step: nil, title: nil, type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil, disambiguation_opt_out: nil)
1902
+ # @!method create_dialog_node(workspace_id:, dialog_node:, description: nil, conditions: nil, parent: nil, previous_sibling: nil, output: nil, context: nil, metadata: nil, next_step: nil, title: nil, type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil, disambiguation_opt_out: nil, include_audit: nil)
1944
1903
  # Create dialog node.
1945
1904
  # Create a new dialog node.
1946
1905
  #
1947
1906
  # If you want to create multiple dialog nodes with a single API call, consider using
1948
1907
  # the **[Update workspace](#update-workspace)** method instead.
1949
- #
1950
- # This operation is limited to 500 requests per 30 minutes. For more information,
1951
- # see **Rate limiting**.
1952
1908
  # @param workspace_id [String] Unique identifier of the workspace.
1953
1909
  # @param dialog_node [String] The dialog node ID. This string must conform to the following restrictions:
1954
1910
  # - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot
@@ -1963,7 +1919,7 @@ module IBMWatson
1963
1919
  # node has no previous sibling.
1964
1920
  # @param output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
1965
1921
  # node output, see the
1966
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
1922
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
1967
1923
  # @param context [Hash] The context for the dialog node.
1968
1924
  # @param metadata [Hash] The metadata for the dialog node.
1969
1925
  # @param next_step [DialogNodeNextStep] The next step to execute following this dialog node.
@@ -1980,9 +1936,12 @@ module IBMWatson
1980
1936
  # @param digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
1981
1937
  # @param user_label [String] A label that can be displayed externally to describe the purpose of the node to
1982
1938
  # users.
1983
- # @param disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions.
1939
+ # @param disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions. Valid
1940
+ # only when **type**=`standard` or `frame`.
1941
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1942
+ # the response.
1984
1943
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1985
- def create_dialog_node(workspace_id:, dialog_node:, description: nil, conditions: nil, parent: nil, previous_sibling: nil, output: nil, context: nil, metadata: nil, next_step: nil, title: nil, type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil, disambiguation_opt_out: nil)
1944
+ def create_dialog_node(workspace_id:, dialog_node:, description: nil, conditions: nil, parent: nil, previous_sibling: nil, output: nil, context: nil, metadata: nil, next_step: nil, title: nil, type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil, disambiguation_opt_out: nil, include_audit: nil)
1986
1945
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1987
1946
 
1988
1947
  raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
@@ -1993,7 +1952,8 @@ module IBMWatson
1993
1952
  headers.merge!(sdk_headers)
1994
1953
 
1995
1954
  params = {
1996
- "version" => @version
1955
+ "version" => @version,
1956
+ "include_audit" => include_audit
1997
1957
  }
1998
1958
 
1999
1959
  data = {
@@ -2035,9 +1995,6 @@ module IBMWatson
2035
1995
  # @!method get_dialog_node(workspace_id:, dialog_node:, include_audit: nil)
2036
1996
  # Get dialog node.
2037
1997
  # Get information about a dialog node.
2038
- #
2039
- # This operation is limited to 6000 requests per 5 minutes. For more information,
2040
- # see **Rate limiting**.
2041
1998
  # @param workspace_id [String] Unique identifier of the workspace.
2042
1999
  # @param dialog_node [String] The dialog node ID (for example, `get_order`).
2043
2000
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
@@ -2071,15 +2028,12 @@ module IBMWatson
2071
2028
  end
2072
2029
 
2073
2030
  ##
2074
- # @!method update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil)
2031
+ # @!method update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil, include_audit: nil)
2075
2032
  # Update dialog node.
2076
2033
  # Update an existing dialog node with new or modified data.
2077
2034
  #
2078
2035
  # If you want to update multiple dialog nodes with a single API call, consider using
2079
2036
  # the **[Update workspace](#update-workspace)** method instead.
2080
- #
2081
- # This operation is limited to 500 requests per 30 minutes. For more information,
2082
- # see **Rate limiting**.
2083
2037
  # @param workspace_id [String] Unique identifier of the workspace.
2084
2038
  # @param dialog_node [String] The dialog node ID (for example, `get_order`).
2085
2039
  # @param new_dialog_node [String] The dialog node ID. This string must conform to the following restrictions:
@@ -2095,7 +2049,7 @@ module IBMWatson
2095
2049
  # node has no previous sibling.
2096
2050
  # @param new_output [DialogNodeOutput] The output of the dialog node. For more information about how to specify dialog
2097
2051
  # node output, see the
2098
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
2052
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
2099
2053
  # @param new_context [Hash] The context for the dialog node.
2100
2054
  # @param new_metadata [Hash] The metadata for the dialog node.
2101
2055
  # @param new_next_step [DialogNodeNextStep] The next step to execute following this dialog node.
@@ -2112,9 +2066,12 @@ module IBMWatson
2112
2066
  # @param new_digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
2113
2067
  # @param new_user_label [String] A label that can be displayed externally to describe the purpose of the node to
2114
2068
  # users.
2115
- # @param new_disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions.
2069
+ # @param new_disambiguation_opt_out [Boolean] Whether the dialog node should be excluded from disambiguation suggestions. Valid
2070
+ # only when **type**=`standard` or `frame`.
2071
+ # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
2072
+ # the response.
2116
2073
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2117
- def update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil)
2074
+ def update_dialog_node(workspace_id:, dialog_node:, new_dialog_node: nil, new_description: nil, new_conditions: nil, new_parent: nil, new_previous_sibling: nil, new_output: nil, new_context: nil, new_metadata: nil, new_next_step: nil, new_title: nil, new_type: nil, new_event_name: nil, new_variable: nil, new_actions: nil, new_digress_in: nil, new_digress_out: nil, new_digress_out_slots: nil, new_user_label: nil, new_disambiguation_opt_out: nil, include_audit: nil)
2118
2075
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
2119
2076
 
2120
2077
  raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
@@ -2125,7 +2082,8 @@ module IBMWatson
2125
2082
  headers.merge!(sdk_headers)
2126
2083
 
2127
2084
  params = {
2128
- "version" => @version
2085
+ "version" => @version,
2086
+ "include_audit" => include_audit
2129
2087
  }
2130
2088
 
2131
2089
  data = {
@@ -2167,9 +2125,6 @@ module IBMWatson
2167
2125
  # @!method delete_dialog_node(workspace_id:, dialog_node:)
2168
2126
  # Delete dialog node.
2169
2127
  # Delete a dialog node from a workspace.
2170
- #
2171
- # This operation is limited to 500 requests per 30 minutes. For more information,
2172
- # see **Rate limiting**.
2173
2128
  # @param workspace_id [String] Unique identifier of the workspace.
2174
2129
  # @param dialog_node [String] The dialog node ID (for example, `get_order`).
2175
2130
  # @return [nil]
@@ -2206,16 +2161,12 @@ module IBMWatson
2206
2161
  # @!method list_logs(workspace_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
2207
2162
  # List log events in a workspace.
2208
2163
  # List the events from the log of a specific workspace.
2209
- #
2210
- # If **cursor** is not specified, this operation is limited to 40 requests per 30
2211
- # minutes. If **cursor** is specified, the limit is 120 requests per minute. For
2212
- # more information, see **Rate limiting**.
2213
2164
  # @param workspace_id [String] Unique identifier of the workspace.
2214
2165
  # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
2215
2166
  # reverse the sort order, prefix the parameter value with a minus sign (`-`).
2216
2167
  # @param filter [String] A cacheable parameter that limits the results to those matching the specified
2217
2168
  # filter. For more information, see the
2218
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-filter-reference#filter-reference).
2169
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
2219
2170
  # @param page_limit [Fixnum] The number of records to return in each page of results.
2220
2171
  # @param cursor [String] A token identifying the page of results to retrieve.
2221
2172
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
@@ -2251,15 +2202,11 @@ module IBMWatson
2251
2202
  # @!method list_all_logs(filter:, sort: nil, page_limit: nil, cursor: nil)
2252
2203
  # List log events in all workspaces.
2253
2204
  # List the events from the logs of all workspaces in the service instance.
2254
- #
2255
- # If **cursor** is not specified, this operation is limited to 40 requests per 30
2256
- # minutes. If **cursor** is specified, the limit is 120 requests per minute. For
2257
- # more information, see **Rate limiting**.
2258
2205
  # @param filter [String] A cacheable parameter that limits the results to those matching the specified
2259
2206
  # filter. You must specify a filter query that includes a value for `language`, as
2260
2207
  # well as a value for `request.context.system.assistant_id`, `workspace_id`, or
2261
2208
  # `request.context.metadata.deployment`. For more information, see the
2262
- # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-filter-reference#filter-reference).
2209
+ # [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-reference#filter-reference).
2263
2210
  # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
2264
2211
  # reverse the sort order, prefix the parameter value with a minus sign (`-`).
2265
2212
  # @param page_limit [Fixnum] The number of records to return in each page of results.
@@ -2305,10 +2252,7 @@ module IBMWatson
2305
2252
  # You associate a customer ID with data by passing the `X-Watson-Metadata` header
2306
2253
  # with a request that passes data. For more information about personal data and
2307
2254
  # customer IDs, see [Information
2308
- # security](https://cloud.ibm.com/docs/services/assistant?topic=assistant-information-security#information-security).
2309
- #
2310
- # This operation is limited to 4 requests per minute. For more information, see
2311
- # **Rate limiting**.
2255
+ # security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
2312
2256
  # @param customer_id [String] The customer ID for which all data is to be deleted.
2313
2257
  # @return [nil]
2314
2258
  def delete_user_data(customer_id:)