Class ChoiceResult

java.lang.Object
com.azure.communication.callautomation.models.RecognizeResult
com.azure.communication.callautomation.models.ChoiceResult
All Implemented Interfaces:
com.azure.json.JsonSerializable<RecognizeResult>

public final class ChoiceResult extends RecognizeResult
The ChoiceResult model.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ChoiceResult from the JsonReader.
    Get the label property: Label is the primary identifier for the choice detected.
    Get the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • getLabel

      public String getLabel()
      Get the label property: Label is the primary identifier for the choice detected.
      Returns:
      the label value.
    • getRecognizedPhrase

      public String getRecognizedPhrase()
      Get the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection. If Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to null.
      Returns:
      the recognizedPhrase value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Throws:
      IOException
    • fromJson

      public static ChoiceResult fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ChoiceResult from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ChoiceResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ChoiceResult.