/
web_detection.pb.go
402 lines (357 loc) · 16.2 KB
/
web_detection.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1/web_detection.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Relevant information for the image from the Internet.
type WebDetection struct {
// Deduced entities from similar images on the Internet.
WebEntities []*WebDetection_WebEntity `protobuf:"bytes,1,rep,name=web_entities,json=webEntities,proto3" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images from the Internet.
// Those images are similar enough to share some key-point features. For
// example an original image will likely have partial matching for its crops.
PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,3,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
// Web pages containing the matching images from the Internet.
PagesWithMatchingImages []*WebDetection_WebPage `protobuf:"bytes,4,rep,name=pages_with_matching_images,json=pagesWithMatchingImages,proto3" json:"pages_with_matching_images,omitempty"`
// The visually similar image results.
VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages,proto3" json:"visually_similar_images,omitempty"`
// Best guess text labels for the request image.
BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels,proto3" json:"best_guess_labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection) Reset() { *m = WebDetection{} }
func (m *WebDetection) String() string { return proto.CompactTextString(m) }
func (*WebDetection) ProtoMessage() {}
func (*WebDetection) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0}
}
func (m *WebDetection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection.Unmarshal(m, b)
}
func (m *WebDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection.Marshal(b, m, deterministic)
}
func (m *WebDetection) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection.Merge(m, src)
}
func (m *WebDetection) XXX_Size() int {
return xxx_messageInfo_WebDetection.Size(m)
}
func (m *WebDetection) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection proto.InternalMessageInfo
func (m *WebDetection) GetWebEntities() []*WebDetection_WebEntity {
if m != nil {
return m.WebEntities
}
return nil
}
func (m *WebDetection) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
func (m *WebDetection) GetPagesWithMatchingImages() []*WebDetection_WebPage {
if m != nil {
return m.PagesWithMatchingImages
}
return nil
}
func (m *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImage {
if m != nil {
return m.VisuallySimilarImages
}
return nil
}
func (m *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabel {
if m != nil {
return m.BestGuessLabels
}
return nil
}
// Entity deduced from similar images on the Internet.
type WebDetection_WebEntity struct {
// Opaque entity ID.
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
// Overall relevancy score for the entity.
// Not normalized and not comparable across different image queries.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebEntity) Reset() { *m = WebDetection_WebEntity{} }
func (m *WebDetection_WebEntity) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebEntity) ProtoMessage() {}
func (*WebDetection_WebEntity) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0, 0}
}
func (m *WebDetection_WebEntity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebEntity.Unmarshal(m, b)
}
func (m *WebDetection_WebEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebEntity.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebEntity) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebEntity.Merge(m, src)
}
func (m *WebDetection_WebEntity) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebEntity.Size(m)
}
func (m *WebDetection_WebEntity) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebEntity.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebEntity proto.InternalMessageInfo
func (m *WebDetection_WebEntity) GetEntityId() string {
if m != nil {
return m.EntityId
}
return ""
}
func (m *WebDetection_WebEntity) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
func (m *WebDetection_WebEntity) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// Metadata for online images.
type WebDetection_WebImage struct {
// The result image URL.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the image.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebImage) Reset() { *m = WebDetection_WebImage{} }
func (m *WebDetection_WebImage) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebImage) ProtoMessage() {}
func (*WebDetection_WebImage) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0, 1}
}
func (m *WebDetection_WebImage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebImage.Unmarshal(m, b)
}
func (m *WebDetection_WebImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebImage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebImage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebImage.Merge(m, src)
}
func (m *WebDetection_WebImage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebImage.Size(m)
}
func (m *WebDetection_WebImage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebImage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebImage proto.InternalMessageInfo
func (m *WebDetection_WebImage) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *WebDetection_WebImage) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
// Metadata for web pages.
type WebDetection_WebPage struct {
// The result web page URL.
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the web page.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Title for the web page, may contain HTML markups.
PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle,proto3" json:"page_title,omitempty"`
// Fully matching images on the page.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images on the page.
// Those images are similar enough to share some key-point features. For
// example an original image will likely have partial matching for its
// crops.
PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,5,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebPage) Reset() { *m = WebDetection_WebPage{} }
func (m *WebDetection_WebPage) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebPage) ProtoMessage() {}
func (*WebDetection_WebPage) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0, 2}
}
func (m *WebDetection_WebPage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebPage.Unmarshal(m, b)
}
func (m *WebDetection_WebPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebPage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebPage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebPage.Merge(m, src)
}
func (m *WebDetection_WebPage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebPage.Size(m)
}
func (m *WebDetection_WebPage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebPage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebPage proto.InternalMessageInfo
func (m *WebDetection_WebPage) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *WebDetection_WebPage) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
func (m *WebDetection_WebPage) GetPageTitle() string {
if m != nil {
return m.PageTitle
}
return ""
}
func (m *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
// Label to provide extra metadata for the web detection.
type WebDetection_WebLabel struct {
// Label for extra metadata.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebLabel) Reset() { *m = WebDetection_WebLabel{} }
func (m *WebDetection_WebLabel) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebLabel) ProtoMessage() {}
func (*WebDetection_WebLabel) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0, 3}
}
func (m *WebDetection_WebLabel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebLabel.Unmarshal(m, b)
}
func (m *WebDetection_WebLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebLabel.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebLabel) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebLabel.Merge(m, src)
}
func (m *WebDetection_WebLabel) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebLabel.Size(m)
}
func (m *WebDetection_WebLabel) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebLabel.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebLabel proto.InternalMessageInfo
func (m *WebDetection_WebLabel) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *WebDetection_WebLabel) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func init() {
proto.RegisterType((*WebDetection)(nil), "google.cloud.vision.v1.WebDetection")
proto.RegisterType((*WebDetection_WebEntity)(nil), "google.cloud.vision.v1.WebDetection.WebEntity")
proto.RegisterType((*WebDetection_WebImage)(nil), "google.cloud.vision.v1.WebDetection.WebImage")
proto.RegisterType((*WebDetection_WebPage)(nil), "google.cloud.vision.v1.WebDetection.WebPage")
proto.RegisterType((*WebDetection_WebLabel)(nil), "google.cloud.vision.v1.WebDetection.WebLabel")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1/web_detection.proto", fileDescriptor_894df371610d13f4)
}
var fileDescriptor_894df371610d13f4 = []byte{
// 512 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x51, 0x6f, 0xd3, 0x30,
0x10, 0xc7, 0x95, 0xb6,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