Skip to content

Commit d2aebb9

Browse files
jeff-arnapaparazzi0329
authored andcommitted
feat(assistantv1): update based on api definitions
this makes breaking model updates to public interfaces BREAKING CHANGE: public interface 'Model' in 'WorkspaceSystemSettingsNlp' has been removed
1 parent 8b5a82e commit d2aebb9

File tree

145 files changed

+918
-1017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+918
-1017
lines changed

assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508
15+
* IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647
1616
*/
1717

1818
package com.ibm.watson.assistant.v1;
@@ -82,7 +82,6 @@
8282
import com.ibm.watson.assistant.v1.model.Synonym;
8383
import com.ibm.watson.assistant.v1.model.SynonymCollection;
8484
import com.ibm.watson.assistant.v1.model.UpdateCounterexampleOptions;
85-
import com.ibm.watson.assistant.v1.model.UpdateDialogNodeNullableOptions;
8685
import com.ibm.watson.assistant.v1.model.UpdateDialogNodeOptions;
8786
import com.ibm.watson.assistant.v1.model.UpdateEntityOptions;
8887
import com.ibm.watson.assistant.v1.model.UpdateExampleOptions;
@@ -112,8 +111,10 @@
112111
*/
113112
public class Assistant extends BaseService {
114113

115-
public static final String DEFAULT_SERVICE_NAME = "assistant";
114+
/** Default service name used when configuring the `Assistant` client. */
115+
public static final String DEFAULT_SERVICE_NAME = "conversation";
116116

117+
/** Default service endpoint URL. */
117118
public static final String DEFAULT_SERVICE_URL =
118119
"https://api.us-south.assistant.watson.cloud.ibm.com";
119120

@@ -2558,52 +2559,6 @@ public ServiceCall<DialogNode> updateDialogNode(UpdateDialogNodeOptions updateDi
25582559
return createServiceCall(builder.build(), responseConverter);
25592560
}
25602561

2561-
/**
2562-
* Update dialog node.
2563-
*
2564-
* <p>Update an existing dialog node with new or modified data.
2565-
*
2566-
* <p>If you want to update multiple dialog nodes with a single API call, consider using the
2567-
* **[Update workspace](#update-workspace)** method instead.
2568-
*
2569-
* @param UpdateDialogNodeNullableOptions the {@link UpdateDialogNodeNullableOptions} containing
2570-
* the options for the call
2571-
* @return a {@link ServiceCall} with a result of type {@link DialogNode}
2572-
*/
2573-
public ServiceCall<DialogNode> updateDialogNodeNullable(
2574-
UpdateDialogNodeNullableOptions UpdateDialogNodeNullableOptions) {
2575-
com.ibm.cloud.sdk.core.util.Validator.notNull(
2576-
UpdateDialogNodeNullableOptions, "UpdateDialogNodeNullableOptions cannot be null");
2577-
Map<String, String> pathParamsMap = new HashMap<String, String>();
2578-
pathParamsMap.put("workspace_id", UpdateDialogNodeNullableOptions.workspaceId());
2579-
pathParamsMap.put("dialog_node", UpdateDialogNodeNullableOptions.dialogNode());
2580-
RequestBuilder builder =
2581-
RequestBuilder.post(
2582-
RequestBuilder.resolveRequestUrl(
2583-
getServiceUrl(),
2584-
"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",
2585-
pathParamsMap));
2586-
Map<String, String> sdkHeaders =
2587-
SdkCommon.getSdkHeaders("conversation", "v1", "testUpdateDialogNode");
2588-
for (Entry<String, String> header : sdkHeaders.entrySet()) {
2589-
builder.header(header.getKey(), header.getValue());
2590-
}
2591-
builder.header("Accept", "application/json");
2592-
builder.query("version", String.valueOf(this.version));
2593-
if (UpdateDialogNodeNullableOptions.includeAudit() != null) {
2594-
builder.query(
2595-
"include_audit", String.valueOf(UpdateDialogNodeNullableOptions.includeAudit()));
2596-
}
2597-
builder.bodyContent(
2598-
com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls()
2599-
.toJson(UpdateDialogNodeNullableOptions.body()),
2600-
"application/json");
2601-
ResponseConverter<DialogNode> responseConverter =
2602-
ResponseConverterUtils.getValue(
2603-
new com.google.gson.reflect.TypeToken<DialogNode>() {}.getType());
2604-
return createServiceCall(builder.build(), responseConverter);
2605-
}
2606-
26072562
/**
26082563
* Delete dialog node.
26092564
*

assistant/src/main/java/com/ibm/watson/assistant/v1/model/AgentAvailabilityMessage.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class AgentAvailabilityMessage extends GenericModel {
2323
public static class Builder {
2424
private String message;
2525

26+
/**
27+
* Instantiates a new Builder from an existing AgentAvailabilityMessage instance.
28+
*
29+
* @param agentAvailabilityMessage the instance to initialize the Builder with
30+
*/
2631
private Builder(AgentAvailabilityMessage agentAvailabilityMessage) {
2732
this.message = agentAvailabilityMessage.message;
2833
}

assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -27,6 +27,11 @@ public static class Builder {
2727
private String workspaceId;
2828
private List<BulkClassifyUtterance> input;
2929

30+
/**
31+
* Instantiates a new Builder from an existing BulkClassifyOptions instance.
32+
*
33+
* @param bulkClassifyOptions the instance to initialize the Builder with
34+
*/
3035
private Builder(BulkClassifyOptions bulkClassifyOptions) {
3136
this.workspaceId = bulkClassifyOptions.workspaceId;
3237
this.input = bulkClassifyOptions.input;

assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyOutput.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -22,6 +22,8 @@ public class BulkClassifyOutput extends GenericModel {
2222
protected List<RuntimeEntity> entities;
2323
protected List<RuntimeIntent> intents;
2424

25+
protected BulkClassifyOutput() {}
26+
2527
/**
2628
* Gets the input.
2729
*

assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyResponse.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -20,6 +20,8 @@ public class BulkClassifyResponse extends GenericModel {
2020

2121
protected List<BulkClassifyOutput> output;
2222

23+
protected BulkClassifyResponse() {}
24+
2325
/**
2426
* Gets the output.
2527
*

assistant/src/main/java/com/ibm/watson/assistant/v1/model/BulkClassifyUtterance.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class BulkClassifyUtterance extends GenericModel {
2323
public static class Builder {
2424
private String text;
2525

26+
/**
27+
* Instantiates a new Builder from an existing BulkClassifyUtterance instance.
28+
*
29+
* @param bulkClassifyUtterance the instance to initialize the Builder with
30+
*/
2631
private Builder(BulkClassifyUtterance bulkClassifyUtterance) {
2732
this.text = bulkClassifyUtterance.text;
2833
}

assistant/src/main/java/com/ibm/watson/assistant/v1/model/CaptureGroup.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2018, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -27,6 +27,11 @@ public static class Builder {
2727
private String group;
2828
private List<Long> location;
2929

30+
/**
31+
* Instantiates a new Builder from an existing CaptureGroup instance.
32+
*
33+
* @param captureGroup the instance to initialize the Builder with
34+
*/
3035
private Builder(CaptureGroup captureGroup) {
3136
this.group = captureGroup.group;
3237
this.location = captureGroup.location;

assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferInfo.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2021, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class ChannelTransferInfo extends GenericModel {
2323
public static class Builder {
2424
private ChannelTransferTarget target;
2525

26+
/**
27+
* Instantiates a new Builder from an existing ChannelTransferInfo instance.
28+
*
29+
* @param channelTransferInfo the instance to initialize the Builder with
30+
*/
2631
private Builder(ChannelTransferInfo channelTransferInfo) {
2732
this.target = channelTransferInfo.target;
2833
}

assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTarget.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2021, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -27,6 +27,11 @@ public class ChannelTransferTarget extends GenericModel {
2727
public static class Builder {
2828
private ChannelTransferTargetChat chat;
2929

30+
/**
31+
* Instantiates a new Builder from an existing ChannelTransferTarget instance.
32+
*
33+
* @param channelTransferTarget the instance to initialize the Builder with
34+
*/
3035
private Builder(ChannelTransferTarget channelTransferTarget) {
3136
this.chat = channelTransferTarget.chat;
3237
}

assistant/src/main/java/com/ibm/watson/assistant/v1/model/ChannelTransferTargetChat.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2021, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class ChannelTransferTargetChat extends GenericModel {
2323
public static class Builder {
2424
private String url;
2525

26+
/**
27+
* Instantiates a new Builder from an existing ChannelTransferTargetChat instance.
28+
*
29+
* @param channelTransferTargetChat the instance to initialize the Builder with
30+
*/
2631
private Builder(ChannelTransferTargetChat channelTransferTargetChat) {
2732
this.url = channelTransferTargetChat.url;
2833
}

0 commit comments

Comments
 (0)