ChoiceResult Class

public final class ChoiceResult
extends RecognizeResult

The ChoiceResult model.

Method Summary

Modifier and Type Method and Description
static ChoiceResult fromJson(JsonReader jsonReader)

Reads an instance of ChoiceResult from the JsonReader.

String getLabel()

Get the label property: Label is the primary identifier for the choice detected.

String getRecognizedPhrase()

Get the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ChoiceResult fromJson(JsonReader jsonReader)

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.

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 JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to