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 Details

    • ClassifyDocumentOptions

      public ClassifyDocumentOptions(String urlSource)
      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

      public String 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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

      public StringIndexType getStringIndexType()
      Gets the string index type.
      Returns:
      the string index type.
    • setStringIndexType

      public ClassifyDocumentOptions setStringIndexType(StringIndexType stringIndexType)
      Sets the string index type.
      Parameters:
      stringIndexType - the string index type to set.
      Returns:
      the updated ClassifyDocumentOptions value.
    • getSplit

      public SplitMode getSplit()
      Gets the split mode.
      Returns:
      the split mode.
    • setSplit

      public ClassifyDocumentOptions setSplit(SplitMode split)
      Sets the split mode.
      Parameters:
      split - the split mode to set.
      Returns:
      the updated ClassifyDocumentOptions value.
    • getPages

      public List<String> getPages()
      Gets the pages.
      Returns:
      the pages.
    • setPages

      public ClassifyDocumentOptions setPages(List<String> pages)
      Sets the pages.
      Parameters:
      pages - the pages to set.
      Returns:
      the updated ClassifyDocumentOptions value.