Class Block.Builder (3.52.0)

public static final class Block.Builder extends GeneratedMessageV3.Builder<Block.Builder> implements BlockOrBuilder

Logical element on the page.

Protobuf type google.cloud.vision.v1p3beta1.Block

Implements

BlockOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllParagraphs(Iterable<? extends Paragraph> values)

public Block.Builder addAllParagraphs(Iterable<? extends Paragraph> values)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.vision.v1p3beta1.Paragraph>
Returns
Type Description
Block.Builder

addParagraphs(Paragraph value)

public Block.Builder addParagraphs(Paragraph value)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
value Paragraph
Returns
Type Description
Block.Builder

addParagraphs(Paragraph.Builder builderForValue)

public Block.Builder addParagraphs(Paragraph.Builder builderForValue)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
builderForValue Paragraph.Builder
Returns
Type Description
Block.Builder

addParagraphs(int index, Paragraph value)

public Block.Builder addParagraphs(int index, Paragraph value)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameters
Name Description
index int
value Paragraph
Returns
Type Description
Block.Builder

addParagraphs(int index, Paragraph.Builder builderForValue)

public Block.Builder addParagraphs(int index, Paragraph.Builder builderForValue)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameters
Name Description
index int
builderForValue Paragraph.Builder
Returns
Type Description
Block.Builder

addParagraphsBuilder()

public Paragraph.Builder addParagraphsBuilder()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
Paragraph.Builder

addParagraphsBuilder(int index)

public Paragraph.Builder addParagraphsBuilder(int index)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
index int
Returns
Type Description
Paragraph.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Block.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Block.Builder
Overrides

build()

public Block build()
Returns
Type Description
Block

buildPartial()

public Block buildPartial()
Returns
Type Description
Block

clear()

public Block.Builder clear()
Returns
Type Description
Block.Builder
Overrides

clearBlockType()

public Block.Builder clearBlockType()

Detected block type (text, image etc) for this block.

.google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4;

Returns
Type Description
Block.Builder

This builder for chaining.

clearBoundingBox()

public Block.Builder clearBoundingBox()

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Returns
Type Description
Block.Builder

clearConfidence()

public Block.Builder clearConfidence()

Confidence of the OCR results on the block. Range [0, 1].

float confidence = 5;

Returns
Type Description
Block.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Block.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Block.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Block.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Block.Builder
Overrides

clearParagraphs()

public Block.Builder clearParagraphs()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
Block.Builder

clearProperty()

public Block.Builder clearProperty()

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Returns
Type Description
Block.Builder

clone()

public Block.Builder clone()
Returns
Type Description
Block.Builder
Overrides

getBlockType()

public Block.BlockType getBlockType()

Detected block type (text, image etc) for this block.

.google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4;

Returns
Type Description
Block.BlockType

The blockType.

getBlockTypeValue()

public int getBlockTypeValue()

Detected block type (text, image etc) for this block.

.google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4;

Returns
Type Description
int

The enum numeric value on the wire for blockType.

getBoundingBox()

public BoundingPoly getBoundingBox()

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Returns
Type Description
BoundingPoly

The boundingBox.

getBoundingBoxBuilder()

public BoundingPoly.Builder getBoundingBoxBuilder()

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Returns
Type Description
BoundingPoly.Builder

getBoundingBoxOrBuilder()

public BoundingPolyOrBuilder getBoundingBoxOrBuilder()

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Returns
Type Description
BoundingPolyOrBuilder

getConfidence()

public float getConfidence()

Confidence of the OCR results on the block. Range [0, 1].

float confidence = 5;

Returns
Type Description
float

The confidence.

getDefaultInstanceForType()

public Block getDefaultInstanceForType()
Returns
Type Description
Block

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getParagraphs(int index)

public Paragraph getParagraphs(int index)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
index int
Returns
Type Description
Paragraph

getParagraphsBuilder(int index)

public Paragraph.Builder getParagraphsBuilder(int index)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
index int
Returns
Type Description
Paragraph.Builder

getParagraphsBuilderList()

public List<Paragraph.Builder> getParagraphsBuilderList()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
List<Builder>

getParagraphsCount()

public int getParagraphsCount()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
int

getParagraphsList()

public List<Paragraph> getParagraphsList()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
List<Paragraph>

getParagraphsOrBuilder(int index)

