Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 43 additions & 46 deletions assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
public class CreateSessionOptions extends GenericModel {

protected String assistantId;
protected String environmentId;
protected RequestAnalytics analytics;

/** Builder. */
public static class Builder {
private String assistantId;
private String environmentId;
private RequestAnalytics analytics;

/**
Expand All @@ -33,6 +35,7 @@ public static class Builder {
*/
private Builder(CreateSessionOptions createSessionOptions) {
this.assistantId = createSessionOptions.assistantId;
this.environmentId = createSessionOptions.environmentId;
this.analytics = createSessionOptions.analytics;
}

Expand All @@ -43,9 +46,11 @@ public Builder() {}
* Instantiates a new builder with required properties.
*
* @param assistantId the assistantId
* @param environmentId the environmentId
*/
public Builder(String assistantId) {
public Builder(String assistantId, String environmentId) {
this.assistantId = assistantId;
this.environmentId = environmentId;
}

/**
Expand All @@ -68,6 +73,17 @@ public Builder assistantId(String assistantId) {
return this;
}

/**
* Set the environmentId.
*
* @param environmentId the environmentId
* @return the CreateSessionOptions builder
*/
public Builder environmentId(String environmentId) {
this.environmentId = environmentId;
return this;
}

/**
* Set the analytics.
*
Expand All @@ -85,7 +101,10 @@ protected CreateSessionOptions() {}
protected CreateSessionOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(
builder.assistantId, "assistantId cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notEmpty(
builder.environmentId, "environmentId cannot be empty");
assistantId = builder.assistantId;
environmentId = builder.environmentId;
analytics = builder.analytics;
}

Expand All @@ -101,30 +120,29 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
public String assistantId() {
return assistantId;
}

/**
* Gets the environmentId.
*
* <p>Unique identifier of the environment. To find the environment ID in the watsonx Assistant
* user interface, open the environment settings and click **API Details**. **Note:** Currently,
* the API does not support creating environments.
*
* @return the environmentId
*/
public String environmentId() {
return environmentId;
}

/**
* Gets the analytics.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
public class DeleteSessionOptions extends GenericModel {

protected String assistantId;
protected String environmentId;
protected String sessionId;

/** Builder. */
public static class Builder {
private String assistantId;
private String environmentId;
private String sessionId;

/**
Expand All @@ -33,6 +35,7 @@ public static class Builder {
*/
private Builder(DeleteSessionOptions deleteSessionOptions) {
this.assistantId = deleteSessionOptions.assistantId;
this.environmentId = deleteSessionOptions.environmentId;
this.sessionId = deleteSessionOptions.sessionId;
}

Expand All @@ -43,10 +46,12 @@ public Builder() {}
* Instantiates a new builder with required properties.
*
* @param assistantId the assistantId
* @param environmentId the environmentId
* @param sessionId the sessionId
*/
public Builder(String assistantId, String sessionId) {
public Builder(String assistantId, String environmentId, String sessionId) {
this.assistantId = assistantId;
this.environmentId = environmentId;
this.sessionId = sessionId;
}

Expand All @@ -70,6 +75,17 @@ public Builder assistantId(String assistantId) {
return this;
}

/**
* Set the environmentId.
*
* @param environmentId the environmentId
* @return the DeleteSessionOptions builder
*/
public Builder environmentId(String environmentId) {
this.environmentId = environmentId;
return this;
}

/**
* Set the sessionId.
*
Expand All @@ -87,8 +103,11 @@ protected DeleteSessionOptions() {}
protected DeleteSessionOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(
builder.assistantId, "assistantId cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notEmpty(
builder.environmentId, "environmentId cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.sessionId, "sessionId cannot be empty");
assistantId = builder.assistantId;
environmentId = builder.environmentId;
sessionId = builder.sessionId;
}

Expand All @@ -104,30 +123,29 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
public String assistantId() {
return assistantId;
}

/**
* Gets the environmentId.
*
* <p>Unique identifier of the environment. To find the environment ID in the watsonx Assistant
* user interface, open the environment settings and click **API Details**. **Note:** Currently,
* the API does not support creating environments.
*
* @return the environmentId
*/
public String environmentId() {
return environmentId;
}

/**
* Gets the sessionId.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,9 @@ public Builder newBuilder() {
/**
* Gets the assistantId.
*
* <p>The assistant ID or the environment ID of the environment where the assistant is deployed.
* Set the value for this ID depending on the type of request:
*
* <p>- For message, session, and log requests, specify the environment ID of the environment
* where the assistant is deployed.
*
* <p>- For all other requests, specify the assistant ID of the assistant.
*
* <p>To get the **assistant ID** and **environment ID** in the watsonx Assistant interface, open
* the **Assistant settings** page, and scroll to the **Assistant IDs and API details** section
* and click **View Details**.
*
* <p>**Note:** If you are using the classic Watson Assistant experience, always use the assistant
* ID.
*
* <p>To find the **assistant ID** in the user interface, open the **Assistant settings** and
* click **API Details**.
* <p>Unique identifier of the assistant. To get the **assistant ID** in the watsonx Assistant
* interface, open the **Assistant settings** page, and scroll to the **Assistant IDs and API
* details** section and click **View Details**.
*
* @return the assistantId
*/
Expand Down
Loading