google-cloud-modelarmor 0.7.2__tar.gz → 0.7.3__tar.gz
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.
- {google_cloud_modelarmor-0.7.2/google_cloud_modelarmor.egg-info → google_cloud_modelarmor-0.7.3}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor/__init__.py +8 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/__init__.py +8 -0
- {google_cloud_modelarmor-0.7.2/google/cloud/modelarmor_v1beta → google_cloud_modelarmor-0.7.3/google/cloud/modelarmor_v1}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/types/__init__.py +8 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/types/service.py +266 -6
- {google_cloud_modelarmor-0.7.2/google/cloud/modelarmor_v1 → google_cloud_modelarmor-0.7.3/google/cloud/modelarmor_v1beta}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3/google_cloud_modelarmor.egg-info}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1/test_model_armor.py +9 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/LICENSE +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/MANIFEST.in +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/README.rst +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/types/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1beta/types/service.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google_cloud_modelarmor.egg-info/SOURCES.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google_cloud_modelarmor.egg-info/dependency_links.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google_cloud_modelarmor.egg-info/not-zip-safe +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google_cloud_modelarmor.egg-info/requires.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google_cloud_modelarmor.egg-info/top_level.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/setup.cfg +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/setup.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1beta/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/modelarmor_v1beta/test_model_armor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-modelarmor
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Google Cloud Modelarmor API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-modelarmor
|
|
6
6
|
Author: Google LLC
|
{google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor/__init__.py
RENAMED
|
@@ -34,6 +34,9 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
34
34
|
FilterExecutionState,
|
|
35
35
|
FilterMatchState,
|
|
36
36
|
FilterResult,
|
|
37
|
+
FilterVersionAlias,
|
|
38
|
+
FilterVersionConfig,
|
|
39
|
+
FilterVersionSelector,
|
|
37
40
|
FloorSetting,
|
|
38
41
|
GetFloorSettingRequest,
|
|
39
42
|
GetTemplateRequest,
|
|
@@ -42,6 +45,7 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
42
45
|
ListTemplatesResponse,
|
|
43
46
|
MaliciousUriFilterResult,
|
|
44
47
|
MaliciousUriFilterSettings,
|
|
48
|
+
McpServerFloorSetting,
|
|
45
49
|
MessageItem,
|
|
46
50
|
Modality,
|
|
47
51
|
MultiLanguageDetectionMetadata,
|
|
@@ -86,6 +90,8 @@ __all__ = (
|
|
|
86
90
|
"DeleteTemplateRequest",
|
|
87
91
|
"FilterConfig",
|
|
88
92
|
"FilterResult",
|
|
93
|
+
"FilterVersionConfig",
|
|
94
|
+
"FilterVersionSelector",
|
|
89
95
|
"FloorSetting",
|
|
90
96
|
"GetFloorSettingRequest",
|
|
91
97
|
"GetTemplateRequest",
|
|
@@ -93,6 +99,7 @@ __all__ = (
|
|
|
93
99
|
"ListTemplatesResponse",
|
|
94
100
|
"MaliciousUriFilterResult",
|
|
95
101
|
"MaliciousUriFilterSettings",
|
|
102
|
+
"McpServerFloorSetting",
|
|
96
103
|
"MessageItem",
|
|
97
104
|
"MultiLanguageDetectionMetadata",
|
|
98
105
|
"PiAndJailbreakFilterResult",
|
|
@@ -123,6 +130,7 @@ __all__ = (
|
|
|
123
130
|
"DetectionConfidenceLevel",
|
|
124
131
|
"FilterExecutionState",
|
|
125
132
|
"FilterMatchState",
|
|
133
|
+
"FilterVersionAlias",
|
|
126
134
|
"InvocationResult",
|
|
127
135
|
"Modality",
|
|
128
136
|
"RaiFilterType",
|
|
@@ -44,6 +44,9 @@ from .types.service import (
|
|
|
44
44
|
FilterExecutionState,
|
|
45
45
|
FilterMatchState,
|
|
46
46
|
FilterResult,
|
|
47
|
+
FilterVersionAlias,
|
|
48
|
+
FilterVersionConfig,
|
|
49
|
+
FilterVersionSelector,
|
|
47
50
|
FloorSetting,
|
|
48
51
|
GetFloorSettingRequest,
|
|
49
52
|
GetTemplateRequest,
|
|
@@ -52,6 +55,7 @@ from .types.service import (
|
|
|
52
55
|
ListTemplatesResponse,
|
|
53
56
|
MaliciousUriFilterResult,
|
|
54
57
|
MaliciousUriFilterSettings,
|
|
58
|
+
McpServerFloorSetting,
|
|
55
59
|
MessageItem,
|
|
56
60
|
Modality,
|
|
57
61
|
MultiLanguageDetectionMetadata,
|
|
@@ -98,6 +102,9 @@ __all__ = (
|
|
|
98
102
|
"FilterExecutionState",
|
|
99
103
|
"FilterMatchState",
|
|
100
104
|
"FilterResult",
|
|
105
|
+
"FilterVersionAlias",
|
|
106
|
+
"FilterVersionConfig",
|
|
107
|
+
"FilterVersionSelector",
|
|
101
108
|
"FloorSetting",
|
|
102
109
|
"GetFloorSettingRequest",
|
|
103
110
|
"GetTemplateRequest",
|
|
@@ -106,6 +113,7 @@ __all__ = (
|
|
|
106
113
|
"ListTemplatesResponse",
|
|
107
114
|
"MaliciousUriFilterResult",
|
|
108
115
|
"MaliciousUriFilterSettings",
|
|
116
|
+
"McpServerFloorSetting",
|
|
109
117
|
"MessageItem",
|
|
110
118
|
"Modality",
|
|
111
119
|
"ModelArmorClient",
|
|
@@ -25,6 +25,9 @@ from .service import (
|
|
|
25
25
|
FilterExecutionState,
|
|
26
26
|
FilterMatchState,
|
|
27
27
|
FilterResult,
|
|
28
|
+
FilterVersionAlias,
|
|
29
|
+
FilterVersionConfig,
|
|
30
|
+
FilterVersionSelector,
|
|
28
31
|
FloorSetting,
|
|
29
32
|
GetFloorSettingRequest,
|
|
30
33
|
GetTemplateRequest,
|
|
@@ -33,6 +36,7 @@ from .service import (
|
|
|
33
36
|
ListTemplatesResponse,
|
|
34
37
|
MaliciousUriFilterResult,
|
|
35
38
|
MaliciousUriFilterSettings,
|
|
39
|
+
McpServerFloorSetting,
|
|
36
40
|
MessageItem,
|
|
37
41
|
Modality,
|
|
38
42
|
MultiLanguageDetectionMetadata,
|
|
@@ -75,6 +79,8 @@ __all__ = (
|
|
|
75
79
|
"DeleteTemplateRequest",
|
|
76
80
|
"FilterConfig",
|
|
77
81
|
"FilterResult",
|
|
82
|
+
"FilterVersionConfig",
|
|
83
|
+
"FilterVersionSelector",
|
|
78
84
|
"FloorSetting",
|
|
79
85
|
"GetFloorSettingRequest",
|
|
80
86
|
"GetTemplateRequest",
|
|
@@ -82,6 +88,7 @@ __all__ = (
|
|
|
82
88
|
"ListTemplatesResponse",
|
|
83
89
|
"MaliciousUriFilterResult",
|
|
84
90
|
"MaliciousUriFilterSettings",
|
|
91
|
+
"McpServerFloorSetting",
|
|
85
92
|
"MessageItem",
|
|
86
93
|
"MultiLanguageDetectionMetadata",
|
|
87
94
|
"PiAndJailbreakFilterResult",
|
|
@@ -112,6 +119,7 @@ __all__ = (
|
|
|
112
119
|
"DetectionConfidenceLevel",
|
|
113
120
|
"FilterExecutionState",
|
|
114
121
|
"FilterMatchState",
|
|
122
|
+
"FilterVersionAlias",
|
|
115
123
|
"InvocationResult",
|
|
116
124
|
"Modality",
|
|
117
125
|
"RaiFilterType",
|
|
@@ -19,6 +19,7 @@ from typing import MutableMapping, MutableSequence
|
|
|
19
19
|
|
|
20
20
|
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
|
|
21
21
|
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
|
|
22
|
+
import google.type.date_pb2 as date_pb2 # type: ignore
|
|
22
23
|
import proto # type: ignore
|
|
23
24
|
|
|
24
25
|
__protobuf__ = proto.module(
|
|
@@ -32,8 +33,11 @@ __protobuf__ = proto.module(
|
|
|
32
33
|
"InvocationResult",
|
|
33
34
|
"StreamingMode",
|
|
34
35
|
"Modality",
|
|
36
|
+
"FilterVersionAlias",
|
|
37
|
+
"FilterVersionSelector",
|
|
35
38
|
"Template",
|
|
36
39
|
"FloorSetting",
|
|
40
|
+
"McpServerFloorSetting",
|
|
37
41
|
"AiPlatformFloorSetting",
|
|
38
42
|
"ListTemplatesRequest",
|
|
39
43
|
"ListTemplatesResponse",
|
|
@@ -54,6 +58,7 @@ __protobuf__ = proto.module(
|
|
|
54
58
|
"SanitizeModelResponseRequest",
|
|
55
59
|
"SanitizeUserPromptResponse",
|
|
56
60
|
"SanitizeModelResponseResponse",
|
|
61
|
+
"FilterVersionConfig",
|
|
57
62
|
"SanitizationResult",
|
|
58
63
|
"MultiLanguageDetectionMetadata",
|
|
59
64
|
"FilterResult",
|
|
@@ -252,6 +257,88 @@ class Modality(proto.Enum):
|
|
|
252
257
|
MODALITY_IMAGE = 2
|
|
253
258
|
|
|
254
259
|
|
|
260
|
+
class FilterVersionAlias(proto.Enum):
|
|
261
|
+
r"""Enum for Filter Version Aliases.
|
|
262
|
+
These aliases provide a way to always point to a specific track
|
|
263
|
+
without needing to update the version in templates.
|
|
264
|
+
|
|
265
|
+
Values:
|
|
266
|
+
FILTER_VERSION_ALIAS_UNSPECIFIED (0):
|
|
267
|
+
The default value. If used, it will resolve to the
|
|
268
|
+
``STABLE`` alias.
|
|
269
|
+
FILTER_VERSION_ALIAS_STABLE (1):
|
|
270
|
+
The ``STABLE`` alias points to the most recent stable model
|
|
271
|
+
version. Using this alias means no code changes are required
|
|
272
|
+
when a new model becomes the stable version.
|
|
273
|
+
FILTER_VERSION_ALIAS_LATEST (2):
|
|
274
|
+
The ``LATEST`` alias points to the newest model version
|
|
275
|
+
available. This version is subject to frequent revisions and
|
|
276
|
+
offers SLO guarantees but does not assure stability,
|
|
277
|
+
providing the most current security protections.
|
|
278
|
+
FILTER_VERSION_ALIAS_LEGACY (3):
|
|
279
|
+
The ``LEGACY`` alias could be used for sanitization
|
|
280
|
+
operations for a transition period. New templates cannot be
|
|
281
|
+
created with this version.
|
|
282
|
+
FILTER_VERSION_ALIAS_RETIRED (4):
|
|
283
|
+
The ``RETIRED`` alias could be used for versions that are no
|
|
284
|
+
longer available to be used. While new templates cannot be
|
|
285
|
+
created with this alias, any existing template or request
|
|
286
|
+
using ``RETIRED`` version will fall back to the current
|
|
287
|
+
``STABLE`` version for sanitization operations.
|
|
288
|
+
"""
|
|
289
|
+
|
|
290
|
+
FILTER_VERSION_ALIAS_UNSPECIFIED = 0
|
|
291
|
+
FILTER_VERSION_ALIAS_STABLE = 1
|
|
292
|
+
FILTER_VERSION_ALIAS_LATEST = 2
|
|
293
|
+
FILTER_VERSION_ALIAS_LEGACY = 3
|
|
294
|
+
FILTER_VERSION_ALIAS_RETIRED = 4
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class FilterVersionSelector(proto.Message):
|
|
298
|
+
r"""Represents the configuration for selecting a Filter Version.
|
|
299
|
+
Allows customers to choose to use either a specific version or a
|
|
300
|
+
predefined alias.
|
|
301
|
+
|
|
302
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
303
|
+
For each oneof, at most one member field can be set at the same time.
|
|
304
|
+
Setting any member of the oneof automatically clears all other
|
|
305
|
+
members.
|
|
306
|
+
|
|
307
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
308
|
+
|
|
309
|
+
Attributes:
|
|
310
|
+
version (str):
|
|
311
|
+
Allows customers to pin to a specific, immutable Filter
|
|
312
|
+
Version. This provides stability, as this will not change
|
|
313
|
+
after a version upgrade. Expected format is a case-sensitive
|
|
314
|
+
string, e.g., "v1", "v2". Requests providing an invalid or
|
|
315
|
+
non-existent version string will be rejected with an
|
|
316
|
+
``INVALID_ARGUMENT`` error.
|
|
317
|
+
|
|
318
|
+
This field is a member of `oneof`_ ``version_spec``.
|
|
319
|
+
alias (google.cloud.modelarmor_v1.types.FilterVersionAlias):
|
|
320
|
+
Allows customers to use a predefined alias
|
|
321
|
+
that dynamically points to a specific version
|
|
322
|
+
based on internal upgrades. This offers
|
|
323
|
+
flexibility and reduces the need for template
|
|
324
|
+
updates.
|
|
325
|
+
|
|
326
|
+
This field is a member of `oneof`_ ``version_spec``.
|
|
327
|
+
"""
|
|
328
|
+
|
|
329
|
+
version: str = proto.Field(
|
|
330
|
+
proto.STRING,
|
|
331
|
+
number=1,
|
|
332
|
+
oneof="version_spec",
|
|
333
|
+
)
|
|
334
|
+
alias: "FilterVersionAlias" = proto.Field(
|
|
335
|
+
proto.ENUM,
|
|
336
|
+
number=2,
|
|
337
|
+
oneof="version_spec",
|
|
338
|
+
enum="FilterVersionAlias",
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
|
|
255
342
|
class Template(proto.Message):
|
|
256
343
|
r"""Message describing Template resource
|
|
257
344
|
|
|
@@ -274,6 +361,8 @@ class Template(proto.Message):
|
|
|
274
361
|
class TemplateMetadata(proto.Message):
|
|
275
362
|
r"""Message describing TemplateMetadata
|
|
276
363
|
|
|
364
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
365
|
+
|
|
277
366
|
Attributes:
|
|
278
367
|
ignore_partial_invocation_failures (bool):
|
|
279
368
|
Optional. If true, partial detector failures
|
|
@@ -306,9 +395,26 @@ class Template(proto.Message):
|
|
|
306
395
|
multi_language_detection (google.cloud.modelarmor_v1.types.Template.TemplateMetadata.MultiLanguageDetection):
|
|
307
396
|
Optional. Metadata for multi language
|
|
308
397
|
detection.
|
|
398
|
+
filter_version_selector (google.cloud.modelarmor_v1.types.FilterVersionSelector):
|
|
399
|
+
Optional. Specifies the configuration for the Filter version
|
|
400
|
+
to be used. If this field is populated, it takes precedence
|
|
401
|
+
over any values set in the deprecated ``filter_version``
|
|
402
|
+
fields within ``RaiFilterSettings``,
|
|
403
|
+
``PiAndJailbreakFilterSettings``.
|
|
404
|
+
|
|
405
|
+
This field is a member of `oneof`_ ``_filter_version_selector``.
|
|
309
406
|
modalities (MutableSequence[google.cloud.modelarmor_v1.types.Modality]):
|
|
310
407
|
Optional. Specifies the modalities to scan.
|
|
311
408
|
If empty, only text modality will be scanned.
|
|
409
|
+
data_residency_compliant (bool):
|
|
410
|
+
Optional. Indicates whether the template is
|
|
411
|
+
subject to data residency compliance. If true
|
|
412
|
+
(default for new templates), the template is
|
|
413
|
+
subject to data residency compliance. If false,
|
|
414
|
+
the template bypasses data residency compliance
|
|
415
|
+
checks.
|
|
416
|
+
|
|
417
|
+
This field is a member of `oneof`_ ``_data_residency_compliant``.
|
|
312
418
|
"""
|
|
313
419
|
|
|
314
420
|
class EnforcementType(proto.Enum):
|
|
@@ -384,11 +490,22 @@ class Template(proto.Message):
|
|
|
384
490
|
message="Template.TemplateMetadata.MultiLanguageDetection",
|
|
385
491
|
)
|
|
386
492
|
)
|
|
493
|
+
filter_version_selector: "FilterVersionSelector" = proto.Field(
|
|
494
|
+
proto.MESSAGE,
|
|
495
|
+
number=10,
|
|
496
|
+
optional=True,
|
|
497
|
+
message="FilterVersionSelector",
|
|
498
|
+
)
|
|
387
499
|
modalities: MutableSequence["Modality"] = proto.RepeatedField(
|
|
388
500
|
proto.ENUM,
|
|
389
501
|
number=11,
|
|
390
502
|
enum="Modality",
|
|
391
503
|
)
|
|
504
|
+
data_residency_compliant: bool = proto.Field(
|
|
505
|
+
proto.BOOL,
|
|
506
|
+
number=12,
|
|
507
|
+
optional=True,
|
|
508
|
+
)
|
|
392
509
|
|
|
393
510
|
name: str = proto.Field(
|
|
394
511
|
proto.STRING,
|
|
@@ -448,6 +565,10 @@ class FloorSetting(proto.Message):
|
|
|
448
565
|
This field is a member of `oneof`_ ``_ai_platform_floor_setting``.
|
|
449
566
|
floor_setting_metadata (google.cloud.modelarmor_v1.types.FloorSetting.FloorSettingMetadata):
|
|
450
567
|
Optional. Metadata for FloorSetting
|
|
568
|
+
google_mcp_server_floor_setting (google.cloud.modelarmor_v1.types.McpServerFloorSetting):
|
|
569
|
+
Optional. Google MCP Server floor setting.
|
|
570
|
+
|
|
571
|
+
This field is a member of `oneof`_ ``_google_mcp_server_floor_setting``.
|
|
451
572
|
"""
|
|
452
573
|
|
|
453
574
|
class IntegratedService(proto.Enum):
|
|
@@ -458,10 +579,14 @@ class FloorSetting(proto.Message):
|
|
|
458
579
|
Unspecified integrated service.
|
|
459
580
|
AI_PLATFORM (1):
|
|
460
581
|
AI Platform.
|
|
582
|
+
GOOGLE_MCP_SERVER (2):
|
|
583
|
+
Google MCP Server (via Shim Service
|
|
584
|
+
Extension)
|
|
461
585
|
"""
|
|
462
586
|
|
|
463
587
|
INTEGRATED_SERVICE_UNSPECIFIED = 0
|
|
464
588
|
AI_PLATFORM = 1
|
|
589
|
+
GOOGLE_MCP_SERVER = 2
|
|
465
590
|
|
|
466
591
|
class FloorSettingMetadata(proto.Message):
|
|
467
592
|
r"""message describing FloorSetting Metadata
|
|
@@ -533,6 +658,56 @@ class FloorSetting(proto.Message):
|
|
|
533
658
|
number=8,
|
|
534
659
|
message=FloorSettingMetadata,
|
|
535
660
|
)
|
|
661
|
+
google_mcp_server_floor_setting: "McpServerFloorSetting" = proto.Field(
|
|
662
|
+
proto.MESSAGE,
|
|
663
|
+
number=9,
|
|
664
|
+
optional=True,
|
|
665
|
+
message="McpServerFloorSetting",
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
class McpServerFloorSetting(proto.Message):
|
|
670
|
+
r"""Message describing MCP Server Floor Setting.
|
|
671
|
+
|
|
672
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
673
|
+
For each oneof, at most one member field can be set at the same time.
|
|
674
|
+
Setting any member of the oneof automatically clears all other
|
|
675
|
+
members.
|
|
676
|
+
|
|
677
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
678
|
+
|
|
679
|
+
Attributes:
|
|
680
|
+
inspect_only (bool):
|
|
681
|
+
Optional. If true, Model Armor filters will
|
|
682
|
+
be run in inspect only mode. No action will be
|
|
683
|
+
taken on the request.
|
|
684
|
+
|
|
685
|
+
This field is a member of `oneof`_ ``enforcement_type``.
|
|
686
|
+
inspect_and_block (bool):
|
|
687
|
+
Optional. If true, Model Armor filters will
|
|
688
|
+
be run in inspect and block mode. Requests that
|
|
689
|
+
trip Model Armor filters will be blocked.
|
|
690
|
+
|
|
691
|
+
This field is a member of `oneof`_ ``enforcement_type``.
|
|
692
|
+
enable_cloud_logging (bool):
|
|
693
|
+
Optional. If true, log Model Armor filter
|
|
694
|
+
results to Cloud Logging.
|
|
695
|
+
"""
|
|
696
|
+
|
|
697
|
+
inspect_only: bool = proto.Field(
|
|
698
|
+
proto.BOOL,
|
|
699
|
+
number=1,
|
|
700
|
+
oneof="enforcement_type",
|
|
701
|
+
)
|
|
702
|
+
inspect_and_block: bool = proto.Field(
|
|
703
|
+
proto.BOOL,
|
|
704
|
+
number=2,
|
|
705
|
+
oneof="enforcement_type",
|
|
706
|
+
)
|
|
707
|
+
enable_cloud_logging: bool = proto.Field(
|
|
708
|
+
proto.BOOL,
|
|
709
|
+
number=3,
|
|
710
|
+
)
|
|
536
711
|
|
|
537
712
|
|
|
538
713
|
class AiPlatformFloorSetting(proto.Message):
|
|
@@ -1251,6 +1426,66 @@ class SanitizeModelResponseResponse(proto.Message):
|
|
|
1251
1426
|
)
|
|
1252
1427
|
|
|
1253
1428
|
|
|
1429
|
+
class FilterVersionConfig(proto.Message):
|
|
1430
|
+
r"""Message describing a Filter Version Configuration.
|
|
1431
|
+
|
|
1432
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
1433
|
+
|
|
1434
|
+
Attributes:
|
|
1435
|
+
filter_version (str):
|
|
1436
|
+
Output only. The identifier for this specific
|
|
1437
|
+
version.
|
|
1438
|
+
filter_version_alias (google.cloud.modelarmor_v1.types.FilterVersionAlias):
|
|
1439
|
+
Output only. The alias associated with this
|
|
1440
|
+
version, if any (e.g., "STABLE", "LATEST"). This
|
|
1441
|
+
will be populated if this version is currently
|
|
1442
|
+
mapped to an alias.
|
|
1443
|
+
|
|
1444
|
+
This field is a member of `oneof`_ ``_filter_version_alias``.
|
|
1445
|
+
release_date (google.type.date_pb2.Date):
|
|
1446
|
+
Output only. The date when this version was
|
|
1447
|
+
released.
|
|
1448
|
+
|
|
1449
|
+
This field is a member of `oneof`_ ``_release_date``.
|
|
1450
|
+
projected_deprecation_date (google.type.date_pb2.Date):
|
|
1451
|
+
Output only. The estimated date when this
|
|
1452
|
+
version is projected to be deprecated.
|
|
1453
|
+
|
|
1454
|
+
This field is a member of `oneof`_ ``_projected_deprecation_date``.
|
|
1455
|
+
message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
|
|
1456
|
+
Output only. Extra information regarding this
|
|
1457
|
+
filter version
|
|
1458
|
+
"""
|
|
1459
|
+
|
|
1460
|
+
filter_version: str = proto.Field(
|
|
1461
|
+
proto.STRING,
|
|
1462
|
+
number=1,
|
|
1463
|
+
)
|
|
1464
|
+
filter_version_alias: "FilterVersionAlias" = proto.Field(
|
|
1465
|
+
proto.ENUM,
|
|
1466
|
+
number=2,
|
|
1467
|
+
optional=True,
|
|
1468
|
+
enum="FilterVersionAlias",
|
|
1469
|
+
)
|
|
1470
|
+
release_date: date_pb2.Date = proto.Field(
|
|
1471
|
+
proto.MESSAGE,
|
|
1472
|
+
number=3,
|
|
1473
|
+
optional=True,
|
|
1474
|
+
message=date_pb2.Date,
|
|
1475
|
+
)
|
|
1476
|
+
projected_deprecation_date: date_pb2.Date = proto.Field(
|
|
1477
|
+
proto.MESSAGE,
|
|
1478
|
+
number=4,
|
|
1479
|
+
optional=True,
|
|
1480
|
+
message=date_pb2.Date,
|
|
1481
|
+
)
|
|
1482
|
+
message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
|
|
1483
|
+
proto.MESSAGE,
|
|
1484
|
+
number=5,
|
|
1485
|
+
message="MessageItem",
|
|
1486
|
+
)
|
|
1487
|
+
|
|
1488
|
+
|
|
1254
1489
|
class SanitizationResult(proto.Message):
|
|
1255
1490
|
r"""Sanitization result after applying all the filters on input
|
|
1256
1491
|
content.
|
|
@@ -1270,7 +1505,7 @@ class SanitizationResult(proto.Message):
|
|
|
1270
1505
|
filter_results (MutableMapping[str, google.cloud.modelarmor_v1.types.FilterResult]):
|
|
1271
1506
|
Output only. Results for all filters where the key is the
|
|
1272
1507
|
filter name - either of "csam", "malicious_uris", "rai",
|
|
1273
|
-
"pi_and_jailbreak"
|
|
1508
|
+
"pi_and_jailbreak", "sdp".
|
|
1274
1509
|
invocation_result (google.cloud.modelarmor_v1.types.InvocationResult):
|
|
1275
1510
|
Output only. A field indicating the outcome
|
|
1276
1511
|
of the invocation, irrespective of match status.
|
|
@@ -1299,6 +1534,10 @@ class SanitizationResult(proto.Message):
|
|
|
1299
1534
|
stream_chunk_processed (google.cloud.modelarmor_v1.types.DataItem):
|
|
1300
1535
|
Output only. The stream chunk processed by
|
|
1301
1536
|
the Sanitization service.
|
|
1537
|
+
filter_version_config (google.cloud.modelarmor_v1.types.FilterVersionConfig):
|
|
1538
|
+
Output only. Provides details about the
|
|
1539
|
+
Filter Version configuration used to sanitize
|
|
1540
|
+
this request.
|
|
1302
1541
|
"""
|
|
1303
1542
|
|
|
1304
1543
|
error_code: int = proto.Field(
|
|
@@ -1318,6 +1557,11 @@ class SanitizationResult(proto.Message):
|
|
|
1318
1557
|
number=4,
|
|
1319
1558
|
message="DataItem",
|
|
1320
1559
|
)
|
|
1560
|
+
filter_version_config: "FilterVersionConfig" = proto.Field(
|
|
1561
|
+
proto.MESSAGE,
|
|
1562
|
+
number=6,
|
|
1563
|
+
message="FilterVersionConfig",
|
|
1564
|
+
)
|
|
1321
1565
|
|
|
1322
1566
|
filter_match_state: "FilterMatchState" = proto.Field(
|
|
1323
1567
|
proto.ENUM,
|
|
@@ -1347,11 +1591,20 @@ class MultiLanguageDetectionMetadata(proto.Message):
|
|
|
1347
1591
|
|
|
1348
1592
|
Attributes:
|
|
1349
1593
|
source_language (str):
|
|
1350
|
-
Optional. Optional Source language of the
|
|
1351
|
-
|
|
1352
|
-
If multi-language detection is enabled
|
|
1353
|
-
|
|
1354
|
-
|
|
1594
|
+
Optional. Optional Source language of the user prompt.
|
|
1595
|
+
|
|
1596
|
+
If multi-language detection is enabled and this field is not
|
|
1597
|
+
set, the source language will be automatically detected.
|
|
1598
|
+
When a source language is provided, Model Armor uses it to
|
|
1599
|
+
sanitize the input. In that case the system does not perform
|
|
1600
|
+
auto-detection and relies solely on the specified language.
|
|
1601
|
+
|
|
1602
|
+
This string field accepts a language code from the ISO-639
|
|
1603
|
+
standard. For a list of languages supported by Model Armor,
|
|
1604
|
+
see [Model Armor supported languages]
|
|
1605
|
+
(https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
|
|
1606
|
+
For a comprehensive list of language codes, see
|
|
1607
|
+
`ISO-639 <https://cloud.google.com/translate/docs/languages#nmt>`__.
|
|
1355
1608
|
enable_multi_language_detection (bool):
|
|
1356
1609
|
Optional. Enable detection of multi-language
|
|
1357
1610
|
prompts and responses.
|
|
@@ -1674,6 +1927,9 @@ class ByteDataItem(proto.Message):
|
|
|
1674
1927
|
Required. The type of byte data
|
|
1675
1928
|
byte_data (bytes):
|
|
1676
1929
|
Required. Bytes Data
|
|
1930
|
+
file_label (str):
|
|
1931
|
+
Optional. Label of the file. This is used to
|
|
1932
|
+
identify the file in the response.
|
|
1677
1933
|
"""
|
|
1678
1934
|
|
|
1679
1935
|
class ByteItemType(proto.Enum):
|
|
@@ -1719,6 +1975,10 @@ class ByteDataItem(proto.Message):
|
|
|
1719
1975
|
proto.BYTES,
|
|
1720
1976
|
number=2,
|
|
1721
1977
|
)
|
|
1978
|
+
file_label: str = proto.Field(
|
|
1979
|
+
proto.STRING,
|
|
1980
|
+
number=3,
|
|
1981
|
+
)
|
|
1722
1982
|
|
|
1723
1983
|
|
|
1724
1984
|
class SdpDeidentifyResult(proto.Message):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-modelarmor
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Google Cloud Modelarmor API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-modelarmor
|
|
6
6
|
Author: Google LLC
|
|
@@ -6875,7 +6875,9 @@ def test_create_template_rest_call_success(request_type):
|
|
|
6875
6875
|
"log_sanitize_operations": True,
|
|
6876
6876
|
"enforcement_type": 1,
|
|
6877
6877
|
"multi_language_detection": {"enable_multi_language_detection": True},
|
|
6878
|
+
"filter_version_selector": {"version": "version_value", "alias": 1},
|
|
6878
6879
|
"modalities": [1],
|
|
6880
|
+
"data_residency_compliant": True,
|
|
6879
6881
|
},
|
|
6880
6882
|
}
|
|
6881
6883
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
@@ -7107,7 +7109,9 @@ def test_update_template_rest_call_success(request_type):
|
|
|
7107
7109
|
"log_sanitize_operations": True,
|
|
7108
7110
|
"enforcement_type": 1,
|
|
7109
7111
|
"multi_language_detection": {"enable_multi_language_detection": True},
|
|
7112
|
+
"filter_version_selector": {"version": "version_value", "alias": 1},
|
|
7110
7113
|
"modalities": [1],
|
|
7114
|
+
"data_residency_compliant": True,
|
|
7111
7115
|
},
|
|
7112
7116
|
}
|
|
7113
7117
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
@@ -7580,6 +7584,11 @@ def test_update_floor_setting_rest_call_success(request_type):
|
|
|
7580
7584
|
"floor_setting_metadata": {
|
|
7581
7585
|
"multi_language_detection": {"enable_multi_language_detection": True}
|
|
7582
7586
|
},
|
|
7587
|
+
"google_mcp_server_floor_setting": {
|
|
7588
|
+
"inspect_only": True,
|
|
7589
|
+
"inspect_and_block": True,
|
|
7590
|
+
"enable_cloud_logging": True,
|
|
7591
|
+
},
|
|
7583
7592
|
}
|
|
7584
7593
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
7585
7594
|
# Delete any fields which are not present in the current runtime dependency
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/google/cloud/modelarmor_v1/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.3}/tests/unit/gapic/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|