ibm_watson 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,7 @@ require "concurrent"
24
24
  require "erb"
25
25
  require "json"
26
26
  require_relative "./detailed_response"
27
+ require_relative "./common.rb"
27
28
 
28
29
  require_relative "./watson_service"
29
30
 
@@ -109,7 +110,7 @@ module IBMWatson
109
110
 
110
111
  headers = {
111
112
  }
112
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_environment"
113
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_environment")
113
114
 
114
115
  params = {
115
116
  "version" => @version
@@ -143,7 +144,7 @@ module IBMWatson
143
144
  def list_environments(name: nil)
144
145
  headers = {
145
146
  }
146
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_environments"
147
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_environments")
147
148
 
148
149
  params = {
149
150
  "version" => @version,
@@ -172,7 +173,7 @@ module IBMWatson
172
173
 
173
174
  headers = {
174
175
  }
175
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_environment"
176
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_environment")
176
177
 
177
178
  params = {
178
179
  "version" => @version
@@ -207,7 +208,7 @@ module IBMWatson
207
208
 
208
209
  headers = {
209
210
  }
210
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_environment"
211
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_environment")
211
212
 
212
213
  params = {
213
214
  "version" => @version
@@ -242,7 +243,7 @@ module IBMWatson
242
243
 
243
244
  headers = {
244
245
  }
245
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_environment"
246
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_environment")
246
247
 
247
248
  params = {
248
249
  "version" => @version
@@ -275,7 +276,7 @@ module IBMWatson
275
276
 
276
277
  headers = {
277
278
  }
278
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_fields"
279
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_fields")
279
280
 
280
281
  params = {
281
282
  "version" => @version,
@@ -329,7 +330,7 @@ module IBMWatson
329
330
 
330
331
  headers = {
331
332
  }
332
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_configuration"
333
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_configuration")
333
334
 
334
335
  params = {
335
336
  "version" => @version
@@ -369,7 +370,7 @@ module IBMWatson
369
370
 
370
371
  headers = {
371
372
  }
372
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_configurations"
373
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_configurations")
373
374
 
374
375
  params = {
375
376
  "version" => @version,
@@ -401,7 +402,7 @@ module IBMWatson
401
402
 
402
403
  headers = {
403
404
  }
404
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_configuration"
405
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_configuration")
405
406
 
406
407
  params = {
407
408
  "version" => @version
@@ -451,7 +452,7 @@ module IBMWatson
451
452
 
452
453
  headers = {
453
454
  }
454
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_configuration"
455
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_configuration")
455
456
 
456
457
  params = {
457
458
  "version" => @version
@@ -498,7 +499,7 @@ module IBMWatson
498
499
 
499
500
  headers = {
500
501
  }
501
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_configuration"
502
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_configuration")
502
503
 
503
504
  params = {
504
505
  "version" => @version
@@ -557,7 +558,7 @@ module IBMWatson
557
558
 
558
559
  headers = {
559
560
  }
560
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=test_configuration_in_environment"
561
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "test_configuration_in_environment")
561
562
 
562
563
  params = {
563
564
  "version" => @version,
@@ -612,7 +613,7 @@ module IBMWatson
612
613
 
613
614
  headers = {
614
615
  }
615
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_collection"
616
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_collection")
616
617
 
617
618
  params = {
618
619
  "version" => @version
@@ -650,7 +651,7 @@ module IBMWatson
650
651
 
651
652
  headers = {
652
653
  }
653
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_collections"
654
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_collections")
654
655
 
655
656
  params = {
656
657
  "version" => @version,
@@ -682,7 +683,7 @@ module IBMWatson
682
683
 
683
684
  headers = {
684
685
  }
685
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_collection"
686
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_collection")
686
687
 
687
688
  params = {
688
689
  "version" => @version
@@ -716,7 +717,7 @@ module IBMWatson
716
717
 
717
718
  headers = {
718
719
  }
719
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_collection"
720
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_collection")
720
721
 
721
722
  params = {
722
723
  "version" => @version
@@ -754,7 +755,7 @@ module IBMWatson
754
755
 
755
756
  headers = {
756
757
  }
757
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_collection"
758
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_collection")
758
759
 
759
760
  params = {
760
761
  "version" => @version
@@ -786,7 +787,7 @@ module IBMWatson
786
787
 
787
788
  headers = {
788
789
  }
789
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_collection_fields"
790
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_collection_fields")
790
791
 
791
792
  params = {
792
793
  "version" => @version
@@ -822,7 +823,7 @@ module IBMWatson
822
823
 
823
824
  headers = {
824
825
  }
825
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_expansions"
826
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_expansions")
826
827
 
827
828
  params = {
828
829
  "version" => @version
@@ -874,7 +875,7 @@ module IBMWatson
874
875
 
875
876
  headers = {
876
877
  }
877
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_expansions"
878
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_expansions")
878
879
 
879
880
  params = {
880
881
  "version" => @version
@@ -912,7 +913,7 @@ module IBMWatson
912
913
 
913
914
  headers = {
914
915
  }
915
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_expansions"
916
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_expansions")
916
917
 
917
918
  params = {
918
919
  "version" => @version
@@ -945,7 +946,7 @@ module IBMWatson
945
946
 
946
947
  headers = {
947
948
  }
948
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_tokenization_dictionary_status"
949
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_tokenization_dictionary_status")
949
950
 
950
951
  params = {
951
952
  "version" => @version
@@ -980,7 +981,7 @@ module IBMWatson
980
981
 
981
982
  headers = {
982
983
  }
983
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_tokenization_dictionary"
984
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_tokenization_dictionary")
984
985
 
985
986
  params = {
986
987
  "version" => @version
@@ -1017,7 +1018,7 @@ module IBMWatson
1017
1018
 
1018
1019
  headers = {
1019
1020
  }
1020
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_tokenization_dictionary"
1021
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_tokenization_dictionary")
1021
1022
 
1022
1023
  params = {
1023
1024
  "version" => @version
@@ -1049,7 +1050,7 @@ module IBMWatson
1049
1050
 
1050
1051
  headers = {
1051
1052
  }
1052
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_stopword_list_status"
1053
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_stopword_list_status")
1053
1054
 
1054
1055
  params = {
1055
1056
  "version" => @version
@@ -1085,7 +1086,7 @@ module IBMWatson
1085
1086
 
1086
1087
  headers = {
1087
1088
  }
1088
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_stopword_list"
1089
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_stopword_list")
1089
1090
 
1090
1091
  params = {
1091
1092
  "version" => @version
@@ -1127,7 +1128,7 @@ module IBMWatson
1127
1128
 
1128
1129
  headers = {
1129
1130
  }
1130
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_stopword_list"
1131
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_stopword_list")
1131
1132
 
1132
1133
  params = {
1133
1134
  "version" => @version
@@ -1197,7 +1198,7 @@ module IBMWatson
1197
1198
 
1198
1199
  headers = {
1199
1200
  }
1200
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=add_document"
1201
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "add_document")
1201
1202
 
1202
1203
  params = {
1203
1204
  "version" => @version
@@ -1248,7 +1249,7 @@ module IBMWatson
1248
1249
 
1249
1250
  headers = {
1250
1251
  }
1251
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_document_status"
1252
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_document_status")
1252
1253
 
1253
1254
  params = {
1254
1255
  "version" => @version
@@ -1295,7 +1296,7 @@ module IBMWatson
1295
1296
 
1296
1297
  headers = {
1297
1298
  }
1298
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_document"
1299
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_document")
1299
1300
 
1300
1301
  params = {
1301
1302
  "version" => @version
@@ -1345,7 +1346,7 @@ module IBMWatson
1345
1346
 
1346
1347
  headers = {
1347
1348
  }
1348
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_document"
1349
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_document")
1349
1350
 
1350
1351
  params = {
1351
1352
  "version" => @version
@@ -1441,7 +1442,7 @@ module IBMWatson
1441
1442
  headers = {
1442
1443
  "X-Watson-Logging-Opt-Out" => logging_opt_out
1443
1444
  }
1444
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=query"
1445
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query")
1445
1446
 
1446
1447
  params = {
1447
1448
  "version" => @version
@@ -1544,7 +1545,7 @@ module IBMWatson
1544
1545
 
1545
1546
  headers = {
1546
1547
  }
1547
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=query_notices"
1548
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_notices")
1548
1549
 
1549
1550
  params = {
1550
1551
  "version" => @version,
@@ -1651,7 +1652,7 @@ module IBMWatson
1651
1652
  headers = {
1652
1653
  "X-Watson-Logging-Opt-Out" => logging_opt_out
1653
1654
  }
1654
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=federated_query"
1655
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "federated_query")
1655
1656
 
1656
1657
  params = {
1657
1658
  "version" => @version
@@ -1748,7 +1749,7 @@ module IBMWatson
1748
1749
 
1749
1750
  headers = {
1750
1751
  }
1751
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=federated_query_notices"
1752
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "federated_query_notices")
1752
1753
 
1753
1754
  params = {
1754
1755
  "version" => @version,
@@ -1805,7 +1806,7 @@ module IBMWatson
1805
1806
 
1806
1807
  headers = {
1807
1808
  }
1808
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=query_entities"
1809
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_entities")
1809
1810
 
1810
1811
  params = {
1811
1812
  "version" => @version
@@ -1860,7 +1861,7 @@ module IBMWatson
1860
1861
 
1861
1862
  headers = {
1862
1863
  }
1863
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=query_relations"
1864
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_relations")
1864
1865
 
1865
1866
  params = {
1866
1867
  "version" => @version
@@ -1905,7 +1906,7 @@ module IBMWatson
1905
1906
 
1906
1907
  headers = {
1907
1908
  }
1908
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_training_data"
1909
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_training_data")
1909
1910
 
1910
1911
  params = {
1911
1912
  "version" => @version
@@ -1941,7 +1942,7 @@ module IBMWatson
1941
1942
 
1942
1943
  headers = {
1943
1944
  }
1944
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=add_training_data"
1945
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "add_training_data")
1945
1946
 
1946
1947
  params = {
1947
1948
  "version" => @version
@@ -1980,7 +1981,7 @@ module IBMWatson
1980
1981
 
1981
1982
  headers = {
1982
1983
  }
1983
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_all_training_data"
1984
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_all_training_data")
1984
1985
 
1985
1986
  params = {
1986
1987
  "version" => @version
@@ -2016,7 +2017,7 @@ module IBMWatson
2016
2017
 
2017
2018
  headers = {
2018
2019
  }
2019
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_training_data"
2020
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_training_data")
2020
2021
 
2021
2022
  params = {
2022
2023
  "version" => @version
@@ -2052,7 +2053,7 @@ module IBMWatson
2052
2053
 
2053
2054
  headers = {
2054
2055
  }
2055
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_training_data"
2056
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_training_data")
2056
2057
 
2057
2058
  params = {
2058
2059
  "version" => @version
@@ -2087,7 +2088,7 @@ module IBMWatson
2087
2088
 
2088
2089
  headers = {
2089
2090
  }
2090
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_training_examples"
2091
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_training_examples")
2091
2092
 
2092
2093
  params = {
2093
2094
  "version" => @version
@@ -2125,7 +2126,7 @@ module IBMWatson
2125
2126
 
2126
2127
  headers = {
2127
2128
  }
2128
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_training_example"
2129
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_training_example")
2129
2130
 
2130
2131
  params = {
2131
2132
  "version" => @version
@@ -2170,7 +2171,7 @@ module IBMWatson
2170
2171
 
2171
2172
  headers = {
2172
2173
  }
2173
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_training_example"
2174
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_training_example")
2174
2175
 
2175
2176
  params = {
2176
2177
  "version" => @version
@@ -2210,7 +2211,7 @@ module IBMWatson
2210
2211
 
2211
2212
  headers = {
2212
2213
  }
2213
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_training_example"
2214
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_training_example")
2214
2215
 
2215
2216
  params = {
2216
2217
  "version" => @version
@@ -2254,7 +2255,7 @@ module IBMWatson
2254
2255
 
2255
2256
  headers = {
2256
2257
  }
2257
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_training_example"
2258
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_training_example")
2258
2259
 
2259
2260
  params = {
2260
2261
  "version" => @version
@@ -2292,7 +2293,7 @@ module IBMWatson
2292
2293
 
2293
2294
  headers = {
2294
2295
  }
2295
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_user_data"
2296
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_user_data")
2296
2297
 
2297
2298
  params = {
2298
2299
  "version" => @version,
@@ -2330,7 +2331,7 @@ module IBMWatson
2330
2331
 
2331
2332
  headers = {
2332
2333
  }
2333
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_event"
2334
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_event")
2334
2335
 
2335
2336
  params = {
2336
2337
  "version" => @version
@@ -2378,7 +2379,7 @@ module IBMWatson
2378
2379
  def query_log(filter: nil, query: nil, count: nil, offset: nil, sort: nil)
2379
2380
  headers = {
2380
2381
  }
2381
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=query_log"
2382
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "query_log")
2382
2383
 
2383
2384
  params = {
2384
2385
  "version" => @version,
@@ -2415,7 +2416,7 @@ module IBMWatson
2415
2416
  def get_metrics_query(start_time: nil, end_time: nil, result_type: nil)
2416
2417
  headers = {
2417
2418
  }
2418
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_metrics_query"
2419
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query")
2419
2420
 
2420
2421
  params = {
2421
2422
  "version" => @version,
@@ -2451,7 +2452,7 @@ module IBMWatson
2451
2452
  def get_metrics_query_event(start_time: nil, end_time: nil, result_type: nil)
2452
2453
  headers = {
2453
2454
  }
2454
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_metrics_query_event"
2455
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_event")
2455
2456
 
2456
2457
  params = {
2457
2458
  "version" => @version,
@@ -2486,7 +2487,7 @@ module IBMWatson
2486
2487
  def get_metrics_query_no_results(start_time: nil, end_time: nil, result_type: nil)
2487
2488
  headers = {
2488
2489
  }
2489
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_metrics_query_no_results"
2490
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_no_results")
2490
2491
 
2491
2492
  params = {
2492
2493
  "version" => @version,
@@ -2523,7 +2524,7 @@ module IBMWatson
2523
2524
  def get_metrics_event_rate(start_time: nil, end_time: nil, result_type: nil)
2524
2525
  headers = {
2525
2526
  }
2526
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_metrics_event_rate"
2527
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_event_rate")
2527
2528
 
2528
2529
  params = {
2529
2530
  "version" => @version,
@@ -2556,7 +2557,7 @@ module IBMWatson
2556
2557
  def get_metrics_query_token_event(count: nil)
2557
2558
  headers = {
2558
2559
  }
2559
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_metrics_query_token_event"
2560
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_metrics_query_token_event")
2560
2561
 
2561
2562
  params = {
2562
2563
  "version" => @version,
@@ -2592,7 +2593,7 @@ module IBMWatson
2592
2593
 
2593
2594
  headers = {
2594
2595
  }
2595
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_credentials"
2596
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_credentials")
2596
2597
 
2597
2598
  params = {
2598
2599
  "version" => @version
@@ -2635,7 +2636,7 @@ module IBMWatson
2635
2636
 
2636
2637
  headers = {
2637
2638
  }
2638
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_credentials"
2639
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_credentials")
2639
2640
 
2640
2641
  params = {
2641
2642
  "version" => @version
@@ -2676,7 +2677,7 @@ module IBMWatson
2676
2677
 
2677
2678
  headers = {
2678
2679
  }
2679
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_credentials"
2680
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_credentials")
2680
2681
 
2681
2682
  params = {
2682
2683
  "version" => @version
@@ -2721,7 +2722,7 @@ module IBMWatson
2721
2722
 
2722
2723
  headers = {
2723
2724
  }
2724
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=update_credentials"
2725
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "update_credentials")
2725
2726
 
2726
2727
  params = {
2727
2728
  "version" => @version
@@ -2759,7 +2760,7 @@ module IBMWatson
2759
2760
 
2760
2761
  headers = {
2761
2762
  }
2762
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_credentials"
2763
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_credentials")
2763
2764
 
2764
2765
  params = {
2765
2766
  "version" => @version
@@ -2791,7 +2792,7 @@ module IBMWatson
2791
2792
 
2792
2793
  headers = {
2793
2794
  }
2794
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=list_gateways"
2795
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "list_gateways")
2795
2796
 
2796
2797
  params = {
2797
2798
  "version" => @version
@@ -2821,7 +2822,7 @@ module IBMWatson
2821
2822
 
2822
2823
  headers = {
2823
2824
  }
2824
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=create_gateway"
2825
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "create_gateway")
2825
2826
 
2826
2827
  params = {
2827
2828
  "version" => @version
@@ -2858,7 +2859,7 @@ module IBMWatson
2858
2859
 
2859
2860
  headers = {
2860
2861
  }
2861
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=get_gateway"
2862
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "get_gateway")
2862
2863
 
2863
2864
  params = {
2864
2865
  "version" => @version
@@ -2890,7 +2891,7 @@ module IBMWatson
2890
2891
 
2891
2892
  headers = {
2892
2893
  }
2893
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=discovery;service_version=V1;operation_id=delete_gateway"
2894
+ headers = Common.new.get_default_headers(headers: headers, service_name: "discovery", service_version: "V1", operation_id: "delete_gateway")
2894
2895
 
2895
2896
  params = {
2896
2897
  "version" => @version
@@ -24,6 +24,7 @@ require "concurrent"
24
24
  require "erb"
25
25
  require "json"
26
26
  require_relative "./detailed_response"
27
+ require_relative "./common.rb"
27
28
 
28
29
  require_relative "./watson_service"
29
30
 
@@ -107,7 +108,7 @@ module IBMWatson
107
108
 
108
109
  headers = {
109
110
  }
110
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=translate"
111
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "translate")
111
112
 
112
113
  params = {
113
114
  "version" => @version
@@ -145,7 +146,7 @@ module IBMWatson
145
146
  def list_identifiable_languages
146
147
  headers = {
147
148
  }
148
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=list_identifiable_languages"
149
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "list_identifiable_languages")
149
150
 
150
151
  params = {
151
152
  "version" => @version
@@ -174,7 +175,7 @@ module IBMWatson
174
175
 
175
176
  headers = {
176
177
  }
177
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=identify"
178
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "identify")
178
179
 
179
180
  params = {
180
181
  "version" => @version
@@ -213,7 +214,7 @@ module IBMWatson
213
214
  def list_models(source: nil, target: nil, default_models: nil)
214
215
  headers = {
215
216
  }
216
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=list_models"
217
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "list_models")
217
218
 
218
219
  params = {
219
220
  "version" => @version,
@@ -275,7 +276,7 @@ module IBMWatson
275
276
 
276
277
  headers = {
277
278
  }
278
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=create_model"
279
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "create_model")
279
280
 
280
281
  params = {
281
282
  "version" => @version,
@@ -325,7 +326,7 @@ module IBMWatson
325
326
 
326
327
  headers = {
327
328
  }
328
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=delete_model"
329
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "delete_model")
329
330
 
330
331
  params = {
331
332
  "version" => @version
@@ -356,7 +357,7 @@ module IBMWatson
356
357
 
357
358
  headers = {
358
359
  }
359
- headers["X-IBMCloud-SDK-Analytics"] = "service_name=language_translator;service_version=V3;operation_id=get_model"
360
+ headers = Common.new.get_default_headers(headers: headers, service_name: "language_translator", service_version: "V3", operation_id: "get_model")
360
361
 
361
362
  params = {
362
363
  "version" => @version