public ParagraphOrBuilder getParagraphsOrBuilder(int index)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
index int
Returns
Type Description
ParagraphOrBuilder

getParagraphsOrBuilderList()

public List<? extends ParagraphOrBuilder> getParagraphsOrBuilderList()

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Returns
Type Description
List<? extends com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder>

getProperty()

public TextAnnotation.TextProperty getProperty()

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Returns
Type Description
TextAnnotation.TextProperty

The property.

getPropertyBuilder()

public TextAnnotation.TextProperty.Builder getPropertyBuilder()

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Returns
Type Description
TextAnnotation.TextProperty.Builder

getPropertyOrBuilder()

public TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder()

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Returns
Type Description
TextAnnotation.TextPropertyOrBuilder

hasBoundingBox()

public boolean hasBoundingBox()

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Returns
Type Description
boolean

Whether the boundingBox field is set.

hasProperty()

public boolean hasProperty()

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Returns
Type Description
boolean

Whether the property field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBoundingBox(BoundingPoly value)

public Block.Builder mergeBoundingBox(BoundingPoly value)

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
Block.Builder

mergeFrom(Block other)

public Block.Builder mergeFrom(Block other)
Parameter
Name Description
other Block
Returns
Type Description
Block.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Block.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Block.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Block.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Block.Builder
Overrides

mergeProperty(TextAnnotation.TextProperty value)

public Block.Builder mergeProperty(TextAnnotation.TextProperty value)

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Parameter
Name Description
value TextAnnotation.TextProperty
Returns
Type Description
Block.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Block.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Block.Builder
Overrides

removeParagraphs(int index)

public Block.Builder removeParagraphs(int index)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameter
Name Description
index int
Returns
Type Description
Block.Builder

setBlockType(Block.BlockType value)

public Block.Builder setBlockType(Block.BlockType value)

Detected block type (text, image etc) for this block.

.google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4;

Parameter
Name Description
value Block.BlockType

The blockType to set.

Returns
Type Description
Block.Builder

This builder for chaining.

setBlockTypeValue(int value)

public Block.Builder setBlockTypeValue(int value)

Detected block type (text, image etc) for this block.

.google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for blockType to set.

Returns
Type Description
Block.Builder

This builder for chaining.

setBoundingBox(BoundingPoly value)

public Block.Builder setBoundingBox(BoundingPoly value)

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
Block.Builder

setBoundingBox(BoundingPoly.Builder builderForValue)

public Block.Builder setBoundingBox(BoundingPoly.Builder builderForValue)

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:

  • when the text is horizontal it might look like:

      0----1
      |    |
      3----2
    
  • when it's rotated 180 degrees around the top-left corner it becomes:

      2----3
      |    |
      1----0
    

    and the vertice order will still be (0, 1, 2, 3).

.google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2;

Parameter
Name Description
builderForValue BoundingPoly.Builder
Returns
Type Description
Block.Builder

setConfidence(float value)

public Block.Builder setConfidence(float value)

Confidence of the OCR results on the block. Range [0, 1].

float confidence = 5;

Parameter
Name Description
value float

The confidence to set.

Returns
Type Description
Block.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Block.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Block.Builder
Overrides

setParagraphs(int index, Paragraph value)

public Block.Builder setParagraphs(int index, Paragraph value)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameters
Name Description
index int
value Paragraph
Returns
Type Description
Block.Builder

setParagraphs(int index, Paragraph.Builder builderForValue)

public Block.Builder setParagraphs(int index, Paragraph.Builder builderForValue)

List of paragraphs in this block (if this blocks is of type text).

repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3;

Parameters
Name Description
index int
builderForValue Paragraph.Builder
Returns
Type Description
Block.Builder

setProperty(TextAnnotation.TextProperty value)

public Block.Builder setProperty(TextAnnotation.TextProperty value)

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Parameter
Name Description
value TextAnnotation.TextProperty
Returns
Type Description
Block.Builder

setProperty(TextAnnotation.TextProperty.Builder builderForValue)

public Block.Builder setProperty(TextAnnotation.TextProperty.Builder builderForValue)

Additional information detected for the block.

.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1;

Parameter
Name Description
builderForValue TextAnnotation.TextProperty.Builder
Returns
Type Description
Block.Builder

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

public Block.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Block.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Block.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Block.Builder
Overrides