Class UtteranceBotResponse

    • Method Detail

      • content

        public final String content()

        The text of the response to the utterance from the bot.

        Returns:
        The text of the response to the utterance from the bot.
      • contentType

        public final UtteranceContentType contentType()

        The type of the response. The following values are possible:

        • PlainText – A plain text string.

        • CustomPayload – A response string that you can customize to include data or metadata for your application.

        • SSML – A string that includes Speech Synthesis Markup Language to customize the audio response.

        • ImageResponseCard – An image with buttons that the customer can select. See ImageResponseCard for more information.

        If the service returns an enum value that is not available in the current SDK version, contentType will return UtteranceContentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from contentTypeAsString().

        Returns:
        The type of the response. The following values are possible:

        • PlainText – A plain text string.

        • CustomPayload – A response string that you can customize to include data or metadata for your application.

        • SSML – A string that includes Speech Synthesis Markup Language to customize the audio response.

        • ImageResponseCard – An image with buttons that the customer can select. See ImageResponseCard for more information.

        See Also:
        UtteranceContentType
      • contentTypeAsString

        public final String contentTypeAsString()

        The type of the response. The following values are possible:

        • PlainText – A plain text string.

        • CustomPayload – A response string that you can customize to include data or metadata for your application.

        • SSML – A string that includes Speech Synthesis Markup Language to customize the audio response.

        • ImageResponseCard – An image with buttons that the customer can select. See ImageResponseCard for more information.

        If the service returns an enum value that is not available in the current SDK version, contentType will return UtteranceContentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from contentTypeAsString().

        Returns:
        The type of the response. The following values are possible:

        • PlainText – A plain text string.

        • CustomPayload – A response string that you can customize to include data or metadata for your application.

        • SSML – A string that includes Speech Synthesis Markup Language to customize the audio response.

        • ImageResponseCard – An image with buttons that the customer can select. See ImageResponseCard for more information.

        See Also:
        UtteranceContentType
      • imageResponseCard

        public final ImageResponseCard imageResponseCard()
        Returns the value of the ImageResponseCard property for this object.
        Returns:
        The value of the ImageResponseCard property for this object.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)