google-cloud-modelarmor 0.7.2__tar.gz → 0.7.4__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.4}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/__init__.py +26 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/__init__.py +26 -0
- {google_cloud_modelarmor-0.7.2/google/cloud/modelarmor_v1beta → google_cloud_modelarmor-0.7.4/google/cloud/modelarmor_v1}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/types/__init__.py +26 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/types/service.py +522 -12
- {google_cloud_modelarmor-0.7.2/google/cloud/modelarmor_v1 → google_cloud_modelarmor-0.7.4/google/cloud/modelarmor_v1beta}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4/google_cloud_modelarmor.egg-info}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/test_model_armor.py +69 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/LICENSE +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/MANIFEST.in +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/README.rst +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/py.typed +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/types/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/types/service.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/SOURCES.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/dependency_links.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/not-zip-safe +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/requires.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/top_level.txt +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/setup.cfg +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/setup.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1beta/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.2 → google_cloud_modelarmor-0.7.4}/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.4
|
|
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.4}/google/cloud/modelarmor/__init__.py
RENAMED
|
@@ -30,10 +30,18 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
30
30
|
DataItem,
|
|
31
31
|
DeleteTemplateRequest,
|
|
32
32
|
DetectionConfidenceLevel,
|
|
33
|
+
Dictionary,
|
|
34
|
+
ExclusionRule,
|
|
33
35
|
FilterConfig,
|
|
34
36
|
FilterExecutionState,
|
|
35
37
|
FilterMatchState,
|
|
36
38
|
FilterResult,
|
|
39
|
+
FilterRule,
|
|
40
|
+
FilterRuleSet,
|
|
41
|
+
FilterRuleSettings,
|
|
42
|
+
FilterVersionAlias,
|
|
43
|
+
FilterVersionConfig,
|
|
44
|
+
FilterVersionSelector,
|
|
37
45
|
FloorSetting,
|
|
38
46
|
GetFloorSettingRequest,
|
|
39
47
|
GetTemplateRequest,
|
|
@@ -42,6 +50,8 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
42
50
|
ListTemplatesResponse,
|
|
43
51
|
MaliciousUriFilterResult,
|
|
44
52
|
MaliciousUriFilterSettings,
|
|
53
|
+
MatchingScope,
|
|
54
|
+
McpServerFloorSetting,
|
|
45
55
|
MessageItem,
|
|
46
56
|
Modality,
|
|
47
57
|
MultiLanguageDetectionMetadata,
|
|
@@ -51,6 +61,8 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
51
61
|
RaiFilterSettings,
|
|
52
62
|
RaiFilterType,
|
|
53
63
|
RangeInfo,
|
|
64
|
+
Regex,
|
|
65
|
+
RuleFilterType,
|
|
54
66
|
SanitizationResult,
|
|
55
67
|
SanitizeModelResponseRequest,
|
|
56
68
|
SanitizeModelResponseResponse,
|
|
@@ -73,6 +85,7 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
73
85
|
UpdateTemplateRequest,
|
|
74
86
|
VirusDetail,
|
|
75
87
|
VirusScanFilterResult,
|
|
88
|
+
WordList,
|
|
76
89
|
)
|
|
77
90
|
|
|
78
91
|
__all__ = (
|
|
@@ -84,8 +97,15 @@ __all__ = (
|
|
|
84
97
|
"CsamFilterResult",
|
|
85
98
|
"DataItem",
|
|
86
99
|
"DeleteTemplateRequest",
|
|
100
|
+
"Dictionary",
|
|
101
|
+
"ExclusionRule",
|
|
87
102
|
"FilterConfig",
|
|
88
103
|
"FilterResult",
|
|
104
|
+
"FilterRule",
|
|
105
|
+
"FilterRuleSet",
|
|
106
|
+
"FilterRuleSettings",
|
|
107
|
+
"FilterVersionConfig",
|
|
108
|
+
"FilterVersionSelector",
|
|
89
109
|
"FloorSetting",
|
|
90
110
|
"GetFloorSettingRequest",
|
|
91
111
|
"GetTemplateRequest",
|
|
@@ -93,6 +113,7 @@ __all__ = (
|
|
|
93
113
|
"ListTemplatesResponse",
|
|
94
114
|
"MaliciousUriFilterResult",
|
|
95
115
|
"MaliciousUriFilterSettings",
|
|
116
|
+
"McpServerFloorSetting",
|
|
96
117
|
"MessageItem",
|
|
97
118
|
"MultiLanguageDetectionMetadata",
|
|
98
119
|
"PiAndJailbreakFilterResult",
|
|
@@ -100,6 +121,7 @@ __all__ = (
|
|
|
100
121
|
"RaiFilterResult",
|
|
101
122
|
"RaiFilterSettings",
|
|
102
123
|
"RangeInfo",
|
|
124
|
+
"Regex",
|
|
103
125
|
"SanitizationResult",
|
|
104
126
|
"SanitizeModelResponseRequest",
|
|
105
127
|
"SanitizeModelResponseResponse",
|
|
@@ -120,12 +142,16 @@ __all__ = (
|
|
|
120
142
|
"UpdateTemplateRequest",
|
|
121
143
|
"VirusDetail",
|
|
122
144
|
"VirusScanFilterResult",
|
|
145
|
+
"WordList",
|
|
123
146
|
"DetectionConfidenceLevel",
|
|
124
147
|
"FilterExecutionState",
|
|
125
148
|
"FilterMatchState",
|
|
149
|
+
"FilterVersionAlias",
|
|
126
150
|
"InvocationResult",
|
|
151
|
+
"MatchingScope",
|
|
127
152
|
"Modality",
|
|
128
153
|
"RaiFilterType",
|
|
154
|
+
"RuleFilterType",
|
|
129
155
|
"SdpFindingLikelihood",
|
|
130
156
|
"StreamingMode",
|
|
131
157
|
)
|
|
@@ -40,10 +40,18 @@ from .types.service import (
|
|
|
40
40
|
DataItem,
|
|
41
41
|
DeleteTemplateRequest,
|
|
42
42
|
DetectionConfidenceLevel,
|
|
43
|
+
Dictionary,
|
|
44
|
+
ExclusionRule,
|
|
43
45
|
FilterConfig,
|
|
44
46
|
FilterExecutionState,
|
|
45
47
|
FilterMatchState,
|
|
46
48
|
FilterResult,
|
|
49
|
+
FilterRule,
|
|
50
|
+
FilterRuleSet,
|
|
51
|
+
FilterRuleSettings,
|
|
52
|
+
FilterVersionAlias,
|
|
53
|
+
FilterVersionConfig,
|
|
54
|
+
FilterVersionSelector,
|
|
47
55
|
FloorSetting,
|
|
48
56
|
GetFloorSettingRequest,
|
|
49
57
|
GetTemplateRequest,
|
|
@@ -52,6 +60,8 @@ from .types.service import (
|
|
|
52
60
|
ListTemplatesResponse,
|
|
53
61
|
MaliciousUriFilterResult,
|
|
54
62
|
MaliciousUriFilterSettings,
|
|
63
|
+
MatchingScope,
|
|
64
|
+
McpServerFloorSetting,
|
|
55
65
|
MessageItem,
|
|
56
66
|
Modality,
|
|
57
67
|
MultiLanguageDetectionMetadata,
|
|
@@ -61,6 +71,8 @@ from .types.service import (
|
|
|
61
71
|
RaiFilterSettings,
|
|
62
72
|
RaiFilterType,
|
|
63
73
|
RangeInfo,
|
|
74
|
+
Regex,
|
|
75
|
+
RuleFilterType,
|
|
64
76
|
SanitizationResult,
|
|
65
77
|
SanitizeModelResponseRequest,
|
|
66
78
|
SanitizeModelResponseResponse,
|
|
@@ -83,6 +95,7 @@ from .types.service import (
|
|
|
83
95
|
UpdateTemplateRequest,
|
|
84
96
|
VirusDetail,
|
|
85
97
|
VirusScanFilterResult,
|
|
98
|
+
WordList,
|
|
86
99
|
)
|
|
87
100
|
|
|
88
101
|
__all__ = (
|
|
@@ -94,10 +107,18 @@ __all__ = (
|
|
|
94
107
|
"DataItem",
|
|
95
108
|
"DeleteTemplateRequest",
|
|
96
109
|
"DetectionConfidenceLevel",
|
|
110
|
+
"Dictionary",
|
|
111
|
+
"ExclusionRule",
|
|
97
112
|
"FilterConfig",
|
|
98
113
|
"FilterExecutionState",
|
|
99
114
|
"FilterMatchState",
|
|
100
115
|
"FilterResult",
|
|
116
|
+
"FilterRule",
|
|
117
|
+
"FilterRuleSet",
|
|
118
|
+
"FilterRuleSettings",
|
|
119
|
+
"FilterVersionAlias",
|
|
120
|
+
"FilterVersionConfig",
|
|
121
|
+
"FilterVersionSelector",
|
|
101
122
|
"FloorSetting",
|
|
102
123
|
"GetFloorSettingRequest",
|
|
103
124
|
"GetTemplateRequest",
|
|
@@ -106,6 +127,8 @@ __all__ = (
|
|
|
106
127
|
"ListTemplatesResponse",
|
|
107
128
|
"MaliciousUriFilterResult",
|
|
108
129
|
"MaliciousUriFilterSettings",
|
|
130
|
+
"MatchingScope",
|
|
131
|
+
"McpServerFloorSetting",
|
|
109
132
|
"MessageItem",
|
|
110
133
|
"Modality",
|
|
111
134
|
"ModelArmorClient",
|
|
@@ -116,6 +139,8 @@ __all__ = (
|
|
|
116
139
|
"RaiFilterSettings",
|
|
117
140
|
"RaiFilterType",
|
|
118
141
|
"RangeInfo",
|
|
142
|
+
"Regex",
|
|
143
|
+
"RuleFilterType",
|
|
119
144
|
"SanitizationResult",
|
|
120
145
|
"SanitizeModelResponseRequest",
|
|
121
146
|
"SanitizeModelResponseResponse",
|
|
@@ -138,6 +163,7 @@ __all__ = (
|
|
|
138
163
|
"UpdateTemplateRequest",
|
|
139
164
|
"VirusDetail",
|
|
140
165
|
"VirusScanFilterResult",
|
|
166
|
+
"WordList",
|
|
141
167
|
)
|
|
142
168
|
|
|
143
169
|
api_core.check_python_version("google.cloud.modelarmor_v1")
|
|
@@ -21,10 +21,18 @@ from .service import (
|
|
|
21
21
|
DataItem,
|
|
22
22
|
DeleteTemplateRequest,
|
|
23
23
|
DetectionConfidenceLevel,
|
|
24
|
+
Dictionary,
|
|
25
|
+
ExclusionRule,
|
|
24
26
|
FilterConfig,
|
|
25
27
|
FilterExecutionState,
|
|
26
28
|
FilterMatchState,
|
|
27
29
|
FilterResult,
|
|
30
|
+
FilterRule,
|
|
31
|
+
FilterRuleSet,
|
|
32
|
+
FilterRuleSettings,
|
|
33
|
+
FilterVersionAlias,
|
|
34
|
+
FilterVersionConfig,
|
|
35
|
+
FilterVersionSelector,
|
|
28
36
|
FloorSetting,
|
|
29
37
|
GetFloorSettingRequest,
|
|
30
38
|
GetTemplateRequest,
|
|
@@ -33,6 +41,8 @@ from .service import (
|
|
|
33
41
|
ListTemplatesResponse,
|
|
34
42
|
MaliciousUriFilterResult,
|
|
35
43
|
MaliciousUriFilterSettings,
|
|
44
|
+
MatchingScope,
|
|
45
|
+
McpServerFloorSetting,
|
|
36
46
|
MessageItem,
|
|
37
47
|
Modality,
|
|
38
48
|
MultiLanguageDetectionMetadata,
|
|
@@ -42,6 +52,8 @@ from .service import (
|
|
|
42
52
|
RaiFilterSettings,
|
|
43
53
|
RaiFilterType,
|
|
44
54
|
RangeInfo,
|
|
55
|
+
Regex,
|
|
56
|
+
RuleFilterType,
|
|
45
57
|
SanitizationResult,
|
|
46
58
|
SanitizeModelResponseRequest,
|
|
47
59
|
SanitizeModelResponseResponse,
|
|
@@ -64,6 +76,7 @@ from .service import (
|
|
|
64
76
|
UpdateTemplateRequest,
|
|
65
77
|
VirusDetail,
|
|
66
78
|
VirusScanFilterResult,
|
|
79
|
+
WordList,
|
|
67
80
|
)
|
|
68
81
|
|
|
69
82
|
__all__ = (
|
|
@@ -73,8 +86,15 @@ __all__ = (
|
|
|
73
86
|
"CsamFilterResult",
|
|
74
87
|
"DataItem",
|
|
75
88
|
"DeleteTemplateRequest",
|
|
89
|
+
"Dictionary",
|
|
90
|
+
"ExclusionRule",
|
|
76
91
|
"FilterConfig",
|
|
77
92
|
"FilterResult",
|
|
93
|
+
"FilterRule",
|
|
94
|
+
"FilterRuleSet",
|
|
95
|
+
"FilterRuleSettings",
|
|
96
|
+
"FilterVersionConfig",
|
|
97
|
+
"FilterVersionSelector",
|
|
78
98
|
"FloorSetting",
|
|
79
99
|
"GetFloorSettingRequest",
|
|
80
100
|
"GetTemplateRequest",
|
|
@@ -82,6 +102,7 @@ __all__ = (
|
|
|
82
102
|
"ListTemplatesResponse",
|
|
83
103
|
"MaliciousUriFilterResult",
|
|
84
104
|
"MaliciousUriFilterSettings",
|
|
105
|
+
"McpServerFloorSetting",
|
|
85
106
|
"MessageItem",
|
|
86
107
|
"MultiLanguageDetectionMetadata",
|
|
87
108
|
"PiAndJailbreakFilterResult",
|
|
@@ -89,6 +110,7 @@ __all__ = (
|
|
|
89
110
|
"RaiFilterResult",
|
|
90
111
|
"RaiFilterSettings",
|
|
91
112
|
"RangeInfo",
|
|
113
|
+
"Regex",
|
|
92
114
|
"SanitizationResult",
|
|
93
115
|
"SanitizeModelResponseRequest",
|
|
94
116
|
"SanitizeModelResponseResponse",
|
|
@@ -109,12 +131,16 @@ __all__ = (
|
|
|
109
131
|
"UpdateTemplateRequest",
|
|
110
132
|
"VirusDetail",
|
|
111
133
|
"VirusScanFilterResult",
|
|
134
|
+
"WordList",
|
|
112
135
|
"DetectionConfidenceLevel",
|
|
113
136
|
"FilterExecutionState",
|
|
114
137
|
"FilterMatchState",
|
|
138
|
+
"FilterVersionAlias",
|
|
115
139
|
"InvocationResult",
|
|
140
|
+
"MatchingScope",
|
|
116
141
|
"Modality",
|
|
117
142
|
"RaiFilterType",
|
|
143
|
+
"RuleFilterType",
|
|
118
144
|
"SdpFindingLikelihood",
|
|
119
145
|
"StreamingMode",
|
|
120
146
|
)
|
|
@@ -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,13 @@ __protobuf__ = proto.module(
|
|
|
32
33
|
"InvocationResult",
|
|
33
34
|
"StreamingMode",
|
|
34
35
|
"Modality",
|
|
36
|
+
"FilterVersionAlias",
|
|
37
|
+
"MatchingScope",
|
|
38
|
+
"RuleFilterType",
|
|
39
|
+
"FilterVersionSelector",
|
|
35
40
|
"Template",
|
|
36
41
|
"FloorSetting",
|
|
42
|
+
"McpServerFloorSetting",
|
|
37
43
|
"AiPlatformFloorSetting",
|
|
38
44
|
"ListTemplatesRequest",
|
|
39
45
|
"ListTemplatesResponse",
|
|
@@ -54,6 +60,7 @@ __protobuf__ = proto.module(
|
|
|
54
60
|
"SanitizeModelResponseRequest",
|
|
55
61
|
"SanitizeUserPromptResponse",
|
|
56
62
|
"SanitizeModelResponseResponse",
|
|
63
|
+
"FilterVersionConfig",
|
|
57
64
|
"SanitizationResult",
|
|
58
65
|
"MultiLanguageDetectionMetadata",
|
|
59
66
|
"FilterResult",
|
|
@@ -67,6 +74,13 @@ __protobuf__ = proto.module(
|
|
|
67
74
|
"SdpContentLocation",
|
|
68
75
|
"SdpFinding",
|
|
69
76
|
"SdpRedactResult",
|
|
77
|
+
"WordList",
|
|
78
|
+
"Dictionary",
|
|
79
|
+
"Regex",
|
|
80
|
+
"ExclusionRule",
|
|
81
|
+
"FilterRule",
|
|
82
|
+
"FilterRuleSet",
|
|
83
|
+
"FilterRuleSettings",
|
|
70
84
|
"PiAndJailbreakFilterResult",
|
|
71
85
|
"MaliciousUriFilterResult",
|
|
72
86
|
"VirusScanFilterResult",
|
|
@@ -228,8 +242,9 @@ class StreamingMode(proto.Enum):
|
|
|
228
242
|
|
|
229
243
|
|
|
230
244
|
class Modality(proto.Enum):
|
|
231
|
-
r"""This enum is used in the TemplateMetadata
|
|
232
|
-
|
|
245
|
+
r"""This enum is used in the TemplateMetadata and
|
|
246
|
+
FloorSettingMetadata messages to indicate the modality supported
|
|
247
|
+
for sanitize API calls.
|
|
233
248
|
|
|
234
249
|
Values:
|
|
235
250
|
MODALITY_UNSPECIFIED (0):
|
|
@@ -252,6 +267,134 @@ class Modality(proto.Enum):
|
|
|
252
267
|
MODALITY_IMAGE = 2
|
|
253
268
|
|
|
254
269
|
|
|
270
|
+
class FilterVersionAlias(proto.Enum):
|
|
271
|
+
r"""Enum for Filter Version Aliases.
|
|
272
|
+
These aliases provide a way to always point to a specific track
|
|
273
|
+
without needing to update the version in templates.
|
|
274
|
+
|
|
275
|
+
Values:
|
|
276
|
+
FILTER_VERSION_ALIAS_UNSPECIFIED (0):
|
|
277
|
+
The default value. If used, it will resolve to the
|
|
278
|
+
``STABLE`` alias.
|
|
279
|
+
FILTER_VERSION_ALIAS_STABLE (1):
|
|
280
|
+
``STABLE`` alias points to the most recent stable model
|
|
281
|
+
version. Using this alias means no code changes are required
|
|
282
|
+
when a new model becomes the stable version.
|
|
283
|
+
FILTER_VERSION_ALIAS_LATEST (2):
|
|
284
|
+
``LATEST`` alias points to the newest model version
|
|
285
|
+
available. This version is subject to frequent revisions and
|
|
286
|
+
offers SLO guarantees but does not assure stability,
|
|
287
|
+
providing the most current security protections.
|
|
288
|
+
FILTER_VERSION_ALIAS_LEGACY (3):
|
|
289
|
+
``LEGACY`` alias could be used for sanitization operations
|
|
290
|
+
for a transition period. New templates cannot be created
|
|
291
|
+
with this version.
|
|
292
|
+
FILTER_VERSION_ALIAS_RETIRED (4):
|
|
293
|
+
``RETIRED`` alias could be used for versions that are no
|
|
294
|
+
longer available to be used. While new templates cannot be
|
|
295
|
+
created with this alias, any existing template or request
|
|
296
|
+
using ``RETIRED`` version will fall back to the current
|
|
297
|
+
``STABLE`` version for sanitization operations.
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
FILTER_VERSION_ALIAS_UNSPECIFIED = 0
|
|
301
|
+
FILTER_VERSION_ALIAS_STABLE = 1
|
|
302
|
+
FILTER_VERSION_ALIAS_LATEST = 2
|
|
303
|
+
FILTER_VERSION_ALIAS_LEGACY = 3
|
|
304
|
+
FILTER_VERSION_ALIAS_RETIRED = 4
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
class MatchingScope(proto.Enum):
|
|
308
|
+
r"""Defines the scope of the match for a rule.
|
|
309
|
+
|
|
310
|
+
Additional values may be added to this enum in the future.
|
|
311
|
+
|
|
312
|
+
Values:
|
|
313
|
+
MATCHING_SCOPE_UNSPECIFIED (0):
|
|
314
|
+
Unspecified matching scope.
|
|
315
|
+
MATCHING_SCOPE_FULL_MATCH (1):
|
|
316
|
+
Full match.
|
|
317
|
+
|
|
318
|
+
- Dictionary: the dictionary match covers the
|
|
319
|
+
entire input content
|
|
320
|
+
- Regular expression: the regular expression
|
|
321
|
+
pattern matches the entire input content
|
|
322
|
+
MATCHING_SCOPE_PARTIAL_MATCH (2):
|
|
323
|
+
Partial match.
|
|
324
|
+
|
|
325
|
+
- Dictionary: at least one of the tokens in the
|
|
326
|
+
input content matches
|
|
327
|
+
- Regular expression: substring of the input
|
|
328
|
+
content matches the regular expression pattern
|
|
329
|
+
"""
|
|
330
|
+
|
|
331
|
+
MATCHING_SCOPE_UNSPECIFIED = 0
|
|
332
|
+
MATCHING_SCOPE_FULL_MATCH = 1
|
|
333
|
+
MATCHING_SCOPE_PARTIAL_MATCH = 2
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
class RuleFilterType(proto.Enum):
|
|
337
|
+
r"""Model Armor Filter types supported for rules.
|
|
338
|
+
|
|
339
|
+
Values:
|
|
340
|
+
RULE_FILTER_TYPE_UNSPECIFIED (0):
|
|
341
|
+
Unspecified filter type.
|
|
342
|
+
PROMPT_INJECTION_AND_JAILBREAK (1):
|
|
343
|
+
Prompt injection and jailbreak filter.
|
|
344
|
+
RESPONSIBLE_AI (2):
|
|
345
|
+
Responsible AI filter.
|
|
346
|
+
"""
|
|
347
|
+
|
|
348
|
+
RULE_FILTER_TYPE_UNSPECIFIED = 0
|
|
349
|
+
PROMPT_INJECTION_AND_JAILBREAK = 1
|
|
350
|
+
RESPONSIBLE_AI = 2
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
class FilterVersionSelector(proto.Message):
|
|
354
|
+
r"""Represents the configuration for selecting a Filter Version.
|
|
355
|
+
Allows customers to choose to use either a specific version or a
|
|
356
|
+
predefined alias.
|
|
357
|
+
|
|
358
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
359
|
+
For each oneof, at most one member field can be set at the same time.
|
|
360
|
+
Setting any member of the oneof automatically clears all other
|
|
361
|
+
members.
|
|
362
|
+
|
|
363
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
364
|
+
|
|
365
|
+
Attributes:
|
|
366
|
+
version (str):
|
|
367
|
+
Allows customers to pin to a specific, immutable Filter
|
|
368
|
+
Version. This provides stability, as this will not change
|
|
369
|
+
after a version upgrade. Expected format is a case-sensitive
|
|
370
|
+
string, e.g., "v1", "v2". Requests providing an invalid or
|
|
371
|
+
non-existent version string will be rejected with an
|
|
372
|
+
``INVALID_ARGUMENT`` error.
|
|
373
|
+
|
|
374
|
+
This field is a member of `oneof`_ ``version_spec``.
|
|
375
|
+
alias (google.cloud.modelarmor_v1.types.FilterVersionAlias):
|
|
376
|
+
Allows customers to use a predefined alias
|
|
377
|
+
that dynamically points to a specific version
|
|
378
|
+
based on internal upgrades. This offers
|
|
379
|
+
flexibility and reduces the need for template
|
|
380
|
+
updates.
|
|
381
|
+
|
|
382
|
+
This field is a member of `oneof`_ ``version_spec``.
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
version: str = proto.Field(
|
|
386
|
+
proto.STRING,
|
|
387
|
+
number=1,
|
|
388
|
+
oneof="version_spec",
|
|
389
|
+
)
|
|
390
|
+
alias: "FilterVersionAlias" = proto.Field(
|
|
391
|
+
proto.ENUM,
|
|
392
|
+
number=2,
|
|
393
|
+
oneof="version_spec",
|
|
394
|
+
enum="FilterVersionAlias",
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
|
|
255
398
|
class Template(proto.Message):
|
|
256
399
|
r"""Message describing Template resource
|
|
257
400
|
|
|
@@ -274,6 +417,8 @@ class Template(proto.Message):
|
|
|
274
417
|
class TemplateMetadata(proto.Message):
|
|
275
418
|
r"""Message describing TemplateMetadata
|
|
276
419
|
|
|
420
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
421
|
+
|
|
277
422
|
Attributes:
|
|
278
423
|
ignore_partial_invocation_failures (bool):
|
|
279
424
|
Optional. If true, partial detector failures
|
|
@@ -306,9 +451,27 @@ class Template(proto.Message):
|
|
|
306
451
|
multi_language_detection (google.cloud.modelarmor_v1.types.Template.TemplateMetadata.MultiLanguageDetection):
|
|
307
452
|
Optional. Metadata for multi language
|
|
308
453
|
detection.
|
|
454
|
+
filter_version_selector (google.cloud.modelarmor_v1.types.FilterVersionSelector):
|
|
455
|
+
Optional. Specifies the configuration for the Filter version
|
|
456
|
+
to be used. If this field is populated, it takes precedence
|
|
457
|
+
over any values set in the deprecated ``filter_version``
|
|
458
|
+
fields within ``RaiFilterSettings``,
|
|
459
|
+
``PiAndJailbreakFilterSettings``.
|
|
460
|
+
|
|
461
|
+
This field is a member of `oneof`_ ``_filter_version_selector``.
|
|
309
462
|
modalities (MutableSequence[google.cloud.modelarmor_v1.types.Modality]):
|
|
310
463
|
Optional. Specifies the modalities to scan.
|
|
311
|
-
If empty, only text modality
|
|
464
|
+
If not specified or empty, only text modality
|
|
465
|
+
will be scanned.
|
|
466
|
+
data_residency_compliant (bool):
|
|
467
|
+
Optional. Indicates whether the template is
|
|
468
|
+
subject to data residency compliance. If true
|
|
469
|
+
(default for new templates), the template is
|
|
470
|
+
subject to data residency compliance. If false,
|
|
471
|
+
the template bypasses data residency compliance
|
|
472
|
+
checks.
|
|
473
|
+
|
|
474
|
+
This field is a member of `oneof`_ ``_data_residency_compliant``.
|
|
312
475
|
"""
|
|
313
476
|
|
|
314
477
|
class EnforcementType(proto.Enum):
|
|
@@ -384,11 +547,22 @@ class Template(proto.Message):
|
|
|
384
547
|
message="Template.TemplateMetadata.MultiLanguageDetection",
|
|
385
548
|
)
|
|
386
549
|
)
|
|
550
|
+
filter_version_selector: "FilterVersionSelector" = proto.Field(
|
|
551
|
+
proto.MESSAGE,
|
|
552
|
+
number=10,
|
|
553
|
+
optional=True,
|
|
554
|
+
message="FilterVersionSelector",
|
|
555
|
+
)
|
|
387
556
|
modalities: MutableSequence["Modality"] = proto.RepeatedField(
|
|
388
557
|
proto.ENUM,
|
|
389
558
|
number=11,
|
|
390
559
|
enum="Modality",
|
|
391
560
|
)
|
|
561
|
+
data_residency_compliant: bool = proto.Field(
|
|
562
|
+
proto.BOOL,
|
|
563
|
+
number=12,
|
|
564
|
+
optional=True,
|
|
565
|
+
)
|
|
392
566
|
|
|
393
567
|
name: str = proto.Field(
|
|
394
568
|
proto.STRING,
|
|
@@ -448,6 +622,10 @@ class FloorSetting(proto.Message):
|
|
|
448
622
|
This field is a member of `oneof`_ ``_ai_platform_floor_setting``.
|
|
449
623
|
floor_setting_metadata (google.cloud.modelarmor_v1.types.FloorSetting.FloorSettingMetadata):
|
|
450
624
|
Optional. Metadata for FloorSetting
|
|
625
|
+
google_mcp_server_floor_setting (google.cloud.modelarmor_v1.types.McpServerFloorSetting):
|
|
626
|
+
Optional. Google MCP Server floor setting.
|
|
627
|
+
|
|
628
|
+
This field is a member of `oneof`_ ``_google_mcp_server_floor_setting``.
|
|
451
629
|
"""
|
|
452
630
|
|
|
453
631
|
class IntegratedService(proto.Enum):
|
|
@@ -458,10 +636,14 @@ class FloorSetting(proto.Message):
|
|
|
458
636
|
Unspecified integrated service.
|
|
459
637
|
AI_PLATFORM (1):
|
|
460
638
|
AI Platform.
|
|
639
|
+
GOOGLE_MCP_SERVER (2):
|
|
640
|
+
Google MCP Server (via Shim Service
|
|
641
|
+
Extension)
|
|
461
642
|
"""
|
|
462
643
|
|
|
463
644
|
INTEGRATED_SERVICE_UNSPECIFIED = 0
|
|
464
645
|
AI_PLATFORM = 1
|
|
646
|
+
GOOGLE_MCP_SERVER = 2
|
|
465
647
|
|
|
466
648
|
class FloorSettingMetadata(proto.Message):
|
|
467
649
|
r"""message describing FloorSetting Metadata
|
|
@@ -533,6 +715,56 @@ class FloorSetting(proto.Message):
|
|
|
533
715
|
number=8,
|
|
534
716
|
message=FloorSettingMetadata,
|
|
535
717
|
)
|
|
718
|
+
google_mcp_server_floor_setting: "McpServerFloorSetting" = proto.Field(
|
|
719
|
+
proto.MESSAGE,
|
|
720
|
+
number=9,
|
|
721
|
+
optional=True,
|
|
722
|
+
message="McpServerFloorSetting",
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
class McpServerFloorSetting(proto.Message):
|
|
727
|
+
r"""Message describing MCP Server Floor Setting.
|
|
728
|
+
|
|
729
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
730
|
+
For each oneof, at most one member field can be set at the same time.
|
|
731
|
+
Setting any member of the oneof automatically clears all other
|
|
732
|
+
members.
|
|
733
|
+
|
|
734
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
735
|
+
|
|
736
|
+
Attributes:
|
|
737
|
+
inspect_only (bool):
|
|
738
|
+
Optional. If true, Model Armor filters will
|
|
739
|
+
be run in inspect only mode. No action will be
|
|
740
|
+
taken on the request.
|
|
741
|
+
|
|
742
|
+
This field is a member of `oneof`_ ``enforcement_type``.
|
|
743
|
+
inspect_and_block (bool):
|
|
744
|
+
Optional. If true, Model Armor filters will
|
|
745
|
+
be run in inspect and block mode. Requests that
|
|
746
|
+
trip Model Armor filters will be blocked.
|
|
747
|
+
|
|
748
|
+
This field is a member of `oneof`_ ``enforcement_type``.
|
|
749
|
+
enable_cloud_logging (bool):
|
|
750
|
+
Optional. If true, log Model Armor filter
|
|
751
|
+
results to Cloud Logging.
|
|
752
|
+
"""
|
|
753
|
+
|
|
754
|
+
inspect_only: bool = proto.Field(
|
|
755
|
+
proto.BOOL,
|
|
756
|
+
number=1,
|
|
757
|
+
oneof="enforcement_type",
|
|
758
|
+
)
|
|
759
|
+
inspect_and_block: bool = proto.Field(
|
|
760
|
+
proto.BOOL,
|
|
761
|
+
number=2,
|
|
762
|
+
oneof="enforcement_type",
|
|
763
|
+
)
|
|
764
|
+
enable_cloud_logging: bool = proto.Field(
|
|
765
|
+
proto.BOOL,
|
|
766
|
+
number=3,
|
|
767
|
+
)
|
|
536
768
|
|
|
537
769
|
|
|
538
770
|
class AiPlatformFloorSetting(proto.Message):
|
|
@@ -865,6 +1097,10 @@ class FilterConfig(proto.Message):
|
|
|
865
1097
|
filter settings.
|
|
866
1098
|
malicious_uri_filter_settings (google.cloud.modelarmor_v1.types.MaliciousUriFilterSettings):
|
|
867
1099
|
Optional. Malicious URI filter settings.
|
|
1100
|
+
filter_rule_settings (google.cloud.modelarmor_v1.types.FilterRuleSettings):
|
|
1101
|
+
Optional. Settings for customizing filter
|
|
1102
|
+
rules. Note: This field is not supported in
|
|
1103
|
+
FloorSetting and Streaming Sanitization APIs.
|
|
868
1104
|
"""
|
|
869
1105
|
|
|
870
1106
|
rai_settings: "RaiFilterSettings" = proto.Field(
|
|
@@ -887,6 +1123,11 @@ class FilterConfig(proto.Message):
|
|
|
887
1123
|
number=4,
|
|
888
1124
|
message="MaliciousUriFilterSettings",
|
|
889
1125
|
)
|
|
1126
|
+
filter_rule_settings: "FilterRuleSettings" = proto.Field(
|
|
1127
|
+
proto.MESSAGE,
|
|
1128
|
+
number=7,
|
|
1129
|
+
message="FilterRuleSettings",
|
|
1130
|
+
)
|
|
890
1131
|
|
|
891
1132
|
|
|
892
1133
|
class PiAndJailbreakFilterSettings(proto.Message):
|
|
@@ -1251,6 +1492,66 @@ class SanitizeModelResponseResponse(proto.Message):
|
|
|
1251
1492
|
)
|
|
1252
1493
|
|
|
1253
1494
|
|
|
1495
|
+
class FilterVersionConfig(proto.Message):
|
|
1496
|
+
r"""Message describing a Filter Version Configuration.
|
|
1497
|
+
|
|
1498
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
1499
|
+
|
|
1500
|
+
Attributes:
|
|
1501
|
+
filter_version (str):
|
|
1502
|
+
Output only. The identifier for this specific
|
|
1503
|
+
version.
|
|
1504
|
+
filter_version_alias (google.cloud.modelarmor_v1.types.FilterVersionAlias):
|
|
1505
|
+
Output only. The alias associated with this
|
|
1506
|
+
version, if any (e.g., "STABLE", "LATEST"). This
|
|
1507
|
+
will be populated if this version is currently
|
|
1508
|
+
mapped to an alias.
|
|
1509
|
+
|
|
1510
|
+
This field is a member of `oneof`_ ``_filter_version_alias``.
|
|
1511
|
+
release_date (google.type.date_pb2.Date):
|
|
1512
|
+
Output only. The date when this version was
|
|
1513
|
+
released.
|
|
1514
|
+
|
|
1515
|
+
This field is a member of `oneof`_ ``_release_date``.
|
|
1516
|
+
projected_deprecation_date (google.type.date_pb2.Date):
|
|
1517
|
+
Output only. The estimated date when this
|
|
1518
|
+
version is projected to be deprecated.
|
|
1519
|
+
|
|
1520
|
+
This field is a member of `oneof`_ ``_projected_deprecation_date``.
|
|
1521
|
+
message_items (MutableSequence[google.cloud.modelarmor_v1.types.MessageItem]):
|
|
1522
|
+
Output only. Extra information regarding this
|
|
1523
|
+
filter version
|
|
1524
|
+
"""
|
|
1525
|
+
|
|
1526
|
+
filter_version: str = proto.Field(
|
|
1527
|
+
proto.STRING,
|
|
1528
|
+
number=1,
|
|
1529
|
+
)
|
|
1530
|
+
filter_version_alias: "FilterVersionAlias" = proto.Field(
|
|
1531
|
+
proto.ENUM,
|
|
1532
|
+
number=2,
|
|
1533
|
+
optional=True,
|
|
1534
|
+
enum="FilterVersionAlias",
|
|
1535
|
+
)
|
|
1536
|
+
release_date: date_pb2.Date = proto.Field(
|
|
1537
|
+
proto.MESSAGE,
|
|
1538
|
+
number=3,
|
|
1539
|
+
optional=True,
|
|
1540
|
+
message=date_pb2.Date,
|
|
1541
|
+
)
|
|
1542
|
+
projected_deprecation_date: date_pb2.Date = proto.Field(
|
|
1543
|
+
proto.MESSAGE,
|
|
1544
|
+
number=4,
|
|
1545
|
+
optional=True,
|
|
1546
|
+
message=date_pb2.Date,
|
|
1547
|
+
)
|
|
1548
|
+
message_items: MutableSequence["MessageItem"] = proto.RepeatedField(
|
|
1549
|
+
proto.MESSAGE,
|
|
1550
|
+
number=5,
|
|
1551
|
+
message="MessageItem",
|
|
1552
|
+
)
|
|
1553
|
+
|
|
1554
|
+
|
|
1254
1555
|
class SanitizationResult(proto.Message):
|
|
1255
1556
|
r"""Sanitization result after applying all the filters on input
|
|
1256
1557
|
content.
|
|
@@ -1270,7 +1571,7 @@ class SanitizationResult(proto.Message):
|
|
|
1270
1571
|
filter_results (MutableMapping[str, google.cloud.modelarmor_v1.types.FilterResult]):
|
|
1271
1572
|
Output only. Results for all filters where the key is the
|
|
1272
1573
|
filter name - either of "csam", "malicious_uris", "rai",
|
|
1273
|
-
"pi_and_jailbreak"
|
|
1574
|
+
"pi_and_jailbreak", "sdp".
|
|
1274
1575
|
invocation_result (google.cloud.modelarmor_v1.types.InvocationResult):
|
|
1275
1576
|
Output only. A field indicating the outcome
|
|
1276
1577
|
of the invocation, irrespective of match status.
|
|
@@ -1299,6 +1600,10 @@ class SanitizationResult(proto.Message):
|
|
|
1299
1600
|
stream_chunk_processed (google.cloud.modelarmor_v1.types.DataItem):
|
|
1300
1601
|
Output only. The stream chunk processed by
|
|
1301
1602
|
the Sanitization service.
|
|
1603
|
+
filter_version_config (google.cloud.modelarmor_v1.types.FilterVersionConfig):
|
|
1604
|
+
Output only. Provides details about the
|
|
1605
|
+
Filter Version configuration used to sanitize
|
|
1606
|
+
this request.
|
|
1302
1607
|
"""
|
|
1303
1608
|
|
|
1304
1609
|
error_code: int = proto.Field(
|
|
@@ -1318,6 +1623,11 @@ class SanitizationResult(proto.Message):
|
|
|
1318
1623
|
number=4,
|
|
1319
1624
|
message="DataItem",
|
|
1320
1625
|
)
|
|
1626
|
+
filter_version_config: "FilterVersionConfig" = proto.Field(
|
|
1627
|
+
proto.MESSAGE,
|
|
1628
|
+
number=6,
|
|
1629
|
+
message="FilterVersionConfig",
|
|
1630
|
+
)
|
|
1321
1631
|
|
|
1322
1632
|
filter_match_state: "FilterMatchState" = proto.Field(
|
|
1323
1633
|
proto.ENUM,
|
|
@@ -1347,11 +1657,20 @@ class MultiLanguageDetectionMetadata(proto.Message):
|
|
|
1347
1657
|
|
|
1348
1658
|
Attributes:
|
|
1349
1659
|
source_language (str):
|
|
1350
|
-
Optional. Optional Source language of the
|
|
1351
|
-
|
|
1352
|
-
If multi-language detection is enabled
|
|
1353
|
-
|
|
1354
|
-
|
|
1660
|
+
Optional. Optional Source language of the user prompt.
|
|
1661
|
+
|
|
1662
|
+
If multi-language detection is enabled and this field is not
|
|
1663
|
+
set, the source language will be automatically detected.
|
|
1664
|
+
When a source language is provided, Model Armor uses it to
|
|
1665
|
+
sanitize the input. In that case the system does not perform
|
|
1666
|
+
auto-detection and relies solely on the specified language.
|
|
1667
|
+
|
|
1668
|
+
This string field accepts a language code from the ISO-639
|
|
1669
|
+
standard. For a list of languages supported by Model Armor,
|
|
1670
|
+
see [Model Armor supported languages]
|
|
1671
|
+
(https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported).
|
|
1672
|
+
For a comprehensive list of language codes, see
|
|
1673
|
+
`ISO-639 <https://cloud.google.com/translate/docs/languages#nmt>`__.
|
|
1355
1674
|
enable_multi_language_detection (bool):
|
|
1356
1675
|
Optional. Enable detection of multi-language
|
|
1357
1676
|
prompts and responses.
|
|
@@ -1462,9 +1781,10 @@ class RaiFilterResult(proto.Message):
|
|
|
1462
1781
|
equal to or higher than the confidence level defined in
|
|
1463
1782
|
configuration.
|
|
1464
1783
|
rai_filter_type_results (MutableMapping[str, google.cloud.modelarmor_v1.types.RaiFilterResult.RaiFilterTypeResult]):
|
|
1465
|
-
The map of RAI filter results where key is RAI
|
|
1466
|
-
|
|
1467
|
-
"
|
|
1784
|
+
The map of RAI filter results where the key is the RAI
|
|
1785
|
+
filter type and the value is the RAI filter's result.
|
|
1786
|
+
Allowed keys are "sexually_explicit", "hate_speech",
|
|
1787
|
+
"harassment", and "dangerous".
|
|
1468
1788
|
"""
|
|
1469
1789
|
|
|
1470
1790
|
class RaiFilterTypeResult(proto.Message):
|
|
@@ -1674,6 +1994,9 @@ class ByteDataItem(proto.Message):
|
|
|
1674
1994
|
Required. The type of byte data
|
|
1675
1995
|
byte_data (bytes):
|
|
1676
1996
|
Required. Bytes Data
|
|
1997
|
+
file_label (str):
|
|
1998
|
+
Optional. Label of the file. This is used to
|
|
1999
|
+
identify the file in the response.
|
|
1677
2000
|
"""
|
|
1678
2001
|
|
|
1679
2002
|
class ByteItemType(proto.Enum):
|
|
@@ -1719,6 +2042,10 @@ class ByteDataItem(proto.Message):
|
|
|
1719
2042
|
proto.BYTES,
|
|
1720
2043
|
number=2,
|
|
1721
2044
|
)
|
|
2045
|
+
file_label: str = proto.Field(
|
|
2046
|
+
proto.STRING,
|
|
2047
|
+
number=3,
|
|
2048
|
+
)
|
|
1722
2049
|
|
|
1723
2050
|
|
|
1724
2051
|
class SdpDeidentifyResult(proto.Message):
|
|
@@ -1995,6 +2322,189 @@ class SdpRedactResult(proto.Message):
|
|
|
1995
2322
|
)
|
|
1996
2323
|
|
|
1997
2324
|
|
|
2325
|
+
class WordList(proto.Message):
|
|
2326
|
+
r"""Message defining a list of words or phrases.
|
|
2327
|
+
|
|
2328
|
+
Attributes:
|
|
2329
|
+
words (MutableSequence[str]):
|
|
2330
|
+
Required. Words or phrases defining the
|
|
2331
|
+
dictionary. The dictionary must contain at least
|
|
2332
|
+
one phrase and every phrase must contain at
|
|
2333
|
+
least two characters that are letters or digits.
|
|
2334
|
+
"""
|
|
2335
|
+
|
|
2336
|
+
words: MutableSequence[str] = proto.RepeatedField(
|
|
2337
|
+
proto.STRING,
|
|
2338
|
+
number=1,
|
|
2339
|
+
)
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
class Dictionary(proto.Message):
|
|
2343
|
+
r"""Message defining a custom dictionary of words or phrases for
|
|
2344
|
+
syntactic match.
|
|
2345
|
+
|
|
2346
|
+
Dictionary words are case-insensitive and all characters other than
|
|
2347
|
+
letters and digits in the unicode `Basic Multilingual
|
|
2348
|
+
Plane <https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane>`__
|
|
2349
|
+
will be replaced with whitespace when scanning for matches. For
|
|
2350
|
+
example, the dictionary phrase ``Sam Johnson`` will match all three
|
|
2351
|
+
phrases ``sam johnson``, ``Sam, Johnson``, and ``Sam (Johnson)``.
|
|
2352
|
+
Additionally, the characters surrounding any match must be of a
|
|
2353
|
+
different type than the adjacent characters within the word, so
|
|
2354
|
+
letters must be next to non-letters and digits must be next to
|
|
2355
|
+
non-digits. For example, the dictionary word ``jen`` will match the
|
|
2356
|
+
first three letters of the text ``jen123`` but will return no
|
|
2357
|
+
matches for ``jennifer``.
|
|
2358
|
+
|
|
2359
|
+
Dictionary words containing a large number of characters that are
|
|
2360
|
+
not letters or digits may result in unexpected matches because such
|
|
2361
|
+
characters are treated as whitespace. For details about the size
|
|
2362
|
+
limits of dictionaries, see `Quotas and
|
|
2363
|
+
limits <https://docs.cloud.google.com/model-armor/quotas>`__.
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
2367
|
+
|
|
2368
|
+
Attributes:
|
|
2369
|
+
word_list (google.cloud.modelarmor_v1.types.WordList):
|
|
2370
|
+
Message defining a list of words or phrases.
|
|
2371
|
+
|
|
2372
|
+
This field is a member of `oneof`_ ``source``.
|
|
2373
|
+
"""
|
|
2374
|
+
|
|
2375
|
+
word_list: "WordList" = proto.Field(
|
|
2376
|
+
proto.MESSAGE,
|
|
2377
|
+
number=1,
|
|
2378
|
+
oneof="source",
|
|
2379
|
+
message="WordList",
|
|
2380
|
+
)
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
class Regex(proto.Message):
|
|
2384
|
+
r"""Message defining a custom regular expression.
|
|
2385
|
+
|
|
2386
|
+
Attributes:
|
|
2387
|
+
pattern (str):
|
|
2388
|
+
Required. The regular expression pattern.
|
|
2389
|
+
"""
|
|
2390
|
+
|
|
2391
|
+
pattern: str = proto.Field(
|
|
2392
|
+
proto.STRING,
|
|
2393
|
+
number=1,
|
|
2394
|
+
)
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
class ExclusionRule(proto.Message):
|
|
2398
|
+
r"""The rule that specifies conditions when filter detections are
|
|
2399
|
+
excluded from results.
|
|
2400
|
+
|
|
2401
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
2402
|
+
For each oneof, at most one member field can be set at the same time.
|
|
2403
|
+
Setting any member of the oneof automatically clears all other
|
|
2404
|
+
members.
|
|
2405
|
+
|
|
2406
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
2407
|
+
|
|
2408
|
+
Attributes:
|
|
2409
|
+
dictionary (google.cloud.modelarmor_v1.types.Dictionary):
|
|
2410
|
+
Dictionary which defines the rule.
|
|
2411
|
+
|
|
2412
|
+
This field is a member of `oneof`_ ``type``.
|
|
2413
|
+
regex (google.cloud.modelarmor_v1.types.Regex):
|
|
2414
|
+
Regular expression which defines the rule.
|
|
2415
|
+
|
|
2416
|
+
This field is a member of `oneof`_ ``type``.
|
|
2417
|
+
matching_scope (google.cloud.modelarmor_v1.types.MatchingScope):
|
|
2418
|
+
Optional. Specifies the scope of the input that should be
|
|
2419
|
+
matched against the exclusion rule. If unspecified, defaults
|
|
2420
|
+
to MATCHING_SCOPE_PARTIAL_MATCH.
|
|
2421
|
+
|
|
2422
|
+
This field is a member of `oneof`_ ``_matching_scope``.
|
|
2423
|
+
"""
|
|
2424
|
+
|
|
2425
|
+
dictionary: "Dictionary" = proto.Field(
|
|
2426
|
+
proto.MESSAGE,
|
|
2427
|
+
number=1,
|
|
2428
|
+
oneof="type",
|
|
2429
|
+
message="Dictionary",
|
|
2430
|
+
)
|
|
2431
|
+
regex: "Regex" = proto.Field(
|
|
2432
|
+
proto.MESSAGE,
|
|
2433
|
+
number=2,
|
|
2434
|
+
oneof="type",
|
|
2435
|
+
message="Regex",
|
|
2436
|
+
)
|
|
2437
|
+
matching_scope: "MatchingScope" = proto.Field(
|
|
2438
|
+
proto.ENUM,
|
|
2439
|
+
number=3,
|
|
2440
|
+
optional=True,
|
|
2441
|
+
enum="MatchingScope",
|
|
2442
|
+
)
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
class FilterRule(proto.Message):
|
|
2446
|
+
r"""A single rule to be applied to filters, specified in
|
|
2447
|
+
``FilterRuleSet``.
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
2451
|
+
|
|
2452
|
+
Attributes:
|
|
2453
|
+
exclusion_rule (google.cloud.modelarmor_v1.types.ExclusionRule):
|
|
2454
|
+
Exclusion rule.
|
|
2455
|
+
|
|
2456
|
+
This field is a member of `oneof`_ ``type``.
|
|
2457
|
+
"""
|
|
2458
|
+
|
|
2459
|
+
exclusion_rule: "ExclusionRule" = proto.Field(
|
|
2460
|
+
proto.MESSAGE,
|
|
2461
|
+
number=1,
|
|
2462
|
+
oneof="type",
|
|
2463
|
+
message="ExclusionRule",
|
|
2464
|
+
)
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
class FilterRuleSet(proto.Message):
|
|
2468
|
+
r"""A set of rules that modifies the behavior of specific filters
|
|
2469
|
+
based on the rules defined within the set.
|
|
2470
|
+
|
|
2471
|
+
Attributes:
|
|
2472
|
+
filter_types (MutableSequence[google.cloud.modelarmor_v1.types.RuleFilterType]):
|
|
2473
|
+
Required. List of filters this rule set is
|
|
2474
|
+
applied to.
|
|
2475
|
+
rules (MutableSequence[google.cloud.modelarmor_v1.types.FilterRule]):
|
|
2476
|
+
Required. Set of rules to be applied to
|
|
2477
|
+
filterTypes.
|
|
2478
|
+
"""
|
|
2479
|
+
|
|
2480
|
+
filter_types: MutableSequence["RuleFilterType"] = proto.RepeatedField(
|
|
2481
|
+
proto.ENUM,
|
|
2482
|
+
number=1,
|
|
2483
|
+
enum="RuleFilterType",
|
|
2484
|
+
)
|
|
2485
|
+
rules: MutableSequence["FilterRule"] = proto.RepeatedField(
|
|
2486
|
+
proto.MESSAGE,
|
|
2487
|
+
number=2,
|
|
2488
|
+
message="FilterRule",
|
|
2489
|
+
)
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
class FilterRuleSettings(proto.Message):
|
|
2493
|
+
r"""Settings for customizing filter rules.
|
|
2494
|
+
|
|
2495
|
+
Attributes:
|
|
2496
|
+
rule_sets (MutableSequence[google.cloud.modelarmor_v1.types.FilterRuleSet]):
|
|
2497
|
+
Optional. List of rule sets to be applied to
|
|
2498
|
+
filters.
|
|
2499
|
+
"""
|
|
2500
|
+
|
|
2501
|
+
rule_sets: MutableSequence["FilterRuleSet"] = proto.RepeatedField(
|
|
2502
|
+
proto.MESSAGE,
|
|
2503
|
+
number=1,
|
|
2504
|
+
message="FilterRuleSet",
|
|
2505
|
+
)
|
|
2506
|
+
|
|
2507
|
+
|
|
1998
2508
|
class PiAndJailbreakFilterResult(proto.Message):
|
|
1999
2509
|
r"""Prompt injection and Jailbreak Filter Result.
|
|
2000
2510
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-modelarmor
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
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
|
|
@@ -6864,6 +6864,26 @@ def test_create_template_rest_call_success(request_type):
|
|
|
6864
6864
|
"confidence_level": 1,
|
|
6865
6865
|
},
|
|
6866
6866
|
"malicious_uri_filter_settings": {"filter_enforcement": 1},
|
|
6867
|
+
"filter_rule_settings": {
|
|
6868
|
+
"rule_sets": [
|
|
6869
|
+
{
|
|
6870
|
+
"filter_types": [1],
|
|
6871
|
+
"rules": [
|
|
6872
|
+
{
|
|
6873
|
+
"exclusion_rule": {
|
|
6874
|
+
"dictionary": {
|
|
6875
|
+
"word_list": {
|
|
6876
|
+
"words": ["words_value1", "words_value2"]
|
|
6877
|
+
}
|
|
6878
|
+
},
|
|
6879
|
+
"regex": {"pattern": "pattern_value"},
|
|
6880
|
+
"matching_scope": 1,
|
|
6881
|
+
}
|
|
6882
|
+
}
|
|
6883
|
+
],
|
|
6884
|
+
}
|
|
6885
|
+
]
|
|
6886
|
+
},
|
|
6867
6887
|
},
|
|
6868
6888
|
"template_metadata": {
|
|
6869
6889
|
"ignore_partial_invocation_failures": True,
|
|
@@ -6875,7 +6895,9 @@ def test_create_template_rest_call_success(request_type):
|
|
|
6875
6895
|
"log_sanitize_operations": True,
|
|
6876
6896
|
"enforcement_type": 1,
|
|
6877
6897
|
"multi_language_detection": {"enable_multi_language_detection": True},
|
|
6898
|
+
"filter_version_selector": {"version": "version_value", "alias": 1},
|
|
6878
6899
|
"modalities": [1],
|
|
6900
|
+
"data_residency_compliant": True,
|
|
6879
6901
|
},
|
|
6880
6902
|
}
|
|
6881
6903
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
@@ -7096,6 +7118,26 @@ def test_update_template_rest_call_success(request_type):
|
|
|
7096
7118
|
"confidence_level": 1,
|
|
7097
7119
|
},
|
|
7098
7120
|
"malicious_uri_filter_settings": {"filter_enforcement": 1},
|
|
7121
|
+
"filter_rule_settings": {
|
|
7122
|
+
"rule_sets": [
|
|
7123
|
+
{
|
|
7124
|
+
"filter_types": [1],
|
|
7125
|
+
"rules": [
|
|
7126
|
+
{
|
|
7127
|
+
"exclusion_rule": {
|
|
7128
|
+
"dictionary": {
|
|
7129
|
+
"word_list": {
|
|
7130
|
+
"words": ["words_value1", "words_value2"]
|
|
7131
|
+
}
|
|
7132
|
+
},
|
|
7133
|
+
"regex": {"pattern": "pattern_value"},
|
|
7134
|
+
"matching_scope": 1,
|
|
7135
|
+
}
|
|
7136
|
+
}
|
|
7137
|
+
],
|
|
7138
|
+
}
|
|
7139
|
+
]
|
|
7140
|
+
},
|
|
7099
7141
|
},
|
|
7100
7142
|
"template_metadata": {
|
|
7101
7143
|
"ignore_partial_invocation_failures": True,
|
|
@@ -7107,7 +7149,9 @@ def test_update_template_rest_call_success(request_type):
|
|
|
7107
7149
|
"log_sanitize_operations": True,
|
|
7108
7150
|
"enforcement_type": 1,
|
|
7109
7151
|
"multi_language_detection": {"enable_multi_language_detection": True},
|
|
7152
|
+
"filter_version_selector": {"version": "version_value", "alias": 1},
|
|
7110
7153
|
"modalities": [1],
|
|
7154
|
+
"data_residency_compliant": True,
|
|
7111
7155
|
},
|
|
7112
7156
|
}
|
|
7113
7157
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
@@ -7569,6 +7613,26 @@ def test_update_floor_setting_rest_call_success(request_type):
|
|
|
7569
7613
|
"confidence_level": 1,
|
|
7570
7614
|
},
|
|
7571
7615
|
"malicious_uri_filter_settings": {"filter_enforcement": 1},
|
|
7616
|
+
"filter_rule_settings": {
|
|
7617
|
+
"rule_sets": [
|
|
7618
|
+
{
|
|
7619
|
+
"filter_types": [1],
|
|
7620
|
+
"rules": [
|
|
7621
|
+
{
|
|
7622
|
+
"exclusion_rule": {
|
|
7623
|
+
"dictionary": {
|
|
7624
|
+
"word_list": {
|
|
7625
|
+
"words": ["words_value1", "words_value2"]
|
|
7626
|
+
}
|
|
7627
|
+
},
|
|
7628
|
+
"regex": {"pattern": "pattern_value"},
|
|
7629
|
+
"matching_scope": 1,
|
|
7630
|
+
}
|
|
7631
|
+
}
|
|
7632
|
+
],
|
|
7633
|
+
}
|
|
7634
|
+
]
|
|
7635
|
+
},
|
|
7572
7636
|
},
|
|
7573
7637
|
"enable_floor_setting_enforcement": True,
|
|
7574
7638
|
"integrated_services": [1],
|
|
@@ -7580,6 +7644,11 @@ def test_update_floor_setting_rest_call_success(request_type):
|
|
|
7580
7644
|
"floor_setting_metadata": {
|
|
7581
7645
|
"multi_language_detection": {"enable_multi_language_detection": True}
|
|
7582
7646
|
},
|
|
7647
|
+
"google_mcp_server_floor_setting": {
|
|
7648
|
+
"inspect_only": True,
|
|
7649
|
+
"inspect_and_block": True,
|
|
7650
|
+
"enable_cloud_logging": True,
|
|
7651
|
+
},
|
|
7583
7652
|
}
|
|
7584
7653
|
# The version of a generated dependency at test runtime may differ from the version used during generation.
|
|
7585
7654
|
# 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.4}/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.4}/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.4}/tests/unit/gapic/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|