ibm_watson 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf8a43fdfbace0a7f6718700990e2fa10a0cc1f5b1914f0612cda793060dad12
4
- data.tar.gz: e62aab095b1541fc2226ade4591fd3f6a47bfd67487c7721c33dcc2a740f7f7a
3
+ metadata.gz: a3aee888f8b5b95bd89cc0e4fcce469bb4cbf9547ca93d6c0d59b899031c5558
4
+ data.tar.gz: ab13ed414ee0c6a572cc86a48c6dc49c8f3c0305586778bd4f71a8d880183248
5
5
  SHA512:
6
- metadata.gz: 7518225b4a7cad2ccfdc83f4ac5b8ed4c5a376c07b13fb3e7d636d3a79abd8e82a943413737a99e922150e6e2e4109e0da1c6bb52b353dd756513523eec066ea
7
- data.tar.gz: d7af5413d872fff10b901a2fb38571b0c7b2d78c6fdb7d9f622f51619603c4c475959e1bdf6bb0d99092be41edc6812e9df7f293d6e8e22074a7a803187ee97b
6
+ metadata.gz: 67e25a43ec539edfb3c75fba544388238d1b155950386cb008930e77f1486a21c567ffc6574380275f0cb9302d3148365fe230367b4230400945300c456e3225
7
+ data.tar.gz: 2eba798a910e335ce5cdcc290243ad4fb7ceedfaa22710c9a5137689e3d81aec034c72159b6f051dc73e257cedd20786b275d3ca4ff663f8292a769937b7bc04
data/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![codecov.io](https://codecov.io/github/watson-developer-cloud/ruby-sdk/coverage.svg)](https://codecov.io/github/watson-developer-cloud/ruby-sdk)
7
7
  [![Gem Version](https://badge.fury.io/rb/ibm_watson.svg)](https://badge.fury.io/rb/ibm_watson)
8
8
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
9
+ [![CLA assistant](https://cla-assistant.io/readme/badge/watson-developer-cloud/ruby-sdk)](https://cla-assistant.io/watson-developer-cloud/ruby-sdk)
9
10
 
10
11
  Ruby gem to quickly get started with the various [IBM Watson][wdc] services.
11
12
 
@@ -99,7 +100,7 @@ discovery = IBMWatson::DiscoveryV1.new(
99
100
  ```ruby
100
101
  # after instantiation, letting the SDK manage the IAM token
101
102
  discovery = IBMWatson::DiscoveryV1.new(version: "2017-10-16")
102
- discovery._iam_apikey(iam_apikey: "<iam_apikey>")
103
+ discovery.iam_apikey(iam_apikey: "<iam_apikey>")
103
104
  ```
104
105
 
105
106
  #### Supplying the access token
@@ -114,7 +115,7 @@ discovery = IBMWatson::DiscoveryV1.new(
114
115
  ```ruby
115
116
  # after instantiation, assuming control of managing IAM token
116
117
  discovery = IBMWatson::DiscoveryV1.new(version: "2017-10-16")
117
- discovery._iam_access_token(iam_access_token: "<access_token>")
118
+ discovery.iam_access_token(iam_access_token: "<access_token>")
118
119
  ```
119
120
 
120
121
  ### Username and password
@@ -29,7 +29,7 @@ require_relative "./watson_service"
29
29
  module IBMWatson
30
30
  ##
31
31
  # The Assistant V1 service.
32
- class AssistantV1
32
+ class AssistantV1 < WatsonService
33
33
  include Concurrent::Async
34
34
  ##
35
35
  # @!method initialize(args)
@@ -70,7 +70,6 @@ module IBMWatson
70
70
  # 'https://iam.ng.bluemix.net/identity/token'.
71
71
  def initialize(args = {})
72
72
  @__async_initialized__ = false
73
- super()
74
73
  defaults = {}
75
74
  defaults[:version] = nil
76
75
  defaults[:url] = "https://gateway.watsonplatform.net/assistant/api"
@@ -80,84 +79,11 @@ module IBMWatson
80
79
  defaults[:iam_access_token] = nil
81
80
  defaults[:iam_url] = nil
82
81
  args = defaults.merge(args)
83
- @watson_service = WatsonService.new(
84
- vcap_services_name: "conversation",
85
- url: args[:url],
86
- username: args[:username],
87
- password: args[:password],
88
- iam_apikey: args[:iam_apikey],
89
- iam_access_token: args[:iam_access_token],
90
- iam_url: args[:iam_url],
91
- use_vcap_services: true
92
- )
82
+ args[:vcap_services_name] = "conversation"
83
+ super
93
84
  @version = args[:version]
94
85
  end
95
86
 
96
- # :nocov:
97
- def add_default_headers(headers: {})
98
- @watson_service.add_default_headers(headers: headers)
99
- end
100
-
101
- def _iam_access_token(iam_access_token:)
102
- @watson_service._iam_access_token(iam_access_token: iam_access_token)
103
- end
104
-
105
- def _iam_apikey(iam_apikey:)
106
- @watson_service._iam_apikey(iam_apikey: iam_apikey)
107
- end
108
-
109
- # @return [DetailedResponse]
110
- def request(args)
111
- @watson_service.request(args)
112
- end
113
-
114
- # @note Chainable
115
- # @param headers [Hash] Custom headers to be sent with the request
116
- # @return [self]
117
- def headers(headers)
118
- @watson_service.headers(headers)
119
- self
120
- end
121
-
122
- def password=(password)
123
- @watson_service.password = password
124
- end
125
-
126
- def password
127
- @watson_service.password
128
- end
129
-
130
- def username=(username)
131
- @watson_service.username = username
132
- end
133
-
134
- def username
135
- @watson_service.username
136
- end
137
-
138
- def url=(url)
139
- @watson_service.url = url
140
- end
141
-
142
- def url
143
- @watson_service.url
144
- end
145
-
146
- # @!method configure_http_client(proxy: {}, timeout: {})
147
- # Sets the http client config, currently works with timeout and proxies
148
- # @param proxy [Hash] The hash of proxy configurations
149
- # @option proxy address [String] The address of the proxy
150
- # @option proxy port [Integer] The port of the proxy
151
- # @option proxy username [String] The username of the proxy, if authentication is needed
152
- # @option proxy password [String] The password of the proxy, if authentication is needed
153
- # @option proxy headers [Hash] The headers to be used with the proxy
154
- # @param timeout [Hash] The hash for configuring timeouts. `per_operation` has priority over `global`
155
- # @option timeout per_operation [Hash] Timeouts per operation. Requires `read`, `write`, `connect`
156
- # @option timeout global [Integer] Upper bound on total request time
157
- def configure_http_client(proxy: {}, timeout: {})
158
- @watson_service.configure_http_client(proxy: proxy, timeout: timeout)
159
- end
160
- # :nocov:
161
87
  #########################
162
88
  # Message
163
89
  #########################
@@ -187,6 +113,7 @@ module IBMWatson
187
113
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
188
114
  def message(workspace_id:, input: nil, alternate_intents: nil, context: nil, entities: nil, intents: nil, output: nil, nodes_visited_details: nil)
189
115
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
116
+
190
117
  headers = {
191
118
  }
192
119
  params = {
@@ -226,8 +153,7 @@ module IBMWatson
226
153
  # @param page_limit [Fixnum] The number of records to return in each page of results.
227
154
  # @param include_count [Boolean] Whether to include information about the number of records returned.
228
155
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
229
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
230
- # and `workspace_id`.
156
+ # prefix the value with a minus sign (`-`).
231
157
  # @param cursor [String] A token identifying the page of results to retrieve.
232
158
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
233
159
  # the response.
@@ -324,6 +250,7 @@ module IBMWatson
324
250
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
325
251
  def get_workspace(workspace_id:, export: nil, include_audit: nil)
326
252
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
253
+
327
254
  headers = {
328
255
  }
329
256
  params = {
@@ -377,6 +304,7 @@ module IBMWatson
377
304
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
378
305
  def update_workspace(workspace_id:, name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, append: nil)
379
306
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
307
+
380
308
  headers = {
381
309
  }
382
310
  params = {
@@ -418,6 +346,7 @@ module IBMWatson
418
346
  # @return [nil]
419
347
  def delete_workspace(workspace_id:)
420
348
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
349
+
421
350
  headers = {
422
351
  }
423
352
  params = {
@@ -452,14 +381,14 @@ module IBMWatson
452
381
  # @param page_limit [Fixnum] The number of records to return in each page of results.
453
382
  # @param include_count [Boolean] Whether to include information about the number of records returned.
454
383
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
455
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
456
- # and `workspace_id`.
384
+ # prefix the value with a minus sign (`-`).
457
385
  # @param cursor [String] A token identifying the page of results to retrieve.
458
386
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
459
387
  # the response.
460
388
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
461
389
  def list_intents(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
462
390
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
391
+
463
392
  headers = {
464
393
  }
465
394
  params = {
@@ -501,7 +430,9 @@ module IBMWatson
501
430
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
502
431
  def create_intent(workspace_id:, intent:, description: nil, examples: nil)
503
432
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
433
+
504
434
  raise ArgumentError("intent must be provided") if intent.nil?
435
+
505
436
  headers = {
506
437
  }
507
438
  params = {
@@ -542,7 +473,9 @@ module IBMWatson
542
473
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
543
474
  def get_intent(workspace_id:, intent:, export: nil, include_audit: nil)
544
475
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
476
+
545
477
  raise ArgumentError("intent must be provided") if intent.nil?
478
+
546
479
  headers = {
547
480
  }
548
481
  params = {
@@ -581,7 +514,9 @@ module IBMWatson
581
514
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
582
515
  def update_intent(workspace_id:, intent:, new_intent: nil, new_description: nil, new_examples: nil)
583
516
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
517
+
584
518
  raise ArgumentError("intent must be provided") if intent.nil?
519
+
585
520
  headers = {
586
521
  }
587
522
  params = {
@@ -616,7 +551,9 @@ module IBMWatson
616
551
  # @return [nil]
617
552
  def delete_intent(workspace_id:, intent:)
618
553
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
554
+
619
555
  raise ArgumentError("intent must be provided") if intent.nil?
556
+
620
557
  headers = {
621
558
  }
622
559
  params = {
@@ -649,15 +586,16 @@ module IBMWatson
649
586
  # @param page_limit [Fixnum] The number of records to return in each page of results.
650
587
  # @param include_count [Boolean] Whether to include information about the number of records returned.
651
588
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
652
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
653
- # and `workspace_id`.
589
+ # prefix the value with a minus sign (`-`).
654
590
  # @param cursor [String] A token identifying the page of results to retrieve.
655
591
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
656
592
  # the response.
657
593
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
658
594
  def list_examples(workspace_id:, intent:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
659
595
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
596
+
660
597
  raise ArgumentError("intent must be provided") if intent.nil?
598
+
661
599
  headers = {
662
600
  }
663
601
  params = {
@@ -697,8 +635,11 @@ module IBMWatson
697
635
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
698
636
  def create_example(workspace_id:, intent:, text:, mentions: nil)
699
637
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
638
+
700
639
  raise ArgumentError("intent must be provided") if intent.nil?
640
+
701
641
  raise ArgumentError("text must be provided") if text.nil?
642
+
702
643
  headers = {
703
644
  }
704
645
  params = {
@@ -735,8 +676,11 @@ module IBMWatson
735
676
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
736
677
  def get_example(workspace_id:, intent:, text:, include_audit: nil)
737
678
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
679
+
738
680
  raise ArgumentError("intent must be provided") if intent.nil?
681
+
739
682
  raise ArgumentError("text must be provided") if text.nil?
683
+
740
684
  headers = {
741
685
  }
742
686
  params = {
@@ -773,8 +717,11 @@ module IBMWatson
773
717
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
774
718
  def update_example(workspace_id:, intent:, text:, new_text: nil, new_mentions: nil)
775
719
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
720
+
776
721
  raise ArgumentError("intent must be provided") if intent.nil?
722
+
777
723
  raise ArgumentError("text must be provided") if text.nil?
724
+
778
725
  headers = {
779
726
  }
780
727
  params = {
@@ -809,8 +756,11 @@ module IBMWatson
809
756
  # @return [nil]
810
757
  def delete_example(workspace_id:, intent:, text:)
811
758
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
759
+
812
760
  raise ArgumentError("intent must be provided") if intent.nil?
761
+
813
762
  raise ArgumentError("text must be provided") if text.nil?
763
+
814
764
  headers = {
815
765
  }
816
766
  params = {
@@ -842,14 +792,14 @@ module IBMWatson
842
792
  # @param page_limit [Fixnum] The number of records to return in each page of results.
843
793
  # @param include_count [Boolean] Whether to include information about the number of records returned.
844
794
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
845
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
846
- # and `workspace_id`.
795
+ # prefix the value with a minus sign (`-`).
847
796
  # @param cursor [String] A token identifying the page of results to retrieve.
848
797
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
849
798
  # the response.
850
799
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
851
800
  def list_counterexamples(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
852
801
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
802
+
853
803
  headers = {
854
804
  }
855
805
  params = {
@@ -888,7 +838,9 @@ module IBMWatson
888
838
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
889
839
  def create_counterexample(workspace_id:, text:)
890
840
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
841
+
891
842
  raise ArgumentError("text must be provided") if text.nil?
843
+
892
844
  headers = {
893
845
  }
894
846
  params = {
@@ -924,7 +876,9 @@ module IBMWatson
924
876
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
925
877
  def get_counterexample(workspace_id:, text:, include_audit: nil)
926
878
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
879
+
927
880
  raise ArgumentError("text must be provided") if text.nil?
881
+
928
882
  headers = {
929
883
  }
930
884
  params = {
@@ -956,7 +910,9 @@ module IBMWatson
956
910
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
957
911
  def update_counterexample(workspace_id:, text:, new_text: nil)
958
912
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
913
+
959
914
  raise ArgumentError("text must be provided") if text.nil?
915
+
960
916
  headers = {
961
917
  }
962
918
  params = {
@@ -990,7 +946,9 @@ module IBMWatson
990
946
  # @return [nil]
991
947
  def delete_counterexample(workspace_id:, text:)
992
948
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
949
+
993
950
  raise ArgumentError("text must be provided") if text.nil?
951
+
994
952
  headers = {
995
953
  }
996
954
  params = {
@@ -1025,14 +983,14 @@ module IBMWatson
1025
983
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1026
984
  # @param include_count [Boolean] Whether to include information about the number of records returned.
1027
985
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
1028
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
1029
- # and `workspace_id`.
986
+ # prefix the value with a minus sign (`-`).
1030
987
  # @param cursor [String] A token identifying the page of results to retrieve.
1031
988
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1032
989
  # the response.
1033
990
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1034
991
  def list_entities(workspace_id:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1035
992
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
993
+
1036
994
  headers = {
1037
995
  }
1038
996
  params = {
@@ -1075,7 +1033,9 @@ module IBMWatson
1075
1033
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1076
1034
  def create_entity(workspace_id:, entity:, description: nil, metadata: nil, values: nil, fuzzy_match: nil)
1077
1035
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1036
+
1078
1037
  raise ArgumentError("entity must be provided") if entity.nil?
1038
+
1079
1039
  headers = {
1080
1040
  }
1081
1041
  params = {
@@ -1118,7 +1078,9 @@ module IBMWatson
1118
1078
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1119
1079
  def get_entity(workspace_id:, entity:, export: nil, include_audit: nil)
1120
1080
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1081
+
1121
1082
  raise ArgumentError("entity must be provided") if entity.nil?
1083
+
1122
1084
  headers = {
1123
1085
  }
1124
1086
  params = {
@@ -1159,7 +1121,9 @@ module IBMWatson
1159
1121
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1160
1122
  def update_entity(workspace_id:, entity:, new_entity: nil, new_description: nil, new_metadata: nil, new_fuzzy_match: nil, new_values: nil)
1161
1123
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1124
+
1162
1125
  raise ArgumentError("entity must be provided") if entity.nil?
1126
+
1163
1127
  headers = {
1164
1128
  }
1165
1129
  params = {
@@ -1196,7 +1160,9 @@ module IBMWatson
1196
1160
  # @return [nil]
1197
1161
  def delete_entity(workspace_id:, entity:)
1198
1162
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1163
+
1199
1164
  raise ArgumentError("entity must be provided") if entity.nil?
1165
+
1200
1166
  headers = {
1201
1167
  }
1202
1168
  params = {
@@ -1234,7 +1200,9 @@ module IBMWatson
1234
1200
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1235
1201
  def list_mentions(workspace_id:, entity:, export: nil, include_audit: nil)
1236
1202
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1203
+
1237
1204
  raise ArgumentError("entity must be provided") if entity.nil?
1205
+
1238
1206
  headers = {
1239
1207
  }
1240
1208
  params = {
@@ -1271,15 +1239,16 @@ module IBMWatson
1271
1239
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1272
1240
  # @param include_count [Boolean] Whether to include information about the number of records returned.
1273
1241
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
1274
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
1275
- # and `workspace_id`.
1242
+ # prefix the value with a minus sign (`-`).
1276
1243
  # @param cursor [String] A token identifying the page of results to retrieve.
1277
1244
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1278
1245
  # the response.
1279
1246
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1280
1247
  def list_values(workspace_id:, entity:, export: nil, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1281
1248
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1249
+
1282
1250
  raise ArgumentError("entity must be provided") if entity.nil?
1251
+
1283
1252
  headers = {
1284
1253
  }
1285
1254
  params = {
@@ -1332,8 +1301,11 @@ module IBMWatson
1332
1301
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1333
1302
  def create_value(workspace_id:, entity:, value:, metadata: nil, synonyms: nil, patterns: nil, value_type: nil)
1334
1303
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1304
+
1335
1305
  raise ArgumentError("entity must be provided") if entity.nil?
1306
+
1336
1307
  raise ArgumentError("value must be provided") if value.nil?
1308
+
1337
1309
  headers = {
1338
1310
  }
1339
1311
  params = {
@@ -1376,8 +1348,11 @@ module IBMWatson
1376
1348
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1377
1349
  def get_value(workspace_id:, entity:, value:, export: nil, include_audit: nil)
1378
1350
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1351
+
1379
1352
  raise ArgumentError("entity must be provided") if entity.nil?
1353
+
1380
1354
  raise ArgumentError("value must be provided") if value.nil?
1355
+
1381
1356
  headers = {
1382
1357
  }
1383
1358
  params = {
@@ -1428,8 +1403,11 @@ module IBMWatson
1428
1403
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1429
1404
  def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_type: nil, new_synonyms: nil, new_patterns: nil)
1430
1405
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1406
+
1431
1407
  raise ArgumentError("entity must be provided") if entity.nil?
1408
+
1432
1409
  raise ArgumentError("value must be provided") if value.nil?
1410
+
1433
1411
  headers = {
1434
1412
  }
1435
1413
  params = {
@@ -1467,8 +1445,11 @@ module IBMWatson
1467
1445
  # @return [nil]
1468
1446
  def delete_value(workspace_id:, entity:, value:)
1469
1447
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1448
+
1470
1449
  raise ArgumentError("entity must be provided") if entity.nil?
1450
+
1471
1451
  raise ArgumentError("value must be provided") if value.nil?
1452
+
1472
1453
  headers = {
1473
1454
  }
1474
1455
  params = {
@@ -1501,16 +1482,18 @@ module IBMWatson
1501
1482
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1502
1483
  # @param include_count [Boolean] Whether to include information about the number of records returned.
1503
1484
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
1504
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
1505
- # and `workspace_id`.
1485
+ # prefix the value with a minus sign (`-`).
1506
1486
  # @param cursor [String] A token identifying the page of results to retrieve.
1507
1487
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1508
1488
  # the response.
1509
1489
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1510
1490
  def list_synonyms(workspace_id:, entity:, value:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1511
1491
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1492
+
1512
1493
  raise ArgumentError("entity must be provided") if entity.nil?
1494
+
1513
1495
  raise ArgumentError("value must be provided") if value.nil?
1496
+
1514
1497
  headers = {
1515
1498
  }
1516
1499
  params = {
@@ -1549,9 +1532,13 @@ module IBMWatson
1549
1532
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1550
1533
  def create_synonym(workspace_id:, entity:, value:, synonym:)
1551
1534
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1535
+
1552
1536
  raise ArgumentError("entity must be provided") if entity.nil?
1537
+
1553
1538
  raise ArgumentError("value must be provided") if value.nil?
1539
+
1554
1540
  raise ArgumentError("synonym must be provided") if synonym.nil?
1541
+
1555
1542
  headers = {
1556
1543
  }
1557
1544
  params = {
@@ -1588,9 +1575,13 @@ module IBMWatson
1588
1575
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1589
1576
  def get_synonym(workspace_id:, entity:, value:, synonym:, include_audit: nil)
1590
1577
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1578
+
1591
1579
  raise ArgumentError("entity must be provided") if entity.nil?
1580
+
1592
1581
  raise ArgumentError("value must be provided") if value.nil?
1582
+
1593
1583
  raise ArgumentError("synonym must be provided") if synonym.nil?
1584
+
1594
1585
  headers = {
1595
1586
  }
1596
1587
  params = {
@@ -1626,9 +1617,13 @@ module IBMWatson
1626
1617
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1627
1618
  def update_synonym(workspace_id:, entity:, value:, synonym:, new_synonym: nil)
1628
1619
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1620
+
1629
1621
  raise ArgumentError("entity must be provided") if entity.nil?
1622
+
1630
1623
  raise ArgumentError("value must be provided") if value.nil?
1624
+
1631
1625
  raise ArgumentError("synonym must be provided") if synonym.nil?
1626
+
1632
1627
  headers = {
1633
1628
  }
1634
1629
  params = {
@@ -1663,9 +1658,13 @@ module IBMWatson
1663
1658
  # @return [nil]
1664
1659
  def delete_synonym(workspace_id:, entity:, value:, synonym:)
1665
1660
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1661
+
1666
1662
  raise ArgumentError("entity must be provided") if entity.nil?
1663
+
1667
1664
  raise ArgumentError("value must be provided") if value.nil?
1665
+
1668
1666
  raise ArgumentError("synonym must be provided") if synonym.nil?
1667
+
1669
1668
  headers = {
1670
1669
  }
1671
1670
  params = {
@@ -1696,14 +1695,14 @@ module IBMWatson
1696
1695
  # @param page_limit [Fixnum] The number of records to return in each page of results.
1697
1696
  # @param include_count [Boolean] Whether to include information about the number of records returned.
1698
1697
  # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
1699
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
1700
- # and `workspace_id`.
1698
+ # prefix the value with a minus sign (`-`).
1701
1699
  # @param cursor [String] A token identifying the page of results to retrieve.
1702
1700
  # @param include_audit [Boolean] Whether to include the audit properties (`created` and `updated` timestamps) in
1703
1701
  # the response.
1704
1702
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1705
1703
  def list_dialog_nodes(workspace_id:, page_limit: nil, include_count: nil, sort: nil, cursor: nil, include_audit: nil)
1706
1704
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1705
+
1707
1706
  headers = {
1708
1707
  }
1709
1708
  params = {
@@ -1763,11 +1762,13 @@ module IBMWatson
1763
1762
  # @param digress_out [String] Whether this dialog node can be returned to after a digression.
1764
1763
  # @param digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
1765
1764
  # @param user_label [String] A label that can be displayed externally to describe the purpose of the node to
1766
- # users.
1765
+ # users. This string must be no longer than 512 characters.
1767
1766
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1768
1767
  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, actions: nil, title: nil, node_type: nil, event_name: nil, variable: nil, digress_in: nil, digress_out: nil, digress_out_slots: nil, user_label: nil)
1769
1768
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1769
+
1770
1770
  raise ArgumentError("dialog_node must be provided") if dialog_node.nil?
1771
+
1771
1772
  headers = {
1772
1773
  }
1773
1774
  params = {
@@ -1819,7 +1820,9 @@ module IBMWatson
1819
1820
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1820
1821
  def get_dialog_node(workspace_id:, dialog_node:, include_audit: nil)
1821
1822
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1823
+
1822
1824
  raise ArgumentError("dialog_node must be provided") if dialog_node.nil?
1825
+
1823
1826
  headers = {
1824
1827
  }
1825
1828
  params = {
@@ -1876,11 +1879,13 @@ module IBMWatson
1876
1879
  # @param new_digress_out [String] Whether this dialog node can be returned to after a digression.
1877
1880
  # @param new_digress_out_slots [String] Whether the user can digress to top-level nodes while filling out slots.
1878
1881
  # @param new_user_label [String] A label that can be displayed externally to describe the purpose of the node to
1879
- # users.
1882
+ # users. This string must be no longer than 512 characters.
1880
1883
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1881
1884
  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)
1882
1885
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1886
+
1883
1887
  raise ArgumentError("dialog_node must be provided") if dialog_node.nil?
1888
+
1884
1889
  headers = {
1885
1890
  }
1886
1891
  params = {
@@ -1930,7 +1935,9 @@ module IBMWatson
1930
1935
  # @return [nil]
1931
1936
  def delete_dialog_node(workspace_id:, dialog_node:)
1932
1937
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1938
+
1933
1939
  raise ArgumentError("dialog_node must be provided") if dialog_node.nil?
1940
+
1934
1941
  headers = {
1935
1942
  }
1936
1943
  params = {
@@ -1959,9 +1966,8 @@ module IBMWatson
1959
1966
  # minutes. If **cursor** is specified, the limit is 120 requests per minute. For
1960
1967
  # more information, see **Rate limiting**.
1961
1968
  # @param workspace_id [String] Unique identifier of the workspace.
1962
- # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
1963
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
1964
- # and `workspace_id`.
1969
+ # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
1970
+ # reverse the sort order, prefix the parameter value with a minus sign (`-`).
1965
1971
  # @param filter [String] A cacheable parameter that limits the results to those matching the specified
1966
1972
  # filter. For more information, see the
1967
1973
  # [documentation](https://console.bluemix.net/docs/services/conversation/filter-reference.html#filter-query-syntax).
@@ -1970,6 +1976,7 @@ module IBMWatson
1970
1976
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
1971
1977
  def list_logs(workspace_id:, sort: nil, filter: nil, page_limit: nil, cursor: nil)
1972
1978
  raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
1979
+
1973
1980
  headers = {
1974
1981
  }
1975
1982
  params = {
@@ -2003,14 +2010,14 @@ module IBMWatson
2003
2010
  # well as a value for `workspace_id` or `request.context.metadata.deployment`. For
2004
2011
  # more information, see the
2005
2012
  # [documentation](https://console.bluemix.net/docs/services/conversation/filter-reference.html#filter-query-syntax).
2006
- # @param sort [String] The attribute by which returned results will be sorted. To reverse the sort order,
2007
- # prefix the value with a minus sign (`-`). Supported values are `name`, `updated`,
2008
- # and `workspace_id`.
2013
+ # @param sort [String] How to sort the returned log events. You can sort by **request_timestamp**. To
2014
+ # reverse the sort order, prefix the parameter value with a minus sign (`-`).
2009
2015
  # @param page_limit [Fixnum] The number of records to return in each page of results.
2010
2016
  # @param cursor [String] A token identifying the page of results to retrieve.
2011
2017
  # @return [DetailedResponse] A `DetailedResponse` object representing the response.
2012
2018
  def list_all_logs(filter:, sort: nil, page_limit: nil, cursor: nil)
2013
2019
  raise ArgumentError("filter must be provided") if filter.nil?
2020
+
2014
2021
  headers = {
2015
2022
  }
2016
2023
  params = {
@@ -2048,6 +2055,7 @@ module IBMWatson
2048
2055
  # @return [nil]
2049
2056
  def delete_user_data(customer_id:)
2050
2057
  raise ArgumentError("customer_id must be provided") if customer_id.nil?
2058
+
2051
2059
  headers = {
2052
2060
  }
2053
2061
  params = {