Share via


TextAnalyticsError Class

  • java.lang.Object
    • com.azure.ai.textanalytics.models.TextAnalyticsError

Implements

public final class TextAnalyticsError
implements JsonSerializable<TextAnalyticsError>

The TextAnalyticsError model.

Constructor Summary

Constructor Description
TextAnalyticsError(TextAnalyticsErrorCode errorCode, String message, String target)

Creates a TextAnalyticsError model that describes text analytics error.

Method Summary

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

Reads an instance of TextAnalyticsError from the JsonReader.

TextAnalyticsErrorCode getErrorCode()

Get the code property: Error code.

String getMessage()

Get the message property: Error message.

String getTarget()

Get the target property: Error target.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

TextAnalyticsError

public TextAnalyticsError(TextAnalyticsErrorCode errorCode, String message, String target)

Creates a TextAnalyticsError model that describes text analytics error.

Parameters:

errorCode - The error code.
message - The error message.
target - The error target.

Method Details

fromJson

public static TextAnalyticsError fromJson(JsonReader jsonReader)

Reads an instance of TextAnalyticsError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TextAnalyticsError if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getErrorCode

public TextAnalyticsErrorCode getErrorCode()

Get the code property: Error code. Possible values include: 'invalidRequest', 'invalidArgument', 'internalServerError', 'serviceUnavailable'.

Returns:

The code value.

getMessage

public String getMessage()

Get the message property: Error message.

Returns:

The message value.

getTarget

public String getTarget()

Get the target property: Error target.

Returns:

The target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to