GameSentenceMiner 2.6.5__py3-none-any.whl → 2.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1238 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # sources: lens_overlay_client_context.proto, lens_overlay_client_logs.proto, lens_overlay_client_platform.proto, lens_overlay_cluster_info.proto, lens_overlay_deep_gleam_data.proto, lens_overlay_document.proto, lens_overlay_filters.proto, lens_overlay_geometry.proto, lens_overlay_image_crop.proto, lens_overlay_image_data.proto, lens_overlay_interaction_request_metadata.proto, lens_overlay_knowledge_intent_query.proto, lens_overlay_knowledge_query.proto, lens_overlay_math_solver_query.proto, lens_overlay_message_set.proto, lens_overlay_overlay_object.proto, lens_overlay_payload.proto, lens_overlay_phase_latencies_metadata.proto, lens_overlay_platform.proto, lens_overlay_polygon.proto, lens_overlay_request_id.proto, lens_overlay_routing_info.proto, lens_overlay_selection_type.proto, lens_overlay_server.proto, lens_overlay_service_deps.proto, lens_overlay_stickiness_signals.proto, lens_overlay_surface.proto, lens_overlay_text.proto, lens_overlay_text_query.proto, lens_overlay_translate_stickiness_signals.proto, lens_overlay_video_context_input_params.proto, lens_overlay_video_params.proto, lens_overlay_visual_search_interaction_data.proto, lens_overlay_visual_search_interaction_log_data.proto
3
+ # plugin: python-betterproto
4
+ # This file has been @generated
5
+
6
+ from dataclasses import dataclass
7
+ from typing import (
8
+ List,
9
+ Optional,
10
+ )
11
+
12
+ import betterproto
13
+
14
+
15
+ class LensOverlayFilterType(betterproto.Enum):
16
+ """Supported filter types."""
17
+
18
+ UNKNOWN_FILTER_TYPE = 0
19
+ TRANSLATE = 2
20
+ AUTO_FILTER = 7
21
+
22
+
23
+ class Platform(betterproto.Enum):
24
+ UNSPECIFIED = 0
25
+ WEB = 3
26
+
27
+
28
+ class Surface(betterproto.Enum):
29
+ UNSPECIFIED = 0
30
+ CHROMIUM = 4
31
+
32
+
33
+ class LensRenderingEnvironment(betterproto.Enum):
34
+ """The possible rendering environments."""
35
+
36
+ RENDERING_ENV_UNSPECIFIED = 0
37
+ RENDERING_ENV_LENS_OVERLAY = 14
38
+
39
+
40
+ class LensOverlayPhaseLatenciesMetadataImageType(betterproto.Enum):
41
+ UNKNOWN = 0
42
+ JPEG = 1
43
+ PNG = 2
44
+ WEBP = 3
45
+
46
+
47
+ class LensOverlayClientLogsLensOverlayEntryPoint(betterproto.Enum):
48
+ UNKNOWN_ENTRY_POINT = 0
49
+ APP_MENU = 1
50
+ PAGE_CONTEXT_MENU = 2
51
+ IMAGE_CONTEXT_MENU = 3
52
+ OMNIBOX_BUTTON = 4
53
+ TOOLBAR_BUTTON = 5
54
+ FIND_IN_PAGE = 6
55
+
56
+
57
+ class ClientPlatform(betterproto.Enum):
58
+ UNSPECIFIED = 0
59
+ LENS_OVERLAY = 2
60
+
61
+
62
+ class CoordinateType(betterproto.Enum):
63
+ """Specifies the coordinate system used for geometry protos."""
64
+
65
+ UNSPECIFIED = 0
66
+ """Unspecified default value, per proto best practice."""
67
+
68
+ NORMALIZED = 1
69
+ """Normalized coordinates."""
70
+
71
+ IMAGE = 2
72
+ """Image pixel coordinates."""
73
+
74
+
75
+ class PolygonVertexOrdering(betterproto.Enum):
76
+ """Specifies the vertex ordering."""
77
+
78
+ VERTEX_ORDERING_UNSPECIFIED = 0
79
+ CLOCKWISE = 1
80
+ COUNTER_CLOCKWISE = 2
81
+
82
+
83
+ class WritingDirection(betterproto.Enum):
84
+ """The text reading order."""
85
+
86
+ LEFT_TO_RIGHT = 0
87
+ RIGHT_TO_LEFT = 1
88
+ TOP_TO_BOTTOM = 2
89
+
90
+
91
+ class Alignment(betterproto.Enum):
92
+ """The text alignment."""
93
+
94
+ DEFAULT_LEFT_ALIGNED = 0
95
+ RIGHT_ALIGNED = 1
96
+ CENTER_ALIGNED = 2
97
+
98
+
99
+ class TextLayoutWordType(betterproto.Enum):
100
+ TEXT = 0
101
+ """Printed text."""
102
+
103
+ FORMULA = 1
104
+ """Formula type, including mathematical or chemical formulas."""
105
+
106
+
107
+ class TranslationDataStatusCode(betterproto.Enum):
108
+ UNKNOWN = 0
109
+ SUCCESS = 1
110
+ SERVER_ERROR = 2
111
+ UNSUPPORTED_LANGUAGE_PAIR = 3
112
+ SAME_LANGUAGE = 4
113
+ UNKNOWN_SOURCE_LANGUAGE = 5
114
+ INVALID_REQUEST = 6
115
+ DEADLINE_EXCEEDED = 7
116
+ EMPTY_TRANSLATION = 8
117
+ NO_OP_TRANSLATION = 9
118
+
119
+
120
+ class TranslationDataBackgroundImageDataFileFormat(betterproto.Enum):
121
+ """File format of the bytes in background_image."""
122
+
123
+ UNKNOWN = 0
124
+ RAW_BYTES_RGBA = 1
125
+ PNG_RGBA = 2
126
+ WEBP_RGBA = 3
127
+ JPEG_RGB_PNG_MASK = 4
128
+
129
+
130
+ class LensOverlayInteractionRequestMetadataType(betterproto.Enum):
131
+ UNKNOWN = 0
132
+ TAP = 1
133
+ """User's tap on the screen."""
134
+
135
+ REGION = 2
136
+ """User's region selection on the screenshot."""
137
+
138
+ TEXT_SELECTION = 3
139
+ """User's text selection on the screenshot."""
140
+
141
+ REGION_SEARCH = 4
142
+ """User selected a bounding box to region search."""
143
+
144
+ OBJECT_FULFILLMENT = 5
145
+ """Requests selection and fulfillment of a specific object."""
146
+
147
+ CONTEXTUAL_SEARCH_QUERY = 9
148
+ """User sent a query in the contextual search box."""
149
+
150
+ PDF_QUERY = 10
151
+ """User sent a query about a pdf."""
152
+
153
+ WEBPAGE_QUERY = 11
154
+ """User sent a query about a website."""
155
+
156
+
157
+ class OverlayObjectRenderingMetadataRenderType(betterproto.Enum):
158
+ DEFAULT = 0
159
+ GLEAM = 1
160
+
161
+
162
+ class LensOverlaySelectionType(betterproto.Enum):
163
+ """Possible selection types for Lens overlay."""
164
+
165
+ UNKNOWN_SELECTION_TYPE = 0
166
+ TAP_ON_EMPTY = 1
167
+ SELECT_TEXT_HIGHLIGHT = 3
168
+ REGION_SEARCH = 7
169
+ INJECTED_IMAGE = 10
170
+ TAP_ON_REGION_GLEAM = 15
171
+ MULTIMODAL_SEARCH = 18
172
+ SELECT_TRANSLATED_TEXT = 21
173
+ TAP_ON_OBJECT = 22
174
+ MULTIMODAL_SUGGEST_TYPEAHEAD = 25
175
+ MULTIMODAL_SUGGEST_ZERO_PREFIX = 26
176
+ TRANSLATE_CHIP = 52
177
+ SYMBOLIC_MATH_OBJECT = 53
178
+
179
+
180
+ class PayloadRequestType(betterproto.Enum):
181
+ """The type of the request the payload is sent in."""
182
+
183
+ REQUEST_TYPE_DEFAULT = 0
184
+ """Unset Request type."""
185
+
186
+ REQUEST_TYPE_PDF = 1
187
+ """Request is for PDF."""
188
+
189
+ REQUEST_TYPE_EARLY_PARTIAL_PDF = 3
190
+ """Request is for partial PDF upload."""
191
+
192
+ REQUEST_TYPE_WEBPAGE = 2
193
+ """Request is for webpage."""
194
+
195
+
196
+ class PayloadCompressionType(betterproto.Enum):
197
+ """Possible compression types for content_data."""
198
+
199
+ UNCOMPRESSED = 0
200
+ """Default value. File is not compressed."""
201
+
202
+ ZSTD = 1
203
+ """ZSTD compression."""
204
+
205
+
206
+ class LensOverlayServerErrorErrorType(betterproto.Enum):
207
+ UNKNOWN_TYPE = 0
208
+ MISSING_REQUEST = 1
209
+
210
+
211
+ class StickinessSignalsNamespace(betterproto.Enum):
212
+ UNKNOWN = 0
213
+ TRANSLATE_LITE = 56
214
+ EDUCATION_INPUT = 79
215
+
216
+
217
+ @dataclass(eq=False, repr=False)
218
+ class AppliedFilter(betterproto.Message):
219
+ """Supported filter types."""
220
+
221
+ filter_type: "LensOverlayFilterType" = betterproto.enum_field(1)
222
+ translate: "AppliedFilterTranslate" = betterproto.message_field(
223
+ 3, group="filter_payload"
224
+ )
225
+
226
+
227
+ @dataclass(eq=False, repr=False)
228
+ class AppliedFilterTranslate(betterproto.Message):
229
+ target_language: str = betterproto.string_field(1)
230
+ source_language: str = betterproto.string_field(2)
231
+
232
+
233
+ @dataclass(eq=False, repr=False)
234
+ class AppliedFilters(betterproto.Message):
235
+ """Supported filter types."""
236
+
237
+ filter: List["AppliedFilter"] = betterproto.message_field(1)
238
+
239
+
240
+ @dataclass(eq=False, repr=False)
241
+ class LensOverlayClientContext(betterproto.Message):
242
+ """Context information of the client sending the request."""
243
+
244
+ platform: "Platform" = betterproto.enum_field(1)
245
+ """Required. Client platform."""
246
+
247
+ surface: "Surface" = betterproto.enum_field(2)
248
+ """Optional. Client surface."""
249
+
250
+ locale_context: "LocaleContext" = betterproto.message_field(4)
251
+ """Required. Locale specific context."""
252
+
253
+ app_id: str = betterproto.string_field(6)
254
+ """
255
+ Required. Name of the package which sends the request to Lens Frontend.
256
+ """
257
+
258
+ client_filters: "AppliedFilters" = betterproto.message_field(17)
259
+ """Filters that are enabled on the client side."""
260
+
261
+ rendering_context: "RenderingContext" = betterproto.message_field(20)
262
+ """The rendering context info."""
263
+
264
+ client_logging_data: "ClientLoggingData" = betterproto.message_field(23)
265
+ """Logging data."""
266
+
267
+
268
+ @dataclass(eq=False, repr=False)
269
+ class LocaleContext(betterproto.Message):
270
+ """Describes locale context."""
271
+
272
+ language: str = betterproto.string_field(1)
273
+ """The BCP 47 language tag used to identify the language of the client."""
274
+
275
+ region: str = betterproto.string_field(2)
276
+ """The CLDR region tag used to identify the region of the client."""
277
+
278
+ time_zone: str = betterproto.string_field(3)
279
+ """The CLDR time zone ID used to identify the timezone of the client."""
280
+
281
+
282
+ @dataclass(eq=False, repr=False)
283
+ class RenderingContext(betterproto.Message):
284
+ rendering_environment: "LensRenderingEnvironment" = betterproto.enum_field(2)
285
+ """The rendering environment."""
286
+
287
+
288
+ @dataclass(eq=False, repr=False)
289
+ class ClientLoggingData(betterproto.Message):
290
+ """Contains data that can be used for logging purposes."""
291
+
292
+ is_history_eligible: bool = betterproto.bool_field(1)
293
+ """Whether history is enabled."""
294
+
295
+
296
+ @dataclass(eq=False, repr=False)
297
+ class LensOverlayPhaseLatenciesMetadata(betterproto.Message):
298
+ """Phase latency metadata for the Lens Overlay."""
299
+
300
+ phase: List["LensOverlayPhaseLatenciesMetadataPhase"] = betterproto.message_field(1)
301
+
302
+
303
+ @dataclass(eq=False, repr=False)
304
+ class LensOverlayPhaseLatenciesMetadataPhase(betterproto.Message):
305
+ """
306
+ Represents a single point in time during the image preprocessing flow.
307
+ """
308
+
309
+ image_downscale_data: "LensOverlayPhaseLatenciesMetadataPhaseImageDownscaleData" = (
310
+ betterproto.message_field(3, group="phase_data")
311
+ )
312
+ """Data specifically only relevant for IMAGE_DOWNSCALE_END PhaseType."""
313
+
314
+ image_encode_data: "LensOverlayPhaseLatenciesMetadataPhaseImageEncodeData" = (
315
+ betterproto.message_field(4, group="phase_data")
316
+ )
317
+ """Data specifically only relevant for IMAGE_ENCODE_END PhaseType."""
318
+
319
+
320
+ @dataclass(eq=False, repr=False)
321
+ class LensOverlayPhaseLatenciesMetadataPhaseImageDownscaleData(betterproto.Message):
322
+ original_image_size: int = betterproto.int64_field(1)
323
+ """The size of the original image, in pixels."""
324
+
325
+ downscaled_image_size: int = betterproto.int64_field(2)
326
+ """The size of the downscaled image, in pixels."""
327
+
328
+
329
+ @dataclass(eq=False, repr=False)
330
+ class LensOverlayPhaseLatenciesMetadataPhaseImageEncodeData(betterproto.Message):
331
+ original_image_type: "LensOverlayPhaseLatenciesMetadataImageType" = (
332
+ betterproto.enum_field(1)
333
+ )
334
+ """
335
+ The type of the original Image. This only applies to IMAGE_ENCODE_END
336
+ PhaseTypes
337
+ """
338
+
339
+ encoded_image_size_bytes: int = betterproto.int64_field(2)
340
+ """The bytes size of the encoded image."""
341
+
342
+
343
+ @dataclass(eq=False, repr=False)
344
+ class LensOverlayClientLogs(betterproto.Message):
345
+ phase_latencies_metadata: "LensOverlayPhaseLatenciesMetadata" = (
346
+ betterproto.message_field(1)
347
+ )
348
+ """
349
+ The phase latency metadata for any image preprocessing required for the
350
+ request.
351
+ """
352
+
353
+ lens_overlay_entry_point: "LensOverlayClientLogsLensOverlayEntryPoint" = (
354
+ betterproto.enum_field(2)
355
+ )
356
+ """The Lens Overlay entry point used to access lens."""
357
+
358
+ paella_id: int = betterproto.uint64_field(3)
359
+ """
360
+ A unique identifier for associating events logged by lens asynchronously.
361
+ """
362
+
363
+ metrics_collection_disabled: bool = betterproto.bool_field(5)
364
+ """Whether the user has disabled metrics collection."""
365
+
366
+
367
+ @dataclass(eq=False, repr=False)
368
+ class LensOverlayRoutingInfo(betterproto.Message):
369
+ """Information about where to route the request."""
370
+
371
+ server_address: str = betterproto.string_field(1)
372
+ """Address to route the request to."""
373
+
374
+ cell_address: str = betterproto.string_field(3)
375
+ """Cell to route the request to."""
376
+
377
+ blade_target: str = betterproto.string_field(2)
378
+ """Blade target to route the request to."""
379
+
380
+
381
+ @dataclass(eq=False, repr=False)
382
+ class LensOverlayClusterInfo(betterproto.Message):
383
+ """The cluster info for a Lens Overlay session."""
384
+
385
+ server_session_id: str = betterproto.string_field(1)
386
+ """ID for subsequent server requests."""
387
+
388
+ search_session_id: str = betterproto.string_field(2)
389
+ """ID for subsequent search requests."""
390
+
391
+ routing_info: "LensOverlayRoutingInfo" = betterproto.message_field(6)
392
+ """Info used for routing subsequent requests."""
393
+
394
+
395
+ @dataclass(eq=False, repr=False)
396
+ class Polygon(betterproto.Message):
397
+ """Information about a polygon."""
398
+
399
+ vertex: List["PolygonVertex"] = betterproto.message_field(1)
400
+ vertex_ordering: "PolygonVertexOrdering" = betterproto.enum_field(2)
401
+ coordinate_type: "CoordinateType" = betterproto.enum_field(3)
402
+ """Specifies the coordinate type of vertices."""
403
+
404
+
405
+ @dataclass(eq=False, repr=False)
406
+ class PolygonVertex(betterproto.Message):
407
+ """Represents a single vertex in the polygon."""
408
+
409
+ x: float = betterproto.float_field(1)
410
+ y: float = betterproto.float_field(2)
411
+
412
+
413
+ @dataclass(eq=False, repr=False)
414
+ class CenterRotatedBox(betterproto.Message):
415
+ """Information about a center bounding box rotated around its center."""
416
+
417
+ center_x: float = betterproto.float_field(1)
418
+ center_y: float = betterproto.float_field(2)
419
+ width: float = betterproto.float_field(3)
420
+ height: float = betterproto.float_field(4)
421
+ rotation_z: float = betterproto.float_field(5)
422
+ """
423
+ Clockwise rotation around the center in radians. The rotation angle is
424
+ computed before normalizing the coordinates.
425
+ """
426
+
427
+ coordinate_type: "CoordinateType" = betterproto.enum_field(6)
428
+ """
429
+ Specifies the coordinate type of center and size.
430
+ @note default is COORDINATE_TYPE_UNSPECIFIED, please initialize this value
431
+ to NORMALIZED or IMAGE for Lens detection API usage.
432
+ """
433
+
434
+
435
+ @dataclass(eq=False, repr=False)
436
+ class Geometry(betterproto.Message):
437
+ """Geometric shape(s) used for tracking and detection."""
438
+
439
+ bounding_box: "CenterRotatedBox" = betterproto.message_field(1)
440
+ """Specifies the bounding box for this geometry."""
441
+
442
+ segmentation_polygon: List["Polygon"] = betterproto.message_field(5)
443
+ """
444
+ Specifies the segmentation polygon. The vertices of the outer-boundaries
445
+ are in clockwise, and the ones of inner-boundaries are in counter-clockwise
446
+ ordering.
447
+ """
448
+
449
+
450
+ @dataclass(eq=False, repr=False)
451
+ class ZoomedCrop(betterproto.Message):
452
+ """
453
+ A cropped and potentially re-scaled image region, rectangular subregion of a
454
+ canonical image.
455
+ """
456
+
457
+ crop: "CenterRotatedBox" = betterproto.message_field(1)
458
+ """The cropped region of the parent image in parent coordinates."""
459
+
460
+ parent_width: int = betterproto.int32_field(2)
461
+ """Width of the parent image."""
462
+
463
+ parent_height: int = betterproto.int32_field(3)
464
+ """Height of the parent image."""
465
+
466
+ zoom: float = betterproto.float_field(4)
467
+ """
468
+ The ratio of the pixel dimensions of the child image to the pixel
469
+ dimensions of the 'crop' in parent coordinates.
470
+ """
471
+
472
+
473
+ @dataclass(eq=False, repr=False)
474
+ class Text(betterproto.Message):
475
+ text_layout: "TextLayout" = betterproto.message_field(1)
476
+ """Optional. Information describing the text."""
477
+
478
+ content_language: str = betterproto.string_field(2)
479
+ """
480
+ Optional. Dominant content language of the text. Language
481
+ code is CLDR/BCP-47.
482
+ """
483
+
484
+
485
+ @dataclass(eq=False, repr=False)
486
+ class TextLayout(betterproto.Message):
487
+ """Nested text structure."""
488
+
489
+ paragraphs: List["TextLayoutParagraph"] = betterproto.message_field(1)
490
+ """Optional. List of paragraphs in natural reading order."""
491
+
492
+
493
+ @dataclass(eq=False, repr=False)
494
+ class TextLayoutWord(betterproto.Message):
495
+ id: "TextEntityIdentifier" = betterproto.message_field(1)
496
+ """Required. Unique id within TextLayout."""
497
+
498
+ plain_text: str = betterproto.string_field(2)
499
+ """Optional. The text in a plain text."""
500
+
501
+ text_separator: Optional[str] = betterproto.string_field(3, optional=True)
502
+ """
503
+ Optional. The text separator that should be appended after this word when
504
+ it is concatenated with the subsequent word in the same or next
505
+ line/paragraph into a single-line string. This is specified as optional
506
+ because there is a distinction between the absence of a separator and
507
+ the empty string as a separator.
508
+ """
509
+
510
+ geometry: "Geometry" = betterproto.message_field(4)
511
+ """Optional. The geometry of the word."""
512
+
513
+ type: "TextLayoutWordType" = betterproto.enum_field(5)
514
+ """Optional. The type of this word."""
515
+
516
+ formula_metadata: "TextLayoutWordFormulaMetadata" = betterproto.message_field(6)
517
+ """
518
+ Optional. Metadata for formulas. This is populated for entities of
519
+ `type=FORMULA`.
520
+ """
521
+
522
+
523
+ @dataclass(eq=False, repr=False)
524
+ class TextLayoutWordFormulaMetadata(betterproto.Message):
525
+ latex: str = betterproto.string_field(1)
526
+ """
527
+ Optional. LaTeX representation of a formula. Can be the same as
528
+ `plain_text`. Example: "\frac{2}{x}=y". The plain text
529
+ representation of this is available in Word.plain_text.
530
+ """
531
+
532
+
533
+ @dataclass(eq=False, repr=False)
534
+ class TextLayoutLine(betterproto.Message):
535
+ words: List["TextLayoutWord"] = betterproto.message_field(1)
536
+ """Optional. List of words in natural reading order."""
537
+
538
+ geometry: "Geometry" = betterproto.message_field(2)
539
+ """Optional. The geometry of the line."""
540
+
541
+
542
+ @dataclass(eq=False, repr=False)
543
+ class TextLayoutParagraph(betterproto.Message):
544
+ id: "TextEntityIdentifier" = betterproto.message_field(1)
545
+ """Required. Unique id within TextLayout."""
546
+
547
+ lines: List["TextLayoutLine"] = betterproto.message_field(2)
548
+ """
549
+ Optional. List of lines in natural reading order (see also
550
+ `writing_direction`).
551
+ """
552
+
553
+ geometry: "Geometry" = betterproto.message_field(3)
554
+ """Optional. Geometry of the paragraph."""
555
+
556
+ writing_direction: "WritingDirection" = betterproto.enum_field(4)
557
+ """Optional. The text writing direction (aka reading order)."""
558
+
559
+ content_language: str = betterproto.string_field(5)
560
+ """
561
+ Optional. BCP-47 language code of the dominant language in this
562
+ paragraph.
563
+ """
564
+
565
+
566
+ @dataclass(eq=False, repr=False)
567
+ class TextEntityIdentifier(betterproto.Message):
568
+ id: int = betterproto.int64_field(1)
569
+ """
570
+ Required. Unique entity id used to reference (and match) text entities and
571
+ ranges.
572
+ """
573
+
574
+
575
+ @dataclass(eq=False, repr=False)
576
+ class DeepGleamData(betterproto.Message):
577
+ translation: "TranslationData" = betterproto.message_field(
578
+ 10, group="rendering_oneof"
579
+ )
580
+ visual_object_id: List[str] = betterproto.string_field(11)
581
+
582
+
583
+ @dataclass(eq=False, repr=False)
584
+ class TranslationData(betterproto.Message):
585
+ status: "TranslationDataStatus" = betterproto.message_field(1)
586
+ target_language: str = betterproto.string_field(2)
587
+ source_language: str = betterproto.string_field(3)
588
+ translation: str = betterproto.string_field(4)
589
+ """The translated text."""
590
+
591
+ line: List["TranslationDataLine"] = betterproto.message_field(5)
592
+ writing_direction: "WritingDirection" = betterproto.enum_field(7)
593
+ """The original writing direction of the source text."""
594
+
595
+ alignment: "Alignment" = betterproto.enum_field(8)
596
+ justified: bool = betterproto.bool_field(9)
597
+ """Whether the text is justified."""
598
+
599
+
600
+ @dataclass(eq=False, repr=False)
601
+ class TranslationDataStatus(betterproto.Message):
602
+ code: "TranslationDataStatusCode" = betterproto.enum_field(1)
603
+
604
+
605
+ @dataclass(eq=False, repr=False)
606
+ class TranslationDataTextStyle(betterproto.Message):
607
+ """
608
+ Style as the aggregation of the styles of the words in the original text.
609
+ """
610
+
611
+ text_color: int = betterproto.uint32_field(1)
612
+ """The foreground color of text in aRGB format."""
613
+
614
+ background_primary_color: int = betterproto.uint32_field(2)
615
+ """The background color of text in aRGB format."""
616
+
617
+
618
+ @dataclass(eq=False, repr=False)
619
+ class TranslationDataBackgroundImageData(betterproto.Message):
620
+ """Properties of the image used to inpaint the source text."""
621
+
622
+ background_image: bytes = betterproto.bytes_field(1)
623
+ """
624
+ Image bytes to inpaint the source text. Contains image bytes in the
625
+ format specified in file_format.
626
+ """
627
+
628
+ image_width: int = betterproto.int32_field(2)
629
+ """Width of background_image in pixels."""
630
+
631
+ image_height: int = betterproto.int32_field(3)
632
+ """Height of background_image in pixels."""
633
+
634
+ vertical_padding: float = betterproto.float_field(4)
635
+ """
636
+ Vertical padding to apply to the text box before drawing the background
637
+ image. Expressed as a fraction of the text box height, i.e. 1.0 means
638
+ that the height should be doubled. Half of the padding should be added on
639
+ the top and half on the bottom.
640
+ """
641
+
642
+ horizontal_padding: float = betterproto.float_field(5)
643
+ """
644
+ Horizontal padding to apply to the text box before drawing the background
645
+ image. Expressed as a fraction of the text box height. Half of the
646
+ padding should be added on the left and half on the right.
647
+ """
648
+
649
+ file_format: "TranslationDataBackgroundImageDataFileFormat" = (
650
+ betterproto.enum_field(6)
651
+ )
652
+ text_mask: bytes = betterproto.bytes_field(7)
653
+ """Text mask for the generated background image."""
654
+
655
+
656
+ @dataclass(eq=False, repr=False)
657
+ class TranslationDataLine(betterproto.Message):
658
+ start: int = betterproto.int32_field(1)
659
+ """
660
+ A substring from the translation from start to end (exclusive),
661
+ that needs to be distributed on this line, measured in Unicode
662
+ characters. If not set, the Line doesn't have any translation.
663
+ """
664
+
665
+ end: int = betterproto.int32_field(2)
666
+ style: "TranslationDataTextStyle" = betterproto.message_field(3)
667
+ word: List["TranslationDataLineWord"] = betterproto.message_field(5)
668
+ background_image_data: "TranslationDataBackgroundImageData" = (
669
+ betterproto.message_field(9)
670
+ )
671
+ """Background image data is set only when inpainting is computed."""
672
+
673
+
674
+ @dataclass(eq=False, repr=False)
675
+ class TranslationDataLineWord(betterproto.Message):
676
+ start: int = betterproto.int32_field(1)
677
+ """
678
+ A substring from the translation from start to end (exclusive),
679
+ representing a word (without separator), measured in Unicode
680
+ characters.
681
+ """
682
+
683
+ end: int = betterproto.int32_field(2)
684
+
685
+
686
+ @dataclass(eq=False, repr=False)
687
+ class LensOverlayDocument(betterproto.Message):
688
+ """
689
+ Top-level PDF representation extracted using Pdfium.
690
+ Next ID: 6
691
+ """
692
+
693
+ pages: List["Page"] = betterproto.message_field(1)
694
+ """Ordered pdf pages."""
695
+
696
+
697
+ @dataclass(eq=False, repr=False)
698
+ class Page(betterproto.Message):
699
+ """
700
+ Represents a single page of the PDF.
701
+ Next ID: 10
702
+ """
703
+
704
+ page_number: int = betterproto.int32_field(1)
705
+ """Page number in the pdf (indexed starting at 1)."""
706
+
707
+ text_segments: List[str] = betterproto.string_field(4)
708
+ """List of text segments of the page."""
709
+
710
+
711
+ @dataclass(eq=False, repr=False)
712
+ class ClientImage(betterproto.Message):
713
+ """Image data from the client."""
714
+
715
+ image_content: bytes = betterproto.bytes_field(1)
716
+ """Required. A byte array encoding an image."""
717
+
718
+
719
+ @dataclass(eq=False, repr=False)
720
+ class ImageCrop(betterproto.Message):
721
+ """User-selected / auto-detected cropped image region."""
722
+
723
+ crop_id: str = betterproto.string_field(1)
724
+ """The ID of the cropped image region."""
725
+
726
+ image: "ClientImage" = betterproto.message_field(2)
727
+ """The image content of the cropped image region."""
728
+
729
+ zoomed_crop: "ZoomedCrop" = betterproto.message_field(3)
730
+ """The zoomed crop properties of the cropped image region."""
731
+
732
+
733
+ @dataclass(eq=False, repr=False)
734
+ class ImageData(betterproto.Message):
735
+ """
736
+ Data representing image. Contains image bytes or image retrieval identifier.
737
+ """
738
+
739
+ payload: "ImagePayload" = betterproto.message_field(1)
740
+ """Image payload to process. This contains image bytes."""
741
+
742
+ image_metadata: "ImageMetadata" = betterproto.message_field(3)
743
+ """Required. Context of the given image."""
744
+
745
+ significant_regions: List["Geometry"] = betterproto.message_field(4)
746
+ """The bounds of significant regions in the image."""
747
+
748
+
749
+ @dataclass(eq=False, repr=False)
750
+ class ImagePayload(betterproto.Message):
751
+ image_bytes: bytes = betterproto.bytes_field(1)
752
+ """Required. Image byte array."""
753
+
754
+
755
+ @dataclass(eq=False, repr=False)
756
+ class ImageMetadata(betterproto.Message):
757
+ width: int = betterproto.int32_field(1)
758
+ """
759
+ Required. Image width in pixels. Should reflect the actual size of
760
+ image_bytes.
761
+ """
762
+
763
+ height: int = betterproto.int32_field(2)
764
+ """
765
+ Required. Image height in pixels. Should reflect the actual size of
766
+ image_bytes.
767
+ """
768
+
769
+
770
+ @dataclass(eq=False, repr=False)
771
+ class TextQuery(betterproto.Message):
772
+ """Contains an unstructured text query to add to an image query."""
773
+
774
+ query: str = betterproto.string_field(1)
775
+ """The unstructured text query, such as "blue" or "blouse"."""
776
+
777
+ is_primary: bool = betterproto.bool_field(2)
778
+
779
+
780
+ @dataclass(eq=False, repr=False)
781
+ class LensOverlayInteractionRequestMetadata(betterproto.Message):
782
+ """Metadata associated with an interaction request."""
783
+
784
+ type: "LensOverlayInteractionRequestMetadataType" = betterproto.enum_field(1)
785
+ selection_metadata: "LensOverlayInteractionRequestMetadataSelectionMetadata" = (
786
+ betterproto.message_field(2)
787
+ )
788
+ query_metadata: "LensOverlayInteractionRequestMetadataQueryMetadata" = (
789
+ betterproto.message_field(4)
790
+ )
791
+
792
+
793
+ @dataclass(eq=False, repr=False)
794
+ class LensOverlayInteractionRequestMetadataSelectionMetadata(betterproto.Message):
795
+ """
796
+ Metadata related to the selection associated with this interaction request.
797
+ """
798
+
799
+ point: "LensOverlayInteractionRequestMetadataSelectionMetadataPoint" = (
800
+ betterproto.message_field(1, group="selection")
801
+ )
802
+ region: "LensOverlayInteractionRequestMetadataSelectionMetadataRegion" = (
803
+ betterproto.message_field(2, group="selection")
804
+ )
805
+ object: "LensOverlayInteractionRequestMetadataSelectionMetadataObject" = (
806
+ betterproto.message_field(3, group="selection")
807
+ )
808
+
809
+
810
+ @dataclass(eq=False, repr=False)
811
+ class LensOverlayInteractionRequestMetadataSelectionMetadataPoint(betterproto.Message):
812
+ x: float = betterproto.float_field(1)
813
+ y: float = betterproto.float_field(2)
814
+
815
+
816
+ @dataclass(eq=False, repr=False)
817
+ class LensOverlayInteractionRequestMetadataSelectionMetadataRegion(betterproto.Message):
818
+ region: "CenterRotatedBox" = betterproto.message_field(1)
819
+
820
+
821
+ @dataclass(eq=False, repr=False)
822
+ class LensOverlayInteractionRequestMetadataSelectionMetadataObject(betterproto.Message):
823
+ object_id: str = betterproto.string_field(1)
824
+ geometry: "Geometry" = betterproto.message_field(2)
825
+
826
+
827
+ @dataclass(eq=False, repr=False)
828
+ class LensOverlayInteractionRequestMetadataQueryMetadata(betterproto.Message):
829
+ """Metadata related to query."""
830
+
831
+ text_query: "TextQuery" = betterproto.message_field(2)
832
+ """The text query information."""
833
+
834
+
835
+ @dataclass(eq=False, repr=False)
836
+ class TranslateStickinessSignals(betterproto.Message):
837
+ """
838
+ Signals specific to queries coming from translate stickiness extension.
839
+ """
840
+
841
+ translate_suppress_echo_for_sticky: bool = betterproto.bool_field(1)
842
+
843
+
844
+ @dataclass(eq=False, repr=False)
845
+ class FunctionCall(betterproto.Message):
846
+ """A message representing the function call of an answers intent query."""
847
+
848
+ name: str = betterproto.string_field(1)
849
+ """Name of this function call."""
850
+
851
+ argument: List["Argument"] = betterproto.message_field(2)
852
+ """A list of arguments of this function call."""
853
+
854
+ signals: "FunctionCallSignals" = betterproto.message_field(4)
855
+ """Signals at the function call level"""
856
+
857
+
858
+ @dataclass(eq=False, repr=False)
859
+ class FunctionCallSignals(betterproto.Message):
860
+ """Signals at the function call level"""
861
+
862
+ translate_stickiness_signals: "TranslateStickinessSignals" = (
863
+ betterproto.message_field(311378150)
864
+ )
865
+
866
+
867
+ @dataclass(eq=False, repr=False)
868
+ class Argument(betterproto.Message):
869
+ """A message representing the function argument."""
870
+
871
+ name: str = betterproto.string_field(1)
872
+ """Name of this argument."""
873
+
874
+ value: "ArgumentValue" = betterproto.message_field(2)
875
+ """The value of this argument."""
876
+
877
+
878
+ @dataclass(eq=False, repr=False)
879
+ class ArgumentValue(betterproto.Message):
880
+ """A message representing the value of an argument."""
881
+
882
+ simple_value: "SimpleValue" = betterproto.message_field(3, group="value")
883
+
884
+
885
+ @dataclass(eq=False, repr=False)
886
+ class SimpleValue(betterproto.Message):
887
+ """A message representing a simple literal value."""
888
+
889
+ string_value: str = betterproto.string_field(1, group="value")
890
+
891
+
892
+ @dataclass(eq=False, repr=False)
893
+ class Query(betterproto.Message):
894
+ """A Query is a representation of the meaning of the user query."""
895
+
896
+ intent_query: "FunctionCall" = betterproto.message_field(56249026)
897
+
898
+
899
+ @dataclass(eq=False, repr=False)
900
+ class MathSolverQuery(betterproto.Message):
901
+ math_input_equation: str = betterproto.string_field(3)
902
+
903
+
904
+ @dataclass(eq=False, repr=False)
905
+ class MessageSet(betterproto.Message):
906
+ """This is proto2's version of MessageSet."""
907
+
908
+ message_set_extension: "Query" = betterproto.message_field(41401449)
909
+
910
+
911
+ @dataclass(eq=False, repr=False)
912
+ class OverlayObject(betterproto.Message):
913
+ """Overlay Object."""
914
+
915
+ id: str = betterproto.string_field(1)
916
+ """The id."""
917
+
918
+ geometry: "Geometry" = betterproto.message_field(2)
919
+ """The object geometry."""
920
+
921
+ rendering_metadata: "OverlayObjectRenderingMetadata" = betterproto.message_field(8)
922
+ """The rendering metadata for the object."""
923
+
924
+ interaction_properties: "OverlayObjectInteractionProperties" = (
925
+ betterproto.message_field(4)
926
+ )
927
+ is_fulfilled: bool = betterproto.bool_field(9)
928
+ """
929
+ Indicates to the client that this object is eligible to be an object
930
+ fulfillment request.
931
+ """
932
+
933
+
934
+ @dataclass(eq=False, repr=False)
935
+ class OverlayObjectRenderingMetadata(betterproto.Message):
936
+ """Rendering metadata for the object."""
937
+
938
+ render_type: "OverlayObjectRenderingMetadataRenderType" = betterproto.enum_field(1)
939
+
940
+
941
+ @dataclass(eq=False, repr=False)
942
+ class OverlayObjectInteractionProperties(betterproto.Message):
943
+ select_on_tap: bool = betterproto.bool_field(1)
944
+ """Whether an object can be tapped"""
945
+
946
+
947
+ @dataclass(eq=False, repr=False)
948
+ class LensOverlayRequestId(betterproto.Message):
949
+ """
950
+ Request Id definition to support request sequencing and state lookup.
951
+ """
952
+
953
+ uuid: int = betterproto.uint64_field(1)
954
+ """A unique identifier for a sequence of related Lens requests."""
955
+
956
+ sequence_id: int = betterproto.int32_field(2)
957
+ """
958
+ An id to indicate the order of the current request within a sequence of
959
+ requests sharing the same uuid. Starts from 1, increments by 1 if there is
960
+ a new request with the same uuid.
961
+ """
962
+
963
+ image_sequence_id: int = betterproto.int32_field(3)
964
+ """
965
+ An id to indicate the order of image payload sent within a sequence of
966
+ requests sharing the same uuid. Starts from 1, increments by 1 if there is
967
+ a new request with an image payload with the same uuid.
968
+ Note, region search request does not increment this id.
969
+ """
970
+
971
+ analytics_id: bytes = betterproto.bytes_field(4)
972
+ """
973
+ Analytics ID for the Lens request. Will be updated on the initial request
974
+ and once per interaction request.
975
+ """
976
+
977
+ routing_info: "LensOverlayRoutingInfo" = betterproto.message_field(6)
978
+ """Information about where to route the request."""
979
+
980
+
981
+ @dataclass(eq=False, repr=False)
982
+ class LensOverlayRequestContext(betterproto.Message):
983
+ """Request context for a Lens Overlay request."""
984
+
985
+ request_id: "LensOverlayRequestId" = betterproto.message_field(3)
986
+ """Required. Identifiers for this request."""
987
+
988
+ client_context: "LensOverlayClientContext" = betterproto.message_field(4)
989
+ """The client context for the request."""
990
+
991
+
992
+ @dataclass(eq=False, repr=False)
993
+ class LensOverlayObjectsRequest(betterproto.Message):
994
+ request_context: "LensOverlayRequestContext" = betterproto.message_field(1)
995
+ """Required. Basic information and context for the request."""
996
+
997
+ image_data: "ImageData" = betterproto.message_field(3)
998
+ """Required. Image Data to process."""
999
+
1000
+ payload: "Payload" = betterproto.message_field(4)
1001
+ """
1002
+ Optional. Data payload of the request.
1003
+ TODO(b/359638436): Mark required when clients have migrated to use Payload
1004
+ field.
1005
+ """
1006
+
1007
+
1008
+ @dataclass(eq=False, repr=False)
1009
+ class LensOverlayObjectsResponse(betterproto.Message):
1010
+ overlay_objects: List["OverlayObject"] = betterproto.message_field(2)
1011
+ """Overlay objects."""
1012
+
1013
+ text: "Text" = betterproto.message_field(3)
1014
+ """Text."""
1015
+
1016
+ deep_gleams: List["DeepGleamData"] = betterproto.message_field(4)
1017
+ """Gleams."""
1018
+
1019
+ cluster_info: "LensOverlayClusterInfo" = betterproto.message_field(7)
1020
+ """The cluster info."""
1021
+
1022
+
1023
+ @dataclass(eq=False, repr=False)
1024
+ class LensOverlayInteractionRequest(betterproto.Message):
1025
+ request_context: "LensOverlayRequestContext" = betterproto.message_field(1)
1026
+ """Basic information and context for the request."""
1027
+
1028
+ interaction_request_metadata: "LensOverlayInteractionRequestMetadata" = (
1029
+ betterproto.message_field(2)
1030
+ )
1031
+ """Metadata associated with an interaction request."""
1032
+
1033
+ image_crop: "ImageCrop" = betterproto.message_field(3)
1034
+ """The image crop data."""
1035
+
1036
+
1037
+ @dataclass(eq=False, repr=False)
1038
+ class LensOverlayInteractionResponse(betterproto.Message):
1039
+ encoded_response: str = betterproto.string_field(3)
1040
+
1041
+
1042
+ @dataclass(eq=False, repr=False)
1043
+ class Payload(betterproto.Message):
1044
+ """Next ID: 9"""
1045
+
1046
+ request_type: "PayloadRequestType" = betterproto.enum_field(6)
1047
+ """Optional. The type of the request."""
1048
+
1049
+ image_data: "ImageData" = betterproto.message_field(2)
1050
+ """
1051
+ Currently unset, use image_data in ObjectsRequest.
1052
+ TODO(b/359638436): Move ObjectsRequest clients onto Payload.ImageData.
1053
+ """
1054
+
1055
+ content_data: bytes = betterproto.bytes_field(3)
1056
+ """
1057
+ Data for non-image payloads. May be sent with or without an image in the
1058
+ image_data field. If content_data is set, content_type must also be set.
1059
+ """
1060
+
1061
+ content_type: str = betterproto.string_field(4)
1062
+ """
1063
+ The media type/MIME type of the data represented i content_data, e.g.
1064
+ "application/pdf". If content_type is set, content_data should also be set.
1065
+ """
1066
+
1067
+ page_url: str = betterproto.string_field(5)
1068
+ """The page url this request was made on."""
1069
+
1070
+ partial_pdf_document: "LensOverlayDocument" = betterproto.message_field(7)
1071
+ """
1072
+ The partially parsed PDF document. Used to get early suggest signals. This
1073
+ is only set for REQUEST_TYPE_EARLY_PARTIAL_PDF.
1074
+ """
1075
+
1076
+ compression_type: "PayloadCompressionType" = betterproto.enum_field(8)
1077
+ """
1078
+ Compression format of content_data. Currently only used for PDF data.
1079
+ """
1080
+
1081
+
1082
+ @dataclass(eq=False, repr=False)
1083
+ class LensOverlayServerClusterInfoRequest(betterproto.Message):
1084
+ """The cluster info request for a Lens Overlay session."""
1085
+
1086
+ enable_search_session_id: bool = betterproto.bool_field(1)
1087
+ """
1088
+ Whether to return a search session id alongside the server session id.
1089
+ """
1090
+
1091
+
1092
+ @dataclass(eq=False, repr=False)
1093
+ class LensOverlayServerClusterInfoResponse(betterproto.Message):
1094
+ server_session_id: str = betterproto.string_field(1)
1095
+ """ID for subsequent server requests."""
1096
+
1097
+ search_session_id: str = betterproto.string_field(2)
1098
+ """ID for subsequent search requests."""
1099
+
1100
+ routing_info: "LensOverlayRoutingInfo" = betterproto.message_field(3)
1101
+ """The routing info for the server session."""
1102
+
1103
+
1104
+ @dataclass(eq=False, repr=False)
1105
+ class LensOverlayServerError(betterproto.Message):
1106
+ """
1107
+ An error encountered while handling a request.
1108
+ Next ID: 2
1109
+ """
1110
+
1111
+ error_type: "LensOverlayServerErrorErrorType" = betterproto.enum_field(1)
1112
+ """The error type."""
1113
+
1114
+
1115
+ @dataclass(eq=False, repr=False)
1116
+ class LensOverlayServerRequest(betterproto.Message):
1117
+ """Next ID: 4"""
1118
+
1119
+ objects_request: "LensOverlayObjectsRequest" = betterproto.message_field(1)
1120
+ """Options for fetching objects."""
1121
+
1122
+ interaction_request: "LensOverlayInteractionRequest" = betterproto.message_field(2)
1123
+ """Options for fetching interactions."""
1124
+
1125
+ client_logs: "LensOverlayClientLogs" = betterproto.message_field(3)
1126
+ """Client logs for the request."""
1127
+
1128
+
1129
+ @dataclass(eq=False, repr=False)
1130
+ class LensOverlayServerResponse(betterproto.Message):
1131
+ """
1132
+ Response details for an LensOverlay request.
1133
+ Next ID: 4
1134
+ """
1135
+
1136
+ error: "LensOverlayServerError" = betterproto.message_field(1)
1137
+ """The encountered error."""
1138
+
1139
+ objects_response: "LensOverlayObjectsResponse" = betterproto.message_field(2)
1140
+ """The objects response."""
1141
+
1142
+ interaction_response: "LensOverlayInteractionResponse" = betterproto.message_field(
1143
+ 3
1144
+ )
1145
+ """The interaction response."""
1146
+
1147
+
1148
+ @dataclass(eq=False, repr=False)
1149
+ class StickinessSignals(betterproto.Message):
1150
+ id_namespace: "StickinessSignalsNamespace" = betterproto.enum_field(1)
1151
+ interpretation: "MessageSet" = betterproto.message_field(28)
1152
+ education_input_extension: "EducationInputExtension" = betterproto.message_field(
1153
+ 121
1154
+ )
1155
+
1156
+
1157
+ @dataclass(eq=False, repr=False)
1158
+ class EducationInputExtension(betterproto.Message):
1159
+ math_solver_query: "MathSolverQuery" = betterproto.message_field(1)
1160
+
1161
+
1162
+ @dataclass(eq=False, repr=False)
1163
+ class LensOverlayVideoContextInputParams(betterproto.Message):
1164
+ url: str = betterproto.string_field(1)
1165
+ """Url of the video."""
1166
+
1167
+
1168
+ @dataclass(eq=False, repr=False)
1169
+ class LensOverlayVideoParams(betterproto.Message):
1170
+ video_context_input_params: "LensOverlayVideoContextInputParams" = (
1171
+ betterproto.message_field(1)
1172
+ )
1173
+ """Video context params from input."""
1174
+
1175
+
1176
+ @dataclass(eq=False, repr=False)
1177
+ class LensOverlayVisualSearchInteractionLogData(betterproto.Message):
1178
+ """Log data for a Lens Overlay visual search interaction."""
1179
+
1180
+ filter_data: "FilterData" = betterproto.message_field(1)
1181
+ """Filter related metadata."""
1182
+
1183
+ user_selection_data: "UserSelectionData" = betterproto.message_field(2)
1184
+ """User Selection metadata."""
1185
+
1186
+ is_parent_query: bool = betterproto.bool_field(3)
1187
+ """Whether the query is a parent query."""
1188
+
1189
+ client_platform: "ClientPlatform" = betterproto.enum_field(4)
1190
+ """The client platform this query was originated from."""
1191
+
1192
+
1193
+ @dataclass(eq=False, repr=False)
1194
+ class FilterData(betterproto.Message):
1195
+ """
1196
+ Filter data.
1197
+ Next ID: 2
1198
+ """
1199
+
1200
+ filter_type: "LensOverlayFilterType" = betterproto.enum_field(1)
1201
+ """
1202
+ The filter type associated with this interaction (auto, translate, etc.).
1203
+ """
1204
+
1205
+
1206
+ @dataclass(eq=False, repr=False)
1207
+ class UserSelectionData(betterproto.Message):
1208
+ """
1209
+ User selection data.
1210
+ Next ID: 2
1211
+ """
1212
+
1213
+ selection_type: "LensOverlaySelectionType" = betterproto.enum_field(1)
1214
+ """
1215
+ The selection type associated with this interaction (e.g. region search).
1216
+ """
1217
+
1218
+
1219
+ @dataclass(eq=False, repr=False)
1220
+ class LensOverlayVisualSearchInteractionData(betterproto.Message):
1221
+ """Metadata associated with a Lens Visual Search request."""
1222
+
1223
+ interaction_type: "LensOverlayInteractionRequestMetadataType" = (
1224
+ betterproto.enum_field(1)
1225
+ )
1226
+ """The type of interaction."""
1227
+
1228
+ zoomed_crop: "ZoomedCrop" = betterproto.message_field(7)
1229
+ """The selected region for this interaction, instead of the object id."""
1230
+
1231
+ object_id: str = betterproto.string_field(3)
1232
+ """
1233
+ The selected object id for this interaction, instead of the zoomed crop.
1234
+ Currently unsupported and should not be populated.
1235
+ """
1236
+
1237
+ log_data: "LensOverlayVisualSearchInteractionLogData" = betterproto.message_field(5)
1238
+ """Logging-specific data."""