Skip to content

Commit e68a35e

Browse files
fix(wa-v2): add conversational_search_end turn event
1 parent b809449 commit e68a35e

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class MessageOutputDebugTurnEvent extends GenericModel {
4747
discriminatorMapping.put("callout", MessageOutputDebugTurnEventTurnEventCallout.class);
4848
discriminatorMapping.put("search", MessageOutputDebugTurnEventTurnEventSearch.class);
4949
discriminatorMapping.put("node_visited", MessageOutputDebugTurnEventTurnEventNodeVisited.class);
50+
discriminatorMapping.put("conversational_search_end", MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.class);
5051
}
5152
/** The type of condition (if any) that is defined for the action. */
5253
public interface ConditionType {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2025.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.watson.assistant.v2.model;
15+
16+
/** MessageOutputDebugTurnEventTurnEventActionVisited. */
17+
public class MessageOutputDebugTurnEventTurnEventConversationalSearchEnd extends MessageOutputDebugTurnEvent {
18+
19+
/** The type of condition (if any) that is defined for the action. */
20+
public interface ConditionType {
21+
/** user_defined. */
22+
String USER_DEFINED = "user_defined";
23+
/** welcome. */
24+
String WELCOME = "welcome";
25+
/** anything_else. */
26+
String ANYTHING_ELSE = "anything_else";
27+
}
28+
29+
protected TurnEventActionSource source;
30+
31+
protected MessageOutputDebugTurnEventTurnEventConversationalSearchEnd() {}
32+
33+
/**
34+
* Gets the source.
35+
*
36+
* @return the source
37+
*/
38+
public TurnEventActionSource getSource() {
39+
return source;
40+
}
41+
}
42+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2025.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.watson.assistant.v2.model;
15+
16+
import static org.testng.Assert.*;
17+
18+
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
19+
import com.ibm.watson.assistant.v2.utils.TestUtilities;
20+
import java.io.InputStream;
21+
import java.util.HashMap;
22+
import java.util.List;
23+
import org.testng.annotations.Test;
24+
25+
/** Unit test class for the MessageOutputDebugTurnEventTurnEventConversationalSearchEnd model. */
26+
public class MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest {
27+
final HashMap<String, InputStream> mockStreamMap = TestUtilities.createMockStreamMap();
28+
final List<FileWithMetadata> mockListFileWithMetadata =
29+
TestUtilities.creatMockListFileWithMetadata();
30+
31+
@Test
32+
public void testMessageOutputDebugTurnEventTurnEventConversationalSearchEnd() throws Throwable {
33+
MessageOutputDebugTurnEventTurnEventConversationalSearchEnd
34+
messageOutputDebugTurnEventTurnEventConversationalSearchEndModel =
35+
new MessageOutputDebugTurnEventTurnEventConversationalSearchEnd();
36+
assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getEvent());
37+
assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getSource());
38+
assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getConditionType());
39+
}
40+
}
41+

0 commit comments

Comments
 (0)