Package com.smartgwt.client.ai

# Class AIResponse

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.util.AsyncOperationResult
com.smartgwt.client.ai.AIResponse

All Implemented Interfaces:
  `HasHandlers`

public class AIResponse extends AsyncOperationResult
Represents a response from AI.

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.RefDataClass

  `id`

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AIResponse()`
  `AIResponse(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AIResponseErrorType`
  `getErrorType()`
  If the `type` is ERROR, the type of error that occurred, if known.
  `AIMessage`
  `getMessage()`
  The message returned from the AI service in response to the request.
  `static AIResponse`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `AIResponse`
  `setErrorType(AIResponseErrorType errorType)`
  If the `type` is ERROR, the type of error that occurred, if known.
  `AIResponse`
  `setMessage(AIMessage message)`
  The message returned from the AI service in response to the request.

  ### Methods inherited from class com.smartgwt.client.util.AsyncOperationResult

  `getCancellationReason, getDisabledMessage, getErrorMessage, getType, setCancellationReason, setDisabledMessage, setErrorMessage, setType`

  ### Methods inherited from class com.smartgwt.client.core.RefDataClass

  `getRef, getRef, internalSetID`

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AIResponse

    public AIResponse()

  - ### AIResponse

    public AIResponse(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static AIResponse getOrCreateRef(JavaScriptObject jsObj)

  - ### setErrorType

    public AIResponse setErrorType(AIResponseErrorType errorType)
    If the `type` is ERROR, the type of error that occurred, if known.
    Parameters:
      `errorType` - New errorType value. Default value is null
    Returns:
      `AIResponse` instance, for chaining setter calls

  - ### getErrorType

    public AIResponseErrorType getErrorType()
    If the `type` is ERROR, the type of error that occurred, if known.
    Returns:
      Current errorType value. Default value is null

  - ### setMessage

    public AIResponse setMessage(AIMessage message)
    The message returned from the AI service in response to the request.
    Parameters:
      `message` - New message value. Default value is null
    Returns:
      `AIResponse` instance, for chaining setter calls

  - ### getMessage

    public AIMessage getMessage()
    The message returned from the AI service in response to the request.
    Returns:
      Current message value. Default value is null