ibm_watson 0.20.1 → 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -60
  3. data/lib/ibm_watson.rb +0 -2
  4. data/lib/ibm_watson/assistant_v1.rb +82 -60
  5. data/lib/ibm_watson/assistant_v2.rb +8 -12
  6. data/lib/ibm_watson/compare_comply_v1.rb +21 -18
  7. data/lib/ibm_watson/discovery_v1.rb +107 -55
  8. data/lib/ibm_watson/language_translator_v3.rb +21 -23
  9. data/lib/ibm_watson/natural_language_classifier_v1.rb +15 -24
  10. data/lib/ibm_watson/natural_language_understanding_v1.rb +8 -12
  11. data/lib/ibm_watson/personality_insights_v3.rb +12 -24
  12. data/lib/ibm_watson/speech_to_text_v1.rb +90 -54
  13. data/lib/ibm_watson/text_to_speech_v1.rb +38 -32
  14. data/lib/ibm_watson/tone_analyzer_v3.rb +13 -24
  15. data/lib/ibm_watson/version.rb +1 -1
  16. data/lib/ibm_watson/visual_recognition_v3.rb +37 -25
  17. data/test/integration/test_assistant_v1.rb +8 -4
  18. data/test/integration/test_assistant_v2.rb +6 -1
  19. data/test/integration/test_compare_comply_v1.rb +6 -2
  20. data/test/integration/test_discovery_v1.rb +4 -1
  21. data/test/integration/test_language_translator_v3.rb +4 -16
  22. data/test/integration/test_natural_language_classifier_v1.rb +4 -1
  23. data/test/integration/test_natural_language_understanding_v1.rb +4 -1
  24. data/test/integration/test_personality_insights_v3.rb +5 -2
  25. data/test/integration/test_speech_to_text_v1.rb +9 -3
  26. data/test/integration/test_text_to_speech_v1.rb +5 -2
  27. data/test/integration/test_tone_analyzer_v3.rb +5 -2
  28. data/test/integration/test_visual_recognition_v3.rb +5 -2
  29. data/test/test_helper.rb +2 -0
  30. data/test/unit/test_assistant_v1.rb +269 -133
  31. data/test/unit/test_assistant_v2.rb +18 -9
  32. data/test/unit/test_compare_comply_v1.rb +72 -40
  33. data/test/unit/test_configure_http_client.rb +4 -2
  34. data/test/unit/test_discovery_v1.rb +297 -152
  35. data/test/unit/test_language_translator_v3.rb +52 -13
  36. data/test/unit/test_natural_language_classifier_v1.rb +10 -4
  37. data/test/unit/test_natural_language_understanding_v1.rb +25 -10
  38. data/test/unit/test_personality_insights_v3.rb +20 -8
  39. data/test/unit/test_speech_to_text_v1.rb +84 -21
  40. data/test/unit/test_text_to_speech_v1.rb +30 -5
  41. data/test/unit/test_tone_analyzer_v3.rb +30 -12
  42. data/test/unit/test_vcap_using_personality_insights.rb +12 -4
  43. data/test/unit/test_visual_recognition_v3.rb +37 -10
  44. metadata +8 -8
  45. data/test/unit/test_watson_service.rb +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2583b96aa62a5ab4e52c66b88176c75cde035094900f1305d86b5e092cacf402
4
- data.tar.gz: 787d92e7cb764abb08460c286d3eb2b130021e6a994ed8114c2b2840d905b02d
3
+ metadata.gz: b17a992a6f44b3bd0ae8f47f13814b35c4cde3f61ee4500d69f56f3dacd75469
4
+ data.tar.gz: 14223e6603d55c94bc6633314bdfcbd5a79f4d7f15587d85293abf3eeab6b04e
5
5
  SHA512:
6
- metadata.gz: f32f1a5fdd4fb8ad375d83233c1e22ecbd13d925eba33c242a582fd0a986fe58c385cb6f911d56f889e0f2898fff4a0e67135611a6b7950f6776d84a012b28a6
7
- data.tar.gz: 2a2af4a1c3d89898b4256533252dc7267269cc2e99e533902a1d45a856b09a5dfc2cecf8a3d7915df9844a8cbe030eb6be147078cdcd24ad1b58057eab63a665
6
+ metadata.gz: be36b78592bf5d819f4f9090b83b12c74b0c7ab6d2f083ea3c9d35d1b16bcd000db7c25ed7b39cf588c2c153fb55269ca4f3746e5522c8942acb12676e9802bc
7
+ data.tar.gz: 4c95a396df9a16b58942ad8fa9dab1cc003ee540a0c1c38d87e70f2173ae5e01510483ac680d6b94d631ce40ac9e10bc155ffdd97556d31d7c116f042ee70da4
data/README.md CHANGED
@@ -130,49 +130,40 @@ You supply either an IAM service **API key** or an **access token**:
130
130
 
131
131
  ```ruby
132
132
  # In the constructor, letting the SDK manage the IAM token
133
+ authenticator = IBMCloudSdkCore::IamAuthenticator.new(
134
+ apikey: "<iam_apikey>",
135
+ url: "<iam_url>" # optional - the default value is https://iam.cloud.ibm.com/identity/token
136
+ )
133
137
  discovery = IBMWatson::DiscoveryV1.new(
134
138
  version: "2017-10-16",
135
- iam_apikey: "<iam_apikey>",
136
- iam_url: "<iam_url>" # optional - the default value is https://iam.cloud.ibm.com/identity/token
139
+ authenticator: authenticator
137
140
  )
138
141
  ```
139
142
 
140
- ```ruby
141
- # after instantiation, letting the SDK manage the IAM token
142
- discovery = IBMWatson::DiscoveryV1.new(version: "2017-10-16")
143
- discovery.iam_apikey(iam_apikey: "<iam_apikey>")
144
- ```
145
-
146
143
  #### Supplying the access token
