Class TextAnalyticsError
java.lang.Object
com.azure.ai.textanalytics.models.TextAnalyticsError
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TextAnalyticsError>
public final class TextAnalyticsError
extends Object
implements com.azure.json.JsonSerializable<TextAnalyticsError>
The
TextAnalyticsError model.-
Constructor Summary
ConstructorsConstructorDescriptionTextAnalyticsError(TextAnalyticsErrorCode errorCode, String message, String target) Creates aTextAnalyticsErrormodel that describes text analytics error. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextAnalyticsErrorfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TextAnalyticsError from the JsonReader.Get the code property: Error code.Get the message property: Error message.Get the target property: Error target.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
-
Constructor Details
-
TextAnalyticsError
Creates aTextAnalyticsErrormodel that describes text analytics error.- Parameters:
errorCode- The error code.message- The error message.target- The error target.
-
-
Method Details
-
getErrorCode
Get the code property: Error code. Possible values include: 'invalidRequest', 'invalidArgument', 'internalServerError', 'serviceUnavailable'.- Returns:
- The code value.
-
getMessage
Get the message property: Error message.- Returns:
- The message value.
-
getTarget
Get the target property: Error target.- Returns:
- The target value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TextAnalyticsError>- Throws:
IOException
-
fromJson
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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the TextAnalyticsError.
-