Class Document.Builder (2.27.0)

public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder

A structured text document e.g. a PDF.

Protobuf type google.cloud.automl.v1.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllLayout(Iterable<? extends Document.Layout> values)

public Document.Builder addAllLayout(Iterable<? extends Document.Layout> values)

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

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

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.automl.v1.Document.Layout>
Returns
TypeDescription
Document.Builder

addLayout(Document.Layout value)

public Document.Builder addLayout(Document.Layout value)

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

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

Parameter
NameDescription
valueDocument.Layout
Returns
TypeDescription
Document.Builder

addLayout(Document.Layout.Builder builderForValue)

public Document.Builder addLayout(Document.Layout.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueDocument.Layout.Builder
Returns
TypeDescription
Document.Builder

addLayout(int index, Document.Layout value)

public Document.Builder addLayout(int index, Document.Layout value)

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

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

Parameters
NameDescription
indexint
valueDocument.Layout
Returns
TypeDescription
Document.Builder

addLayout(int index, Document.Layout.Builder builderForValue)

public Document.Builder addLayout(int index, Document.Layout.Builder builderForValue)

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

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

Parameters
NameDescription
indexint
builderForValueDocument.Layout.Builder
Returns
TypeDescription
Document.Builder

addLayoutBuilder()

public Document.Layout.Builder addLayoutBuilder()

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

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

Returns
TypeDescription
Document.Layout.Builder

addLayoutBuilder(int index)

public Document.Layout.Builder addLayoutBuilder(int index)

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

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Layout.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

build()

public Document build()
Returns
TypeDescription
Document

buildPartial()

public Document buildPartial()
Returns
TypeDescription
Document

clear()

public Document.Builder clear()
Returns
TypeDescription
Document.Builder
Overrides

clearDocumentDimensions()

public Document.Builder clearDocumentDimensions()

The dimensions of the page in the document.

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

Returns
TypeDescription
Document.Builder

clearDocumentText()

public Document.Builder clearDocumentText()

The plain text version of this document.

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

Returns
TypeDescription
Document.Builder

clearField(Descriptors.FieldDescriptor field)

public Document.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearInputConfig()

public Document.Builder clearInputConfig()

An input config specifying the content of the document.

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

Returns
TypeDescription
Document.Builder

clearLayout()

public Document.Builder clearLayout()

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

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

Returns
TypeDescription
Document.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearPageCount()

public Document.Builder clearPageCount()

Number of pages in the document.

int32 page_count = 5;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clone()

public Document.Builder clone()
Returns
TypeDescription
Document.Builder
Overrides

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
Document

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocumentDimensions()

public DocumentDimensions getDocumentDimensions()

The dimensions of the page in the document.

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

Returns
TypeDescription
DocumentDimensions

The documentDimensions.

getDocumentDimensionsBuilder()

public DocumentDimensions.Builder getDocumentDimensionsBuilder()

The dimensions of the page in the document.

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

Returns
TypeDescription
DocumentDimensions.Builder

getDocumentDimensionsOrBuilder()

public DocumentDimensionsOrBuilder getDocumentDimensionsOrBuilder()

The dimensions of the page in the document.

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

Returns
TypeDescription
DocumentDimensionsOrBuilder

getDocumentText()

public TextSnippet getDocumentText()

The plain text version of this document.

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

Returns
TypeDescription
TextSnippet

The documentText.

getDocumentTextBuilder()

public TextSnippet.Builder getDocumentTextBuilder()

The plain text version of this document.

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

Returns
TypeDescription
TextSnippet.Builder

getDocumentTextOrBuilder()

public TextSnippetOrBuilder getDocumentTextOrBuilder()

The plain text version of this document.

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

Returns
TypeDescription
TextSnippetOrBuilder

getInputConfig()

public DocumentInputConfig getInputConfig()

An input config specifying the content of the document.

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

Returns
TypeDescription
DocumentInputConfig

The inputConfig.

getInputConfigBuilder()

public DocumentInputConfig.Builder getInputConfigBuilder()

An input config specifying the content of the document.

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

Returns
TypeDescription
DocumentInputConfig.Builder

getInputConfigOrBuilder()

public DocumentInputConfigOrBuilder getInputConfigOrBuilder()

An input config specifying the content of the document.

.google.cloud.automl.v1.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.v1.Document.Layout layout = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Layout

getLayoutBuilder(int index)

public Document.Layout.Builder getLayoutBuilder(int index)

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

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Layout.Builder

getLayoutBuilderList()

public List<Document.Layout.Builder> getLayoutBuilderList()

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

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

Returns
TypeDescription
List<Builder>

getLayoutCount()

public int getLayoutCount()

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

repeated .google.cloud.automl.v1.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.v1.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.v1.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.v1.Document.Layout layout = 3;

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

getPageCount()

public int getPageCount()

Number of pages in the document.

int32 page_count = 5;

Returns
TypeDescription
int

The pageCount.

hasDocumentDimensions()

public boolean hasDocumentDimensions()

The dimensions of the page in the document.

.google.cloud.automl.v1.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.v1.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.v1.DocumentInputConfig input_config = 1;

Returns
TypeDescription
boolean

Whether the inputConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDocumentDimensions(DocumentDimensions value)

public Document.Builder mergeDocumentDimensions(DocumentDimensions value)

The dimensions of the page in the document.

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

Parameter
NameDescription
valueDocumentDimensions
Returns
TypeDescription
Document.Builder

mergeDocumentText(TextSnippet value)

public Document.Builder mergeDocumentText(TextSnippet value)

The plain text version of this document.

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

Parameter
NameDescription
valueTextSnippet
Returns
TypeDescription
Document.Builder

mergeFrom(Document other)

public Document.Builder mergeFrom(Document other)
Parameter
NameDescription
otherDocument
Returns
TypeDescription
Document.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Document.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Document.Builder
Overrides

mergeInputConfig(DocumentInputConfig value)

public Document.Builder mergeInputConfig(DocumentInputConfig value)

An input config specifying the content of the document.

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

Parameter
NameDescription
valueDocumentInputConfig
Returns
TypeDescription
Document.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides

removeLayout(int index)

public Document.Builder removeLayout(int index)

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

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

setDocumentDimensions(DocumentDimensions value)

public Document.Builder setDocumentDimensions(DocumentDimensions value)

The dimensions of the page in the document.

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

Parameter
NameDescription
valueDocumentDimensions
Returns
TypeDescription
Document.Builder

setDocumentDimensions(DocumentDimensions.Builder builderForValue)

public Document.Builder setDocumentDimensions(DocumentDimensions.Builder builderForValue)

The dimensions of the page in the document.

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

Parameter
NameDescription
builderForValueDocumentDimensions.Builder
Returns
TypeDescription
Document.Builder

setDocumentText(TextSnippet value)

public Document.Builder setDocumentText(TextSnippet value)

The plain text version of this document.

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

Parameter
NameDescription
valueTextSnippet
Returns
TypeDescription
Document.Builder

setDocumentText(TextSnippet.Builder builderForValue)

public Document.Builder setDocumentText(TextSnippet.Builder builderForValue)

The plain text version of this document.

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

Parameter
NameDescription
builderForValueTextSnippet.Builder
Returns
TypeDescription
Document.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setInputConfig(DocumentInputConfig value)

public Document.Builder setInputConfig(DocumentInputConfig value)

An input config specifying the content of the document.

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

Parameter
NameDescription
valueDocumentInputConfig
Returns
TypeDescription
Document.Builder

setInputConfig(DocumentInputConfig.Builder builderForValue)

public Document.Builder setInputConfig(DocumentInputConfig.Builder builderForValue)

An input config specifying the content of the document.

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

Parameter
NameDescription
builderForValueDocumentInputConfig.Builder
Returns
TypeDescription
Document.Builder

setLayout(int index, Document.Layout value)

public Document.Builder setLayout(int index, Document.Layout value)

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

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

Parameters
NameDescription
indexint
valueDocument.Layout
Returns
TypeDescription
Document.Builder

setLayout(int index, Document.Layout.Builder builderForValue)

public Document.Builder setLayout(int index, Document.Layout.Builder builderForValue)

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

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

Parameters
NameDescription
indexint
builderForValueDocument.Layout.Builder
Returns
TypeDescription
Document.Builder

setPageCount(int value)

public Document.Builder setPageCount(int value)

Number of pages in the document.

int32 page_count = 5;

Parameter
NameDescription
valueint

The pageCount to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides