ClassifyDocumentOptions Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.models.ClassifyDocumentOptions

Implements

public final class ClassifyDocumentOptions
implements JsonSerializable<ClassifyDocumentOptions>

Document classification parameters.

Constructor Summary

Constructor Description
ClassifyDocumentOptions(byte[] bytesSource)

Creates an instance of ClassifyDocumentOptions with the specified bytes of the document.

ClassifyDocumentOptions(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 Type Method and Description
static ClassifyDocumentOptions fromJson(JsonReader jsonReader)

Reads an instance of ClassifyDocumentOptions from the JsonReader.

byte[] getBytesSource()

Get the bytesSource property: Base64 encoding of the document to classify.

List<String> getPages()

Gets the pages.

SplitMode getSplit()

Gets the split mode.

StringIndexType getStringIndexType()

Gets the string index type.

String getUrlSource()

Get the urlSource property: Document URL to classify.

ClassifyDocumentOptions setPages(List<String> pages)

Sets the pages.

ClassifyDocumentOptions setSplit(SplitMode split)

Sets the split mode.

ClassifyDocumentOptions setStringIndexType(StringIndexType stringIndexType)

Sets the string index type.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

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(BinaryData binaryData)

Creates an instance of ClassifyDocumentOptions with the specified BinaryData source.

Parameters:

binaryData - the document to analyze.

ClassifyDocumentOptions

public ClassifyDocumentOptions(String urlSource)

Creates an instance of ClassifyDocumentOptions with the specified URL source.

Parameters:

urlSource - the URL of the document to classify.

Method Details

fromJson

public static ClassifyDocumentOptions fromJson(JsonReader jsonReader)

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.

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.

getPages

public List<String> getPages()

Gets the pages.

Returns:

the pages.

getSplit

public SplitMode getSplit()

Gets the split mode.

Returns:

the split mode.

getStringIndexType

public StringIndexType getStringIndexType()

Gets the string index type.

Returns:

the string index type.

getUrlSource

public String getUrlSource()

Get the urlSource property: Document URL to classify. Either urlSource or base64Source must be specified.

Returns:

the urlSource value.

setPages

public ClassifyDocumentOptions setPages(List<String> pages)

Sets the pages.

Parameters:

pages - the pages to set.

Returns:

the updated ClassifyDocumentOptions value.

setSplit

public ClassifyDocumentOptions setSplit(SplitMode split)

Sets the split mode.

Parameters:

split - the split mode to set.

Returns:

the updated ClassifyDocumentOptions value.

setStringIndexType

public ClassifyDocumentOptions setStringIndexType(StringIndexType stringIndexType)

Sets the string index type.

Parameters:

stringIndexType - the string index type to set.

Returns:

the updated ClassifyDocumentOptions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to