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>
The ChoiceResult model.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChoiceResultfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChoiceResult from the JsonReader.getLabel()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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getLabel
Get the label property: Label is the primary identifier for the choice detected.- Returns:
- the label value.
-
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
- Throws:
IOException
-
fromJson
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.
-