1
1
/*
2
- * (C) Copyright IBM Corp. 2019, 2023 .
2
+ * (C) Copyright IBM Corp. 2024 .
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5
5
* the License. You may obtain a copy of the License at
12
12
*/
13
13
14
14
/*
15
- * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647
15
+ * IBM OpenAPI SDK Code Generator Version: 3.85.0-75c38f8f-20240206-210220
16
16
*/
17
17
18
18
package com .ibm .watson .assistant .v2 ;
68
68
import java .util .Map .Entry ;
69
69
70
70
/**
71
- * The IBM Watson ™ Assistant service combines machine learning, natural language
71
+ * The IBM® watsonx ™ Assistant service combines machine learning, natural language
72
72
* understanding, and an integrated dialog editor to create conversation flows between your apps and
73
73
* your users.
74
74
*
75
75
* <p>The Assistant v2 API provides runtime methods your client application can use to send user
76
76
* input to an assistant and receive a response.
77
77
*
78
+ * <p>You need a paid Plus plan or higher to use the watsonx Assistant v2 API.
79
+ *
78
80
* <p>API Version: 2.0 See: https://cloud.ibm.com/docs/assistant
79
81
*/
80
82
public class Assistant extends BaseService {
@@ -93,7 +95,7 @@ public class Assistant extends BaseService {
93
95
* the client instance.
94
96
*
95
97
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
96
- * format. The current version is `2021-11-27 `.
98
+ * format. The current version is `2023-06-15 `.
97
99
*/
98
100
public Assistant (String version ) {
99
101
this (
@@ -107,7 +109,7 @@ public Assistant(String version) {
107
109
* authenticator are used to configure the client instance.
108
110
*
109
111
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
110
- * format. The current version is `2021-11-27 `.
112
+ * format. The current version is `2023-06-15 `.
111
113
* @param authenticator the {@link Authenticator} instance to be configured for this client
112
114
*/
113
115
public Assistant (String version , Authenticator authenticator ) {
@@ -119,7 +121,7 @@ public Assistant(String version, Authenticator authenticator) {
119
121
* configure the client instance.
120
122
*
121
123
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
122
- * format. The current version is `2021-11-27 `.
124
+ * format. The current version is `2023-06-15 `.
123
125
* @param serviceName the service name to be used when configuring the client instance
124
126
*/
125
127
public Assistant (String version , String serviceName ) {
@@ -131,7 +133,7 @@ public Assistant(String version, String serviceName) {
131
133
* are used to configure the client instance.
132
134
*
133
135
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
134
- * format. The current version is `2021-11-27 `.
136
+ * format. The current version is `2023-06-15 `.
135
137
* @param serviceName the service name to be used when configuring the client instance
136
138
* @param authenticator the {@link Authenticator} instance to be configured for this client
137
139
*/
@@ -146,7 +148,7 @@ public Assistant(String version, String serviceName, Authenticator authenticator
146
148
* Gets the version.
147
149
*
148
150
* <p>Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The
149
- * current version is `2021-11-27 `.
151
+ * current version is `2023-06-15 `.
150
152
*
151
153
* @return the version
152
154
*/
@@ -169,8 +171,6 @@ public void setVersion(final String version) {
169
171
*
170
172
* <p>Create a new assistant.
171
173
*
172
- * <p>This method is available only with Enterprise plans.
173
- *
174
174
* @param createAssistantOptions the {@link CreateAssistantOptions} containing the options for the
175
175
* call
176
176
* @return a {@link ServiceCall} with a result of type {@link AssistantData}
@@ -214,8 +214,6 @@ public ServiceCall<AssistantData> createAssistant(CreateAssistantOptions createA
214
214
*
215
215
* <p>Create a new assistant.
216
216
*
217
- * <p>This method is available only with Enterprise plans.
218
- *
219
217
* @return a {@link ServiceCall} with a result of type {@link AssistantData}
220
218
*/
221
219
public ServiceCall <AssistantData > createAssistant () {
@@ -225,9 +223,7 @@ public ServiceCall<AssistantData> createAssistant() {
225
223
/**
226
224
* List assistants.
227
225
*
228
- * <p>List the assistants associated with a Watson Assistant service instance.
229
- *
230
- * <p>This method is available only with Enterprise plans.
226
+ * <p>List the assistants associated with a watsonx Assistant service instance.
231
227
*
232
228
* @param listAssistantsOptions the {@link ListAssistantsOptions} containing the options for the
233
229
* call
@@ -271,9 +267,7 @@ public ServiceCall<AssistantCollection> listAssistants(
271
267
/**
272
268
* List assistants.
273
269
*
274
- * <p>List the assistants associated with a Watson Assistant service instance.
275
- *
276
- * <p>This method is available only with Enterprise plans.
270
+ * <p>List the assistants associated with a watsonx Assistant service instance.
277
271
*
278
272
* @return a {@link ServiceCall} with a result of type {@link AssistantCollection}
279
273
*/
@@ -286,8 +280,6 @@ public ServiceCall<AssistantCollection> listAssistants() {
286
280
*
287
281
* <p>Delete an assistant.
288
282
*
289
- * <p>This method is available only with Enterprise plans.
290
- *
291
283
* @param deleteAssistantOptions the {@link DeleteAssistantOptions} containing the options for the
292
284
* call
293
285
* @return a {@link ServiceCall} with a void result
@@ -318,7 +310,7 @@ public ServiceCall<Void> deleteAssistant(DeleteAssistantOptions deleteAssistantO
318
310
* <p>Create a new session. A session is used to send user input to a skill and receive responses.
319
311
* It also maintains the state of the conversation. A session persists until it is deleted, or
320
312
* until it times out because of inactivity. (For more information, see the
321
- * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings).
313
+ * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant-settings).).
322
314
*
323
315
* @param createSessionOptions the {@link CreateSessionOptions} containing the options for the
324
316
* call
@@ -390,7 +382,7 @@ public ServiceCall<Void> deleteSession(DeleteSessionOptions deleteSessionOptions
390
382
* Send user input to assistant (stateful).
391
383
*
392
384
* <p>Send user input to an assistant and receive a response, with conversation state (including
393
- * context data) stored by Watson Assistant for the duration of the session.
385
+ * context data) stored by watsonx Assistant for the duration of the session.
394
386
*
395
387
* @param messageOptions the {@link MessageOptions} containing the options for the call
396
388
* @return a {@link ServiceCall} with a result of type {@link MessageResponse}
@@ -527,7 +519,7 @@ public ServiceCall<BulkClassifyResponse> bulkClassify(BulkClassifyOptions bulkCl
527
519
*
528
520
* <p>List the events from the log of an assistant.
529
521
*
530
- * <p>This method requires Manager access, and is available only with Plus and Enterprise plans .
522
+ * <p>This method requires Manager access.
531
523
*
532
524
* <p>**Note:** If you use the **cursor** parameter to retrieve results one page at a time,
533
525
* subsequent requests must be no more than 5 minutes apart. Any returned value for the **cursor**
@@ -583,7 +575,7 @@ public ServiceCall<LogCollection> listLogs(ListLogsOptions listLogsOptions) {
583
575
*
584
576
* <p>**Note:** This operation is intended only for deleting data associated with a single
585
577
* specific customer, not for deleting data associated with multiple customers or for any other
586
- * purpose. For more information, see [Labeling and deleting data in Watson
578
+ * purpose. For more information, see [Labeling and deleting data in watsonx
587
579
* Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security-gdpr-wa).
588
580
*
589
581
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
@@ -612,8 +604,6 @@ public ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOpti
612
604
*
613
605
* <p>List the environments associated with an assistant.
614
606
*
615
- * <p>This method is available only with Enterprise plans.
616
- *
617
607
* @param listEnvironmentsOptions the {@link ListEnvironmentsOptions} containing the options for
618
608
* the call
619
609
* @return a {@link ServiceCall} with a result of type {@link EnvironmentCollection}
@@ -662,8 +652,6 @@ public ServiceCall<EnvironmentCollection> listEnvironments(
662
652
* <p>Get information about an environment. For more information about environments, see
663
653
* [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments).
664
654
*
665
- * <p>This method is available only with Enterprise plans.
666
- *
667
655
* @param getEnvironmentOptions the {@link GetEnvironmentOptions} containing the options for the
668
656
* call
669
657
* @return a {@link ServiceCall} with a result of type {@link Environment}
@@ -703,8 +691,6 @@ public ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironm
703
691
* see
704
692
* [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overview#environments).
705
693
*
706
- * <p>This method is available only with Enterprise plans.
707
- *
708
694
* @param updateEnvironmentOptions the {@link UpdateEnvironmentOptions} containing the options for
709
695
* the call
710
696
* @return a {@link ServiceCall} with a result of type {@link Environment}
@@ -736,6 +722,12 @@ public ServiceCall<Environment> updateEnvironment(
736
722
if (updateEnvironmentOptions .description () != null ) {
737
723
contentJson .addProperty ("description" , updateEnvironmentOptions .description ());
738
724
}
725
+ if (updateEnvironmentOptions .orchestration () != null ) {
726
+ contentJson .add (
727
+ "orchestration" ,
728
+ com .ibm .cloud .sdk .core .util .GsonSingleton .getGson ()
729
+ .toJsonTree (updateEnvironmentOptions .orchestration ()));
730
+ }
739
731
if (updateEnvironmentOptions .sessionTimeout () != null ) {
740
732
contentJson .addProperty ("session_timeout" , updateEnvironmentOptions .sessionTimeout ());
741
733
}
@@ -756,9 +748,7 @@ public ServiceCall<Environment> updateEnvironment(
756
748
* Create release.
757
749
*
758
750
* <p>Create a new release using the current content of the dialog and action skills in the draft
759
- * environment. (In the Watson Assistant user interface, a release is called a *version*.)
760
- *
761
- * <p>This method is available only with Enterprise plans.
751
+ * environment. (In the watsonx Assistant user interface, a release is called a *version*.).
762
752
*
763
753
* @param createReleaseOptions the {@link CreateReleaseOptions} containing the options for the
764
754
* call
@@ -793,10 +783,8 @@ public ServiceCall<Release> createRelease(CreateReleaseOptions createReleaseOpti
793
783
/**
794
784
* List releases.
795
785
*
796
- * <p>List the releases associated with an assistant. (In the Watson Assistant user interface, a
797
- * release is called a *version*.)
798
- *
799
- * <p>This method is available only with Enterprise plans.
786
+ * <p>List the releases associated with an assistant. (In the watsonx Assistant user interface, a
787
+ * release is called a *version*.).
800
788
*
801
789
* @param listReleasesOptions the {@link ListReleasesOptions} containing the options for the call
802
790
* @return a {@link ServiceCall} with a result of type {@link ReleaseCollection}
@@ -847,8 +835,6 @@ public ServiceCall<ReleaseCollection> listReleases(ListReleasesOptions listRelea
847
835
* value of the **status** property. When processing has completed, the request returns the
848
836
* release data.
849
837
*
850
- * <p>This method is available only with Enterprise plans.
851
- *
852
838
* @param getReleaseOptions the {@link GetReleaseOptions} containing the options for the call
853
839
* @return a {@link ServiceCall} with a result of type {@link Release}
854
840
*/
@@ -882,9 +868,8 @@ public ServiceCall<Release> getRelease(GetReleaseOptions getReleaseOptions) {
882
868
/**
883
869
* Delete release.
884
870
*
885
- * <p>Delete a release. (In the Watson Assistant user interface, a release is called a *version*.)
886
- *
887
- * <p>This method is available only with Enterprise plans.
871
+ * <p>Delete a release. (In the watsonx Assistant user interface, a release is called a
872
+ * *version*.).
888
873
*
889
874
* @param deleteReleaseOptions the {@link DeleteReleaseOptions} containing the options for the
890
875
* call
@@ -918,8 +903,6 @@ public ServiceCall<Void> deleteRelease(DeleteReleaseOptions deleteReleaseOptions
918
903
* <p>Update the environment with the content of the release. All snapshots saved as part of the
919
904
* release become active in the environment.
920
905
*
921
- * <p>This method is available only with Enterprise plans.
922
- *
923
906
* @param deployReleaseOptions the {@link DeployReleaseOptions} containing the options for the
924
907
* call
925
908
* @return a {@link ServiceCall} with a result of type {@link Environment}
@@ -959,8 +942,6 @@ public ServiceCall<Environment> deployRelease(DeployReleaseOptions deployRelease
959
942
*
960
943
* <p>Get information about a skill.
961
944
*
962
- * <p>This method is available only with Enterprise plans.
963
- *
964
945
* @param getSkillOptions the {@link GetSkillOptions} containing the options for the call
965
946
* @return a {@link ServiceCall} with a result of type {@link Skill}
966
947
*/
@@ -994,8 +975,6 @@ public ServiceCall<Skill> getSkill(GetSkillOptions getSkillOptions) {
994
975
* <p>**Note:** The update is performed asynchronously; you can see the status of the update by
995
976
* calling the **Get skill** method and checking the value of the **status** property.
996
977
*
997
- * <p>This method is available only with Enterprise plans.
998
- *
999
978
* @param updateSkillOptions the {@link UpdateSkillOptions} containing the options for the call
1000
979
* @return a {@link ServiceCall} with a result of type {@link Skill}
1001
980
*/
@@ -1066,8 +1045,6 @@ public ServiceCall<Skill> updateSkill(UpdateSkillOptions updateSkillOptions) {
1066
1045
* <p>When processing has completed, the request returns the exported JSON data. Remember that the
1067
1046
* usual rate limits apply.
1068
1047
*
1069
- * <p>This method is available only with Enterprise plans.
1070
- *
1071
1048
* @param exportSkillsOptions the {@link ExportSkillsOptions} containing the options for the call
1072
1049
* @return a {@link ServiceCall} with a result of type {@link SkillsExport}
1073
1050
*/
@@ -1107,8 +1084,6 @@ public ServiceCall<SkillsExport> exportSkills(ExportSkillsOptions exportSkillsOp
1107
1084
* belonging to the assistant are not available until processing completes. To check the status of
1108
1085
* the asynchronous import operation, use the **Get status of skills import** method.
1109
1086
*
1110
- * <p>This method is available only with Enterprise plans.
1111
- *
1112
1087
* @param importSkillsOptions the {@link ImportSkillsOptions} containing the options for the call
1113
1088
* @return a {@link ServiceCall} with a result of type {@link SkillsAsyncRequestStatus}
1114
1089
*/
@@ -1153,8 +1128,6 @@ public ServiceCall<SkillsAsyncRequestStatus> importSkills(
1153
1128
* <p>Retrieve the status of an asynchronous import operation previously initiated by using the
1154
1129
* **Import skills** method.
1155
1130
*
1156
- * <p>This method is available only with Enterprise plans.
1157
- *
1158
1131
* @param importSkillsStatusOptions the {@link ImportSkillsStatusOptions} containing the options
1159
1132
* for the call
1160
1133
* @return a {@link ServiceCall} with a result of type {@link SkillsAsyncRequestStatus}
0 commit comments