Skip to content

Commit 39f9ce6

Browse files
feat: [google-cloud-modelarmor] add support for Model Armor v1beta API (#13944)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 763267768 Source-Link: googleapis/googleapis@17b10a6 Source-Link: googleapis/googleapis-gen@3715712 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vZGVsYXJtb3IvLk93bEJvdC55YW1sIiwiaCI6IjM3MTU3MTIwNTViZmUwMDA2ZTYyYmQyYzYxYzdjM2VmMDE0NzE1NmMifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4b52aac commit 39f9ce6

File tree

47 files changed

+22190
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+22190
-3
lines changed

packages/google-cloud-modelarmor/docs/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
.. include:: multiprocessing.rst
44

5+
This package includes clients for multiple versions of Model Armor API.
6+
By default, you will get version ``modelarmor_v1``.
7+
58

69
API Reference
710
-------------
@@ -11,6 +14,14 @@ API Reference
1114
modelarmor_v1/services_
1215
modelarmor_v1/types_
1316

17+
API Reference
18+
-------------
19+
.. toctree::
20+
:maxdepth: 2
21+
22+
modelarmor_v1beta/services_
23+
modelarmor_v1beta/types_
24+
1425

1526
Changelog
1627
---------
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ModelArmor
2+
----------------------------
3+
4+
.. automodule:: google.cloud.modelarmor_v1beta.services.model_armor
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.modelarmor_v1beta.services.model_armor.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Services for Google Cloud Modelarmor v1beta API
2+
===============================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
model_armor
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Types for Google Cloud Modelarmor v1beta API
2+
============================================
3+
4+
.. automodule:: google.cloud.modelarmor_v1beta.types
5+
:members:
6+
:show-inheritance:

packages/google-cloud-modelarmor/google/cloud/modelarmor/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-modelarmor/google/cloud/modelarmor_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from google.cloud.modelarmor_v1beta import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
20+
21+
from .services.model_armor import ModelArmorAsyncClient, ModelArmorClient
22+
from .types.service import (
23+
ByteDataItem,
24+
CreateTemplateRequest,
25+
CsamFilterResult,
26+
DataItem,
27+
DeleteTemplateRequest,
28+
DetectionConfidenceLevel,
29+
FilterConfig,
30+
FilterExecutionState,
31+
FilterMatchState,
32+
FilterResult,
33+
FloorSetting,
34+
GetFloorSettingRequest,
35+
GetTemplateRequest,
36+
InvocationResult,
37+
ListTemplatesRequest,
38+
ListTemplatesResponse,
39+
MaliciousUriFilterResult,
40+
MaliciousUriFilterSettings,
41+
MessageItem,
42+
MultiLanguageDetectionMetadata,
43+
PiAndJailbreakFilterResult,
44+
PiAndJailbreakFilterSettings,
45+
RaiFilterResult,
46+
RaiFilterSettings,
47+
RaiFilterType,
48+
RangeInfo,
49+
SanitizationResult,
50+
SanitizeModelResponseRequest,
51+
SanitizeModelResponseResponse,
52+
SanitizeUserPromptRequest,
53+
SanitizeUserPromptResponse,
54+
SdpAdvancedConfig,
55+
SdpBasicConfig,
56+
SdpDeidentifyResult,
57+
SdpFilterResult,
58+
SdpFilterSettings,
59+
SdpFinding,
60+
SdpFindingLikelihood,
61+
SdpInspectResult,
62+
Template,
63+
UpdateFloorSettingRequest,
64+
UpdateTemplateRequest,
65+
VirusDetail,
66+
VirusScanFilterResult,
67+
)
68+
69+
__all__ = (
70+
"ModelArmorAsyncClient",
71+
"ByteDataItem",
72+
"CreateTemplateRequest",
73+
"CsamFilterResult",
74+
"DataItem",
75+
"DeleteTemplateRequest",
76+
"DetectionConfidenceLevel",
77+
"FilterConfig",
78+
"FilterExecutionState",
79+
"FilterMatchState",
80+
"FilterResult",
81+
"FloorSetting",
82+
"GetFloorSettingRequest",
83+
"GetTemplateRequest",
84+
"InvocationResult",
85+
"ListTemplatesRequest",
86+
"ListTemplatesResponse",
87+
"MaliciousUriFilterResult",
88+
"MaliciousUriFilterSettings",
89+
"MessageItem",
90+
"ModelArmorClient",
91+
"MultiLanguageDetectionMetadata",
92+
"PiAndJailbreakFilterResult",
93+
"PiAndJailbreakFilterSettings",
94+
"RaiFilterResult",
95+
"RaiFilterSettings",
96+
"RaiFilterType",
97+
"RangeInfo",
98+
"SanitizationResult",
99+
"SanitizeModelResponseRequest",
100+
"SanitizeModelResponseResponse",
101+
"SanitizeUserPromptRequest",
102+
"SanitizeUserPromptResponse",
103+
"SdpAdvancedConfig",
104+
"SdpBasicConfig",
105+
"SdpDeidentifyResult",
106+
"SdpFilterResult",
107+
"SdpFilterSettings",
108+
"SdpFinding",
109+
"SdpFindingLikelihood",
110+
"SdpInspectResult",
111+
"Template",
112+
"UpdateFloorSettingRequest",
113+
"UpdateTemplateRequest",
114+
"VirusDetail",
115+
"VirusScanFilterResult",
116+
)
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.modelarmor_v1beta",
5+
"protoPackage": "google.cloud.modelarmor.v1beta",
6+
"schema": "1.0",
7+
"services": {
8+
"ModelArmor": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "ModelArmorClient",
12+
"rpcs": {
13+
"CreateTemplate": {
14+
"methods": [
15+
"create_template"
16+
]
17+
},
18+
"DeleteTemplate": {
19+
"methods": [
20+
"delete_template"
21+
]
22+
},
23+
"GetFloorSetting": {
24+
"methods": [
25+
"get_floor_setting"
26+
]
27+
},
28+
"GetTemplate": {
29+
"methods": [
30+
"get_template"
31+
]
32+
},
33+
"ListTemplates": {
34+
"methods": [
35+
"list_templates"
36+
]
37+
},
38+
"SanitizeModelResponse": {
39+
"methods": [
40+
"sanitize_model_response"
41+
]
42+
},
43+
"SanitizeUserPrompt": {
44+
"methods": [
45+
"sanitize_user_prompt"
46+
]
47+
},
48+
"UpdateFloorSetting": {
49+
"methods": [
50+
"update_floor_setting"
51+
]
52+
},
53+
"UpdateTemplate": {
54+
"methods": [
55+
"update_template"
56+
]
57+
}
58+
}
59+
},
60+
"grpc-async": {
61+
"libraryClient": "ModelArmorAsyncClient",
62+
"rpcs": {
63+
"CreateTemplate": {
64+
"methods": [
65+
"create_template"
66+
]
67+
},
68+
"DeleteTemplate": {
69+
"methods": [
70+
"delete_template"
71+
]
72+
},
73+
"GetFloorSetting": {
74+
"methods": [
75+
"get_floor_setting"
76+
]
77+
},
78+
"GetTemplate": {
79+
"methods": [
80+
"get_template"
81+
]
82+
},
83+
"ListTemplates": {
84+
"methods": [
85+
"list_templates"
86+
]
87+
},
88+
"SanitizeModelResponse": {
89+
"methods": [
90+
"sanitize_model_response"
91+
]
92+
},
93+
"SanitizeUserPrompt": {
94+
"methods": [
95+
"sanitize_user_prompt"
96+
]
97+
},
98+
"UpdateFloorSetting": {
99+
"methods": [
100+
"update_floor_setting"
101+
]
102+
},
103+
"UpdateTemplate": {
104+
"methods": [
105+
"update_template"
106+
]
107+
}
108+
}
109+
},
110+
"rest": {
111+
"libraryClient": "ModelArmorClient",
112+
"rpcs": {
113+
"CreateTemplate": {
114+
"methods": [
115+
"create_template"
116+
]
117+
},
118+
"DeleteTemplate": {
119+
"methods": [
120+
"delete_template"
121+
]
122+
},
123+
"GetFloorSetting": {
124+
"methods": [
125+
"get_floor_setting"
126+
]
127+
},
128+
"GetTemplate": {
129+
"methods": [
130+
"get_template"
131+
]
132+
},
133+
"ListTemplates": {
134+
"methods": [
135+
"list_templates"
136+
]
137+
},
138+
"SanitizeModelResponse": {
139+
"methods": [
140+
"sanitize_model_response"
141+
]
142+
},
143+
"SanitizeUserPrompt": {
144+
"methods": [
145+
"sanitize_user_prompt"
146+
]
147+
},
148+
"UpdateFloorSetting": {
149+
"methods": [
150+
"update_floor_setting"
151+
]
152+
},
153+
"UpdateTemplate": {
154+
"methods": [
155+
"update_template"
156+
]
157+
}
158+
}
159+
}
160+
}
161+
}
162+
}
163+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.0.0" # {x-release-please-version}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Marker file for PEP 561.
2+
# The google-cloud-modelarmor package uses inline types.

0 commit comments

Comments
 (0)