• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/vision/v1/text_annotation.proto
18 
19 package com.google.cloud.vision.v1;
20 
21 public interface BlockOrBuilder
22     extends
23     // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Block)
24     com.google.protobuf.MessageOrBuilder {
25 
26   /**
27    *
28    *
29    * <pre>
30    * Additional information detected for the block.
31    * </pre>
32    *
33    * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code>
34    *
35    * @return Whether the property field is set.
36    */
hasProperty()37   boolean hasProperty();
38   /**
39    *
40    *
41    * <pre>
42    * Additional information detected for the block.
43    * </pre>
44    *
45    * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code>
46    *
47    * @return The property.
48    */
getProperty()49   com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty();
50   /**
51    *
52    *
53    * <pre>
54    * Additional information detected for the block.
55    * </pre>
56    *
57    * <code>.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;</code>
58    */
getPropertyOrBuilder()59   com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder();
60 
61   /**
62    *
63    *
64    * <pre>
65    * The bounding box for the block.
66    * The vertices are in the order of top-left, top-right, bottom-right,
67    * bottom-left. When a rotation of the bounding box is detected the rotation
68    * is represented as around the top-left corner as defined when the text is
69    * read in the 'natural' orientation.
70    * For example:
71    * * when the text is horizontal it might look like:
72    *         0----1
73    *         |    |
74    *         3----2
75    * * when it's rotated 180 degrees around the top-left corner it becomes:
76    *         2----3
77    *         |    |
78    *         1----0
79    *   and the vertex order will still be (0, 1, 2, 3).
80    * </pre>
81    *
82    * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code>
83    *
84    * @return Whether the boundingBox field is set.
85    */
hasBoundingBox()86   boolean hasBoundingBox();
87   /**
88    *
89    *
90    * <pre>
91    * The bounding box for the block.
92    * The vertices are in the order of top-left, top-right, bottom-right,
93    * bottom-left. When a rotation of the bounding box is detected the rotation
94    * is represented as around the top-left corner as defined when the text is
95    * read in the 'natural' orientation.
96    * For example:
97    * * when the text is horizontal it might look like:
98    *         0----1
99    *         |    |
100    *         3----2
101    * * when it's rotated 180 degrees around the top-left corner it becomes:
102    *         2----3
103    *         |    |
104    *         1----0
105    *   and the vertex order will still be (0, 1, 2, 3).
106    * </pre>
107    *
108    * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code>
109    *
110    * @return The boundingBox.
111    */
getBoundingBox()112   com.google.cloud.vision.v1.BoundingPoly getBoundingBox();
113   /**
114    *
115    *
116    * <pre>
117    * The bounding box for the block.
118    * The vertices are in the order of top-left, top-right, bottom-right,
119    * bottom-left. When a rotation of the bounding box is detected the rotation
120    * is represented as around the top-left corner as defined when the text is
121    * read in the 'natural' orientation.
122    * For example:
123    * * when the text is horizontal it might look like:
124    *         0----1
125    *         |    |
126    *         3----2
127    * * when it's rotated 180 degrees around the top-left corner it becomes:
128    *         2----3
129    *         |    |
130    *         1----0
131    *   and the vertex order will still be (0, 1, 2, 3).
132    * </pre>
133    *
134    * <code>.google.cloud.vision.v1.BoundingPoly bounding_box = 2;</code>
135    */
getBoundingBoxOrBuilder()136   com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder();
137 
138   /**
139    *
140    *
141    * <pre>
142    * List of paragraphs in this block (if this blocks is of type text).
143    * </pre>
144    *
145    * <code>repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;</code>
146    */
getParagraphsList()147   java.util.List<com.google.cloud.vision.v1.Paragraph> getParagraphsList();
148   /**
149    *
150    *
151    * <pre>
152    * List of paragraphs in this block (if this blocks is of type text).
153    * </pre>
154    *
155    * <code>repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;</code>
156    */
getParagraphs(int index)157   com.google.cloud.vision.v1.Paragraph getParagraphs(int index);
158   /**
159    *
160    *
161    * <pre>
162    * List of paragraphs in this block (if this blocks is of type text).
163    * </pre>
164    *
165    * <code>repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;</code>
166    */
getParagraphsCount()167   int getParagraphsCount();
168   /**
169    *
170    *
171    * <pre>
172    * List of paragraphs in this block (if this blocks is of type text).
173    * </pre>
174    *
175    * <code>repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;</code>
176    */
177   java.util.List<? extends com.google.cloud.vision.v1.ParagraphOrBuilder>
getParagraphsOrBuilderList()178       getParagraphsOrBuilderList();
179   /**
180    *
181    *
182    * <pre>
183    * List of paragraphs in this block (if this blocks is of type text).
184    * </pre>
185    *
186    * <code>repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;</code>
187    */
getParagraphsOrBuilder(int index)188   com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder(int index);
189 
190   /**
191    *
192    *
193    * <pre>
194    * Detected block type (text, image etc) for this block.
195    * </pre>
196    *
197    * <code>.google.cloud.vision.v1.Block.BlockType block_type = 4;</code>
198    *
199    * @return The enum numeric value on the wire for blockType.
200    */
getBlockTypeValue()201   int getBlockTypeValue();
202   /**
203    *
204    *
205    * <pre>
206    * Detected block type (text, image etc) for this block.
207    * </pre>
208    *
209    * <code>.google.cloud.vision.v1.Block.BlockType block_type = 4;</code>
210    *
211    * @return The blockType.
212    */
getBlockType()213   com.google.cloud.vision.v1.Block.BlockType getBlockType();
214 
215   /**
216    *
217    *
218    * <pre>
219    * Confidence of the OCR results on the block. Range [0, 1].
220    * </pre>
221    *
222    * <code>float confidence = 5;</code>
223    *
224    * @return The confidence.
225    */
getConfidence()226   float getConfidence();
227 }
228