com.smartgwt.client.ai

## Class AIMessage

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.ai.AIMessage

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers
  Direct Known Subclasses:
    AIMessageWithSource

      public class AIMessage
      extends DataClass

  An individual message in the list of `AIRequest.messages` of an AI request.

- - ### Field Summary

    - ### 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 and Description
    `AIMessage()`
    `AIMessage(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getContent()` The data for the message.
    `static AIMessage` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `AIContentType` | `getType()` The type of data.
    `AIMessage` | `setContent(java.lang.Object content)` The data for the message.
    `AIMessage` | `setType(AIContentType type)` The type of data.

    - ### 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 Detail

    - #### AIMessage

          public AIMessage()

    - #### AIMessage

          public AIMessage(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static AIMessage getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setContent

          public AIMessage setContent(java.lang.Object content)

      The data for the message. If the `type` of this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.
      Parameters:
        `content` - New content value. Default value is null
      Returns:
        `AIMessage` instance, for chaining setter calls

    - #### getContent

          public java.lang.Object getContent()

      The data for the message. If the `type` of this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.
      Returns:
        Current content value. Default value is null

    - #### setType

          public AIMessage setType(AIContentType type)

      The type of data.
      Parameters:
        `type` - New type value. Default value is "text"
      Returns:
        `AIMessage` instance, for chaining setter calls

    - #### getType

          public AIContentType getType()

      The type of data.
      Returns:
        Current type value. Default value is "text"