Class Document (2.19.0)

public final class Document extends GeneratedMessageV3 implements DocumentOrBuilder

A structured text document e.g. a PDF.

Protobuf type google.cloud.automl.v1beta1.Document

Implements

DocumentOrBuilder

Static Fields

DOCUMENT_DIMENSIONS_FIELD_NUMBER

public static final int DOCUMENT_DIMENSIONS_FIELD_NUMBER
Field Value
TypeDescription
int

DOCUMENT_TEXT_FIELD_NUMBER

public static final int DOCUMENT_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_CONFIG_FIELD_NUMBER

public static final int INPUT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

LAYOUT_FIELD_NUMBER

public static final int LAYOUT_FIELD_NUMBER
Field Value
TypeDescription
int

PAGE_COUNT_FIELD_NUMBER

public static final int PAGE_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Document getDefaultInstance()
Returns
TypeDescription
Document

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Document.Builder newBuilder()
Returns
TypeDescription
Document.Builder

newBuilder(Document prototype)

public static Document.Builder newBuilder(Document prototype)
Parameter
NameDescription
prototypeDocument
Returns
TypeDescription
Document.Builder

parseDelimitedFrom(InputStream input)

public static Document parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Document parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Document parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Document parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Document> parser()
Returns
TypeDescription
Parser<Document>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
Document

getDocumentDimensions()

public DocumentDimensions getDocumentDimensions()

The dimensions of the page in the document.

.google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;

Returns
TypeDescription
DocumentDimensions

The documentDimensions.

getDocumentDimensionsOrBuilder()

public DocumentDimensionsOrBuilder getDocumentDimensionsOrBuilder()

The dimensions of the page in the document.

.google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;

Returns
TypeDescription
DocumentDimensionsOrBuilder

getDocumentText()

public TextSnippet getDocumentText()

The plain text version of this document.

.google.cloud.automl.v1beta1.TextSnippet document_text = 2;

Returns
TypeDescription
TextSnippet

The documentText.

getDocumentTextOrBuilder()

public TextSnippetOrBuilder getDocumentTextOrBuilder()

The plain text version of this document.

.google.cloud.automl.v1beta1.TextSnippet document_text = 2;

Returns
TypeDescription
TextSnippetOrBuilder

getInputConfig()

public DocumentInputConfig getInputConfig()

An input config specifying the content of the document.

.google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;

Returns
TypeDescription
DocumentInputConfig

The inputConfig.

getInputConfigOrBuilder()

public DocumentInputConfigOrBuilder getInputConfigOrBuilder()

An input config specifying the content of the document.

.google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;

Returns
TypeDescription
DocumentInputConfigOrBuilder

getLayout(int index)

public Document.Layout getLayout(int index)

Describes the layout of the document. Sorted by [page_number][].

repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Layout

getLayoutCount()

public int getLayoutCount()

Describes the layout of the document. Sorted by [page_number][].

repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;

Returns
TypeDescription
int

getLayoutList()

public List<Document.Layout> getLayoutList()

Describes the layout of the document. Sorted by [page_number][].

repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;

Returns
TypeDescription
List<Layout>

getLayoutOrBuilder(int index)

public Document.LayoutOrBuilder getLayoutOrBuilder(int index)

Describes the layout of the document. Sorted by [page_number][].

repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.LayoutOrBuilder

getLayoutOrBuilderList()

public List<? extends Document.LayoutOrBuilder> getLayoutOrBuilderList()

Describes the layout of the document. Sorted by [page_number][].

repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3;

Returns
TypeDescription
List<? extends com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder>

getPageCount()

public int getPageCount()

Number of pages in the document.

int32 page_count = 5;

Returns
TypeDescription
int

The pageCount.

getParserForType()

public Parser<Document> getParserForType()
Returns
TypeDescription
Parser<Document>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDocumentDimensions()

public boolean hasDocumentDimensions()

The dimensions of the page in the document.

.google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4;

Returns
TypeDescription
boolean

Whether the documentDimensions field is set.

hasDocumentText()

public boolean hasDocumentText()

The plain text version of this document.

.google.cloud.automl.v1beta1.TextSnippet document_text = 2;

Returns
TypeDescription
boolean

Whether the documentText field is set.

hasInputConfig()

public boolean hasInputConfig()

An input config specifying the content of the document.

.google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1;

Returns
TypeDescription
boolean

Whether the inputConfig field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Document.Builder newBuilderForType()
Returns
TypeDescription
Document.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Document.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Document.Builder toBuilder()
Returns
TypeDescription
Document.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException