1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/cloud/vision/v1p2beta1/text_annotation.proto
3
4package vision // import "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1"
5
6import proto "github.com/golang/protobuf/proto"
7import fmt "fmt"
8import math "math"
9import _ "google.golang.org/genproto/googleapis/api/annotations"
10
11// Reference imports to suppress errors if they are not otherwise used.
12var _ = proto.Marshal
13var _ = fmt.Errorf
14var _ = math.Inf
15
16// This is a compile-time assertion to ensure that this generated file
17// is compatible with the proto package it is being compiled against.
18// A compilation error at this line likely means your copy of the
19// proto package needs to be updated.
20const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
21
22// Enum to denote the type of break found. New line, space etc.
23type TextAnnotation_DetectedBreak_BreakType int32
24
25const (
26	// Unknown break label type.
27	TextAnnotation_DetectedBreak_UNKNOWN TextAnnotation_DetectedBreak_BreakType = 0
28	// Regular space.
29	TextAnnotation_DetectedBreak_SPACE TextAnnotation_DetectedBreak_BreakType = 1
30	// Sure space (very wide).
31	TextAnnotation_DetectedBreak_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 2
32	// Line-wrapping break.
33	TextAnnotation_DetectedBreak_EOL_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 3
34	// End-line hyphen that is not present in text; does not co-occur with
35	// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
36	TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
37	// Line break that ends a paragraph.
38	TextAnnotation_DetectedBreak_LINE_BREAK TextAnnotation_DetectedBreak_BreakType = 5
39)
40
41var TextAnnotation_DetectedBreak_BreakType_name = map[int32]string{
42	0: "UNKNOWN",
43	1: "SPACE",
44	2: "SURE_SPACE",
45	3: "EOL_SURE_SPACE",
46	4: "HYPHEN",
47	5: "LINE_BREAK",
48}
49var TextAnnotation_DetectedBreak_BreakType_value = map[string]int32{
50	"UNKNOWN":        0,
51	"SPACE":          1,
52	"SURE_SPACE":     2,
53	"EOL_SURE_SPACE": 3,
54	"HYPHEN":         4,
55	"LINE_BREAK":     5,
56}
57
58func (x TextAnnotation_DetectedBreak_BreakType) String() string {
59	return proto.EnumName(TextAnnotation_DetectedBreak_BreakType_name, int32(x))
60}
61func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor() ([]byte, []int) {
62	return fileDescriptor_text_annotation_8d9193533acd557d, []int{0, 1, 0}
63}
64
65// Type of a block (text, image etc) as identified by OCR.
66type Block_BlockType int32
67
68const (
69	// Unknown block type.
70	Block_UNKNOWN Block_BlockType = 0
71	// Regular text block.
72	Block_TEXT Block_BlockType = 1
73	// Table block.
74	Block_TABLE Block_BlockType = 2
75	// Image block.
76	Block_PICTURE Block_BlockType = 3
77	// Horizontal/vertical line box.
78	Block_RULER Block_BlockType = 4
79	// Barcode block.
80	Block_BARCODE Block_BlockType = 5
81)
82
83var Block_BlockType_name = map[int32]string{
84	0: "UNKNOWN",
85	1: "TEXT",
86	2: "TABLE",
87	3: "PICTURE",
88	4: "RULER",
89	5: "BARCODE",
90}
91var Block_BlockType_value = map[string]int32{
92	"UNKNOWN": 0,
93	"TEXT":    1,
94	"TABLE":   2,
95	"PICTURE": 3,
96	"RULER":   4,
97	"BARCODE": 5,
98}
99
100func (x Block_BlockType) String() string {
101	return proto.EnumName(Block_BlockType_name, int32(x))
102}
103func (Block_BlockType) EnumDescriptor() ([]byte, []int) {
104	return fileDescriptor_text_annotation_8d9193533acd557d, []int{2, 0}
105}
106
107// TextAnnotation contains a structured representation of OCR extracted text.
108// The hierarchy of an OCR extracted text structure is like this:
109//     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
110// Each structural component, starting from Page, may further have their own
111// properties. Properties describe detected languages, breaks etc.. Please refer
112// to the [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] message definition below for more
113// detail.
114type TextAnnotation struct {
115	// List of pages detected by OCR.
116	Pages []*Page `protobuf:"bytes,1,rep,name=pages,proto3" json:"pages,omitempty"`
117	// UTF-8 text detected on the pages.
118	Text                 string   `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
119	XXX_NoUnkeyedLiteral struct{} `json:"-"`
120	XXX_unrecognized     []byte   `json:"-"`
121	XXX_sizecache        int32    `json:"-"`
122}
123
124func (m *TextAnnotation) Reset()         { *m = TextAnnotation{} }
125func (m *TextAnnotation) String() string { return proto.CompactTextString(m) }
126func (*TextAnnotation) ProtoMessage()    {}
127func (*TextAnnotation) Descriptor() ([]byte, []int) {
128	return fileDescriptor_text_annotation_8d9193533acd557d, []int{0}
129}
130func (m *TextAnnotation) XXX_Unmarshal(b []byte) error {
131	return xxx_messageInfo_TextAnnotation.Unmarshal(m, b)
132}
133func (m *TextAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
134	return xxx_messageInfo_TextAnnotation.Marshal(b, m, deterministic)
135}
136func (dst *TextAnnotation) XXX_Merge(src proto.Message) {
137	xxx_messageInfo_TextAnnotation.Merge(dst, src)
138}
139func (m *TextAnnotation) XXX_Size() int {
140	return xxx_messageInfo_TextAnnotation.Size(m)
141}
142func (m *TextAnnotation) XXX_DiscardUnknown() {
143	xxx_messageInfo_TextAnnotation.DiscardUnknown(m)
144}
145
146var xxx_messageInfo_TextAnnotation proto.InternalMessageInfo
147
148func (m *TextAnnotation) GetPages() []*Page {
149	if m != nil {
150		return m.Pages
151	}
152	return nil
153}
154
155func (m *TextAnnotation) GetText() string {
156	if m != nil {
157		return m.Text
158	}
159	return ""
160}
161
162// Detected language for a structural component.
163type TextAnnotation_DetectedLanguage struct {
164	// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
165	// information, see
166	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
167	LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
168	// Confidence of detected language. Range [0, 1].
169	Confidence           float32  `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
170	XXX_NoUnkeyedLiteral struct{} `json:"-"`
171	XXX_unrecognized     []byte   `json:"-"`
172	XXX_sizecache        int32    `json:"-"`
173}
174
175func (m *TextAnnotation_DetectedLanguage) Reset()         { *m = TextAnnotation_DetectedLanguage{} }
176func (m *TextAnnotation_DetectedLanguage) String() string { return proto.CompactTextString(m) }
177func (*TextAnnotation_DetectedLanguage) ProtoMessage()    {}
178func (*TextAnnotation_DetectedLanguage) Descriptor() ([]byte, []int) {
179	return fileDescriptor_text_annotation_8d9193533acd557d, []int{0, 0}
180}
181func (m *TextAnnotation_DetectedLanguage) XXX_Unmarshal(b []byte) error {
182	return xxx_messageInfo_TextAnnotation_DetectedLanguage.Unmarshal(m, b)
183}
184func (m *TextAnnotation_DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
185	return xxx_messageInfo_TextAnnotation_DetectedLanguage.Marshal(b, m, deterministic)
186}
187func (dst *TextAnnotation_DetectedLanguage) XXX_Merge(src proto.Message) {
188	xxx_messageInfo_TextAnnotation_DetectedLanguage.Merge(dst, src)
189}
190func (m *TextAnnotation_DetectedLanguage) XXX_Size() int {
191	return xxx_messageInfo_TextAnnotation_DetectedLanguage.Size(m)
192}
193func (m *TextAnnotation_DetectedLanguage) XXX_DiscardUnknown() {
194	xxx_messageInfo_TextAnnotation_DetectedLanguage.DiscardUnknown(m)
195}
196
197var xxx_messageInfo_TextAnnotation_DetectedLanguage proto.InternalMessageInfo
198
199func (m *TextAnnotation_DetectedLanguage) GetLanguageCode() string {
200	if m != nil {
201		return m.LanguageCode
202	}
203	return ""
204}
205
206func (m *TextAnnotation_DetectedLanguage) GetConfidence() float32 {
207	if m != nil {
208		return m.Confidence
209	}
210	return 0
211}
212
213// Detected start or end of a structural component.
214type TextAnnotation_DetectedBreak struct {
215	// Detected break type.
216	Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.vision.v1p2beta1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
217	// True if break prepends the element.
218	IsPrefix             bool     `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix,proto3" json:"is_prefix,omitempty"`
219	XXX_NoUnkeyedLiteral struct{} `json:"-"`
220	XXX_unrecognized     []byte   `json:"-"`
221	XXX_sizecache        int32    `json:"-"`
222}
223
224func (m *TextAnnotation_DetectedBreak) Reset()         { *m = TextAnnotation_DetectedBreak{} }
225func (m *TextAnnotation_DetectedBreak) String() string { return proto.CompactTextString(m) }
226func (*TextAnnotation_DetectedBreak) ProtoMessage()    {}
227func (*TextAnnotation_DetectedBreak) Descriptor() ([]byte, []int) {
228	return fileDescriptor_text_annotation_8d9193533acd557d, []int{0, 1}
229}
230func (m *TextAnnotation_DetectedBreak) XXX_Unmarshal(b []byte) error {
231	return xxx_messageInfo_TextAnnotation_DetectedBreak.Unmarshal(m, b)
232}
233func (m *TextAnnotation_DetectedBreak) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
234	return xxx_messageInfo_TextAnnotation_DetectedBreak.Marshal(b, m, deterministic)
235}
236func (dst *TextAnnotation_DetectedBreak) XXX_Merge(src proto.Message) {
237	xxx_messageInfo_TextAnnotation_DetectedBreak.Merge(dst, src)
238}
239func (m *TextAnnotation_DetectedBreak) XXX_Size() int {
240	return xxx_messageInfo_TextAnnotation_DetectedBreak.Size(m)
241}
242func (m *TextAnnotation_DetectedBreak) XXX_DiscardUnknown() {
243	xxx_messageInfo_TextAnnotation_DetectedBreak.DiscardUnknown(m)
244}
245
246var xxx_messageInfo_TextAnnotation_DetectedBreak proto.InternalMessageInfo
247
248func (m *TextAnnotation_DetectedBreak) GetType() TextAnnotation_DetectedBreak_BreakType {
249	if m != nil {
250		return m.Type
251	}
252	return TextAnnotation_DetectedBreak_UNKNOWN
253}
254
255func (m *TextAnnotation_DetectedBreak) GetIsPrefix() bool {
256	if m != nil {
257		return m.IsPrefix
258	}
259	return false
260}
261
262// Additional information detected on the structural component.
263type TextAnnotation_TextProperty struct {
264	// A list of detected languages together with confidence.
265	DetectedLanguages []*TextAnnotation_DetectedLanguage `protobuf:"bytes,1,rep,name=detected_languages,json=detectedLanguages,proto3" json:"detected_languages,omitempty"`
266	// Detected start or end of a text segment.
267	DetectedBreak        *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"`
268	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
269	XXX_unrecognized     []byte                        `json:"-"`
270	XXX_sizecache        int32                         `json:"-"`
271}
272
273func (m *TextAnnotation_TextProperty) Reset()         { *m = TextAnnotation_TextProperty{} }
274func (m *TextAnnotation_TextProperty) String() string { return proto.CompactTextString(m) }
275func (*TextAnnotation_TextProperty) ProtoMessage()    {}
276func (*TextAnnotation_TextProperty) Descriptor() ([]byte, []int) {
277	return fileDescriptor_text_annotation_8d9193533acd557d, []int{0, 2}
278}
279func (m *TextAnnotation_TextProperty) XXX_Unmarshal(b []byte) error {
280	return xxx_messageInfo_TextAnnotation_TextProperty.Unmarshal(m, b)
281}
282func (m *TextAnnotation_TextProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
283	return xxx_messageInfo_TextAnnotation_TextProperty.Marshal(b, m, deterministic)
284}
285func (dst *TextAnnotation_TextProperty) XXX_Merge(src proto.Message) {
286	xxx_messageInfo_TextAnnotation_TextProperty.Merge(dst, src)
287}
288func (m *TextAnnotation_TextProperty) XXX_Size() int {
289	return xxx_messageInfo_TextAnnotation_TextProperty.Size(m)
290}
291func (m *TextAnnotation_TextProperty) XXX_DiscardUnknown() {
292	xxx_messageInfo_TextAnnotation_TextProperty.DiscardUnknown(m)
293}
294
295var xxx_messageInfo_TextAnnotation_TextProperty proto.InternalMessageInfo
296
297func (m *TextAnnotation_TextProperty) GetDetectedLanguages() []*TextAnnotation_DetectedLanguage {
298	if m != nil {
299		return m.DetectedLanguages
300	}
301	return nil
302}
303
304func (m *TextAnnotation_TextProperty) GetDetectedBreak() *TextAnnotation_DetectedBreak {
305	if m != nil {
306		return m.DetectedBreak
307	}
308	return nil
309}
310
311// Detected page from OCR.
312type Page struct {
313	// Additional information detected on the page.
314	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
315	// Page width. For PDFs the unit is points. For images (including
316	// TIFFs) the unit is pixels.
317	Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
318	// Page height. For PDFs the unit is points. For images (including
319	// TIFFs) the unit is pixels.
320	Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
321	// List of blocks of text, images etc on this page.
322	Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"`
323	// Confidence of the OCR results on the page. Range [0, 1].
324	Confidence           float32  `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
325	XXX_NoUnkeyedLiteral struct{} `json:"-"`
326	XXX_unrecognized     []byte   `json:"-"`
327	XXX_sizecache        int32    `json:"-"`
328}
329
330func (m *Page) Reset()         { *m = Page{} }
331func (m *Page) String() string { return proto.CompactTextString(m) }
332func (*Page) ProtoMessage()    {}
333func (*Page) Descriptor() ([]byte, []int) {
334	return fileDescriptor_text_annotation_8d9193533acd557d, []int{1}
335}
336func (m *Page) XXX_Unmarshal(b []byte) error {
337	return xxx_messageInfo_Page.Unmarshal(m, b)
338}
339func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
340	return xxx_messageInfo_Page.Marshal(b, m, deterministic)
341}
342func (dst *Page) XXX_Merge(src proto.Message) {
343	xxx_messageInfo_Page.Merge(dst, src)
344}
345func (m *Page) XXX_Size() int {
346	return xxx_messageInfo_Page.Size(m)
347}
348func (m *Page) XXX_DiscardUnknown() {
349	xxx_messageInfo_Page.DiscardUnknown(m)
350}
351
352var xxx_messageInfo_Page proto.InternalMessageInfo
353
354func (m *Page) GetProperty() *TextAnnotation_TextProperty {
355	if m != nil {
356		return m.Property
357	}
358	return nil
359}
360
361func (m *Page) GetWidth() int32 {
362	if m != nil {
363		return m.Width
364	}
365	return 0
366}
367
368func (m *Page) GetHeight() int32 {
369	if m != nil {
370		return m.Height
371	}
372	return 0
373}
374
375func (m *Page) GetBlocks() []*Block {
376	if m != nil {
377		return m.Blocks
378	}
379	return nil
380}
381
382func (m *Page) GetConfidence() float32 {
383	if m != nil {
384		return m.Confidence
385	}
386	return 0
387}
388
389// Logical element on the page.
390type Block struct {
391	// Additional information detected for the block.
392	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
393	// The bounding box for the block.
394	// The vertices are in the order of top-left, top-right, bottom-right,
395	// bottom-left. When a rotation of the bounding box is detected the rotation
396	// is represented as around the top-left corner as defined when the text is
397	// read in the 'natural' orientation.
398	// For example:
399	//
400	// * when the text is horizontal it might look like:
401	//
402	//         0----1
403	//         |    |
404	//         3----2
405	//
406	// * when it's rotated 180 degrees around the top-left corner it becomes:
407	//
408	//         2----3
409	//         |    |
410	//         1----0
411	//
412	//   and the vertice order will still be (0, 1, 2, 3).
413	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
414	// List of paragraphs in this block (if this blocks is of type text).
415	Paragraphs []*Paragraph `protobuf:"bytes,3,rep,name=paragraphs,proto3" json:"paragraphs,omitempty"`
416	// Detected block type (text, image etc) for this block.
417	BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=google.cloud.vision.v1p2beta1.Block_BlockType" json:"block_type,omitempty"`
418	// Confidence of the OCR results on the block. Range [0, 1].
419	Confidence           float32  `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
420	XXX_NoUnkeyedLiteral struct{} `json:"-"`
421	XXX_unrecognized     []byte   `json:"-"`
422	XXX_sizecache        int32    `json:"-"`
423}
424
425func (m *Block) Reset()         { *m = Block{} }
426func (m *Block) String() string { return proto.CompactTextString(m) }
427func (*Block) ProtoMessage()    {}
428func (*Block) Descriptor() ([]byte, []int) {
429	return fileDescriptor_text_annotation_8d9193533acd557d, []int{2}
430}
431func (m *Block) XXX_Unmarshal(b []byte) error {
432	return xxx_messageInfo_Block.Unmarshal(m, b)
433}
434func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
435	return xxx_messageInfo_Block.Marshal(b, m, deterministic)
436}
437func (dst *Block) XXX_Merge(src proto.Message) {
438	xxx_messageInfo_Block.Merge(dst, src)
439}
440func (m *Block) XXX_Size() int {
441	return xxx_messageInfo_Block.Size(m)
442}
443func (m *Block) XXX_DiscardUnknown() {
444	xxx_messageInfo_Block.DiscardUnknown(m)
445}
446
447var xxx_messageInfo_Block proto.InternalMessageInfo
448
449func (m *Block) GetProperty() *TextAnnotation_TextProperty {
450	if m != nil {
451		return m.Property
452	}
453	return nil
454}
455
456func (m *Block) GetBoundingBox() *BoundingPoly {
457	if m != nil {
458		return m.BoundingBox
459	}
460	return nil
461}
462
463func (m *Block) GetParagraphs() []*Paragraph {
464	if m != nil {
465		return m.Paragraphs
466	}
467	return nil
468}
469
470func (m *Block) GetBlockType() Block_BlockType {
471	if m != nil {
472		return m.BlockType
473	}
474	return Block_UNKNOWN
475}
476
477func (m *Block) GetConfidence() float32 {
478	if m != nil {
479		return m.Confidence
480	}
481	return 0
482}
483
484// Structural unit of text representing a number of words in certain order.
485type Paragraph struct {
486	// Additional information detected for the paragraph.
487	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
488	// The bounding box for the paragraph.
489	// The vertices are in the order of top-left, top-right, bottom-right,
490	// bottom-left. When a rotation of the bounding box is detected the rotation
491	// is represented as around the top-left corner as defined when the text is
492	// read in the 'natural' orientation.
493	// For example:
494	//   * when the text is horizontal it might look like:
495	//      0----1
496	//      |    |
497	//      3----2
498	//   * when it's rotated 180 degrees around the top-left corner it becomes:
499	//      2----3
500	//      |    |
501	//      1----0
502	//   and the vertice order will still be (0, 1, 2, 3).
503	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
504	// List of words in this paragraph.
505	Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
506	// Confidence of the OCR results for the paragraph. Range [0, 1].
507	Confidence           float32  `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
508	XXX_NoUnkeyedLiteral struct{} `json:"-"`
509	XXX_unrecognized     []byte   `json:"-"`
510	XXX_sizecache        int32    `json:"-"`
511}
512
513func (m *Paragraph) Reset()         { *m = Paragraph{} }
514func (m *Paragraph) String() string { return proto.CompactTextString(m) }
515func (*Paragraph) ProtoMessage()    {}
516func (*Paragraph) Descriptor() ([]byte, []int) {
517	return fileDescriptor_text_annotation_8d9193533acd557d, []int{3}
518}
519func (m *Paragraph) XXX_Unmarshal(b []byte) error {
520	return xxx_messageInfo_Paragraph.Unmarshal(m, b)
521}
522func (m *Paragraph) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
523	return xxx_messageInfo_Paragraph.Marshal(b, m, deterministic)
524}
525func (dst *Paragraph) XXX_Merge(src proto.Message) {
526	xxx_messageInfo_Paragraph.Merge(dst, src)
527}
528func (m *Paragraph) XXX_Size() int {
529	return xxx_messageInfo_Paragraph.Size(m)
530}
531func (m *Paragraph) XXX_DiscardUnknown() {
532	xxx_messageInfo_Paragraph.DiscardUnknown(m)
533}
534
535var xxx_messageInfo_Paragraph proto.InternalMessageInfo
536
537func (m *Paragraph) GetProperty() *TextAnnotation_TextProperty {
538	if m != nil {
539		return m.Property
540	}
541	return nil
542}
543
544func (m *Paragraph) GetBoundingBox() *BoundingPoly {
545	if m != nil {
546		return m.BoundingBox
547	}
548	return nil
549}
550
551func (m *Paragraph) GetWords() []*Word {
552	if m != nil {
553		return m.Words
554	}
555	return nil
556}
557
558func (m *Paragraph) GetConfidence() float32 {
559	if m != nil {
560		return m.Confidence
561	}
562	return 0
563}
564
565// A word representation.
566type Word struct {
567	// Additional information detected for the word.
568	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
569	// The bounding box for the word.
570	// The vertices are in the order of top-left, top-right, bottom-right,
571	// bottom-left. When a rotation of the bounding box is detected the rotation
572	// is represented as around the top-left corner as defined when the text is
573	// read in the 'natural' orientation.
574	// For example:
575	//   * when the text is horizontal it might look like:
576	//      0----1
577	//      |    |
578	//      3----2
579	//   * when it's rotated 180 degrees around the top-left corner it becomes:
580	//      2----3
581	//      |    |
582	//      1----0
583	//   and the vertice order will still be (0, 1, 2, 3).
584	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
585	// List of symbols in the word.
586	// The order of the symbols follows the natural reading order.
587	Symbols []*Symbol `protobuf:"bytes,3,rep,name=symbols,proto3" json:"symbols,omitempty"`
588	// Confidence of the OCR results for the word. Range [0, 1].
589	Confidence           float32  `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
590	XXX_NoUnkeyedLiteral struct{} `json:"-"`
591	XXX_unrecognized     []byte   `json:"-"`
592	XXX_sizecache        int32    `json:"-"`
593}
594
595func (m *Word) Reset()         { *m = Word{} }
596func (m *Word) String() string { return proto.CompactTextString(m) }
597func (*Word) ProtoMessage()    {}
598func (*Word) Descriptor() ([]byte, []int) {
599	return fileDescriptor_text_annotation_8d9193533acd557d, []int{4}
600}
601func (m *Word) XXX_Unmarshal(b []byte) error {
602	return xxx_messageInfo_Word.Unmarshal(m, b)
603}
604func (m *Word) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
605	return xxx_messageInfo_Word.Marshal(b, m, deterministic)
606}
607func (dst *Word) XXX_Merge(src proto.Message) {
608	xxx_messageInfo_Word.Merge(dst, src)
609}
610func (m *Word) XXX_Size() int {
611	return xxx_messageInfo_Word.Size(m)
612}
613func (m *Word) XXX_DiscardUnknown() {
614	xxx_messageInfo_Word.DiscardUnknown(m)
615}
616
617var xxx_messageInfo_Word proto.InternalMessageInfo
618
619func (m *Word) GetProperty() *TextAnnotation_TextProperty {
620	if m != nil {
621		return m.Property
622	}
623	return nil
624}
625
626func (m *Word) GetBoundingBox() *BoundingPoly {
627	if m != nil {
628		return m.BoundingBox
629	}
630	return nil
631}
632
633func (m *Word) GetSymbols() []*Symbol {
634	if m != nil {
635		return m.Symbols
636	}
637	return nil
638}
639
640func (m *Word) GetConfidence() float32 {
641	if m != nil {
642		return m.Confidence
643	}
644	return 0
645}
646
647// A single symbol representation.
648type Symbol struct {
649	// Additional information detected for the symbol.
650	Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
651	// The bounding box for the symbol.
652	// The vertices are in the order of top-left, top-right, bottom-right,
653	// bottom-left. When a rotation of the bounding box is detected the rotation
654	// is represented as around the top-left corner as defined when the text is
655	// read in the 'natural' orientation.
656	// For example:
657	//   * when the text is horizontal it might look like:
658	//      0----1
659	//      |    |
660	//      3----2
661	//   * when it's rotated 180 degrees around the top-left corner it becomes:
662	//      2----3
663	//      |    |
664	//      1----0
665	//   and the vertice order will still be (0, 1, 2, 3).
666	BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
667	// The actual UTF-8 representation of the symbol.
668	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
669	// Confidence of the OCR results for the symbol. Range [0, 1].
670	Confidence           float32  `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
671	XXX_NoUnkeyedLiteral struct{} `json:"-"`
672	XXX_unrecognized     []byte   `json:"-"`
673	XXX_sizecache        int32    `json:"-"`
674}
675
676func (m *Symbol) Reset()         { *m = Symbol{} }
677func (m *Symbol) String() string { return proto.CompactTextString(m) }
678func (*Symbol) ProtoMessage()    {}
679func (*Symbol) Descriptor() ([]byte, []int) {
680	return fileDescriptor_text_annotation_8d9193533acd557d, []int{5}
681}
682func (m *Symbol) XXX_Unmarshal(b []byte) error {
683	return xxx_messageInfo_Symbol.Unmarshal(m, b)
684}
685func (m *Symbol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
686	return xxx_messageInfo_Symbol.Marshal(b, m, deterministic)
687}
688func (dst *Symbol) XXX_Merge(src proto.Message) {
689	xxx_messageInfo_Symbol.Merge(dst, src)
690}
691func (m *Symbol) XXX_Size() int {
692	return xxx_messageInfo_Symbol.Size(m)
693}
694func (m *Symbol) XXX_DiscardUnknown() {
695	xxx_messageInfo_Symbol.DiscardUnknown(m)
696}
697
698var xxx_messageInfo_Symbol proto.InternalMessageInfo
699
700func (m *Symbol) GetProperty() *TextAnnotation_TextProperty {
701	if m != nil {
702		return m.Property
703	}
704	return nil
705}
706
707func (m *Symbol) GetBoundingBox() *BoundingPoly {
708	if m != nil {
709		return m.BoundingBox
710	}
711	return nil
712}
713
714func (m *Symbol) GetText() string {
715	if m != nil {
716		return m.Text
717	}
718	return ""
719}
720
721func (m *Symbol) GetConfidence() float32 {
722	if m != nil {
723		return m.Confidence
724	}
725	return 0
726}
727
728func init() {
729	proto.RegisterType((*TextAnnotation)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation")
730	proto.RegisterType((*TextAnnotation_DetectedLanguage)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage")
731	proto.RegisterType((*TextAnnotation_DetectedBreak)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak")
732	proto.RegisterType((*TextAnnotation_TextProperty)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty")
733	proto.RegisterType((*Page)(nil), "google.cloud.vision.v1p2beta1.Page")
734	proto.RegisterType((*Block)(nil), "google.cloud.vision.v1p2beta1.Block")
735	proto.RegisterType((*Paragraph)(nil), "google.cloud.vision.v1p2beta1.Paragraph")
736	proto.RegisterType((*Word)(nil), "google.cloud.vision.v1p2beta1.Word")
737	proto.RegisterType((*Symbol)(nil), "google.cloud.vision.v1p2beta1.Symbol")
738	proto.RegisterEnum("google.cloud.vision.v1p2beta1.TextAnnotation_DetectedBreak_BreakType", TextAnnotation_DetectedBreak_BreakType_name, TextAnnotation_DetectedBreak_BreakType_value)
739	proto.RegisterEnum("google.cloud.vision.v1p2beta1.Block_BlockType", Block_BlockType_name, Block_BlockType_value)
740}
741
742func init() {
743	proto.RegisterFile("google/cloud/vision/v1p2beta1/text_annotation.proto", fileDescriptor_text_annotation_8d9193533acd557d)
744}
745
746var fileDescriptor_text_annotation_8d9193533acd557d = []byte{
747	// 774 bytes of a gzipped FileDescriptorProto
748	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xd3, 0x48,
749	0x14, 0x5f, 0x27, 0x76, 0x1a, 0xbf, 0xb4, 0x91, 0x77, 0x76, 0xb5, 0x8a, 0xb2, 0xbb, 0xa8, 0xa4,
750	0x20, 0x55, 0x02, 0x39, 0x6a, 0x7a, 0x2a, 0x45, 0xa0, 0x38, 0xb5, 0xd4, 0xaa, 0x21, 0xb5, 0xa6,
751	0x09, 0xa5, 0x5c, 0x2c, 0xff, 0x99, 0x3a, 0x56, 0x13, 0x8f, 0x65, 0xbb, 0x6d, 0x72, 0xe5, 0x8a,
752	0x04, 0x5f, 0x88, 0x2f, 0x83, 0xc4, 0x09, 0xf1, 0x01, 0x38, 0x22, 0x8f, 0xed, 0x34, 0x09, 0xa2,
753	0xe6, 0x8f, 0x38, 0xf4, 0x12, 0xcd, 0x7b, 0x79, 0xbf, 0x37, 0xef, 0xf7, 0x7b, 0xf3, 0x3c, 0x03,
754	0xdb, 0x0e, 0xa5, 0xce, 0x88, 0x34, 0xad, 0x11, 0xbd, 0xb0, 0x9b, 0x97, 0x6e, 0xe8, 0x52, 0xaf,
755	0x79, 0xb9, 0xe5, 0xb7, 0x4c, 0x12, 0x19, 0x5b, 0xcd, 0x88, 0x4c, 0x22, 0xdd, 0xf0, 0x3c, 0x1a,
756	0x19, 0x91, 0x4b, 0x3d, 0xd9, 0x0f, 0x68, 0x44, 0xd1, 0xff, 0x09, 0x48, 0x66, 0x20, 0x39, 0x01,
757	0xc9, 0x33, 0x50, 0xfd, 0xbf, 0x34, 0xa7, 0xe1, 0xbb, 0xcd, 0x6b, 0x6c, 0x98, 0x80, 0xeb, 0x0f,
758	0x6f, 0xde, 0xd1, 0x21, 0x74, 0x4c, 0xa2, 0x60, 0x9a, 0x44, 0x37, 0x5e, 0x0b, 0x50, 0xed, 0x93,
759	0x49, 0xd4, 0x9e, 0xe5, 0x41, 0x3b, 0x20, 0xf8, 0x86, 0x43, 0xc2, 0x1a, 0xb7, 0x5e, 0xdc, 0xac,
760	0xb4, 0x36, 0xe4, 0x1b, 0xab, 0x91, 0x35, 0xc3, 0x21, 0x38, 0x41, 0x20, 0x04, 0x7c, 0xcc, 0xa8,
761	0x56, 0x58, 0xe7, 0x36, 0x45, 0xcc, 0xd6, 0xf5, 0x13, 0x90, 0xf6, 0x48, 0x44, 0xac, 0x88, 0xd8,
762	0x5d, 0xc3, 0x73, 0x2e, 0x0c, 0x87, 0xa0, 0x0d, 0x58, 0x1b, 0xa5, 0x6b, 0xdd, 0xa2, 0x36, 0xa9,
763	0x71, 0x0c, 0xb0, 0x9a, 0x39, 0x3b, 0xd4, 0x26, 0xe8, 0x0e, 0x80, 0x45, 0xbd, 0x33, 0xd7, 0x26,
764	0x9e, 0x45, 0x58, 0xca, 0x02, 0x9e, 0xf3, 0xd4, 0x3f, 0x71, 0xb0, 0x96, 0x65, 0x56, 0x02, 0x62,
765	0x9c, 0xa3, 0x53, 0xe0, 0xa3, 0xa9, 0x9f, 0x64, 0xab, 0xb6, 0xd4, 0x9c, 0xc2, 0x17, 0x69, 0xcb,
766	0x0b, 0xa9, 0x64, 0xf6, 0xdb, 0x9f, 0xfa, 0x04, 0xb3, 0x94, 0xe8, 0x5f, 0x10, 0xdd, 0x50, 0xf7,
767	0x03,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0xb6, 0x00, 0x7c, 0x1c, 0x7f, 0x6b, 0xb4,
790	0x78, 0x0a, 0x2b, 0xe1, 0x74, 0x6c, 0xd2, 0x51, 0xa6, 0xc6, 0xfd, 0x9c, 0x54, 0xc7, 0x2c, 0x1a,
791	0x67, 0xa8, 0x5c, 0x45, 0x3e, 0x70, 0x50, 0x4a, 0x30, 0xb7, 0x46, 0x93, 0xec, 0x06, 0x2f, 0x5e,
792	0xdf, 0xe0, 0x79, 0x34, 0x95, 0x57, 0x1c, 0xdc, 0xb5, 0xe8, 0xf8, 0xe6, 0x3d, 0x95, 0xbf, 0x16,
793	0x09, 0x69, 0xf1, 0xf3, 0x43, 0xe3, 0x5e, 0x76, 0x52, 0x94, 0x43, 0xe3, 0x3b, 0x4c, 0xa6, 0x81,
794	0xd3, 0x74, 0x88, 0xc7, 0x1e, 0x27, 0xcd, 0xe4, 0x2f, 0xc3, 0x77, 0xc3, 0x6f, 0xbc, 0x66, 0x76,
795	0x13, 0xc7, 0x67, 0x8e, 0x33, 0x4b, 0x0c, 0xb2, 0xfd, 0x25, 0x00, 0x00, 0xff, 0xff, 0xce, 0x91,
796	0x71, 0x97, 0x71, 0x09, 0x00, 0x00,
797}
798