Skip to content

Commit

Permalink
feat(assistant-v2): generated using api-def: master & generator: 3.46.0
Browse files Browse the repository at this point in the history
MessageContext: integrations property added, MessageContextGlobalSystem: skipUserInput property
added, MessageContextStateless: integrations property added, MessageInput: attachments property
added, MessageInputStateless: attachments property added, MessageOutputDebug: BREAKING nodesVisited
type DialogNodesVisited changed to DialogNodeVisited, RuntimeEntity: BREAKING optional metadata
property removed, RuntimeResponseGeneric: Three new response types added

BREAKING CHANGE: MessageOutputDebug: BREAKING nodesVisited type DialogNodesVisited changed to
DialogNodeVisited, RuntimeEntity: BREAKING optional metadata property removed
  • Loading branch information
kevinkowa committed Mar 15, 2022
1 parent dc7f6a4 commit 4fdfb2f
Show file tree
Hide file tree
Showing 17 changed files with 405 additions and 64 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025
* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428
*/

package com.ibm.watson.assistant.v2;
Expand Down Expand Up @@ -54,7 +54,7 @@
*/
public class Assistant extends BaseService {

public static final String DEFAULT_SERVICE_NAME = "assistant";
public static final String DEFAULT_SERVICE_NAME = "conversation";

public static final String DEFAULT_SERVICE_URL =
"https://api.us-south.assistant.watson.cloud.ibm.com";
Expand All @@ -66,7 +66,7 @@ public class Assistant extends BaseService {
* the client instance.
*
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
* format. The current version is `2021-06-14`.
* format. The current version is `2021-11-27`.
*/
public Assistant(String version) {
this(
Expand All @@ -80,7 +80,7 @@ public Assistant(String version) {
* authenticator are used to configure the client instance.
*
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
* format. The current version is `2021-06-14`.
* format. The current version is `2021-11-27`.
* @param authenticator the {@link Authenticator} instance to be configured for this client
*/
public Assistant(String version, Authenticator authenticator) {
Expand All @@ -92,7 +92,7 @@ public Assistant(String version, Authenticator authenticator) {
* configure the client instance.
*
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
* format. The current version is `2021-06-14`.
* format. The current version is `2021-11-27`.
* @param serviceName the service name to be used when configuring the client instance
*/
public Assistant(String version, String serviceName) {
Expand All @@ -104,7 +104,7 @@ public Assistant(String version, String serviceName) {
* are used to configure the client instance.
*
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
* format. The current version is `2021-06-14`.
* format. The current version is `2021-11-27`.
* @param serviceName the service name to be used when configuring the client instance
* @param authenticator the {@link Authenticator} instance to be configured for this client
*/
Expand All @@ -119,7 +119,7 @@ public Assistant(String version, String serviceName, Authenticator authenticator
* Gets the version.
*
* <p>Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The
* current version is `2021-06-14`.
* current version is `2021-11-27`.
*
* @return the version
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -15,8 +15,11 @@
import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/** DialogNodesVisited. */
public class DialogNodesVisited extends GenericModel {
/**
* An objects containing detailed diagnostic information about a dialog node that was triggered
* during processing of the input message.
*/
public class DialogNodeVisited extends GenericModel {

@SerializedName("dialog_node")
protected String dialogNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -20,15 +20,18 @@ public class MessageContext extends GenericModel {

protected MessageContextGlobal global;
protected Map<String, MessageContextSkill> skills;
protected Map<String, Object> integrations;

/** Builder. */
public static class Builder {
private MessageContextGlobal global;
private Map<String, MessageContextSkill> skills;
private Map<String, Object> integrations;

private Builder(MessageContext messageContext) {
this.global = messageContext.global;
this.skills = messageContext.skills;
this.integrations = messageContext.integrations;
}

/** Instantiates a new builder. */
Expand Down Expand Up @@ -64,11 +67,23 @@ public Builder skills(Map<String, MessageContextSkill> skills) {
this.skills = skills;
return this;
}

/**
* Set the integrations.
*
* @param integrations the integrations
* @return the MessageContext builder
*/
public Builder integrations(Map<String, Object> integrations) {
this.integrations = integrations;
return this;
}
}

protected MessageContext(Builder builder) {
global = builder.global;
skills = builder.skills;
integrations = builder.integrations;
}

/**
Expand All @@ -83,7 +98,7 @@ public Builder newBuilder() {
/**
* Gets the global.
*
* <p>Session context data that is shared by all skills used by the Assistant.
* <p>Session context data that is shared by all skills used by the assistant.
*
* @return the global
*/
Expand All @@ -104,4 +119,17 @@ public MessageContextGlobal global() {
public Map<String, MessageContextSkill> skills() {
return skills;
}

/**
* Gets the integrations.
*
* <p>An object containing context data that is specific to particular integrations. For more
* information, see the
* [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
*
* @return the integrations
*/
public Map<String, Object> integrations() {
return integrations;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -15,7 +15,7 @@
import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/** Session context data that is shared by all skills used by the Assistant. */
/** Session context data that is shared by all skills used by the assistant. */
public class MessageContextGlobal extends GenericModel {

protected MessageContextGlobalSystem system;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -15,7 +15,7 @@
import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/** Session context data that is shared by all skills used by the Assistant. */
/** Session context data that is shared by all skills used by the assistant. */
public class MessageContextGlobalStateless extends GenericModel {

protected MessageContextGlobalSystem system;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2021.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -77,6 +77,9 @@ public interface Locale {

protected String state;

@SerializedName("skip_user_input")
protected Boolean skipUserInput;

/** Builder. */
public static class Builder {
private String timezone;
Expand All @@ -86,6 +89,7 @@ public static class Builder {
private String referenceTime;
private String sessionStartTime;
private String state;
private Boolean skipUserInput;

private Builder(MessageContextGlobalSystem messageContextGlobalSystem) {
this.timezone = messageContextGlobalSystem.timezone;
Expand All @@ -95,6 +99,7 @@ private Builder(MessageContextGlobalSystem messageContextGlobalSystem) {
this.referenceTime = messageContextGlobalSystem.referenceTime;
this.sessionStartTime = messageContextGlobalSystem.sessionStartTime;
this.state = messageContextGlobalSystem.state;
this.skipUserInput = messageContextGlobalSystem.skipUserInput;
}

/** Instantiates a new builder. */
Expand Down Expand Up @@ -185,6 +190,17 @@ public Builder state(String state) {
this.state = state;
return this;
}

/**
* Set the skipUserInput.
*
* @param skipUserInput the skipUserInput
* @return the MessageContextGlobalSystem builder
*/
public Builder skipUserInput(Boolean skipUserInput) {
this.skipUserInput = skipUserInput;
return this;
}
}

protected MessageContextGlobalSystem(Builder builder) {
Expand All @@ -195,6 +211,7 @@ protected MessageContextGlobalSystem(Builder builder) {
referenceTime = builder.referenceTime;
sessionStartTime = builder.sessionStartTime;
state = builder.state;
skipUserInput = builder.skipUserInput;
}

/**
Expand Down Expand Up @@ -316,4 +333,15 @@ public String sessionStartTime() {
public String state() {
return state;
}

/**
* Gets the skipUserInput.
*
* <p>For internal use only.
*
* @return the skipUserInput
*/
public Boolean skipUserInput() {
return skipUserInput;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2019, 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -17,7 +17,7 @@
import java.util.Map;

/**
* Contains information specific to a particular skill used by the Assistant. The property name must
* Contains information specific to a particular skill used by the assistant. The property name must
* be the same as the name of the skill (for example, `main skill`).
*/
public class MessageContextSkill extends GenericModel {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020.
* (C) Copyright IBM Corp. 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -20,15 +20,18 @@ public class MessageContextStateless extends GenericModel {

protected MessageContextGlobalStateless global;
protected Map<String, MessageContextSkill> skills;
protected Map<String, Object> integrations;

/** Builder. */
public static class Builder {
private MessageContextGlobalStateless global;
private Map<String, MessageContextSkill> skills;
private Map<String, Object> integrations;

private Builder(MessageContextStateless messageContextStateless) {
this.global = messageContextStateless.global;
this.skills = messageContextStateless.skills;
this.integrations = messageContextStateless.integrations;
}

/** Instantiates a new builder. */
Expand Down Expand Up @@ -64,11 +67,23 @@ public Builder skills(Map<String, MessageContextSkill> skills) {
this.skills = skills;
return this;
}

/**
* Set the integrations.
*
* @param integrations the integrations
* @return the MessageContextStateless builder
*/
public Builder integrations(Map<String, Object> integrations) {
this.integrations = integrations;
return this;
}
}

protected MessageContextStateless(Builder builder) {
global = builder.global;
skills = builder.skills;
integrations = builder.integrations;
}

/**
Expand All @@ -83,7 +98,7 @@ public Builder newBuilder() {
/**
* Gets the global.
*
* <p>Session context data that is shared by all skills used by the Assistant.
* <p>Session context data that is shared by all skills used by the assistant.
*
* @return the global
*/
Expand All @@ -104,4 +119,17 @@ public MessageContextGlobalStateless global() {
public Map<String, MessageContextSkill> skills() {
return skills;
}

/**
* Gets the integrations.
*
* <p>An object containing context data that is specific to particular integrations. For more
* information, see the
* [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
*
* @return the integrations
*/
public Map<String, Object> integrations() {
return integrations;
}
}
Loading

0 comments on commit 4fdfb2f

Please sign in to comment.