Class IndexingResult
java.lang.Object
com.azure.search.documents.models.IndexingResult
- All Implemented Interfaces:
com.azure.json.JsonSerializable<IndexingResult>,Serializable
public final class IndexingResult
extends Object
implements com.azure.json.JsonSerializable<IndexingResult>, Serializable
Status of an indexing operation for a single document.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndexingResult(String key, boolean succeeded, int statusCode) Creates an instance of IndexingResult class. -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexingResultfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of IndexingResult from the JsonReader.Get the errorMessage property: The error message explaining why the indexing operation failed for the document identified by the key; null if indexing succeeded.getKey()Get the key property: The key of a document that was in the indexing request.intGet the statusCode property: The status code of the indexing operation.booleanGet the succeeded property: A value indicating whether the indexing operation succeeded for the document identified by the key.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
-
IndexingResult
Creates an instance of IndexingResult class.- Parameters:
key- the key value to set.succeeded- the succeeded value to set.statusCode- the statusCode value to set.
-
-
Method Details
-
getKey
Get the key property: The key of a document that was in the indexing request.- Returns:
- the key value.
-
getErrorMessage
Get the errorMessage property: The error message explaining why the indexing operation failed for the document identified by the key; null if indexing succeeded.- Returns:
- the errorMessage value.
-
isSucceeded
public boolean isSucceeded()Get the succeeded property: A value indicating whether the indexing operation succeeded for the document identified by the key.- Returns:
- the succeeded value.
-
getStatusCode
public int getStatusCode()Get the statusCode property: The status code of the indexing operation. Possible values include: 200 for a successful update or delete, 201 for successful document creation, 400 for a malformed input document, 404 for document not found, 409 for a version conflict, 422 when the index is temporarily unavailable, or 503 for when the service is too busy.- Returns:
- the statusCode value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<IndexingResult>- Throws:
IOException
-
fromJson
Reads an instance of IndexingResult from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of IndexingResult 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 IndexingResult.
-