147
144
 
148
145
  ```ruby
149
- # in the constructor, assuming control of managing IAM token
150
- discovery = IBMWatson::DiscoveryV1.new(
151
- version: "2017-10-16",
152
- iam_access_token: "<iam_access_token>"
146
+ authenticator = IBMCloudSdkCore::BearerTokenAuthenticator.new(
147
+ bearer_token: "<iam_access_token>"
153
148
  )
154
- ```
155
-
156
- ```ruby
157
- # after instantiation, assuming control of managing IAM token
158
- discovery = IBMWatson::DiscoveryV1.new(version: "2017-10-16")
159
- discovery.iam_access_token(iam_access_token: "<access_token>")
149
+ discovery = IBMWatson::DiscoveryV1.new(version: "2017-10-16", authenticator)
160
150
  ```
161
151
 
162
152
  ### Username and password
163
153
 
164
154
  ```ruby
165
155
  require "ibm_watson"
156
+ require "ibm_cloud_sdk_core"
166
157
  include IBMWatson
167
158
  # In the constructor
168
- discovery = DiscoveryV1.new(version: "2017-10-16", username: "<username>", password: "<password>")
169
- ```
170
-
171
- ```ruby
172
- # After instantiation
173
- discovery = DiscoveryV1.new(version: "2017-10-16")
174
- discovery.username = "<username>"
175
- discovery.password = "<password>"
159
+ authenticator = IBMCloudSdkCore::BasicAuthenticator.new(
160
+ username: "<username>",
161
+ password: "<password>"
162
+ )
163
+ discovery = DiscoveryV1.new(
164
+ version: "2017-10-16",
165
+ authenticator: authenticator
166
+ )
176
167
  ```
177
168
 
178
169
  ## Sending requests asynchronously
@@ -185,9 +176,13 @@ Requests can be sent asynchronously. There are two asynchronous methods availabl
185
176
  When `await` is used, the request is made synchronously.
186
177
 
187
178
  ```ruby
179
+ authenticator = IBMCloudSdkCore::IamAuthenticator.new(
180
+ username: "<username>",
181
+ password: "<password>"
182
+ )
183
+
188
184
  speech_to_text = IBMWatson::SpeechToTextV1.new(
189
- username: "username",
190
- password: "password"
185
+ authenticator: authenticator
191
186
  )
192
187
  audio_file = File.open(Dir.getwd + "/resources/speech.wav")
193
188
  future = speech_to_text.await.recognize(
@@ -200,9 +195,13 @@ output = future.value # The response is accessible at future.value
200
195
  When `async` is used, the request is made asynchronously
201
196
 
202
197
  ```ruby
198
+ authenticator = IBMCloudSdkCore::IamAuthenticator.new(
199
+ username: "<username>",
200
+ password: "<password>"
201
+ )
202
+
203
203
  speech_to_text = IBMWatson::SpeechToTextV1.new(
204
- username: "username",
205
- password: "password"
204
+ authenticator: authenticator
206
205
  )
207
206
  audio_file = File.open(Dir.getwd + "/resources/speech.wav")
