google-cloud-modelarmor 0.1.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.
Files changed (25) hide show
  1. google/cloud/modelarmor/__init__.py +117 -0
  2. google/cloud/modelarmor/gapic_version.py +16 -0
  3. google/cloud/modelarmor/py.typed +2 -0
  4. google/cloud/modelarmor_v1/__init__.py +114 -0
  5. google/cloud/modelarmor_v1/gapic_metadata.json +163 -0
  6. google/cloud/modelarmor_v1/gapic_version.py +16 -0
  7. google/cloud/modelarmor_v1/py.typed +2 -0
  8. google/cloud/modelarmor_v1/services/__init__.py +15 -0
  9. google/cloud/modelarmor_v1/services/model_armor/__init__.py +22 -0
  10. google/cloud/modelarmor_v1/services/model_armor/async_client.py +1377 -0
  11. google/cloud/modelarmor_v1/services/model_armor/client.py +1772 -0
  12. google/cloud/modelarmor_v1/services/model_armor/pagers.py +197 -0
  13. google/cloud/modelarmor_v1/services/model_armor/transports/__init__.py +36 -0
  14. google/cloud/modelarmor_v1/services/model_armor/transports/base.py +357 -0
  15. google/cloud/modelarmor_v1/services/model_armor/transports/grpc.py +607 -0
  16. google/cloud/modelarmor_v1/services/model_armor/transports/grpc_asyncio.py +730 -0
  17. google/cloud/modelarmor_v1/services/model_armor/transports/rest.py +2143 -0
  18. google/cloud/modelarmor_v1/services/model_armor/transports/rest_base.py +638 -0
  19. google/cloud/modelarmor_v1/types/__init__.py +106 -0
  20. google/cloud/modelarmor_v1/types/service.py +1881 -0
  21. google_cloud_modelarmor-0.1.0.dist-info/LICENSE +202 -0
  22. google_cloud_modelarmor-0.1.0.dist-info/METADATA +139 -0
  23. google_cloud_modelarmor-0.1.0.dist-info/RECORD +25 -0
  24. google_cloud_modelarmor-0.1.0.dist-info/WHEEL +5 -0
  25. google_cloud_modelarmor-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1881 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 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
