RecognitionChoice Class

  • java.lang.Object
    • com.azure.communication.callautomation.models.RecognitionChoice

Implements

public final class RecognitionChoice
implements JsonSerializable<RecognitionChoice>

The RecognitionChoice model.

Constructor Summary

Constructor Description
RecognitionChoice()

Creates an instance of RecognitionChoice.

Method Summary

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

Reads an instance of CallConnectionPropertiesInternal from the JsonReader.

String getLabel()

Get the label property: Identifier for a given choice.

List<String> getPhrases()

Get the phrases property: List of phrases to recognize.

DtmfTone getTone()

Get the tone property: The tone property.

RecognitionChoice setLabel(String label)

Set the label property: Identifier for a given choice.

RecognitionChoice setPhrases(List<String> phrases)

Set the phrases property: The phrases property.

RecognitionChoice setTone(DtmfTone tone)

Set the tone property: The tone property.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

RecognitionChoice

public RecognitionChoice()

Creates an instance of RecognitionChoice.

Method Details

fromJson

public static RecognitionChoice fromJson(JsonReader jsonReader)

Reads an instance of CallConnectionPropertiesInternal from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CallConnectionPropertiesInternal 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 CallConnectionPropertiesInternal.

getLabel

public String getLabel()

Get the label property: Identifier for a given choice.

Returns:

the label value.

getPhrases

public List<String> getPhrases()

Get the phrases property: List of phrases to recognize.

Returns:

the phrases value.

getTone

public DtmfTone getTone()

Get the tone property: The tone property.

Returns:

the tone value.

setLabel

public RecognitionChoice setLabel(String label)

Set the label property: Identifier for a given choice.

Parameters:

label - the label value to set.

Returns:

the RecognitionChoice object itself.

setPhrases

public RecognitionChoice setPhrases(List<String> phrases)

Set the phrases property: The phrases property.

Parameters:

phrases - the phrases value to set.

Returns:

the RecognitionChoice object itself.

setTone

public RecognitionChoice setTone(DtmfTone tone)

Set the tone property: The tone property.

Parameters:

tone - the tone value to set.

Returns:

the RecognitionChoice object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to