google-cloud-modelarmor 0.7.3__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.3/google_cloud_modelarmor.egg-info → google_cloud_modelarmor-0.7.4}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/__init__.py +18 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/__init__.py +18 -0
- {google_cloud_modelarmor-0.7.3/google/cloud/modelarmor_v1beta → google_cloud_modelarmor-0.7.4/google/cloud/modelarmor_v1}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/types/__init__.py +18 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/types/service.py +262 -12
- {google_cloud_modelarmor-0.7.3/google/cloud/modelarmor_v1 → google_cloud_modelarmor-0.7.4/google/cloud/modelarmor_v1beta}/gapic_version.py +1 -1
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4/google_cloud_modelarmor.egg-info}/PKG-INFO +1 -1
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/test_model_armor.py +60 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/LICENSE +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/MANIFEST.in +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/README.rst +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/py.typed +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/py.typed +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/_compat.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/gapic_metadata.json +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/py.typed +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/async_client.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/client.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/pagers.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/base.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/grpc_asyncio.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/services/model_armor/transports/rest_base.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/types/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor_v1beta/types/service.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/SOURCES.txt +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/dependency_links.txt +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/not-zip-safe +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/requires.txt +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/google_cloud_modelarmor.egg-info/top_level.txt +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/setup.cfg +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/setup.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1beta/__init__.py +0 -0
- {google_cloud_modelarmor-0.7.3 → google_cloud_modelarmor-0.7.4}/tests/unit/gapic/modelarmor_v1beta/test_compat.py +0 -0
- {google_cloud_modelarmor-0.7.3 → 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.3 → google_cloud_modelarmor-0.7.4}/google/cloud/modelarmor/__init__.py
RENAMED
|
@@ -30,10 +30,15 @@ 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,
|
|
37
42
|
FilterVersionAlias,
|
|
38
43
|
FilterVersionConfig,
|
|
39
44
|
FilterVersionSelector,
|
|
@@ -45,6 +50,7 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
45
50
|
ListTemplatesResponse,
|
|
46
51
|
MaliciousUriFilterResult,
|
|
47
52
|
MaliciousUriFilterSettings,
|
|
53
|
+
MatchingScope,
|
|
48
54
|
McpServerFloorSetting,
|
|
49
55
|
MessageItem,
|
|
50
56
|
Modality,
|
|
@@ -55,6 +61,8 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
55
61
|
RaiFilterSettings,
|
|
56
62
|
RaiFilterType,
|
|
57
63
|
RangeInfo,
|
|
64
|
+
Regex,
|
|
65
|
+
RuleFilterType,
|
|
58
66
|
SanitizationResult,
|
|
59
67
|
SanitizeModelResponseRequest,
|
|
60
68
|
SanitizeModelResponseResponse,
|
|
@@ -77,6 +85,7 @@ from google.cloud.modelarmor_v1.types.service import (
|
|
|
77
85
|
UpdateTemplateRequest,
|
|
78
86
|
VirusDetail,
|
|
79
87
|
VirusScanFilterResult,
|
|
88
|
+
WordList,
|
|
80
89
|
)
|
|
81
90
|
|
|
82
91
|
__all__ = (
|
|
@@ -88,8 +97,13 @@ __all__ = (
|
|
|
88
97
|
"CsamFilterResult",
|
|
89
98
|
"DataItem",
|
|
90
99
|
"DeleteTemplateRequest",
|
|
100
|
+
"Dictionary",
|
|
101
|
+
"ExclusionRule",
|
|
91
102
|
"FilterConfig",
|
|
92
103
|
"FilterResult",
|
|
104
|
+
"FilterRule",
|
|
105
|
+
"FilterRuleSet",
|
|
106
|
+
"FilterRuleSettings",
|
|
93
107
|
"FilterVersionConfig",
|
|
94
108
|
"FilterVersionSelector",
|
|
95
109
|
"FloorSetting",
|
|
@@ -107,6 +121,7 @@ __all__ = (
|
|
|
107
121
|
"RaiFilterResult",
|
|
108
122
|
"RaiFilterSettings",
|
|
109
123
|
"RangeInfo",
|
|
124
|
+
"Regex",
|
|
110
125
|
"SanitizationResult",
|
|
111
126
|
"SanitizeModelResponseRequest",
|
|
112
127
|
"SanitizeModelResponseResponse",
|
|
@@ -127,13 +142,16 @@ __all__ = (
|
|
|
127
142
|
"UpdateTemplateRequest",
|
|
128
143
|
"VirusDetail",
|
|
129
144
|
"VirusScanFilterResult",
|
|
145
|
+
"WordList",
|
|
130
146
|
"DetectionConfidenceLevel",
|
|
131
147
|
"FilterExecutionState",
|
|
132
148
|
"FilterMatchState",
|
|
133
149
|
"FilterVersionAlias",
|
|
134
150
|
"InvocationResult",
|
|
151
|
+
"MatchingScope",
|
|
135
152
|
"Modality",
|
|
136
153
|
"RaiFilterType",
|
|
154
|
+
"RuleFilterType",
|
|
137
155
|
"SdpFindingLikelihood",
|
|
138
156
|
"StreamingMode",
|
|
139
157
|
)
|
|
@@ -40,10 +40,15 @@ 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,
|
|
47
52
|
FilterVersionAlias,
|
|
48
53
|
FilterVersionConfig,
|
|
49
54
|
FilterVersionSelector,
|
|
@@ -55,6 +60,7 @@ from .types.service import (
|
|
|
55
60
|
ListTemplatesResponse,
|
|
56
61
|
MaliciousUriFilterResult,
|
|
57
62
|
MaliciousUriFilterSettings,
|
|
63
|
+
MatchingScope,
|
|
58
64
|
McpServerFloorSetting,
|
|
59
65
|
MessageItem,
|
|
60
66
|
Modality,
|
|
@@ -65,6 +71,8 @@ from .types.service import (
|
|
|
65
71
|
RaiFilterSettings,
|
|
66
72
|
RaiFilterType,
|
|
67
73
|
RangeInfo,
|
|
74
|
+
Regex,
|
|
75
|
+
RuleFilterType,
|
|
68
76
|
SanitizationResult,
|
|
69
77
|
SanitizeModelResponseRequest,
|
|
70
78
|
SanitizeModelResponseResponse,
|
|
@@ -87,6 +95,7 @@ from .types.service import (
|
|
|
87
95
|
UpdateTemplateRequest,
|
|
88
96
|
VirusDetail,
|
|
89
97
|
VirusScanFilterResult,
|
|
98
|
+
WordList,
|
|
90
99
|
)
|
|
91
100
|
|
|
92
101
|
__all__ = (
|
|
@@ -98,10 +107,15 @@ __all__ = (
|
|
|
98
107
|
"DataItem",
|
|
99
108
|
"DeleteTemplateRequest",
|
|
100
109
|
"DetectionConfidenceLevel",
|
|
110
|
+
"Dictionary",
|
|
111
|
+
"ExclusionRule",
|
|
101
112
|
"FilterConfig",
|
|
102
113
|
"FilterExecutionState",
|
|
103
114
|
"FilterMatchState",
|
|
104
115
|
"FilterResult",
|
|
116
|
+
"FilterRule",
|
|
117
|
+
"FilterRuleSet",
|
|
118
|
+
"FilterRuleSettings",
|
|
105
119
|
"FilterVersionAlias",
|
|
106
120
|
"FilterVersionConfig",
|
|
107
121
|
"FilterVersionSelector",
|
|
@@ -113,6 +127,7 @@ __all__ = (
|
|
|
113
127
|
"ListTemplatesResponse",
|
|
114
128
|
"MaliciousUriFilterResult",
|
|
115
129
|
"MaliciousUriFilterSettings",
|
|
130
|
+
"MatchingScope",
|
|
116
131
|
"McpServerFloorSetting",
|
|
117
132
|
"MessageItem",
|
|
118
133
|
"Modality",
|
|
@@ -124,6 +139,8 @@ __all__ = (
|
|
|
124
139
|
"RaiFilterSettings",
|
|
125
140
|
"RaiFilterType",
|
|
126
141
|
"RangeInfo",
|
|
142
|
+
"Regex",
|
|
143
|
+
"RuleFilterType",
|
|
127
144
|
"SanitizationResult",
|
|
128
145
|
"SanitizeModelResponseRequest",
|
|
129
146
|
"SanitizeModelResponseResponse",
|
|
@@ -146,6 +163,7 @@ __all__ = (
|
|
|
146
163
|
"UpdateTemplateRequest",
|
|
147
164
|
"VirusDetail",
|
|
148
165
|
"VirusScanFilterResult",
|
|
166
|
+
"WordList",
|
|
149
167
|
)
|
|
150
168
|
|
|
151
169
|
api_core.check_python_version("google.cloud.modelarmor_v1")
|
|
@@ -21,10 +21,15 @@ 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,
|
|
28
33
|
FilterVersionAlias,
|
|
29
34
|
FilterVersionConfig,
|
|
30
35
|
FilterVersionSelector,
|
|
@@ -36,6 +41,7 @@ from .service import (
|
|
|
36
41
|
ListTemplatesResponse,
|
|
37
42
|
MaliciousUriFilterResult,
|
|
38
43
|
MaliciousUriFilterSettings,
|
|
44
|
+
MatchingScope,
|
|
39
45
|
McpServerFloorSetting,
|
|
40
46
|
MessageItem,
|
|
41
47
|
Modality,
|
|
@@ -46,6 +52,8 @@ from .service import (
|
|
|
46
52
|
RaiFilterSettings,
|
|
47
53
|
RaiFilterType,
|
|
48
54
|
RangeInfo,
|
|
55
|
+
Regex,
|
|
56
|
+
RuleFilterType,
|
|
49
57
|
SanitizationResult,
|
|
50
58
|
SanitizeModelResponseRequest,
|
|
51
59
|
SanitizeModelResponseResponse,
|
|
@@ -68,6 +76,7 @@ from .service import (
|
|
|
68
76
|
UpdateTemplateRequest,
|
|
69
77
|
VirusDetail,
|
|
70
78
|
VirusScanFilterResult,
|
|
79
|
+
WordList,
|
|
71
80
|
)
|
|
72
81
|
|
|
73
82
|
__all__ = (
|
|
@@ -77,8 +86,13 @@ __all__ = (
|
|
|
77
86
|
"CsamFilterResult",
|
|
78
87
|
"DataItem",
|
|
79
88
|
"DeleteTemplateRequest",
|
|
89
|
+
"Dictionary",
|
|
90
|
+
"ExclusionRule",
|
|
80
91
|
"FilterConfig",
|
|
81
92
|
"FilterResult",
|
|
93
|
+
"FilterRule",
|
|
94
|
+
"FilterRuleSet",
|
|
95
|
+
"FilterRuleSettings",
|
|
82
96
|
"FilterVersionConfig",
|
|
83
97
|
"FilterVersionSelector",
|
|
84
98
|
"FloorSetting",
|
|
@@ -96,6 +110,7 @@ __all__ = (
|
|
|
96
110
|
"RaiFilterResult",
|
|
97
111
|
"RaiFilterSettings",
|
|
98
112
|
"RangeInfo",
|
|
113
|
+
"Regex",
|
|
99
114
|
"SanitizationResult",
|
|
100
115
|
"SanitizeModelResponseRequest",
|
|
101
116
|
"SanitizeModelResponseResponse",
|
|
@@ -116,13 +131,16 @@ __all__ = (
|
|
|
116
131
|
"UpdateTemplateRequest",
|
|
117
132
|
"VirusDetail",
|
|
118
133
|
"VirusScanFilterResult",
|
|
134
|
+
"WordList",
|
|
119
135
|
"DetectionConfidenceLevel",
|
|
120
136
|
"FilterExecutionState",
|
|
121
137
|
"FilterMatchState",
|
|
122
138
|
"FilterVersionAlias",
|
|
123
139
|
"InvocationResult",
|
|
140
|
+
"MatchingScope",
|
|
124
141
|
"Modality",
|
|
125
142
|
"RaiFilterType",
|
|
143
|
+
"RuleFilterType",
|
|
126
144
|
"SdpFindingLikelihood",
|
|
127
145
|
"StreamingMode",
|
|
128
146
|
)
|
|
@@ -34,6 +34,8 @@ __protobuf__ = proto.module(
|
|
|
34
34
|
"StreamingMode",
|
|
35
35
|
"Modality",
|
|
36
36
|
"FilterVersionAlias",
|
|
37
|
+
"MatchingScope",
|
|
38
|
+
"RuleFilterType",
|
|
37
39
|
"FilterVersionSelector",
|
|
38
40
|
"Template",
|
|
39
41
|
"FloorSetting",
|
|
@@ -72,6 +74,13 @@ __protobuf__ = proto.module(
|
|
|
72
74
|
"SdpContentLocation",
|
|
73
75
|
"SdpFinding",
|
|
74
76
|
"SdpRedactResult",
|
|
77
|
+
"WordList",
|
|
78
|
+
"Dictionary",
|
|
79
|
+
"Regex",
|
|
80
|
+
"ExclusionRule",
|
|
81
|
+
"FilterRule",
|
|
82
|
+
"FilterRuleSet",
|
|
83
|
+
"FilterRuleSettings",
|
|
75
84
|
"PiAndJailbreakFilterResult",
|
|
76
85
|
"MaliciousUriFilterResult",
|
|
77
86
|
"VirusScanFilterResult",
|
|
@@ -233,8 +242,9 @@ class StreamingMode(proto.Enum):
|
|
|
233
242
|
|
|
234
243
|
|
|
235
244
|
class Modality(proto.Enum):
|
|
236
|
-
r"""This enum is used in the TemplateMetadata
|
|
237
|
-
|
|
245
|
+
r"""This enum is used in the TemplateMetadata and
|
|
246
|
+
FloorSettingMetadata messages to indicate the modality supported
|
|
247
|
+
for sanitize API calls.
|
|
238
248
|
|
|
239
249
|
Values:
|
|
240
250
|
MODALITY_UNSPECIFIED (0):
|
|
@@ -267,20 +277,20 @@ class FilterVersionAlias(proto.Enum):
|
|
|
267
277
|
The default value. If used, it will resolve to the
|
|
268
278
|
``STABLE`` alias.
|
|
269
279
|
FILTER_VERSION_ALIAS_STABLE (1):
|
|
270
|
-
|
|
280
|
+
``STABLE`` alias points to the most recent stable model
|
|
271
281
|
version. Using this alias means no code changes are required
|
|
272
282
|
when a new model becomes the stable version.
|
|
273
283
|
FILTER_VERSION_ALIAS_LATEST (2):
|
|
274
|
-
|
|
284
|
+
``LATEST`` alias points to the newest model version
|
|
275
285
|
available. This version is subject to frequent revisions and
|
|
276
286
|
offers SLO guarantees but does not assure stability,
|
|
277
287
|
providing the most current security protections.
|
|
278
288
|
FILTER_VERSION_ALIAS_LEGACY (3):
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
289
|
+
``LEGACY`` alias could be used for sanitization operations
|
|
290
|
+
for a transition period. New templates cannot be created
|
|
291
|
+
with this version.
|
|
282
292
|
FILTER_VERSION_ALIAS_RETIRED (4):
|
|
283
|
-
|
|
293
|
+
``RETIRED`` alias could be used for versions that are no
|
|
284
294
|
longer available to be used. While new templates cannot be
|
|
285
295
|
created with this alias, any existing template or request
|
|
286
296
|
using ``RETIRED`` version will fall back to the current
|
|
@@ -294,6 +304,52 @@ class FilterVersionAlias(proto.Enum):
|
|
|
294
304
|
FILTER_VERSION_ALIAS_RETIRED = 4
|
|
295
305
|
|
|
296
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
|
+
|
|
297
353
|
class FilterVersionSelector(proto.Message):
|
|
298
354
|
r"""Represents the configuration for selecting a Filter Version.
|
|
299
355
|
Allows customers to choose to use either a specific version or a
|
|
@@ -405,7 +461,8 @@ class Template(proto.Message):
|
|
|
405
461
|
This field is a member of `oneof`_ ``_filter_version_selector``.
|
|
406
462
|
modalities (MutableSequence[google.cloud.modelarmor_v1.types.Modality]):
|
|
407
463
|
Optional. Specifies the modalities to scan.
|
|
408
|
-
If empty, only text modality
|
|
464
|
+
If not specified or empty, only text modality
|
|
465
|
+
will be scanned.
|
|
409
466
|
data_residency_compliant (bool):
|
|
410
467
|
Optional. Indicates whether the template is
|
|
411
468
|
subject to data residency compliance. If true
|
|
@@ -1040,6 +1097,10 @@ class FilterConfig(proto.Message):
|
|
|
1040
1097
|
filter settings.
|
|
1041
1098
|
malicious_uri_filter_settings (google.cloud.modelarmor_v1.types.MaliciousUriFilterSettings):
|
|
1042
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.
|
|
1043
1104
|
"""
|
|
1044
1105
|
|
|
1045
1106
|
rai_settings: "RaiFilterSettings" = proto.Field(
|
|
@@ -1062,6 +1123,11 @@ class FilterConfig(proto.Message):
|
|
|
1062
1123
|
number=4,
|
|
1063
1124
|
message="MaliciousUriFilterSettings",
|
|
1064
1125
|
)
|
|
1126
|
+
filter_rule_settings: "FilterRuleSettings" = proto.Field(
|
|
1127
|
+
proto.MESSAGE,
|
|
1128
|
+
number=7,
|
|
1129
|
+
message="FilterRuleSettings",
|
|
1130
|
+
)
|
|
1065
1131
|
|
|
1066
1132
|
|
|
1067
1133
|
class PiAndJailbreakFilterSettings(proto.Message):
|
|
@@ -1715,9 +1781,10 @@ class RaiFilterResult(proto.Message):
|
|
|
1715
1781
|
equal to or higher than the confidence level defined in
|
|
1716
1782
|
configuration.
|
|
1717
1783
|
rai_filter_type_results (MutableMapping[str, google.cloud.modelarmor_v1.types.RaiFilterResult.RaiFilterTypeResult]):
|
|
1718
|
-
The map of RAI filter results where key is RAI
|
|
1719
|
-
|
|
1720
|
-
"
|
|
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".
|
|
1721
1788
|
"""
|
|
1722
1789
|
|
|
1723
1790
|
class RaiFilterTypeResult(proto.Message):
|
|
@@ -2255,6 +2322,189 @@ class SdpRedactResult(proto.Message):
|
|
|
2255
2322
|
)
|
|
2256
2323
|
|
|
2257
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
|
+
|
|
2258
2508
|
class PiAndJailbreakFilterResult(proto.Message):
|
|
2259
2509
|
r"""Prompt injection and Jailbreak Filter Result.
|
|
2260
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,
|
|
@@ -7098,6 +7118,26 @@ def test_update_template_rest_call_success(request_type):
|
|
|
7098
7118
|
"confidence_level": 1,
|
|
7099
7119
|
},
|
|
7100
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
|
+
},
|
|
7101
7141
|
},
|
|
7102
7142
|
"template_metadata": {
|
|
7103
7143
|
"ignore_partial_invocation_failures": True,
|
|
@@ -7573,6 +7613,26 @@ def test_update_floor_setting_rest_call_success(request_type):
|
|
|
7573
7613
|
"confidence_level": 1,
|
|
7574
7614
|
},
|
|
7575
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
|
+
},
|
|
7576
7636
|
},
|
|
7577
7637
|
"enable_floor_setting_enforcement": True,
|
|
7578
7638
|
"integrated_services": [1],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_modelarmor-0.7.3 → 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.3 → 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.3 → 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
|