+ # http://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
+ from __future__ import annotations
17
+
18
+ from typing import MutableMapping, MutableSequence
19
+
20
+ from google.protobuf import field_mask_pb2 # type: ignore
21
+ from google.protobuf import timestamp_pb2 # type: ignore
22
+ import proto # type: ignore
23
+
24
+ __protobuf__ = proto.module(
25
+ package="google.cloud.modelarmor.v1",
26
+ manifest={
27
+ "FilterMatchState",
28
+ "FilterExecutionState",
29
+ "RaiFilterType",
30
+ "DetectionConfidenceLevel",
31
+ "SdpFindingLikelihood",
32
+ "InvocationResult",
33
+ "Template",
34
+ "FloorSetting",
35
+ "ListTemplatesRequest",
36
+ "ListTemplatesResponse",
37
+ "GetTemplateRequest",
38
+ "CreateTemplateRequest",
39
+ "UpdateTemplateRequest",
40
+ "DeleteTemplateRequest",
41
+ "GetFloorSettingRequest",
42
+ "UpdateFloorSettingRequest",
43
+ "FilterConfig",
44
+ "PiAndJailbreakFilterSettings",
45
+ "MaliciousUriFilterSettings",
46
+ "RaiFilterSettings",
47
+ "SdpFilterSettings",
48
+ "SdpBasicConfig",
49
+ "SdpAdvancedConfig",
50
+ "SanitizeUserPromptRequest",
51
+ "SanitizeModelResponseRequest",
52
+ "SanitizeUserPromptResponse",
53
+ "SanitizeModelResponseResponse",
54
+ "SanitizationResult",
55
+ "FilterResult",
56
+ "RaiFilterResult",
57
+ "SdpFilterResult",
58
+ "SdpInspectResult",
59
+ "DataItem",
60
+ "ByteDataItem",
61
+ "SdpDeidentifyResult",
62
+ "SdpFinding",
63
+ "PiAndJailbreakFilterResult",
64
+ "MaliciousUriFilterResult",
65
+ "VirusScanFilterResult",
66
+ "VirusDetail",
67
+ "CsamFilterResult",
68
+ "MessageItem",
69
+ "RangeInfo",
70
+ },
71
+ )
72
+
73
+
74
+ class FilterMatchState(proto.Enum):
75
+ r"""Option to specify filter match state.
76
+
77
+ Values:
78
+ FILTER_MATCH_STATE_UNSPECIFIED (0):
79
+ Unused
80
+ NO_MATCH_FOUND (1):
81
+ Matching criteria is not achieved for
82
+ filters.
83
+ MATCH_FOUND (2):
84
+ Matching criteria is achieved for the filter.
85
+ """
86
+ FILTER_MATCH_STATE_UNSPECIFIED = 0
87
+ NO_MATCH_FOUND = 1
88
+ MATCH_FOUND = 2
89
+
90
+
91
+ class FilterExecutionState(proto.Enum):
92
+ r"""Enum which reports whether a specific filter executed
93
+ successfully or not.
94
+
95
+ Values:
96
+ FILTER_EXECUTION_STATE_UNSPECIFIED (0):
97
+ Unused
98
+ EXECUTION_SUCCESS (1):
99
+ Filter executed successfully
100
+ EXECUTION_SKIPPED (2):
101
+ Filter execution was skipped. This can happen
102
+ due to server-side error or permission issue.
103
+ """
104
+ FILTER_EXECUTION_STATE_UNSPECIFIED = 0
105
+ EXECUTION_SUCCESS = 1
106
+ EXECUTION_SKIPPED = 2
107
+
108
+
109
+ class RaiFilterType(proto.Enum):
110
+ r"""Options for responsible AI Filter Types.
111
+
112
+ Values:
113
+ RAI_FILTER_TYPE_UNSPECIFIED (0):
114
+ Unspecified filter type.
115
+ SEXUALLY_EXPLICIT (2):
116
+ Sexually Explicit.
117
+ HATE_SPEECH (3):
118
+ Hate Speech.
119
+ HARASSMENT (6):
120
+ Harassment.
121
+ DANGEROUS (17):
122
+ Danger
123
+ """
124
+ RAI_FILTER_TYPE_UNSPECIFIED = 0
125
+ SEXUALLY_EXPLICIT = 2
126
+ HATE_SPEECH = 3
127
+ HARASSMENT = 6
128
+ DANGEROUS = 17
129
+
130
+
131
+ class DetectionConfidenceLevel(proto.Enum):
132
+ r"""Confidence levels for detectors.
133
+ Higher value maps to a greater confidence level. To enforce
134
+ stricter level a lower value should be used.
135
+
136
+ Values:
137
+ DETECTION_CONFIDENCE_LEVEL_UNSPECIFIED (0):
138
+ Same as LOW_AND_ABOVE.
139
+ LOW_AND_ABOVE (1):
140
+ Highest chance of a false positive.
141
+ MEDIUM_AND_ABOVE (2):
142
+ Some chance of false positives.
143
+ HIGH (3):
144
+ Low chance of false positives.
145
+ """
146
+ DETECTION_CONFIDENCE_LEVEL_UNSPECIFIED = 0
147
+ LOW_AND_ABOVE = 1
148
+ MEDIUM_AND_ABOVE = 2
149
+ HIGH = 3
150
+
151
+
152
+ class SdpFindingLikelihood(proto.Enum):
153
+ r"""For more information about each Sensitive Data Protection
154
+ likelihood level, see
155
+ https://cloud.google.com/sensitive-data-protection/docs/likelihood.
156
+
157
+ Values:
158
+ SDP_FINDING_LIKELIHOOD_UNSPECIFIED (0):
159
+ Default value; same as POSSIBLE.
160
+ VERY_UNLIKELY (1):
161
+ Highest chance of a false positive.
162
+ UNLIKELY (2):
163
+ High chance of a false positive.
164
+ POSSIBLE (3):
165
+ Some matching signals. The default value.
166
+ LIKELY (4):
167
+ Low chance of a false positive.
168
+ VERY_LIKELY (5):
169
+ Confidence level is high. Lowest chance of a
170
+ false positive.
171
+ """
172
+ SDP_FINDING_LIKELIHOOD_UNSPECIFIED = 0
173
+ VERY_UNLIKELY = 1
174
+ UNLIKELY = 2
175
+ POSSIBLE = 3
176
+ LIKELY = 4
177
+ VERY_LIKELY = 5
178
+
179
+
180
+ class InvocationResult(proto.Enum):
181
+ r"""A field indicating the outcome of the invocation,
182
+ irrespective of match status.
183
+
184
+ Values:
185
+ INVOCATION_RESULT_UNSPECIFIED (0):
186
+ Unused. Default value.
187
+ SUCCESS (1):
188
+ All filters were invoked successfully.
189
+ PARTIAL (2):
190
+ Some filters were skipped or failed.
191
+ FAILURE (3):
192
+ All filters were skipped or failed.
193
+ """
194
+ INVOCATION_RESULT_UNSPECIFIED = 0
195
+ SUCCESS = 1
196
+ PARTIAL = 2
197
+ FAILURE = 3
198
+
199
+
200
+ class Template(proto.Message):
201
+ r"""Message describing Template resource
202
+
203
+ Attributes:
204
+ name (str):
205
+ Identifier. name of resource
206
+ create_time (google.protobuf.timestamp_pb2.Timestamp):
207
+ Output only. [Output only] Create time stamp
208
+ update_time (google.protobuf.timestamp_pb2.Timestamp):
209
+ Output only. [Output only] Update time stamp
210
+ labels (MutableMapping[str, str]):
211
+ Optional. Labels as key value pairs
212
+ filter_config (google.cloud.modelarmor_v1.types.FilterConfig):
213
+ Required. filter configuration for this
214
+ template
215
+ template_metadata (google.cloud.modelarmor_v1.types.Template.TemplateMetadata):
216
+ Optional. metadata for this template
217
+ """
218
+
219
+ class TemplateMetadata(proto.Message):
220
+ r"""Message describing TemplateMetadata
221
+
222
+ Attributes:
223
+ ignore_partial_invocation_failures (bool):
224
+ Optional. If true, partial detector failures
225
+ should be ignored.
226
+ custom_prompt_safety_error_code (int):
227
+ Optional. Indicates the custom error code set
228
+ by the user to be returned to the end user by
229
+ the service extension if the prompt trips Model
230
+ Armor filters.
231
+ custom_prompt_safety_error_message (str):
232
+ Optional. Indicates the custom error message
233
+ set by the user to be returned to the end user
234
+ if the prompt trips Model Armor filters.
235
+ custom_llm_response_safety_error_code (int):
236
+ Optional. Indicates the custom error code set
237
+ by the user to be returned to the end user if
238
+ the LLM response trips Model Armor filters.
239
+ custom_llm_response_safety_error_message (str):
240
+ Optional. Indicates the custom error message
241
+ set by the user to be returned to the end user
242
+ if the LLM response trips Model Armor filters.
243
+ log_template_operations (bool):
244
+ Optional. If true, log template crud
245
+ operations.
246
+ log_sanitize_operations (bool):
247
+ Optional. If true, log sanitize operations.
248
+ """
249
+
250
+ ignore_partial_invocation_failures: bool = proto.Field(
251
+ proto.BOOL,
252
+ number=1,
253
+ )
254
+ custom_prompt_safety_error_code: int = proto.Field(
255
+ proto.INT32,
256
+ number=2,
257
+ )
258
+ custom_prompt_safety_error_message: str = proto.Field(
259
+ proto.STRING,
260
+ number=3,
261
+ )
262
+ custom_llm_response_safety_error_code: int = proto.Field(
263
+ proto.INT32,
264
+ number=4,
265
+ )
266
+ custom_llm_response_safety_error_message: str = proto.Field(
267
+ proto.STRING,
268
+ number=5,
269
+ )
270
+ log_template_operations: bool = proto.Field(
271
+ proto.BOOL,
272
+ number=6,
273
+ )
274
+ log_sanitize_operations: bool = proto.Field(
275
+ proto.BOOL,
276
+ number=7,
277
+ )
278
+
279
+ name: str = proto.Field(
280
+ proto.STRING,
281
+ number=1,
282
+ )
283
+ create_time: timestamp_pb2.Timestamp = proto.Field(
284
+ proto.MESSAGE,
285
+ number=2,
286
+ message=timestamp_pb2.Timestamp,
287
+ )
288
+ update_time: timestamp_pb2.Timestamp = proto.Field(
289
+ proto.MESSAGE,
290
+ number=3,
291
+ message=timestamp_pb2.Timestamp,
292
+ )
293
+ labels: MutableMapping[str, str] = proto.MapField(
294
+ proto.STRING,
295
+ proto.STRING,
296
+ number=4,
297
+ )
298
+ filter_config: "FilterConfig" = proto.Field(
299
+ proto.MESSAGE,
300
+ number=5,
301
+ message="FilterConfig",
302
+ )
303
+ template_metadata: TemplateMetadata = proto.Field(
304
+ proto.MESSAGE,
305
+ number=6,
306
+ message=TemplateMetadata,
307
+ )
308
+
309
+
310
+ class FloorSetting(proto.Message):
311
+ r"""Message describing FloorSetting resource
312
+
313
+ Attributes:
314
+ name (str):
315
+ Identifier. The resource name.
316
+ create_time (google.protobuf.timestamp_pb2.Timestamp):
317
+ Output only. [Output only] Create timestamp
318
+ update_time (google.protobuf.timestamp_pb2.Timestamp):
319
+ Output only. [Output only] Update timestamp
320
+ filter_config (google.cloud.modelarmor_v1.types.FilterConfig):
321
+ Required. ModelArmor filter configuration.
322
+ enable_floor_setting_enforcement (bool):
323
+ Optional. Floor Settings enforcement status.
324
+ """
325
+
326
+ name: str = proto.Field(
327
+ proto.STRING,
328
+ number=1,
329
+ )
330
+ create_time: timestamp_pb2.Timestamp = proto.Field(
331
+ proto.MESSAGE,
332
+ number=2,
333
+ message=timestamp_pb2.Timestamp,
334
+ )
335
+ update_time: timestamp_pb2.Timestamp = proto.Field(
336
+ proto.MESSAGE,
337
+ number=3,
338
+ message=timestamp_pb2.Timestamp,
339
+ )
340
+ filter_config: "FilterConfig" = proto.Field(
341
+ proto.MESSAGE,
342
+ number=4,
343
+ message="FilterConfig",
344
+ )
345
+ enable_floor_setting_enforcement: bool = proto.Field(
346
+ proto.BOOL,
347
+ number=5,
348
+ )
349
+
350
+
351
+ class ListTemplatesRequest(proto.Message):
352
+ r"""Message for requesting list of Templates
353
+
354
+ Attributes:
355
+ parent (str):
356
+ Required. Parent value for
357
+ ListTemplatesRequest
358
+ page_size (int):
359
+ Optional. Requested page size. Server may
360
+ return fewer items than requested. If
361
+ unspecified, server will pick an appropriate
362
+ default.
363
+ page_token (str):
364
+ Optional. A token identifying a page of
365
+ results the server should return.
366
+ filter (str):
367
+ Optional. Filtering results
368
+ order_by (str):
369
+ Optional. Hint for how to order the results
370
+ """
371
+
372
+ parent: str = proto.Field(
373
+ proto.STRING,
374
+ number=1,
375
+ )
376
+ page_size: int = proto.Field(
377
+ proto.INT32,
378
+ number=2,
379
+ )
380
+ page_token: str = proto.Field(
381
+ proto.STRING,
382
+ number=3,
383
+ )
384
+ filter: str = proto.Field(
385
+ proto.STRING,
386
+ number=4,
387
+ )
388
+ order_by: str = proto.Field(
389
+ proto.STRING,
390
+ number=5,
391
+ )
392
+
393
+
394
+ class ListTemplatesResponse(proto.Message):
395
+ r"""Message for response to listing Templates
396
+
397
+ Attributes:
398
+ templates (MutableSequence[google.cloud.modelarmor_v1.types.Template]):
399
+ The list of Template
400
+ next_page_token (str):
401
+ A token identifying a page of results the
402
+ server should return.
403
+ unreachable (MutableSequence[str]):
404
+ Locations that could not be reached.
405
+ """
406
+
407
+ @property
408
+ def raw_page(self):
409
+ return self
410
+
411
+ templates: MutableSequence["Template"] = proto.RepeatedField(
412
+ proto.MESSAGE,
413
+ number=1,
414
+ message="Template",
415
+ )
416
+ next_page_token: str = proto.Field(
417
+ proto.STRING,
418
+ number=2,
419
+ )
420
+ unreachable: MutableSequence[str] = proto.RepeatedField(
421
+ proto.STRING,
422
+ number=3,
423
+ )
424
+
425
+
426
+ class GetTemplateRequest(proto.Message):
427
+ r"""Message for getting a Template
428
+
429
+ Attributes:
430
+ name (str):
431
+ Required. Name of the resource
432
+ """
433
+
434
+ name: str = proto.Field(
435
+ proto.STRING,
436
+ number=1,
437
+ )
438
+
439
+
440
+ class CreateTemplateRequest(proto.Message):
441
+ r"""Message for creating a Template
442
+
443
+ Attributes:
444
+ parent (str):
445
+ Required. Value for parent.
446
+ template_id (str):
447
+ Required. Id of the requesting object If auto-generating Id
448
+ server-side, remove this field and template_id from the
449
+ method_signature of Create RPC
450
+ template (google.cloud.modelarmor_v1.types.Template):
451
+ Required. The resource being created
452
+ request_id (str):
453
+ Optional. An optional request ID to identify
454
+ requests. Specify a unique request ID so that if
455
+ you must retry your request, the server will
456
+ know to ignore the request if it has already
457
+ been completed. The server stores the request ID
458
+ for 60 minutes after the first request.
459
+
460
+ For example, consider a situation where you make
461
+ an initial request and the request times out. If
462
+ you make the request again with the same request
463
+ ID, the server can check if original operation
464
+ with the same request ID was received, and if
465
+ so, will ignore the second request. This
466
+ prevents clients from accidentally creating
467
+ duplicate commitments.
468
+
469
+ The request ID must be a valid UUID with the
470
+ exception that zero UUID is not supported
471
+ (00000000-0000-0000-0000-000000000000).
472
+ """
473
+
474
+ parent: str = proto.Field(
475
+ proto.STRING,
476
+ number=1,
477
+ )
478
+ template_id: str = proto.Field(
479
+ proto.STRING,
480
+ number=2,
481
+ )
482
+ template: "Template" = proto.Field(
483
+ proto.MESSAGE,
484
+ number=3,
485
+ message="Template",
486
+ )
487
+ request_id: str = proto.Field(
488
+ proto.STRING,
489
+ number=4,
490
+ )
491
+
492
+
493
+ class UpdateTemplateRequest(proto.Message):
494
+ r"""Message for updating a Template
495
+
496
+ Attributes:
497
+ update_mask (google.protobuf.field_mask_pb2.FieldMask):
498
+ Required. Field mask is used to specify the fields to be
499
+ overwritten in the Template resource by the update. The
500
+ fields specified in the update_mask are relative to the
501
+ resource, not the full request. A field will be overwritten
502
+ if it is in the mask. If the user does not provide a mask
503
+ then all fields will be overwritten.
504
+ template (google.cloud.modelarmor_v1.types.Template):
505
+ Required. The resource being updated
506
+ request_id (str):
507
+ Optional. An optional request ID to identify
508
+ requests. Specify a unique request ID so that if
509
+ you must retry your request, the server will
510
+ know to ignore the request if it has already
511
+ been completed. The server stores the request ID
512
+ for 60 minutes after the first request.
513
+
514
+ For example, consider a situation where you make
515
+ an initial request and the request times out. If
516
+ you make the request again with the same request
517
+ ID, the server can check if original operation
518
+ with the same request ID was received, and if
519
+ so, will ignore the second request. This
520
+ prevents clients from accidentally creating
521
+ duplicate commitments.
522
+
523
+ The request ID must be a valid UUID with the
524
+ exception that zero UUID is not supported
525
+ (00000000-0000-0000-0000-000000000000).
526
+ """
527
+
528
+ update_mask: field_mask_pb2.FieldMask = proto.Field(
529
+ proto.MESSAGE,
530
+ number=1,
531
+ message=field_mask_pb2.FieldMask,
532
+ )
533
+ template: "Template" = proto.Field(
534
+ proto.MESSAGE,
535
+ number=2,
536
+ message="Template",
537
+ )
538
+ request_id: str = proto.Field(
539
+ proto.STRING,
540
+ number=3,
541
+ )
542
+
543
+
544
+ class DeleteTemplateRequest(proto.Message):
545
+ r"""Message for deleting a Template
546
+
547
+ Attributes:
548
+ name (str):
549
+ Required. Name of the resource
550
+ request_id (str):
551
+ Optional. An optional request ID to identify
552
+ requests. Specify a unique request ID so that if
553
+ you must retry your request, the server will
554
+ know to ignore the request if it has already
555
+ been completed. The server stores the request ID
556
+ for 60 minutes after the first request.
557
+
558
+ For example, consider a situation where you make
559
+ an initial request and the request times out. If
560
+ you make the request again with the same request
561
+ ID, the server can check if original operation
562
+ with the same request ID was received, and if
563
+ so, will ignore the second request. This
564
+ prevents clients from accidentally creating
565
+ duplicate commitments.
566
+
567
+ The request ID must be a valid UUID with the
568
+ exception that zero UUID is not supported
569
+ (00000000-0000-0000-0000-000000000000).
570
+ """
571
+
572
+ name: str = proto.Field(
573
+ proto.STRING,
574
+ number=1,
575
+ )
576
+ request_id: str = proto.Field(
577
+ proto.STRING,
578
+ number=2,
579
+ )
580
+
581
+
582
+ class GetFloorSettingRequest(proto.Message):
583
+ r"""Message for getting a Floor Setting
584
+
585
+ Attributes:
586
+ name (str):
587
+ Required. The name of the floor setting to
588
+ get, example projects/123/floorsetting.
589
+ """
590
+
591
+ name: str = proto.Field(
592
+ proto.STRING,
593
+ number=1,
594
+ )
595
+
596
+
597
+ class UpdateFloorSettingRequest(proto.Message):
598
+ r"""Message for Updating a Floor Setting
599
+
600
+ Attributes:
601
+ floor_setting (google.cloud.modelarmor_v1.types.FloorSetting):
602
+ Required. The floor setting being updated.
603
+ update_mask (google.protobuf.field_mask_pb2.FieldMask):
604
+ Optional. Field mask is used to specify the fields to be
605
+ overwritten in the FloorSetting resource by the update. The
606
+ fields specified in the update_mask are relative to the
607
+ resource, not the full request. A field will be overwritten
608
+ if it is in the mask. If the user does not provide a mask
609
+ then all fields will be overwritten.
610
+ """
611
+
612
+ floor_setting: "FloorSetting" = proto.Field(
613
+ proto.MESSAGE,
614
+ number=1,
615
+ message="FloorSetting",
616
+ )
617
+ update_mask: field_mask_pb2.FieldMask = proto.Field(
618
+ proto.MESSAGE,
619
+ number=2,
620
+ message=field_mask_pb2.FieldMask,
621
+ )
622
+
623
+
624
+ class FilterConfig(proto.Message):
625
+ r"""Filters configuration.
626
+
627
+ Attributes:
628
+ rai_settings (google.cloud.modelarmor_v1.types.RaiFilterSettings):
629
+ Optional. Responsible AI settings.
630
+ sdp_settings (google.cloud.modelarmor_v1.types.SdpFilterSettings):
631
+ Optional. Sensitive Data Protection settings.
632
+ pi_and_jailbreak_filter_settings (google.cloud.modelarmor_v1.types.PiAndJailbreakFilterSettings):
633
+ Optional. Prompt injection and Jailbreak
634
+ filter settings.
635
+ malicious_uri_filter_settings (google.cloud.modelarmor_v1.types.MaliciousUriFilterSettings):
636
+ Optional. Malicious URI filter settings.
637
+ """
638
+
639
+ rai_settings: "RaiFilterSettings" = proto.Field(
640
+ proto.MESSAGE,
641
+ number=1,
642
+ message="RaiFilterSettings",
643
+ )
644
+ sdp_settings: "SdpFilterSettings" = proto.Field(
645
+ proto.MESSAGE,
646
+ number=2,
647
+ message="SdpFilterSettings",
648
+ )
649
+ pi_and_jailbreak_filter_settings: "PiAndJailbreakFilterSettings" = proto.Field(
650
+ proto.MESSAGE,
651
+ number=3,
652
+ message="PiAndJailbreakFilterSettings",
653
+ )
654
+ malicious_uri_filter_settings: "MaliciousUriFilterSettings" = proto.Field(
655
+ proto.MESSAGE,
656
+ number=4,
657
+ message="MaliciousUriFilterSettings",
658
+ )
659
+
660
+
661
+ class PiAndJailbreakFilterSettings(proto.Message):
662
+ r"""Prompt injection and Jailbreak Filter settings.
663
+
664
+ Attributes:
665
+ filter_enforcement (google.cloud.modelarmor_v1.types.PiAndJailbreakFilterSettings.PiAndJailbreakFilterEnforcement):
666
+ Optional. Tells whether Prompt injection and
667
+ Jailbreak filter is enabled or disabled.
668
+ confidence_level (google.cloud.modelarmor_v1.types.DetectionConfidenceLevel):
669
+ Optional. Confidence level for this filter.
670
+ Confidence level is used to determine the
671
+ threshold for the filter. If detection
672
+ confidence is equal to or greater than the
673
+ specified level, a positive match is reported.
674
+ Confidence level will only be used if the filter
675
+ is enabled.
676
+ """
677
+
678
+ class PiAndJailbreakFilterEnforcement(proto.Enum):
679
+ r"""Option to specify the state of Prompt Injection and Jailbreak
680
+ filter (ENABLED/DISABLED).
681
+
682
+ Values:
683
+ PI_AND_JAILBREAK_FILTER_ENFORCEMENT_UNSPECIFIED (0):
684
+ Same as Disabled
685
+ ENABLED (1):
686
+ Enabled
687
+ DISABLED (2):
688
+ Enabled
689
+ """
690
+ PI_AND_JAILBREAK_FILTER_ENFORCEMENT_UNSPECIFIED = 0
691
+ ENABLED = 1
692
+ DISABLED = 2
693
+
694
+ filter_enforcement: PiAndJailbreakFilterEnforcement = proto.Field(
695
+ proto.ENUM,
696
+ number=1,
697
+ enum=PiAndJailbreakFilterEnforcement,
698
+ )
699
+ confidence_level: "DetectionConfidenceLevel" = proto.Field(
700
+ proto.ENUM,
701
+ number=3,
702
+ enum="DetectionConfidenceLevel",
703
+ )
704
+
705
+
706
+ class MaliciousUriFilterSettings(proto.Message):
707
+ r"""Malicious URI filter settings.
708
+
709
+ Attributes:
710
+ filter_enforcement (google.cloud.modelarmor_v1.types.MaliciousUriFilterSettings.MaliciousUriFilterEnforcement):
711
+ Optional. Tells whether the Malicious URI
712
+ filter is enabled or disabled.
713
+ """
714
+
715
+ class MaliciousUriFilterEnforcement(proto.Enum):
716
+ r"""Option to specify the state of Malicious URI filter
717
+ (ENABLED/DISABLED).
718
+
719
+ Values:
720
+ MALICIOUS_URI_FILTER_ENFORCEMENT_UNSPECIFIED (0):
721
+ Same as Disabled
722
+ ENABLED (1):
723
+ Enabled
724
+ DISABLED (2):
725
+ Disabled
726
+ """
727
+ MALICIOUS_URI_FILTER_ENFORCEMENT_UNSPECIFIED = 0
728
+ ENABLED = 1
729
+ DISABLED = 2
730
+
731
+ filter_enforcement: MaliciousUriFilterEnforcement = proto.Field(
732
+ proto.ENUM,
733
+ number=1,
734
+ enum=MaliciousUriFilterEnforcement,
735
+ )
736
+
737
+
738
+ class RaiFilterSettings(proto.Message):
739
+ r"""Responsible AI Filter settings.
740
+
741
+ Attributes:
742
+ rai_filters (MutableSequence[google.cloud.modelarmor_v1.types.RaiFilterSettings.RaiFilter]):
743
+ Required. List of Responsible AI filters
744
+ enabled for template.
745
+ """
746
+
747
+ class RaiFilter(proto.Message):
748
+ r"""Responsible AI filter.
749
+
750
+ Attributes:
751
+ filter_type (google.cloud.modelarmor_v1.types.RaiFilterType):
752
+ Required. Type of responsible AI filter.
753
+ confidence_level (google.cloud.modelarmor_v1.types.DetectionConfidenceLevel):
754
+ Optional. Confidence level for this RAI filter. During data
755
+ sanitization, if data is classified under this filter with a
756
+ confidence level equal to or greater than the specified
757
+ level, a positive match is reported. If the confidence level
758
+ is unspecified (i.e., 0), the system will use a reasonable
759
+ default level based on the ``filter_type``.
760
+ """
761
+
762
+ filter_type: "RaiFilterType" = proto.Field(
763
+ proto.ENUM,
764
+ number=1,
765
+ enum="RaiFilterType",
766
+ )
767
+ confidence_level: "DetectionConfidenceLevel" = proto.Field(
768
+ proto.ENUM,
769
+ number=2,
770
+ enum="DetectionConfidenceLevel",
771
+ )
772
+
773
+ rai_filters: MutableSequence[RaiFilter] = proto.RepeatedField(
774
+ proto.MESSAGE,
775
+ number=1,
776
+ message=RaiFilter,
777
+ )
778
+
779
+
780
+ class SdpFilterSettings(proto.Message):
781
+ r"""Sensitive Data Protection settings.
782
+
783
+ This message has `oneof`_ fields (mutually exclusive fields).
784
+ For each oneof, at most one member field can be set at the same time.
785
+ Setting any member of the oneof automatically clears all other
786
+ members.
787
+
788
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
789
+
790
+ Attributes:
791
+ basic_config (google.cloud.modelarmor_v1.types.SdpBasicConfig):
792
+ Optional. Basic Sensitive Data Protection
793
+ configuration inspects the content for sensitive
794
+ data using a fixed set of six info-types.
795
+ Sensitive Data Protection templates cannot be
796
+ used with basic configuration. Only Sensitive
797
+ Data Protection inspection operation is
798
+ supported with basic configuration.
799
+
800
+ This field is a member of `oneof`_ ``sdp_configuration``.
801
+ advanced_config (google.cloud.modelarmor_v1.types.SdpAdvancedConfig):
802
+ Optional. Advanced Sensitive Data Protection
803
+ configuration which enables use of Sensitive
804
+ Data Protection templates. Supports both
805
+ Sensitive Data Protection inspection and
806
+ de-identification operations.
807
+
808
+ This field is a member of `oneof`_ ``sdp_configuration``.
809
+ """
810
+
811
+ basic_config: "SdpBasicConfig" = proto.Field(
812
+ proto.MESSAGE,
813
+ number=1,
814
+ oneof="sdp_configuration",
815
+ message="SdpBasicConfig",
816
+ )
817
+ advanced_config: "SdpAdvancedConfig" = proto.Field(
818
+ proto.MESSAGE,
819
+ number=2,
820
+ oneof="sdp_configuration",
821
+ message="SdpAdvancedConfig",
822
+ )
823
+
824
+
825
+ class SdpBasicConfig(proto.Message):
826
+ r"""Sensitive Data Protection basic configuration.
827
+
828
+ Attributes:
829
+ filter_enforcement (google.cloud.modelarmor_v1.types.SdpBasicConfig.SdpBasicConfigEnforcement):
830
+ Optional. Tells whether the Sensitive Data
831
+ Protection basic config is enabled or disabled.
832
+ """
833
+
834
+ class SdpBasicConfigEnforcement(proto.Enum):
835
+ r"""Option to specify the state of Sensitive Data Protection
836
+ basic config (ENABLED/DISABLED).
837
+
838
+ Values:
839
+ SDP_BASIC_CONFIG_ENFORCEMENT_UNSPECIFIED (0):
840
+ Same as Disabled
841
+ ENABLED (1):
842
+ Enabled
843
+ DISABLED (2):
844
+ Disabled
845
+ """
846
+ SDP_BASIC_CONFIG_ENFORCEMENT_UNSPECIFIED = 0
847
+ ENABLED = 1
848
+ DISABLED = 2
849
+
850
+ filter_enforcement: SdpBasicConfigEnforcement = proto.Field(
851
+ proto.ENUM,
852
+ number=3,
853
+ enum=SdpBasicConfigEnforcement,
854
+ )
855
+
856
+
857
+ class SdpAdvancedConfig(proto.Message):
858
+ r"""Sensitive Data Protection Advanced configuration.
859
+
860
+ Attributes:
861
+ inspect_template (str):
862
+ Optional. Sensitive Data Protection inspect template
863
+ resource name
864
+
865
+ If only inspect template is provided (de-identify template
866
+ not provided), then Sensitive Data Protection InspectContent
867
+ action is performed during Sanitization. All Sensitive Data
868
+ Protection findings identified during inspection will be
869
+ returned as SdpFinding in SdpInsepctionResult e.g.
870
+ ``organizations/{organization}/inspectTemplates/{inspect_template}``,
871
+ ``projects/{project}/inspectTemplates/{inspect_template}``
872
+ ``organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}``
873
+ ``projects/{project}/locations/{location}/inspectTemplates/{inspect_template}``
874
+ deidentify_template (str):
875
+ Optional. Optional Sensitive Data Protection Deidentify
876
+ template resource name.
877
+
878
+ If provided then DeidentifyContent action is performed
879
+ during Sanitization using this template and inspect
880
+ template. The De-identified data will be returned in
881
+ SdpDeidentifyResult. Note that all info-types present in the
882
+ deidentify template must be present in inspect template.
883
+
884
+ e.g.
885
+ ``organizations/{organization}/deidentifyTemplates/{deidentify_template}``,
886
+ ``projects/{project}/deidentifyTemplates/{deidentify_template}``
887
+ ``organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}``
888
+ ``projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}``
889
+ """
890
+
891
+ inspect_template: str = proto.Field(
892
+ proto.STRING,
893
+ number=1,
894
+ )
895
+ deidentify_template: str = proto.Field(
896
+ proto.STRING,
897
+ number=2,
898
+ )
899
+
900
+
901
+ class SanitizeUserPromptRequest(proto.Message):
902
+ r"""Sanitize User Prompt request.
903
+
904
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
905
+
906
+ Attributes:
907
+ name (str):
908
+ Required. Represents resource name of
909
+ template e.g.
910
+ name=projects/sample-project/locations/us-central1/templates/templ01
911
+ user_prompt_data (google.cloud.modelarmor_v1.types.DataItem):
912
+ Required. User prompt data to sanitize.
913
+ filter_config (google.cloud.modelarmor_v1.types.FilterConfig):
914
+ Optional. Optional Filter configuration to Sanitize User
915
+ Prompt.
916
+
917
+ If below configuration is specified then Sanitization will
918
+ be performed using settings in this configuration along with
919
+ settings defined at template level (union of both).
920
+
921
+ If a filter setting overlaps, then the lowest threshold
922
+ value i.e. value with greater false positives will be
923
+ applied. For example, the ``filter_configuration`` defines
924
+ LOW_AND_ABOVE confidence level for TOXICITY, and template
925
+ defines HIGH confidence level, then Sanitization is
926
+ performed using LOW_AND_ABOVE confidence level.
927
+
928
+ This field is a member of `oneof`_ ``_filter_config``.
929
+ """
930
+
931
+ name: str = proto.Field(
932
+ proto.STRING,
933
+ number=1,
934
+ )
935
+ user_prompt_data: "DataItem" = proto.Field(
936
+ proto.MESSAGE,
937
+ number=2,
938
+ message="DataItem",
939
+ )
940
+ filter_config: "FilterConfig" = proto.Field(
941
+ proto.MESSAGE,
942
+ number=3,
943
+ optional=True,
944
+ message="FilterConfig",
945
+ )
946
+
947
+
948
+ class SanitizeModelResponseRequest(proto.Message):
949
+ r"""Sanitize Model Response request.
950
+
951
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
952
+
953
+ Attributes:
954
+ name (str):
955
+ Required. Represents resource name of
956
+ template e.g.
957
+ name=projects/sample-project/locations/us-central1/templates/templ01
958
+ model_response_data (google.cloud.modelarmor_v1.types.DataItem):
959
+ Required. Model response data to sanitize.
960
+ filter_config (google.cloud.modelarmor_v1.types.FilterConfig):
961
+ Optional. Optional Filter configuration to Sanitize User
962
+ Prompt.
963
+
964
+ If below configuration is specified then Sanitization will
965
+ be performed using settings in this configuration along with
966
+ settings defined at template level (union of both).
967
+
968
+ If a filter overlaps, then the highest level of strictness
969
+ will be applied. For example, the filter_configuration
970
+ specifies LOW_AND_ABOVE confidence level for TOXICITY filter
971
+ and template uses HIGH confidence level, then Sanitization
972
+ is performed using LOW_AND_ABOVE confidence level.
973
+
974
+ This field is a member of `oneof`_ ``_filter_config``.
975
+ user_prompt (str):
976
+ Optional. User Prompt associated with Model
977
+ response.
978
+ """
979
+
980
+ name: str = proto.Field(
981
+ proto.STRING,
982
+ number=1,
983
+ )
984
+ model_response_data: "DataItem" = proto.Field(
985
+ proto.MESSAGE,
986
+ number=2,
987
+ message="DataItem",
988
+ )
989
+ filter_config: "FilterConfig" = proto.Field(
990
+ proto.MESSAGE,
991
+ number=3,
992
+ optional=True,
993
+ message="FilterConfig",
994
+ )
995
+ user_prompt: str = proto.Field(
996
+ proto.STRING,
997
+ number=4,
998
+ )
999
+
1000
+
1001
+ class SanitizeUserPromptResponse(proto.Message):
1002
+ r"""Sanitized User Prompt Response.
1003
+
1004
+ Attributes:
1005
+ sanitization_result (google.cloud.modelarmor_v1.types.SanitizationResult):
1006
+ Output only. Sanitization Result.
1007
+ """
1008
+
1009
+ sanitization_result: "SanitizationResult" = proto.Field(
1010
+ proto.MESSAGE,
1011
+ number=1,
1012
+ message="SanitizationResult",
1013
+ )
1014
+
1015
+
1016
+ class SanitizeModelResponseResponse(proto.Message):
1017
+ r"""Sanitized Model Response Response.
1018
+
1019
+ Attributes:
1020
+ sanitization_result (google.cloud.modelarmor_v1.types.SanitizationResult):
1021
+ Output only. Sanitization Result.
1022
+ """
1023
+
1024
+ sanitization_result: "SanitizationResult" = proto.Field(
1025
+ proto.MESSAGE,
1026
+ number=1,
1027
+ message="SanitizationResult",
1028
+ )
1029
+
1030
+
1031
+ class SanitizationResult(proto.Message):
1032
+ r"""Sanitization result after applying all the filters on input
1033
+ content.
1034
+
1035
+ Attributes:
1036
+ filter_match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1037
+ Output only. Overall filter match state for Sanitization.
1038
+ The state can have below two values.
1039
+
1040
+ 1) NO_MATCH_FOUND: No filters in configuration satisfy
1041
+ matching criteria. In other words, input passed all
1042
+ filters.
1043
+
1044
+ 2) MATCH_FOUND: At least one filter in configuration
1045
+ satisfies matching. In other words, input did not pass
1046
+ one or more filters.
1047
+ filter_results (MutableMapping[str, google.cloud.modelarmor_v1.types.FilterResult]):
1048
+ Output only. Results for all filters where the key is the
1049
+ filter name - either of "csam", "malicious_uris", "rai",
1050
+ "pi_and_jailbreak" ,"sdp".
1051
+ invocation_result (google.cloud.modelarmor_v1.types.InvocationResult):
1052
+ Output only. A field indicating the outcome
1053
+ of the invocation, irrespective of match status.
1054
+ It can have the following three values: SUCCESS:
1055
+ All filters were executed successfully. PARTIAL:
1056
+ Some filters were skipped or failed execution.
1057
+ FAILURE: All filters were skipped or failed
1058
+ execution.
1059
+ sanitization_metadata (google.cloud.modelarmor_v1.types.SanitizationResult.SanitizationMetadata):
1060
+ Output only. Metadata related to
1061
+ Sanitization.
1062
+ """
1063
+
1064
+ class SanitizationMetadata(proto.Message):
1065
+ r"""Message describing Sanitization metadata.
1066
+
1067
+ Attributes:
1068
+ error_code (int):
1069
+ Error code if any.
1070
+ error_message (str):
1071
+ Error message if any.
1072
+ """
1073
+
1074
+ error_code: int = proto.Field(
1075
+ proto.INT64,
1076
+ number=1,
1077
+ )
1078
+ error_message: str = proto.Field(
1079
+ proto.STRING,
1080
+ number=2,
1081
+ )
1082
+
1083
+ filter_match_state: "FilterMatchState" = proto.Field(
1084
+ proto.ENUM,
1085
+ number=1,
1086
+ enum="FilterMatchState",
1087
+ )
1088
+ filter_results: MutableMapping[str, "FilterResult"] = proto.MapField(
1089
+ proto.STRING,
1090
+ proto.MESSAGE,
1091
+ number=2,
1092
+ message="FilterResult",
1093
+ )
1094
+ invocation_result: "InvocationResult" = proto.Field(
1095
+ proto.ENUM,
1096
+ number=4,
1097
+ enum="InvocationResult",
1098
+ )
1099
+ sanitization_metadata: SanitizationMetadata = proto.Field(
1100
+ proto.MESSAGE,
1101
+ number=3,
1102
+ message=SanitizationMetadata,
1103
+ )
1104
+
1105
+
1106
+ class FilterResult(proto.Message):
1107
+ r"""Filter Result obtained after Sanitization operations.
1108
+
1109
+ This message has `oneof`_ fields (mutually exclusive fields).
1110
+ For each oneof, at most one member field can be set at the same time.
1111
+ Setting any member of the oneof automatically clears all other
1112
+ members.
1113
+
1114
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1115
+
1116
+ Attributes:
1117
+ rai_filter_result (google.cloud.modelarmor_v1.types.RaiFilterResult):
1118
+ Responsible AI filter results.
1119
+
1120
+ This field is a member of `oneof`_ ``filter_result``.
1121
+ sdp_filter_result (google.cloud.modelarmor_v1.types.SdpFilterResult):
1122
+ Sensitive Data Protection results.
1123
+
1124
+ This field is a member of `oneof`_ ``filter_result``.
1125
+ pi_and_jailbreak_filter_result (google.cloud.modelarmor_v1.types.PiAndJailbreakFilterResult):
1126
+ Prompt injection and Jailbreak filter
1127
+ results.
1128
+
1129
+ This field is a member of `oneof`_ ``filter_result``.
1130
+ malicious_uri_filter_result (google.cloud.modelarmor_v1.types.MaliciousUriFilterResult):
1131
+ Malicious URI filter results.
1132
+
1133
+ This field is a member of `oneof`_ ``filter_result``.
1134
+ csam_filter_filter_result (google.cloud.modelarmor_v1.types.CsamFilterResult):
1135
+ CSAM filter results.
1136
+
1137
+ This field is a member of `oneof`_ ``filter_result``.
1138
+ virus_scan_filter_result (google.cloud.modelarmor_v1.types.VirusScanFilterResult):
1139
+ Virus scan results.
1140
+
1141
+ This field is a member of `oneof`_ ``filter_result``.
1142
+ """
1143
+
1144
+ rai_filter_result: "RaiFilterResult" = proto.Field(
1145
+ proto.MESSAGE,
1146
+ number=1,
1147
+ oneof="filter_result",
1148
+ message="RaiFilterResult",
1149
+ )
1150
+ sdp_filter_result: "SdpFilterResult" = proto.Field(
1151
+ proto.MESSAGE,
1152
+ number=2,
1153
+ oneof="filter_result",
1154
+ message="SdpFilterResult",
1155
+ )
1156
+ pi_and_jailbreak_filter_result: "PiAndJailbreakFilterResult" = proto.Field(
1157
+ proto.MESSAGE,
1158
+ number=3,
1159
+ oneof="filter_result",
1160
+ message="PiAndJailbreakFilterResult",
1161
+ )
1162
+ malicious_uri_filter_result: "MaliciousUriFilterResult" = proto.Field(
1163
+ proto.MESSAGE,
1164
+ number=4,
1165
+ oneof="filter_result",
1166
+ message="MaliciousUriFilterResult",
1167
+ )
1168
+ csam_filter_filter_result: "CsamFilterResult" = proto.Field(
1169
+ proto.MESSAGE,
1170
+ number=5,
1171
+ oneof="filter_result",
1172
+ message="CsamFilterResult",
1173
+ )
1174
+ virus_scan_filter_result: "VirusScanFilterResult" = proto.Field(
1175
+ proto.MESSAGE,
1176
+ number=6,
1177
+ oneof="filter_result",
1178
+ message="VirusScanFilterResult",
1179
+ )
1180
+
1181
+
1182
+ class RaiFilterResult(proto.Message):
1183
+ r"""Responsible AI Result.
1184
+
1185
+ Attributes:
1186
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1187
+ Output only. Reports whether the RAI filter
1188
+ was successfully executed or not.
1189
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1190
+ Optional messages corresponding to the
1191
+ result. A message can provide warnings or error
1192
+ details. For example, if execution state is
1193
+ skipped then this field provides related
1194
+ reason/explanation.
1195
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1196
+ Output only. Overall filter match state for RAI. Value is
1197
+ MATCH_FOUND if at least one RAI filter confidence level is
1198
+ equal to or higher than the confidence level defined in
1199
+ configuration.
1200
+ rai_filter_type_results (MutableMapping[str, google.cloud.modelarmor_v1.types.RaiFilterResult.RaiFilterTypeResult]):
1201
+ The map of RAI filter results where key is RAI filter type -
1202
+ either of "sexually_explicit", "hate_speech", "harassment",
1203
+ "dangerous".
1204
+ """
1205
+
1206
+ class RaiFilterTypeResult(proto.Message):
1207
+ r"""Detailed Filter result for each of the responsible AI Filter
1208
+ Types.
1209
+
1210
+ Attributes:
1211
+ filter_type (google.cloud.modelarmor_v1.types.RaiFilterType):
1212
+ Type of responsible AI filter.
1213
+ confidence_level (google.cloud.modelarmor_v1.types.DetectionConfidenceLevel):
1214
+ Confidence level identified for this RAI
1215
+ filter.
1216
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1217
+ Output only. Match state for this RAI filter.
1218
+ """
1219
+
1220
+ filter_type: "RaiFilterType" = proto.Field(
1221
+ proto.ENUM,
1222
+ number=1,
1223
+ enum="RaiFilterType",
1224
+ )
1225
+ confidence_level: "DetectionConfidenceLevel" = proto.Field(
1226
+ proto.ENUM,
1227
+ number=2,
1228
+ enum="DetectionConfidenceLevel",
1229
+ )
1230
+ match_state: "FilterMatchState" = proto.Field(
1231
+ proto.ENUM,
1232
+ number=3,
1233
+ enum="FilterMatchState",
1234
+ )
1235
+
1236
+ execution_state: "FilterExecutionState" = proto.Field(
1237
+ proto.ENUM,
1238
+ number=1,
1239
+ enum="FilterExecutionState",
1240
+ )
1241
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1242
+ proto.MESSAGE,
1243
+ number=2,
1244
+ message="MessageItem",
1245
+ )
1246
+ match_state: "FilterMatchState" = proto.Field(
1247
+ proto.ENUM,
1248
+ number=3,
1249
+ enum="FilterMatchState",
1250
+ )
1251
+ rai_filter_type_results: MutableMapping[str, RaiFilterTypeResult] = proto.MapField(
1252
+ proto.STRING,
1253
+ proto.MESSAGE,
1254
+ number=4,
1255
+ message=RaiFilterTypeResult,
1256
+ )
1257
+
1258
+
1259
+ class SdpFilterResult(proto.Message):
1260
+ r"""Sensitive Data Protection filter result.
1261
+
1262
+ This message has `oneof`_ fields (mutually exclusive fields).
1263
+ For each oneof, at most one member field can be set at the same time.
1264
+ Setting any member of the oneof automatically clears all other
1265
+ members.
1266
+
1267
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1268
+
1269
+ Attributes:
1270
+ inspect_result (google.cloud.modelarmor_v1.types.SdpInspectResult):
1271
+ Sensitive Data Protection Inspection result
1272
+ if inspection is performed.
1273
+
1274
+ This field is a member of `oneof`_ ``result``.
1275
+ deidentify_result (google.cloud.modelarmor_v1.types.SdpDeidentifyResult):
1276
+ Sensitive Data Protection Deidentification
1277
+ result if deidentification is performed.
1278
+
1279
+ This field is a member of `oneof`_ ``result``.
1280
+ """
1281
+
1282
+ inspect_result: "SdpInspectResult" = proto.Field(
1283
+ proto.MESSAGE,
1284
+ number=1,
1285
+ oneof="result",
1286
+ message="SdpInspectResult",
1287
+ )
1288
+ deidentify_result: "SdpDeidentifyResult" = proto.Field(
1289
+ proto.MESSAGE,
1290
+ number=2,
1291
+ oneof="result",
1292
+ message="SdpDeidentifyResult",
1293
+ )
1294
+
1295
+
1296
+ class SdpInspectResult(proto.Message):
1297
+ r"""Sensitive Data Protection Inspection Result.
1298
+
1299
+ Attributes:
1300
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1301
+ Output only. Reports whether Sensitive Data
1302
+ Protection inspection was successfully executed
1303
+ or not.
1304
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1305
+ Optional messages corresponding to the
1306
+ result. A message can provide warnings or error
1307
+ details. For example, if execution state is
1308
+ skipped then this field provides related
1309
+ reason/explanation.
1310
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1311
+ Output only. Match state for SDP Inspection. Value is
1312
+ MATCH_FOUND if at least one Sensitive Data Protection
1313
+ finding is identified.
1314
+ findings (MutableSequence[google.cloud.modelarmor_v1.types.SdpFinding]):
1315
+ List of Sensitive Data Protection findings.
1316
+ findings_truncated (bool):
1317
+ If true, then there is possibility that more
1318
+ findings were identified and the findings
1319
+ returned are a subset of all findings. The
1320
+ findings list might be truncated because the
1321
+ input items were too large, or because the
1322
+ server reached the maximum amount of resources
1323
+ allowed for a single API call.
1324
+ """
1325
+
1326
+ execution_state: "FilterExecutionState" = proto.Field(
1327
+ proto.ENUM,
1328
+ number=1,
1329
+ enum="FilterExecutionState",
1330
+ )
1331
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1332
+ proto.MESSAGE,
1333
+ number=2,
1334
+ message="MessageItem",
1335
+ )
1336
+ match_state: "FilterMatchState" = proto.Field(
1337
+ proto.ENUM,
1338
+ number=3,
1339
+ enum="FilterMatchState",
1340
+ )
1341
+ findings: MutableSequence["SdpFinding"] = proto.RepeatedField(
1342
+ proto.MESSAGE,
1343
+ number=4,
1344
+ message="SdpFinding",
1345
+ )
1346
+ findings_truncated: bool = proto.Field(
1347
+ proto.BOOL,
1348
+ number=5,
1349
+ )
1350
+
1351
+
1352
+ class DataItem(proto.Message):
1353
+ r"""Represents Data item
1354
+
1355
+ This message has `oneof`_ fields (mutually exclusive fields).
1356
+ For each oneof, at most one member field can be set at the same time.
1357
+ Setting any member of the oneof automatically clears all other
1358
+ members.
1359
+
1360
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1361
+
1362
+ Attributes:
1363
+ text (str):
1364
+ Plaintext string data for sanitization.
1365
+
1366
+ This field is a member of `oneof`_ ``data_item``.
1367
+ byte_item (google.cloud.modelarmor_v1.types.ByteDataItem):
1368
+ Data provided in the form of bytes.
1369
+
1370
+ This field is a member of `oneof`_ ``data_item``.
1371
+ """
1372
+
1373
+ text: str = proto.Field(
1374
+ proto.STRING,
1375
+ number=1,
1376
+ oneof="data_item",
1377
+ )
1378
+ byte_item: "ByteDataItem" = proto.Field(
1379
+ proto.MESSAGE,
1380
+ number=2,
1381
+ oneof="data_item",
1382
+ message="ByteDataItem",
1383
+ )
1384
+
1385
+
1386
+ class ByteDataItem(proto.Message):
1387
+ r"""Represents Byte Data item.
1388
+
1389
+ Attributes:
1390
+ byte_data_type (google.cloud.modelarmor_v1.types.ByteDataItem.ByteItemType):
1391
+ Required. The type of byte data
1392
+ byte_data (bytes):
1393
+ Required. Bytes Data
1394
+ """
1395
+
1396
+ class ByteItemType(proto.Enum):
1397
+ r"""Option to specify the type of byte data.
1398
+
1399
+ Values:
1400
+ BYTE_ITEM_TYPE_UNSPECIFIED (0):
1401
+ Unused
1402
+ PLAINTEXT_UTF8 (1):
1403
+ plain text
1404
+ PDF (2):
1405
+ PDF
1406
+ """
1407
+ BYTE_ITEM_TYPE_UNSPECIFIED = 0
1408
+ PLAINTEXT_UTF8 = 1
1409
+ PDF = 2
1410
+
1411
+ byte_data_type: ByteItemType = proto.Field(
1412
+ proto.ENUM,
1413
+ number=1,
1414
+ enum=ByteItemType,
1415
+ )
1416
+ byte_data: bytes = proto.Field(
1417
+ proto.BYTES,
1418
+ number=2,
1419
+ )
1420
+
1421
+
1422
+ class SdpDeidentifyResult(proto.Message):
1423
+ r"""Sensitive Data Protection Deidentification Result.
1424
+
1425
+ Attributes:
1426
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1427
+ Output only. Reports whether Sensitive Data
1428
+ Protection deidentification was successfully
1429
+ executed or not.
1430
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1431
+ Optional messages corresponding to the
1432
+ result. A message can provide warnings or error
1433
+ details. For example, if execution state is
1434
+ skipped then this field provides related
1435
+ reason/explanation.
1436
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1437
+ Output only. Match state for Sensitive Data Protection
1438
+ Deidentification. Value is MATCH_FOUND if content is
1439
+ de-identified.
1440
+ data (google.cloud.modelarmor_v1.types.DataItem):
1441
+ De-identified data.
1442
+ transformed_bytes (int):
1443
+ Total size in bytes that were transformed
1444
+ during deidentification.
1445
+ """
1446
+
1447
+ execution_state: "FilterExecutionState" = proto.Field(
1448
+ proto.ENUM,
1449
+ number=1,
1450
+ enum="FilterExecutionState",
1451
+ )
1452
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1453
+ proto.MESSAGE,
1454
+ number=2,
1455
+ message="MessageItem",
1456
+ )
1457
+ match_state: "FilterMatchState" = proto.Field(
1458
+ proto.ENUM,
1459
+ number=3,
1460
+ enum="FilterMatchState",
1461
+ )
1462
+ data: "DataItem" = proto.Field(
1463
+ proto.MESSAGE,
1464
+ number=4,
1465
+ message="DataItem",
1466
+ )
1467
+ transformed_bytes: int = proto.Field(
1468
+ proto.INT64,
1469
+ number=5,
1470
+ )
1471
+
1472
+
1473
+ class SdpFinding(proto.Message):
1474
+ r"""Finding corresponding to Sensitive Data Protection filter.
1475
+
1476
+ Attributes:
1477
+ info_type (str):
1478
+ Name of Sensitive Data Protection info type
1479
+ for this finding.
1480
+ likelihood (google.cloud.modelarmor_v1.types.SdpFindingLikelihood):
1481
+ Identified confidence likelihood for ``info_type``.
1482
+ location (google.cloud.modelarmor_v1.types.SdpFinding.SdpFindingLocation):
1483
+ Location for this finding.
1484
+ """
1485
+
1486
+ class SdpFindingLocation(proto.Message):
1487
+ r"""Location of this Sensitive Data Protection Finding within
1488
+ input content.
1489
+
1490
+ Attributes:
1491
+ byte_range (google.cloud.modelarmor_v1.types.RangeInfo):
1492
+ Zero-based byte offsets delimiting the
1493
+ finding. These are relative to the finding's
1494
+ containing element. Note that when the content
1495
+ is not textual, this references the UTF-8
1496
+ encoded textual representation of the content.
1497
+ codepoint_range (google.cloud.modelarmor_v1.types.RangeInfo):
1498
+ Unicode character offsets delimiting the
1499
+ finding. These are relative to the finding's
1500
+ containing element. Provided when the content is
1501
+ text.
1502
+ """
1503
+
1504
+ byte_range: "RangeInfo" = proto.Field(
1505
+ proto.MESSAGE,
1506
+ number=1,
1507
+ message="RangeInfo",
1508
+ )
1509
+ codepoint_range: "RangeInfo" = proto.Field(
1510
+ proto.MESSAGE,
1511
+ number=2,
1512
+ message="RangeInfo",
1513
+ )
1514
+
1515
+ info_type: str = proto.Field(
1516
+ proto.STRING,
1517
+ number=1,
1518
+ )
1519
+ likelihood: "SdpFindingLikelihood" = proto.Field(
1520
+ proto.ENUM,
1521
+ number=2,
1522
+ enum="SdpFindingLikelihood",
1523
+ )
1524
+ location: SdpFindingLocation = proto.Field(
1525
+ proto.MESSAGE,
1526
+ number=3,
1527
+ message=SdpFindingLocation,
1528
+ )
1529
+
1530
+
1531
+ class PiAndJailbreakFilterResult(proto.Message):
1532
+ r"""Prompt injection and Jailbreak Filter Result.
1533
+
1534
+ Attributes:
1535
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1536
+ Output only. Reports whether Prompt injection
1537
+ and Jailbreak filter was successfully executed
1538
+ or not.
1539
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1540
+ Optional messages corresponding to the
1541
+ result. A message can provide warnings or error
1542
+ details. For example, if execution state is
1543
+ skipped then this field provides related
1544
+ reason/explanation.
1545
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1546
+ Output only. Match state for Prompt injection
1547
+ and Jailbreak.
1548
+ confidence_level (google.cloud.modelarmor_v1.types.DetectionConfidenceLevel):
1549
+ Confidence level identified for Prompt
1550
+ injection and Jailbreak.
1551
+ """
1552
+
1553
+ execution_state: "FilterExecutionState" = proto.Field(
1554
+ proto.ENUM,
1555
+ number=1,
1556
+ enum="FilterExecutionState",
1557
+ )
1558
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1559
+ proto.MESSAGE,
1560
+ number=2,
1561
+ message="MessageItem",
1562
+ )
1563
+ match_state: "FilterMatchState" = proto.Field(
1564
+ proto.ENUM,
1565
+ number=3,
1566
+ enum="FilterMatchState",
1567
+ )
1568
+ confidence_level: "DetectionConfidenceLevel" = proto.Field(
1569
+ proto.ENUM,
1570
+ number=5,
1571
+ enum="DetectionConfidenceLevel",
1572
+ )
1573
+
1574
+
1575
+ class MaliciousUriFilterResult(proto.Message):
1576
+ r"""Malicious URI Filter Result.
1577
+
1578
+ Attributes:
1579
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1580
+ Output only. Reports whether Malicious URI
1581
+ filter was successfully executed or not.
1582
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1583
+ Optional messages corresponding to the
1584
+ result. A message can provide warnings or error
1585
+ details. For example, if execution state is
1586
+ skipped then this field provides related
1587
+ reason/explanation.
1588
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1589
+ Output only. Match state for this Malicious URI. Value is
1590
+ MATCH_FOUND if at least one Malicious URI is found.
1591
+ malicious_uri_matched_items (MutableSequence[google.cloud.modelarmor_v1.types.MaliciousUriFilterResult.MaliciousUriMatchedItem]):
1592
+ List of Malicious URIs found in data.
1593
+ """
1594
+
1595
+ class MaliciousUriMatchedItem(proto.Message):
1596
+ r"""Information regarding malicious URI and its location within
1597
+ the input content.
1598
+
1599
+ Attributes:
1600
+ uri (str):
1601
+ Malicious URI.
1602
+ locations (MutableSequence[google.cloud.modelarmor_v1.types.RangeInfo]):
1603
+ List of locations where Malicious URI is identified. The
1604
+ ``locations`` field is supported only for plaintext content
1605
+ i.e. ByteItemType.PLAINTEXT_UTF8
1606
+ """
1607
+
1608
+ uri: str = proto.Field(
1609
+ proto.STRING,
1610
+ number=1,
1611
+ )
1612
+ locations: MutableSequence["RangeInfo"] = proto.RepeatedField(
1613
+ proto.MESSAGE,
1614
+ number=2,
1615
+ message="RangeInfo",
1616
+ )
1617
+
1618
+ execution_state: "FilterExecutionState" = proto.Field(
1619
+ proto.ENUM,
1620
+ number=1,
1621
+ enum="FilterExecutionState",
1622
+ )
1623
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1624
+ proto.MESSAGE,
1625
+ number=2,
1626
+ message="MessageItem",
1627
+ )
1628
+ match_state: "FilterMatchState" = proto.Field(
1629
+ proto.ENUM,
1630
+ number=3,
1631
+ enum="FilterMatchState",
1632
+ )
1633
+ malicious_uri_matched_items: MutableSequence[
1634
+ MaliciousUriMatchedItem
1635
+ ] = proto.RepeatedField(
1636
+ proto.MESSAGE,
1637
+ number=4,
1638
+ message=MaliciousUriMatchedItem,
1639
+ )
1640
+
1641
+
1642
+ class VirusScanFilterResult(proto.Message):
1643
+ r"""Virus scan results.
1644
+
1645
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1646
+
1647
+ Attributes:
1648
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1649
+ Output only. Reports whether Virus Scan was
1650
+ successfully executed or not.
1651
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1652
+ Optional messages corresponding to the
1653
+ result. A message can provide warnings or error
1654
+ details. For example, if execution status is
1655
+ skipped then this field provides related
1656
+ reason/explanation.
1657
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1658
+ Output only. Match status for Virus. Value is MATCH_FOUND if
1659
+ the data is infected with a virus.
1660
+ scanned_content_type (google.cloud.modelarmor_v1.types.VirusScanFilterResult.ScannedContentType):
1661
+ Type of content scanned.
1662
+ scanned_size (int):
1663
+ Size of scanned content in bytes.
1664
+
1665
+ This field is a member of `oneof`_ ``_scanned_size``.
1666
+ virus_details (MutableSequence[google.cloud.modelarmor_v1.types.VirusDetail]):
1667
+ List of Viruses identified.
1668
+ This field will be empty if no virus was
1669
+ detected.
1670
+ """
1671
+
1672
+ class ScannedContentType(proto.Enum):
1673
+ r"""Type of content scanned.
1674
+
1675
+ Values:
1676
+ SCANNED_CONTENT_TYPE_UNSPECIFIED (0):
1677
+ Unused
1678
+ UNKNOWN (1):
1679
+ Unknown content
1680
+ PLAINTEXT (2):
1681
+ Plaintext
1682
+ PDF (3):
1683
+ PDF
1684
+ Scanning for only PDF is supported.
1685
+ """
1686
+ SCANNED_CONTENT_TYPE_UNSPECIFIED = 0
1687
+ UNKNOWN = 1
1688
+ PLAINTEXT = 2
1689
+ PDF = 3
1690
+
1691
+ execution_state: "FilterExecutionState" = proto.Field(
1692
+ proto.ENUM,
1693
+ number=1,
1694
+ enum="FilterExecutionState",
1695
+ )
1696
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1697
+ proto.MESSAGE,
1698
+ number=2,
1699
+ message="MessageItem",
1700
+ )
1701
+ match_state: "FilterMatchState" = proto.Field(
1702
+ proto.ENUM,
1703
+ number=3,
1704
+ enum="FilterMatchState",
1705
+ )
1706
+ scanned_content_type: ScannedContentType = proto.Field(
1707
+ proto.ENUM,
1708
+ number=4,
1709
+ enum=ScannedContentType,
1710
+ )
1711
+ scanned_size: int = proto.Field(
1712
+ proto.INT64,
1713
+ number=5,
1714
+ optional=True,
1715
+ )
1716
+ virus_details: MutableSequence["VirusDetail"] = proto.RepeatedField(
1717
+ proto.MESSAGE,
1718
+ number=6,
1719
+ message="VirusDetail",
1720
+ )
1721
+
1722
+
1723
+ class VirusDetail(proto.Message):
1724
+ r"""Details of an identified virus
1725
+
1726
+ Attributes:
1727
+ vendor (str):
1728
+ Name of vendor that produced this virus
1729
+ identification.
1730
+ names (MutableSequence[str]):
1731
+ Names of this Virus.
1732
+ threat_type (google.cloud.modelarmor_v1.types.VirusDetail.ThreatType):
1733
+ Threat type of the identified virus
1734
+ """
1735
+
1736
+ class ThreatType(proto.Enum):
1737
+ r"""Defines all the threat types of a virus
1738
+
1739
+ Values:
1740
+ THREAT_TYPE_UNSPECIFIED (0):
1741
+ Unused
1742
+ UNKNOWN (1):
1743
+ Unable to categorize threat
1744
+ VIRUS_OR_WORM (2):
1745
+ Virus or Worm threat.
1746
+ MALICIOUS_PROGRAM (3):
1747
+ Malicious program. E.g. Spyware, Trojan.
1748
+ POTENTIALLY_HARMFUL_CONTENT (4):
1749
+ Potentially harmful content. E.g. Injected
1750
+ code, Macro
1751
+ POTENTIALLY_UNWANTED_CONTENT (5):
1752
+ Potentially unwanted content. E.g. Adware.
1753
+ """
1754
+ THREAT_TYPE_UNSPECIFIED = 0
1755
+ UNKNOWN = 1
1756
+ VIRUS_OR_WORM = 2
1757
+ MALICIOUS_PROGRAM = 3
1758
+ POTENTIALLY_HARMFUL_CONTENT = 4
1759
+ POTENTIALLY_UNWANTED_CONTENT = 5
1760
+
1761
+ vendor: str = proto.Field(
1762
+ proto.STRING,
1763
+ number=1,
1764
+ )
1765
+ names: MutableSequence[str] = proto.RepeatedField(
1766
+ proto.STRING,
1767
+ number=2,
1768
+ )
1769
+ threat_type: ThreatType = proto.Field(
1770
+ proto.ENUM,
1771
+ number=3,
1772
+ enum=ThreatType,
1773
+ )
1774
+
1775
+
1776
+ class CsamFilterResult(proto.Message):
1777
+ r"""CSAM (Child Safety Abuse Material) Filter Result
1778
+
1779
+ Attributes:
1780
+ execution_state (google.cloud.modelarmor_v1.types.FilterExecutionState):
1781
+ Output only. Reports whether the CSAM filter
1782
+ was successfully executed or not.
1783
+ message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
1784
+ Optional messages corresponding to the
1785
+ result. A message can provide warnings or error
1786
+ details. For example, if execution state is
1787
+ skipped then this field provides related
1788
+ reason/explanation.
1789
+ match_state (google.cloud.modelarmor_v1.types.FilterMatchState):
1790
+ Output only. Match state for CSAM.
1791
+ """
1792
+
1793
+ execution_state: "FilterExecutionState" = proto.Field(
1794
+ proto.ENUM,
1795
+ number=1,
1796
+ enum="FilterExecutionState",
1797
+ )
1798
+ message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
1799
+ proto.MESSAGE,
1800
+ number=2,
1801
+ message="MessageItem",
1802
+ )
1803
+ match_state: "FilterMatchState" = proto.Field(
1804
+ proto.ENUM,
1805
+ number=3,
1806
+ enum="FilterMatchState",
1807
+ )
1808
+
1809
+
1810
+ class MessageItem(proto.Message):
1811
+ r"""Message item to report information, warning or error
1812
+ messages.
1813
+
1814
+ Attributes:
1815
+ message_type (google.cloud.modelarmor_v1.types.MessageItem.MessageType):
1816
+ Type of message.
1817
+ message (str):
1818
+ The message content.
1819
+ """
1820
+
1821
+ class MessageType(proto.Enum):
1822
+ r"""Option to specify the type of message.
1823
+
1824
+ Values:
1825
+ MESSAGE_TYPE_UNSPECIFIED (0):
1826
+ Unused
1827
+ INFO (1):
1828
+ Information related message.
1829
+ WARNING (2):
1830
+ Warning related message.
1831
+ ERROR (3):
1832
+ Error message.
1833
+ """
1834
+ MESSAGE_TYPE_UNSPECIFIED = 0
1835
+ INFO = 1
1836
+ WARNING = 2
1837
+ ERROR = 3
1838
+
1839
+ message_type: MessageType = proto.Field(
1840
+ proto.ENUM,
1841
+ number=1,
1842
+ enum=MessageType,
1843
+ )
1844
+ message: str = proto.Field(
1845
+ proto.STRING,
1846
+ number=2,
1847
+ )
1848
+
1849
+
1850
+ class RangeInfo(proto.Message):
1851
+ r"""Half-open range interval [start, end)
1852
+
1853
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1854
+
1855
+ Attributes:
1856
+ start (int):
1857
+ For proto3, value cannot be set to 0 unless
1858
+ the field is optional. Ref:
1859
+ https://protobuf.dev/programming-guides/proto3/#default
1860
+ Index of first character (inclusive).
1861
+
1862
+ This field is a member of `oneof`_ ``_start``.
1863
+ end (int):
1864
+ Index of last character (exclusive).
1865
+
1866
+ This field is a member of `oneof`_ ``_end``.
1867
+ """
1868
+
1869
+ start: int = proto.Field(
1870
+ proto.INT64,
1871
+ number=1,
1872
+ optional=True,
1873
+ )
1874
+ end: int = proto.Field(
1875
+ proto.INT64,
1876
+ number=2,
1877
+ optional=True,
1878
+ )
1879
+
1880
+
1881
+ __all__ = tuple(sorted(__protobuf__.manifest))