@@ -99,17 +99,6 @@ public class Conversation extends WatsonService {
99
99
100
100
private String versionDate ;
101
101
102
- /** The Constant VERSION_DATE_2017_05_26. */
103
- public static final String VERSION_DATE_2017_05_26 = "2017-05-26" ;
104
- /** The Constant VERSION_DATE_2017_04_21. */
105
- public static final String VERSION_DATE_2017_04_21 = "2017-04-21" ;
106
- /** The Constant VERSION_DATE_2017_02_03. */
107
- public static final String VERSION_DATE_2017_02_03 = "2017-02-03" ;
108
- /** The Constant VERSION_DATE_2016_09_20. */
109
- public static final String VERSION_DATE_2016_09_20 = "2016-09-20" ;
110
- /** The Constant VERSION_DATE_2016_07_11. */
111
- public static final String VERSION_DATE_2016_07_11 = "2016-07-11" ;
112
-
113
102
/**
114
103
* Instantiates a new `Conversation`.
115
104
*
@@ -122,8 +111,7 @@ public Conversation(String versionDate) {
122
111
setEndPoint (URL );
123
112
}
124
113
125
- Validator .isTrue ((versionDate != null ) && !versionDate .isEmpty (),
126
- "'version cannot be null. Use " + VERSION_DATE_2017_05_26 );
114
+ Validator .isTrue ((versionDate != null ) && !versionDate .isEmpty (), "version cannot be null." );
127
115
128
116
this .versionDate = versionDate ;
129
117
}
@@ -231,6 +219,9 @@ public ServiceCall<WorkspaceExport> getWorkspace(GetWorkspaceOptions getWorkspac
231
219
if (getWorkspaceOptions .export () != null ) {
232
220
builder .query ("export" , String .valueOf (getWorkspaceOptions .export ()));
233
221
}
222
+ if (getWorkspaceOptions .includeAudit () != null ) {
223
+ builder .query ("include_audit" , String .valueOf (getWorkspaceOptions .includeAudit ()));
224
+ }
234
225
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (WorkspaceExport .class ));
235
226
}
236
227
@@ -258,6 +249,9 @@ public ServiceCall<WorkspaceCollection> listWorkspaces(ListWorkspacesOptions lis
258
249
if (listWorkspacesOptions .cursor () != null ) {
259
250
builder .query ("cursor" , listWorkspacesOptions .cursor ());
260
251
}
252
+ if (listWorkspacesOptions .includeAudit () != null ) {
253
+ builder .query ("include_audit" , String .valueOf (listWorkspacesOptions .includeAudit ()));
254
+ }
261
255
}
262
256
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (WorkspaceCollection .class ));
263
257
}
@@ -416,6 +410,9 @@ public ServiceCall<IntentExport> getIntent(GetIntentOptions getIntentOptions) {
416
410
if (getIntentOptions .export () != null ) {
417
411
builder .query ("export" , String .valueOf (getIntentOptions .export ()));
418
412
}
413
+ if (getIntentOptions .includeAudit () != null ) {
414
+ builder .query ("include_audit" , String .valueOf (getIntentOptions .includeAudit ()));
415
+ }
419
416
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (IntentExport .class ));
420
417
}
421
418
@@ -447,6 +444,9 @@ public ServiceCall<IntentCollection> listIntents(ListIntentsOptions listIntentsO
447
444
if (listIntentsOptions .cursor () != null ) {
448
445
builder .query ("cursor" , listIntentsOptions .cursor ());
449
446
}
447
+ if (listIntentsOptions .includeAudit () != null ) {
448
+ builder .query ("include_audit" , String .valueOf (listIntentsOptions .includeAudit ()));
449
+ }
450
450
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (IntentCollection .class ));
451
451
}
452
452
@@ -526,6 +526,9 @@ public ServiceCall<Example> getExample(GetExampleOptions getExampleOptions) {
526
526
RequestBuilder builder = RequestBuilder .get (String .format ("/v1/workspaces/%s/intents/%s/examples/%s" ,
527
527
getExampleOptions .workspaceId (), getExampleOptions .intent (), getExampleOptions .text ()));
528
528
builder .query (VERSION , versionDate );
529
+ if (getExampleOptions .includeAudit () != null ) {
530
+ builder .query ("include_audit" , String .valueOf (getExampleOptions .includeAudit ()));
531
+ }
529
532
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (Example .class ));
530
533
}
531
534
@@ -554,6 +557,9 @@ public ServiceCall<ExampleCollection> listExamples(ListExamplesOptions listExamp
554
557
if (listExamplesOptions .cursor () != null ) {
555
558
builder .query ("cursor" , listExamplesOptions .cursor ());
556
559
}
560
+ if (listExamplesOptions .includeAudit () != null ) {
561
+ builder .query ("include_audit" , String .valueOf (listExamplesOptions .includeAudit ()));
562
+ }
557
563
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (ExampleCollection .class ));
558
564
}
559
565
@@ -641,6 +647,9 @@ public ServiceCall<EntityExport> getEntity(GetEntityOptions getEntityOptions) {
641
647
if (getEntityOptions .export () != null ) {
642
648
builder .query ("export" , String .valueOf (getEntityOptions .export ()));
643
649
}
650
+ if (getEntityOptions .includeAudit () != null ) {
651
+ builder .query ("include_audit" , String .valueOf (getEntityOptions .includeAudit ()));
652
+ }
644
653
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (EntityExport .class ));
645
654
}
646
655
@@ -672,6 +681,9 @@ public ServiceCall<EntityCollection> listEntities(ListEntitiesOptions listEntiti
672
681
if (listEntitiesOptions .cursor () != null ) {
673
682
builder .query ("cursor" , listEntitiesOptions .cursor ());
674
683
}
684
+ if (listEntitiesOptions .includeAudit () != null ) {
685
+ builder .query ("include_audit" , String .valueOf (listEntitiesOptions .includeAudit ()));
686
+ }
675
687
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (EntityCollection .class ));
676
688
}
677
689
@@ -771,6 +783,9 @@ public ServiceCall<ValueExport> getValue(GetValueOptions getValueOptions) {
771
783
if (getValueOptions .export () != null ) {
772
784
builder .query ("export" , String .valueOf (getValueOptions .export ()));
773
785
}
786
+ if (getValueOptions .includeAudit () != null ) {
787
+ builder .query ("include_audit" , String .valueOf (getValueOptions .includeAudit ()));
788
+ }
774
789
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (ValueExport .class ));
775
790
}
776
791
@@ -802,6 +817,9 @@ public ServiceCall<ValueCollection> listValues(ListValuesOptions listValuesOptio
802
817
if (listValuesOptions .cursor () != null ) {
803
818
builder .query ("cursor" , listValuesOptions .cursor ());
804
819
}
820
+ if (listValuesOptions .includeAudit () != null ) {
821
+ builder .query ("include_audit" , String .valueOf (listValuesOptions .includeAudit ()));
822
+ }
805
823
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (ValueCollection .class ));
806
824
}
807
825
@@ -888,6 +906,9 @@ public ServiceCall<Synonym> getSynonym(GetSynonymOptions getSynonymOptions) {
888
906
getSynonymOptions .workspaceId (), getSynonymOptions .entity (), getSynonymOptions .value (), getSynonymOptions
889
907
.synonym ()));
890
908
builder .query (VERSION , versionDate );
909
+ if (getSynonymOptions .includeAudit () != null ) {
910
+ builder .query ("include_audit" , String .valueOf (getSynonymOptions .includeAudit ()));
911
+ }
891
912
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (Synonym .class ));
892
913
}
893
914
@@ -916,6 +937,9 @@ public ServiceCall<SynonymCollection> listSynonyms(ListSynonymsOptions listSynon
916
937
if (listSynonymsOptions .cursor () != null ) {
917
938
builder .query ("cursor" , listSynonymsOptions .cursor ());
918
939
}
940
+ if (listSynonymsOptions .includeAudit () != null ) {
941
+ builder .query ("include_audit" , String .valueOf (listSynonymsOptions .includeAudit ()));
942
+ }
919
943
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (SynonymCollection .class ));
920
944
}
921
945
@@ -1028,6 +1052,9 @@ public ServiceCall<DialogNode> getDialogNode(GetDialogNodeOptions getDialogNodeO
1028
1052
RequestBuilder builder = RequestBuilder .get (String .format ("/v1/workspaces/%s/dialog_nodes/%s" , getDialogNodeOptions
1029
1053
.workspaceId (), getDialogNodeOptions .dialogNode ()));
1030
1054
builder .query (VERSION , versionDate );
1055
+ if (getDialogNodeOptions .includeAudit () != null ) {
1056
+ builder .query ("include_audit" , String .valueOf (getDialogNodeOptions .includeAudit ()));
1057
+ }
1031
1058
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (DialogNode .class ));
1032
1059
}
1033
1060
@@ -1056,6 +1083,9 @@ public ServiceCall<DialogNodeCollection> listDialogNodes(ListDialogNodesOptions
1056
1083
if (listDialogNodesOptions .cursor () != null ) {
1057
1084
builder .query ("cursor" , listDialogNodesOptions .cursor ());
1058
1085
}
1086
+ if (listDialogNodesOptions .includeAudit () != null ) {
1087
+ builder .query ("include_audit" , String .valueOf (listDialogNodesOptions .includeAudit ()));
1088
+ }
1059
1089
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (DialogNodeCollection .class ));
1060
1090
}
1061
1091
@@ -1112,7 +1142,9 @@ public ServiceCall<DialogNode> updateDialogNode(UpdateDialogNodeOptions updateDi
1112
1142
if (updateDialogNodeOptions .newParent () != null ) {
1113
1143
contentJson .addProperty ("parent" , updateDialogNodeOptions .newParent ());
1114
1144
}
1115
- contentJson .addProperty ("dialog_node" , updateDialogNodeOptions .newDialogNode ());
1145
+ if (updateDialogNodeOptions .newDialogNode () != null ) {
1146
+ contentJson .addProperty ("dialog_node" , updateDialogNodeOptions .newDialogNode ());
1147
+ }
1116
1148
builder .bodyJson (contentJson );
1117
1149
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (DialogNode .class ));
1118
1150
}
@@ -1217,6 +1249,9 @@ public ServiceCall<Counterexample> getCounterexample(GetCounterexampleOptions ge
1217
1249
RequestBuilder builder = RequestBuilder .get (String .format ("/v1/workspaces/%s/counterexamples/%s" ,
1218
1250
getCounterexampleOptions .workspaceId (), getCounterexampleOptions .text ()));
1219
1251
builder .query (VERSION , versionDate );
1252
+ if (getCounterexampleOptions .includeAudit () != null ) {
1253
+ builder .query ("include_audit" , String .valueOf (getCounterexampleOptions .includeAudit ()));
1254
+ }
1220
1255
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (Counterexample .class ));
1221
1256
}
1222
1257
@@ -1246,6 +1281,9 @@ public ServiceCall<CounterexampleCollection> listCounterexamples(
1246
1281
if (listCounterexamplesOptions .cursor () != null ) {
1247
1282
builder .query ("cursor" , listCounterexamplesOptions .cursor ());
1248
1283
}
1284
+ if (listCounterexamplesOptions .includeAudit () != null ) {
1285
+ builder .query ("include_audit" , String .valueOf (listCounterexamplesOptions .includeAudit ()));
1286
+ }
1249
1287
return createServiceCall (builder .build (), ResponseConverterUtils .getObject (CounterexampleCollection .class ));
1250
1288
}
1251
1289
0 commit comments