Class ClassifyDocumentOptions
java.lang.Object
com.azure.ai.documentintelligence.models.ClassifyDocumentOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ClassifyDocumentOptions>
public final class ClassifyDocumentOptions
extends Object
implements com.azure.json.JsonSerializable<ClassifyDocumentOptions>
Document classification parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionClassifyDocumentOptions(byte[] bytesSource) Creates an instance of ClassifyDocumentOptions with the specified bytes of the document.ClassifyDocumentOptions(com.azure.core.util.BinaryData binaryData) Creates an instance of ClassifyDocumentOptions with the specified BinaryData source.ClassifyDocumentOptions(String urlSource) Creates an instance of ClassifyDocumentOptions with the specified URL source. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassifyDocumentOptionsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ClassifyDocumentOptions from the JsonReader.byte[]Get the bytesSource property: Base64 encoding of the document to classify.getPages()Gets the pages.getSplit()Gets the split mode.Gets the string index type.Get the urlSource property: Document URL to classify.Sets the pages.Sets the split mode.setStringIndexType(StringIndexType stringIndexType) Sets the string index type.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
-
ClassifyDocumentOptions
Creates an instance of ClassifyDocumentOptions with the specified URL source.- Parameters:
urlSource- the URL of the document to classify.
-
ClassifyDocumentOptions
public ClassifyDocumentOptions(byte[] bytesSource) Creates an instance of ClassifyDocumentOptions with the specified bytes of the document.- Parameters:
bytesSource- the encoded bytes of the document to classify.
-
ClassifyDocumentOptions
public ClassifyDocumentOptions(com.azure.core.util.BinaryData binaryData) Creates an instance of ClassifyDocumentOptions with the specified BinaryData source.- Parameters:
binaryData- the document to analyze.
-
-
Method Details
-
getUrlSource
Get the urlSource property: Document URL to classify. Either urlSource or base64Source must be specified.- Returns:
- the urlSource value.
-
getBytesSource
public byte[] getBytesSource()Get the bytesSource property: Base64 encoding of the document to classify. Either urlSource or base64Source must be specified.- Returns:
- the bytesSource value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ClassifyDocumentOptions>- Throws:
IOException
-
fromJson
public static ClassifyDocumentOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ClassifyDocumentOptions from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ClassifyDocumentOptions 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 ClassifyDocumentOptions.
-
getStringIndexType
Gets the string index type.- Returns:
- the string index type.
-
setStringIndexType
Sets the string index type.- Parameters:
stringIndexType- the string index type to set.- Returns:
- the updated
ClassifyDocumentOptionsvalue.
-
getSplit
Gets the split mode.- Returns:
- the split mode.
-
setSplit
Sets the split mode.- Parameters:
split- the split mode to set.- Returns:
- the updated
ClassifyDocumentOptionsvalue.
-
getPages
Gets the pages.- Returns:
- the pages.
-
setPages
Sets the pages.- Parameters:
pages- the pages to set.- Returns:
- the updated
ClassifyDocumentOptionsvalue.
-