208
207
  future = speech_to_text.async.recognize(
@@ -222,8 +221,7 @@ require "ibm_watson"
222
221
  include IBMWatson
223
222
 
224
223
  assistant = AssistantV1.new(
225
- username: "xxx",
226
- password: "yyy",
224
+ authenticator: "<authenticator>"
227
225
  version: "2017-04-21"
228
226
  )
229
227
 
@@ -241,8 +239,7 @@ require "ibm_watson"
241
239
  include IBMWatson
242
240
 
243
241
  assistant = AssistantV1.new(
244
- username: "xxx",
245
- password: "yyy",
242
+ authenticator: "<authenticator>"
246
243
  version: "2017-04-21"
247
244
  )
248
245
 
@@ -270,8 +267,7 @@ require "ibm_watson/assistant_v1"
270
267
  include IBMWatson
271
268
 
272
269
  assistant = AssistantV1.new(
273
- username: "{username}",
274
- password: "{password}",
270
+ authenticator: "<authenticator>"
275
271
  version: "2018-07-10"
276
272
  )
277
273
 
@@ -307,8 +303,7 @@ include IBMWatson
307
303
 
308
304
  service = AssistantV1.new(
309
305
  version: "<version>",
310
- username: "<username>",
311
- password: "<password>",
306
+ authenticator: "<authenticator>"
312
307
  )
313
308
 
314
309
  service.configure_http_client(disable_ssl_verification: true)
@@ -341,35 +336,26 @@ thr.join # Wait for the thread to finish before ending the program or running ot
341
336
 
342
337
  Note: `recognize_with_websocket` has been **deprecated** in favor of **`recognize_using_websocket`**
343
338
 
344
- ## IBM Cloud Pak for Data(ICP4D)
339
+ ## IBM Cloud Pak for Data(CP4D)
345
340
  If your service instance is of ICP4D, below are two ways of initializing the assistant service.
346
341
 
347
- #### 1) Supplying the `username`, `password`, `icp4d_url` and `authentication_type`
342
+ #### Supplying the `username`, `password`, and `url`
348
343
 
349
344
  The SDK will manage the token for the user
350
345
 
351
346
  ```ruby
352
- assistant = IBMWatson::AssistantV1.new(
353
- version: "<version>",
354
- username: "<username>",
355
- password: "<password>",
356
- url: "<service url>",
357
- icp4d_url: "<authentication url>",
358
- authentication_type: "icp4d"
359
- )
360
- assistant.configure_http_client(disable_ssl_verification: true) # MAKE SURE SSL VERIFICATION IS DISABLED
361
- ```
362
-
363
- #### 2) Supplying the access token
364
347
 
365
- ```ruby
366
- assistant = IBMWatson::AssistantV1.new(
367
- version: "<version>",
368
- url: "<service url>",
369
- icp4d_token: "<your managed access token>",
370
- authentication_type: "icp4d"
371
- )
372
- assistant.configure_http_client(disable_ssl_verification: true) # MAKE SURE SSL VERIFICATION IS DISABLED
348
+ authenticator = IBMCloudSdkCore::CLoudPakForDataAuthenticator.new(
349
+ username: "<username>",
350
+ password: "<password>",
351
+ url: "<authentication url>",
352
+ disable_ssl: true
353
+ )
354
+ assistant = IBMWatson::AssistantV1.new(
355
+ version: "<version>",
356
+ authenticator: authenticator
357
+ )
358
+ assistant.configure_http_client(disable_ssl_verification: true) # MAKE SURE SSL VERIFICATION IS DISABLED
373
359
  ```
374
360
 
375
361
  ## Ruby version
data/lib/ibm_watson.rb CHANGED
@@ -6,8 +6,6 @@ require("ibm_cloud_sdk_core")
6
6
  module IBMWatson
7
7
  ApiException = IBMCloudSdkCore::ApiException
8
8
  DetailedResponse = IBMCloudSdkCore::DetailedResponse
9
- IAMTokenManager = IBMCloudSdkCore::IAMTokenManager
10
- ICP4DTokenManager = IBMCloudSdkCore::ICP4DTokenManager
11
9
 
12
10
  require_relative("./ibm_watson/personality_insights_v3.rb")
13
11
  require_relative("./ibm_watson/tone_analyzer_v3.rb")
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2018 IBM All Rights Reserved.
3
+ # (C) Copyright IBM Corp. 2019.
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.
@@ -82,21 +82,14 @@ module IBMWatson
82
82
  defaults = {}
83
83
  defaults[:version] = nil
84
84
  defaults[:url] = "https://gateway.watsonplatform.net/assistant/api"
85
- defaults[:username] = nil
86
- defaults[:password] = nil
87
- defaults[:iam_apikey] = nil
88
- defaults[:iam_access_token] = nil
89
- defaults[:iam_url] = nil
90
- defaults[:iam_client_id] = nil
91
- defaults[:iam_client_secret] = nil
92
- defaults[:icp4d_access_token] = nil
93
- defaults[:icp4d_url] = nil
85
+ defaults[:authenticator] = nil
94
86
  defaults[:authentication_type] = nil
95
87
  args = defaults.merge(args)
96
- args[:vcap_services_name] = "conversation"
88
+ @version = args[:version]
89
+ raise ArgumentError.new("version must be provided") if @version.nil?
90
+
97
91
  args[:display_name] = "Assistant"
98
92
  super
99
- @version = args[:version]
100
93
  end
101
94
 
102
95
  #########################
@@ -155,6 +148,7 @@ module IBMWatson
155
148
 
156
149
  method_url = "/v1/workspaces/%s/message" % [ERB::Util.url_encode(workspace_id)]
157
150
 
151
+ headers = authenticator.authenticate(headers)
158
152
  response = request(
159
153
  method: "POST",
160
154
  url: method_url,
@@ -170,21 +164,20 @@ module IBMWatson
170
164
  #########################
171
165
 
172
166
  ##
173
- # @!method list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
167
+ # @!method list_workspaces(page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
174
168
  # List workspaces.
175
169
  # List the workspaces associated with a Watson Assistant service instance.
176
170
  #
177
171
  # This operation is limited to 500 requests per 30 minutes. For more information,
178
172
  # see **Rate limiting**.
179
173
  # @param page_limit [Fixnum] The number of records to return in each page of results.
180
- # @param include_count [Boolean] Whether to include information about the number of records returned.
181
174
  # @param sort [String] The attribute by which returned workspaces will be sorted. To reverse the sort
182
175
  # order, prefix the value with a minus sign (`-`).
183
176
  # @param cursor [String] A token identifying the page of results to retrieve.
184
177
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
185
178
  # the response.
186
179
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
187
- def list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
180
+ def list_workspaces(page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
188
181
  headers = {
189
182
  }
190
183
  sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "list_workspaces")
@@ -193,7 +186,6 @@ module IBMWatson
193
186
  params = {
194
187
  "version" => @version,
195
188
  "page_limit" => page_limit,
196
- "include_count" => include_count,
197
189
  "sort" => sort,
198
190
  "cursor" => cursor,
199
191
  "include_audit" => include_audit
@@ -201,6 +193,7 @@ module IBMWatson
201
193
 
202
194
  method_url = "/v1/workspaces"
203
195
 
196
+ headers = authenticator.authenticate(headers)
204
197
  response = request(
205
198
  method: "GET",
206
199
  url: method_url,
@@ -260,6 +253,7 @@ module IBMWatson
260
253
 
261
254
  method_url = "/v1/workspaces"
262
255
 
256
+ headers = authenticator.authenticate(headers)
263
257
  response = request(
264
258
  method: "POST",
265
259
  url: method_url,
@@ -306,6 +300,7 @@ module IBMWatson
306
300
 
307
301
  method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)]
308
302
 
303
+ headers = authenticator.authenticate(headers)
309
304
  response = request(
310
305
  method: "GET",
311
306
  url: method_url,
@@ -378,6 +373,7 @@ module IBMWatson
378
373
 
379
374
  method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)]
380
375
 
376
+ headers = authenticator.authenticate(headers)
381
377
  response = request(
382
378
  method: "POST",
383
379
  url: method_url,
@@ -412,6 +408,7 @@ module IBMWatson
412
408
 
413
409
  method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)]
414
410
 
411
+ headers = authenticator.authenticate(headers)
415
412
  request(
416
413
  method: "DELETE",
417
414
  url: method_url,
@@ -426,7 +423,7 @@ module IBMWatson
426
423
  #########################
427
424
 
428
425
  ##
429
- # @!method list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
426
+ # @!method list_intents(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
430
427
  # List intents.
431
428
  # List the intents for a workspace.
432
429
  #
@@ -438,14 +435,13 @@ module IBMWatson
438
435
  # **export**=`false`, the returned data includes only information about the element
439
436
  # itself. If **export**=`true`, all content, including subelements, is included.
440
437
  # @param page_limit [Fixnum] The number of records to return in each page of results.
441
- # @param include_count [Boolean] Whether to include information about the number of records returned.
442
438
  # @param sort [String] The attribute by which returned intents will be sorted. To reverse the sort order,
443
439
  # prefix the value with a minus sign (`-`).
444
440
  # @param cursor [String] A token identifying the page of results to retrieve.
445
441
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
446
442
  # the response.
447
443
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
448
- def list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
444
+ def list_intents(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
449
445
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
450
446
 
451
447
  headers = {
@@ -457,7 +453,6 @@ module IBMWatson
457
453
  "version" => @version,
458
454
  "export" => export,
459
455
  "page_limit" => page_limit,
460
- "include_count" => include_count,
461
456
  "sort" => sort,
462
457
  "cursor" => cursor,
463
458
  "include_audit" => include_audit
@@ -465,6 +460,7 @@ module IBMWatson
465
460
 
466
461
  method_url = "/v1/workspaces/%s/intents" % [ERB::Util.url_encode(workspace_id)]
467
462
 
463
+ headers = authenticator.authenticate(headers)
468
464
  response = request(
469
465
  method: "GET",
470
466
  url: method_url,
@@ -516,6 +512,7 @@ module IBMWatson
516
512
 
517
513
  method_url = "/v1/workspaces/%s/intents" % [ERB::Util.url_encode(workspace_id)]
518
514
 
515
+ headers = authenticator.authenticate(headers)
519
516
  response = request(
520
517
  method: "POST",
521
518
  url: method_url,
@@ -561,6 +558,7 @@ module IBMWatson
561
558
 
562
559
  method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)]
563
560
 
561
+ headers = authenticator.authenticate(headers)
564
562
  response = request(
565
563
  method: "GET",
566
564
  url: method_url,
@@ -614,6 +612,7 @@ module IBMWatson
614
612
 
615
613
  method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)]
616
614
 
615
+ headers = authenticator.authenticate(headers)
617
616
  response = request(
618
617
  method: "POST",
619
618
  url: method_url,
@@ -651,6 +650,7 @@ module IBMWatson
651
650
 
652
651
  method_url = "/v1/workspaces/%s/intents/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)]
653
652
 
653
+ headers = authenticator.authenticate(headers)
654
654
  request(
655
655
  method: "DELETE",
656
656
  url: method_url,
@@ -665,7 +665,7 @@ module IBMWatson
665
665
  #########################
666
666
 
667
667
  ##
668
- # @!method list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
668
+ # @!method list_examples(workspace_id:, intent:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
669
669
  # List user input examples.
670
670
  # List the user input examples for an intent, optionally including contextual entity
671
671
  # mentions.
@@ -675,14 +675,13 @@ module IBMWatson
675
675
  # @param workspace_id [String] Unique identifier of the workspace.
676
676
  # @param intent [String] The intent name.
677
677
  # @param page_limit [Fixnum] The number of records to return in each page of results.
678
- # @param include_count [Boolean] Whether to include information about the number of records returned.
679
678
  # @param sort [String] The attribute by which returned examples will be sorted. To reverse the sort
680
679
  # order, prefix the value with a minus sign (`-`).
681
680
  # @param cursor [String] A token identifying the page of results to retrieve.
682
681
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
683
682
  # the response.
684
683
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
685
- def list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
684
+ def list_examples(workspace_id:, intent:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
686
685
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
687
686
 
688
687
  raise ArgumentError.new("intent must be provided") if intent.nil?
@@ -695,7 +694,6 @@ module IBMWatson
695
694
  params = {
696
695
  "version" => @version,
697
696
  "page_limit" => page_limit,
698
- "include_count" => include_count,
699
697
  "sort" => sort,
700
698
  "cursor" => cursor,
701
699
  "include_audit" => include_audit
@@ -703,6 +701,7 @@ module IBMWatson
703
701
 
704
702
  method_url = "/v1/workspaces/%s/intents/%s/examples" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)]
705
703
 
704
+ headers = authenticator.authenticate(headers)
706
705
  response = request(
707
706
  method: "GET",
708
707
  url: method_url,
@@ -754,6 +753,7 @@ module IBMWatson
754
753
 
755
754
  method_url = "/v1/workspaces/%s/intents/%s/examples" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent)]
756
755
 
756
+ headers = authenticator.authenticate(headers)
757
757
  response = request(
758
758
  method: "POST",
759
759
  url: method_url,
@@ -797,6 +797,7 @@ module IBMWatson
797
797
 
798
798
  method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)]
799
799
 
800
+ headers = authenticator.authenticate(headers)
800
801
  response = request(
801
802
  method: "GET",
802
803
  url: method_url,
@@ -849,6 +850,7 @@ module IBMWatson
849
850
 
850
851
  method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)]
851
852
 
853
+ headers = authenticator.authenticate(headers)
852
854
  response = request(
853
855
  method: "POST",
854
856
  url: method_url,
@@ -889,6 +891,7 @@ module IBMWatson
889
891
 
890
892
  method_url = "/v1/workspaces/%s/intents/%s/examples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(intent), ERB::Util.url_encode(text)]
891
893
 
894
+ headers = authenticator.authenticate(headers)
892
895
  request(
893
896
  method: "DELETE",
894
897
  url: method_url,
@@ -903,7 +906,7 @@ module IBMWatson
903
906
  #########################
904
907
 
905
908
  ##
906
- # @!method list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
909
+ # @!method list_counterexamples(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
907
910
  # List counterexamples.
908
911
  # List the counterexamples for a workspace. Counterexamples are examples that have
909
912
  # been marked as irrelevant input.
@@ -912,14 +915,13 @@ module IBMWatson
912
915
  # see **Rate limiting**.
913
916
  # @param workspace_id [String] Unique identifier of the workspace.
914
917
  # @param page_limit [Fixnum] The number of records to return in each page of results.
915
- # @param include_count [Boolean] Whether to include information about the number of records returned.
916
918
  # @param sort [String] The attribute by which returned counterexamples will be sorted. To reverse the
917
919
  # sort order, prefix the value with a minus sign (`-`).
918
920
  # @param cursor [String] A token identifying the page of results to retrieve.
919
921
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
920
922
  # the response.
921
923
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
922
- def list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
924
+ def list_counterexamples(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
923
925
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
924
926
 
925
927
  headers = {
@@ -930,7 +932,6 @@ module IBMWatson
930
932
  params = {
931
933
  "version" => @version,
932
934
  "page_limit" => page_limit,
933
- "include_count" => include_count,
934
935
  "sort" => sort,
935
936
  "cursor" => cursor,
936
937
  "include_audit" => include_audit
@@ -938,6 +939,7 @@ module IBMWatson
938
939
 
939
940
  method_url = "/v1/workspaces/%s/counterexamples" % [ERB::Util.url_encode(workspace_id)]
940
941
 
942
+ headers = authenticator.authenticate(headers)
941
943
  response = request(
942
944
  method: "GET",
943
945
  url: method_url,
@@ -985,6 +987,7 @@ module IBMWatson
985
987
 
986
988
  method_url = "/v1/workspaces/%s/counterexamples" % [ERB::Util.url_encode(workspace_id)]
987
989
 
990
+ headers = authenticator.authenticate(headers)
988
991
  response = request(
989
992
  method: "POST",
990
993
  url: method_url,
@@ -1026,6 +1029,7 @@ module IBMWatson
1026
1029
 
1027
1030
  method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)]
1028
1031
 
1032
+ headers = authenticator.authenticate(headers)
1029
1033
  response = request(
1030
1034
  method: "GET",
1031
1035
  url: method_url,
@@ -1074,6 +1078,7 @@ module IBMWatson
1074
1078
 
1075
1079
  method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)]
1076
1080
 
1081
+ headers = authenticator.authenticate(headers)
1077
1082
  response = request(
1078
1083
  method: "POST",
1079
1084
  url: method_url,
@@ -1112,6 +1117,7 @@ module IBMWatson
1112
1117
 
1113
1118
  method_url = "/v1/workspaces/%s/counterexamples/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(text)]
1114
1119
 
1120
+ headers = authenticator.authenticate(headers)
1115
1121
  request(
1116
1122
  method: "DELETE",
1117
1123
  url: method_url,
@@ -1126,7 +1132,7 @@ module IBMWatson
1126
1132
  #########################
1127
1133
 
1128
1134
  ##
1129
- # @!method list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1135
+ # @!method list_entities(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1130
1136
  # List entities.
1131
1137
  # List the entities for a workspace.
1132
1138
  #
@@ -1138,14 +1144,13 @@ module IBMWatson
1138
1144
  # **export**=`false`, the returned data includes only information about the element
1139
1145
  # itself. If **export**=`true`, all content, including subelements, is included.
1140
1146
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1141
- # @param include_count [Boolean] Whether to include information about the number of records returned.
1142
1147
  # @param sort [String] The attribute by which returned entities will be sorted. To reverse the sort
1143
1148
  # order, prefix the value with a minus sign (`-`).
1144
1149
  # @param cursor [String] A token identifying the page of results to retrieve.
1145
1150
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1146
1151
  # the response.
1147
1152
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1148
- def list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1153
+ def list_entities(workspace_id:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1149
1154
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1150
1155
 
1151
1156
  headers = {
@@ -1157,7 +1162,6 @@ module IBMWatson
1157
1162
  "version" => @version,
1158
1163
  "export" => export,
1159
1164
  "page_limit" => page_limit,
1160
- "include_count" => include_count,
1161
1165
  "sort" => sort,
1162
1166
  "cursor" => cursor,
1163
1167
  "include_audit" => include_audit
@@ -1165,6 +1169,7 @@ module IBMWatson
1165
1169
 
1166
1170
  method_url = "/v1/workspaces/%s/entities" % [ERB::Util.url_encode(workspace_id)]
1167
1171
 
1172
+ headers = authenticator.authenticate(headers)
1168
1173
  response = request(
1169
1174
  method: "GET",
1170
1175
  url: method_url,
@@ -1221,6 +1226,7 @@ module IBMWatson
1221
1226
 
1222
1227
  method_url = "/v1/workspaces/%s/entities" % [ERB::Util.url_encode(workspace_id)]
1223
1228
 
1229
+ headers = authenticator.authenticate(headers)
1224
1230
  response = request(
1225
1231
  method: "POST",
1226
1232
  url: method_url,
@@ -1266,6 +1272,7 @@ module IBMWatson
1266
1272
 
1267
1273
  method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1268
1274
 
1275
+ headers = authenticator.authenticate(headers)
1269
1276
  response = request(
1270
1277
  method: "GET",
1271
1278
  url: method_url,
@@ -1322,6 +1329,7 @@ module IBMWatson
1322
1329
 
1323
1330
  method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1324
1331
 
1332
+ headers = authenticator.authenticate(headers)
1325
1333
  response = request(
1326
1334
  method: "POST",
1327
1335
  url: method_url,
@@ -1359,6 +1367,7 @@ module IBMWatson
1359
1367
 
1360
1368
  method_url = "/v1/workspaces/%s/entities/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1361
1369
 
1370
+ headers = authenticator.authenticate(headers)
1362
1371
  request(
1363
1372
  method: "DELETE",
1364
1373
  url: method_url,
@@ -1406,6 +1415,7 @@ module IBMWatson
1406
1415
 
1407
1416
  method_url = "/v1/workspaces/%s/entities/%s/mentions" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1408
1417
 
1418
+ headers = authenticator.authenticate(headers)
1409
1419
  response = request(
1410
1420
  method: "GET",
1411
1421
  url: method_url,
@@ -1420,7 +1430,7 @@ module IBMWatson
1420
1430
  #########################
1421
1431
 
1422
1432
  ##
1423
- # @!method list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1433
+ # @!method list_values(workspace_id:, entity:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1424
1434
  # List entity values.
1425
1435
  # List the values for an entity.
1426
1436
  #
@@ -1432,14 +1442,13 @@ module IBMWatson
1432
1442
  # **export**=`false`, the returned data includes only information about the element
1433
1443
  # itself. If **export**=`true`, all content, including subelements, is included.
1434
1444
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1435
- # @param include_count [Boolean] Whether to include information about the number of records returned.
1436
1445
  # @param sort [String] The attribute by which returned entity values will be sorted. To reverse the sort
1437
1446
  # order, prefix the value with a minus sign (`-`).
1438
1447
  # @param cursor [String] A token identifying the page of results to retrieve.
1439
1448
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1440
1449
  # the response.
1441
1450
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1442
- def list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1451
+ def list_values(workspace_id:, entity:, export: nil, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1443
1452
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1444
1453
 
1445
1454
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1453,7 +1462,6 @@ module IBMWatson
1453
1462
  "version" => @version,
1454
1463
  "export" => export,
1455
1464
  "page_limit" => page_limit,
1456
- "include_count" => include_count,
1457
1465
  "sort" => sort,
1458
1466
  "cursor" => cursor,
1459
1467
  "include_audit" => include_audit
@@ -1461,6 +1469,7 @@ module IBMWatson
1461
1469
 
1462
1470
  method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1463
1471
 
1472
+ headers = authenticator.authenticate(headers)
1464
1473
  response = request(
1465
1474
  method: "GET",
1466
1475
  url: method_url,
@@ -1472,7 +1481,7 @@ module IBMWatson
1472
1481
  end
1473
1482
 
1474
1483
  ##
1475
- # @!method create_value(workspace_id:, entity:, value:, metadata: nil, value_type: nil, synonyms: nil, patterns: nil)
1484
+ # @!method create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
1476
1485
  # Create entity value.
1477
1486
  # Create a new value for an entity.
1478
1487
  #
@@ -1488,7 +1497,7 @@ module IBMWatson
1488
1497
  # - It cannot contain carriage return, newline, or tab characters.
1489
1498
  # - It cannot consist of only whitespace characters.
1490
1499
  # @param metadata [Hash] Any metadata related to the entity value.
1491
- # @param value_type [String] Specifies the type of entity value.
1500
+ # @param type [String] Specifies the type of entity value.
1492
1501
  # @param synonyms [Array[String]] An array of synonyms for the entity value. A value can specify either synonyms or
1493
1502
  # patterns (depending on the value type), but not both. A synonym must conform to
1494
1503
  # the following resrictions:
@@ -1499,7 +1508,7 @@ module IBMWatson
1499
1508
  # expression; for more information about how to specify a pattern, see the
1500
1509
  # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
1501
1510
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1502
- def create_value(workspace_id:, entity:, value:, metadata: nil, value_type: nil, synonyms: nil, patterns: nil)
1511
+ def create_value(workspace_id:, entity:, value:, metadata: nil, type: nil, synonyms: nil, patterns: nil)
1503
1512
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1504
1513
 
1505
1514
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1518,13 +1527,14 @@ module IBMWatson
1518
1527
  data = {
1519
1528
  "value" => value,
1520
1529
  "metadata" => metadata,
1521
- "type" => value_type,
1530
+ "type" => type,
1522
1531
  "synonyms" => synonyms,
1523
1532
  "patterns" => patterns
1524
1533
  }
1525
1534
 
1526
1535
  method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]
1527
1536
 
1537
+ headers = authenticator.authenticate(headers)
1528
1538
  response = request(
1529
1539
  method: "POST",
1530
1540
  url: method_url,
@@ -1572,6 +1582,7 @@ module IBMWatson
1572
1582
 
1573
1583
  method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)]
1574
1584
 
1585
+ headers = authenticator.authenticate(headers)
1575
1586
  response = request(
1576
1587
  method: "GET",
1577
1588
  url: method_url,
@@ -1583,7 +1594,7 @@ module IBMWatson
1583
1594
  end
1584
1595
 
1585
1596
  ##
1586
- # @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_value_type: nil, new_synonyms: nil, new_patterns: nil)
1597
+ # @!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
1587
1598
  # Update entity value.
1588
1599
  # Update an existing entity value with new or modified data. You must provide
1589
1600
  # component objects defining the content of the updated entity value.
@@ -1601,7 +1612,7 @@ module IBMWatson
1601
1612
  # - It cannot contain carriage return, newline, or tab characters.
1602
1613
  # - It cannot consist of only whitespace characters.
1603
1614
  # @param new_metadata [Hash] Any metadata related to the entity value.
1604
- # @param new_value_type [String] Specifies the type of entity value.
1615
+ # @param new_type [String] Specifies the type of entity value.
1605
1616
  # @param new_synonyms [Array[String]] An array of synonyms for the entity value. A value can specify either synonyms or
1606
1617
  # patterns (depending on the value type), but not both. A synonym must conform to
1607
1618
  # the following resrictions:
@@ -1612,7 +1623,7 @@ module IBMWatson
1612
1623
  # expression; for more information about how to specify a pattern, see the
1613
1624
  # [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-entities#entities-create-dictionary-based).
1614
1625
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1615
- def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_value_type: nil, new_synonyms: nil, new_patterns: nil)
1626
+ def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
1616
1627
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1617
1628
 
1618
1629
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1631,13 +1642,14 @@ module IBMWatson
1631
1642
  data = {
1632
1643
  "value" => new_value,
1633
1644
  "metadata" => new_metadata,
1634
- "type" => new_value_type,
1645
+ "type" => new_type,
1635
1646
  "synonyms" => new_synonyms,
1636
1647
  "patterns" => new_patterns
1637
1648
  }
1638
1649
 
1639
1650
  method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)]
1640
1651
 
1652
+ headers = authenticator.authenticate(headers)
1641
1653
  response = request(
1642
1654
  method: "POST",
1643
1655
  url: method_url,
@@ -1678,6 +1690,7 @@ module IBMWatson
1678
1690
 
1679
1691
  method_url = "/v1/workspaces/%s/entities/%s/values/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)]
1680
1692
 
1693
+ headers = authenticator.authenticate(headers)
1681
1694
  request(
1682
1695
  method: "DELETE",
1683
1696
  url: method_url,
@@ -1692,7 +1705,7 @@ module IBMWatson
1692
1705
  #########################
1693
1706
 
1694
1707
  ##
1695
- # @!method list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1708
+ # @!method list_synonyms(workspace_id:, entity:, value:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1696
1709
  # List entity value synonyms.
1697
1710
  # List the synonyms for an entity value.
1698
1711
  #
@@ -1702,14 +1715,13 @@ module IBMWatson
1702
1715
  # @param entity [String] The name of the entity.
1703
1716
  # @param value [String] The text of the entity value.
1704
1717
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1705
- # @param include_count [Boolean] Whether to include information about the number of records returned.
1706
1718
  # @param sort [String] The attribute by which returned entity value synonyms will be sorted. To reverse
1707
1719
  # the sort order, prefix the value with a minus sign (`-`).
1708
1720
  # @param cursor [String] A token identifying the page of results to retrieve.
1709
1721
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1710
1722
  # the response.
1711
1723
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1712
- def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1724
+ def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1713
1725
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1714
1726
 
1715
1727
  raise ArgumentError.new("entity must be provided") if entity.nil?
@@ -1724,7 +1736,6 @@ module IBMWatson
1724
1736
  params = {
1725
1737
  "version" => @version,
1726
1738
  "page_limit" => page_limit,
1727
- "include_count" => include_count,
1728
1739
  "sort" => sort,
1729
1740
  "cursor" => cursor,
1730
1741
  "include_audit" => include_audit
@@ -1732,6 +1743,7 @@ module IBMWatson
1732
1743
 
1733
1744
  method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)]
1734
1745
 
1746
+ headers = authenticator.authenticate(headers)
1735
1747
  response = request(
1736
1748
  method: "GET",
1737
1749
  url: method_url,
@@ -1784,6 +1796,7 @@ module IBMWatson
1784
1796
 
1785
1797
  method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value)]
1786
1798
 
1799
+ headers = authenticator.authenticate(headers)
1787
1800
  response = request(
1788
1801
  method: "POST",
1789
1802
  url: method_url,
@@ -1830,6 +1843,7 @@ module IBMWatson
1830
1843
 
1831
1844
  method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)]
1832
1845
 
1846
+ headers = authenticator.authenticate(headers)
1833
1847
  response = request(
1834
1848
  method: "GET",
1835
1849
  url: method_url,
@@ -1883,6 +1897,7 @@ module IBMWatson
1883
1897
 
1884
1898
  method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)]
1885
1899
 
1900
+ headers = authenticator.authenticate(headers)
1886
1901
  response = request(
1887
1902
  method: "POST",
1888
1903
  url: method_url,
@@ -1926,6 +1941,7 @@ module IBMWatson
1926
1941
 
1927
1942
  method_url = "/v1/workspaces/%s/entities/%s/values/%s/synonyms/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity), ERB::Util.url_encode(value), ERB::Util.url_encode(synonym)]
1928
1943
 
1944
+ headers = authenticator.authenticate(headers)
1929
1945
  request(
1930
1946
  method: "DELETE",
1931
1947
  url: method_url,
@@ -1940,7 +1956,7 @@ module IBMWatson
1940
1956
  #########################
1941
1957
 
1942
1958
  ##
1943
- # @!method list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1959
+ # @!method list_dialog_nodes(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1944
1960
  # List dialog nodes.
1945
1961
  # List the dialog nodes for a workspace.
1946
1962
  #
@@ -1948,14 +1964,13 @@ module IBMWatson
1948
1964
  # see **Rate limiting**.
1949
1965
  # @param workspace_id [String] Unique identifier of the workspace.
1950
1966
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1951
- # @param include_count [Boolean] Whether to include information about the number of records returned.
1952
1967
  # @param sort [String] The attribute by which returned dialog nodes will be sorted. To reverse the sort
1953
1968
  # order, prefix the value with a minus sign (`-`).
1954
1969
  # @param cursor [String] A token identifying the page of results to retrieve.
1955
1970
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1956
1971
  # the response.
1957
1972
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1958
- def list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1973
+ def list_dialog_nodes(workspace_id:, page_limit: nil, sort: nil, cursor: nil, include_audit: nil)
1959
1974
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
1960
1975
 
1961
1976
  headers = {
@@ -1966,7 +1981,6 @@ module IBMWatson
1966
1981
  params = {
1967
1982
  "version" => @version,
1968
1983
  "page_limit" => page_limit,
1969
- "include_count" => include_count,
1970
1984
  "sort" => sort,
1971
1985
  "cursor" => cursor,
1972
1986
  "include_audit" => include_audit
@@ -1974,6 +1988,7 @@ module IBMWatson
1974
1988
 
1975
1989
  method_url = "/v1/workspaces/%s/dialog_nodes" % [ERB::Util.url_encode(workspace_id)]
1976
1990
 
1991
+ headers = authenticator.authenticate(headers)
1977
1992
  response = request(
1978
1993
  method: "GET",
1979
1994
  url: method_url,
@@ -1985,7 +2000,7 @@ module IBMWatson
1985
2000
  end
1986
2001
 
1987
2002
  ##
1988
- # @!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, node_type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil)
2003
+ # @!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)
1989
2004
  # Create dialog node.
1990
2005
  # Create a new dialog node.
1991
2006
  #
@@ -2016,7 +2031,7 @@ module IBMWatson
2016
2031
  # following restrictions:
2017
2032
  # - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot
2018
2033
  # characters.
2019
- # @param node_type [String] How the dialog node is processed.
2034
+ # @param type [String] How the dialog node is processed.
2020
2035
  # @param event_name [String] How an `event_handler` node is processed.
2021
2036
  # @param variable [String] The location in the dialog context where output is stored.
2022
2037
  # @param actions [Array[DialogNodeAction]] An array of objects describing any actions to be invoked by the dialog node.
@@ -2026,7 +2041,7 @@ module IBMWatson
2026
2041
  # @param user_label [String] A label that can be displayed externally to describe the purpose of the node to
2027
2042
  # users.
2028
2043
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2029
- 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, node_type: nil, event_name: nil, variable: nil, actions: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil)
2044
+ 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)
2030
2045
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
2031
2046
 
2032
2047
  raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
@@ -2051,7 +2066,7 @@ module IBMWatson
2051
2066
  "metadata" => metadata,
2052
2067
  "next_step" => next_step,
2053
2068
  "title" => title,
2054
- "type" => node_type,
2069
+ "type" => type,
2055
2070
  "event_name" => event_name,
2056
2071
  "variable" => variable,
2057
2072
  "actions" => actions,
@@ -2063,6 +2078,7 @@ module IBMWatson
2063
2078
 
2064
2079
  method_url = "/v1/workspaces/%s/dialog_nodes" % [ERB::Util.url_encode(workspace_id)]
2065
2080
 
2081
+ headers = authenticator.authenticate(headers)
2066
2082
  response = request(
2067
2083
  method: "POST",
2068
2084
  url: method_url,
@@ -2103,6 +2119,7 @@ module IBMWatson
2103
2119
 
2104
2120
  method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)]
2105
2121
 
2122
+ headers = authenticator.authenticate(headers)
2106
2123
  response = request(
2107
2124
  method: "GET",
2108
2125
  url: method_url,
@@ -2114,7 +2131,7 @@ module IBMWatson
2114
2131
  end
2115
2132
 
2116
2133
  ##
2117
- # @!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_node_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)
2134
+ # @!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)
2118
2135
  # Update dialog node.
2119
2136
  # Update an existing dialog node with new or modified data.
2120
2137
  #
@@ -2146,7 +2163,7 @@ module IBMWatson
2146
2163
  # following restrictions:
2147
2164
  # - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot
2148
2165
  # characters.
2149
- # @param new_node_type [String] How the dialog node is processed.
2166
+ # @param new_type [String] How the dialog node is processed.
2150
2167
  # @param new_event_name [String] How an `event_handler` node is processed.
2151
2168
  # @param new_variable [String] The location in the dialog context where output is stored.
2152
2169
  # @param new_actions [Array[DialogNodeAction]] An array of objects describing any actions to be invoked by the dialog node.
@@ -2156,7 +2173,7 @@ module IBMWatson
2156
2173
  # @param new_user_label [String] A label that can be displayed externally to describe the purpose of the node to
2157
2174
  # users.
2158
2175
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
2159
- 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_node_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)
2176
+ 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)
2160
2177
  raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?
2161
2178
 
2162
2179
  raise ArgumentError.new("dialog_node must be provided") if dialog_node.nil?
@@ -2181,7 +2198,7 @@ module IBMWatson
2181
2198
  "metadata" => new_metadata,
2182
2199
  "next_step" => new_next_step,
2183
2200
  "title" => new_title,
2184
- "type" => new_node_type,
2201
+ "type" => new_type,
2185
2202
  "event_name" => new_event_name,
2186
2203
  "variable" => new_variable,
2187
2204
  "actions" => new_actions,
@@ -2193,6 +2210,7 @@ module IBMWatson
2193
2210
 
2194
2211
  method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)]
2195
2212
 
2213
+ headers = authenticator.authenticate(headers)
2196
2214
  response = request(
2197
2215
  method: "POST",
2198
2216
  url: method_url,
@@ -2230,6 +2248,7 @@ module IBMWatson
2230
2248
 
2231
2249
  method_url = "/v1/workspaces/%s/dialog_nodes/%s" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(dialog_node)]
2232
2250
 
2251
+ headers = authenticator.authenticate(headers)
2233
2252
  request(
2234
2253
  method: "DELETE",
2235
2254
  url: method_url,
@@ -2278,6 +2297,7 @@ module IBMWatson
2278
2297
 
2279
2298
  method_url = "/v1/workspaces/%s/logs" % [ERB::Util.url_encode(workspace_id)]
2280
2299
 
2300
+ headers = authenticator.authenticate(headers)
2281
2301
  response = request(
2282
2302
  method: "GET",
2283
2303
  url: method_url,
@@ -2324,6 +2344,7 @@ module IBMWatson
2324
2344
 
2325
2345
  method_url = "/v1/logs"
2326
2346
 
2347
+ headers = authenticator.authenticate(headers)
2327
2348
  response = request(
2328
2349
  method: "GET",
2329
2350
  url: method_url,
@@ -2364,6 +2385,7 @@ module IBMWatson
2364
2385
 
2365
2386
  method_url = "/v1/user_data"
2366
2387
 
2388
+ headers = authenticator.authenticate(headers)
2367
2389
  request(
2368
2390
  method: "DELETE",
2369
2391
  url: method_url,