Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Commit 0bd530d

Browse filesBrowse files
feat: enable "rest" transport in Python for services supporting numeric enums (#205)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: googleapis/googleapis-gen@6ad1279 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 76fdb6b commit 0bd530d
Copy full SHA for 0bd530d

File tree

Expand file treeCollapse file tree

5 files changed

+3497
-106
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+3497
-106
lines changed
Open diff view settings
Collapse file

‎google/cloud/orgpolicy_v2/gapic_metadata.json‎

Copy file name to clipboardExpand all lines: google/cloud/orgpolicy_v2/gapic_metadata.json
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,46 @@
8686
]
8787
}
8888
}
89+
},
90+
"rest": {
91+
"libraryClient": "OrgPolicyClient",
92+
"rpcs": {
93+
"CreatePolicy": {
94+
"methods": [
95+
"create_policy"
96+
]
97+
},
98+
"DeletePolicy": {
99+
"methods": [
100+
"delete_policy"
101+
]
102+
},
103+
"GetEffectivePolicy": {
104+
"methods": [
105+
"get_effective_policy"
106+
]
107+
},
108+
"GetPolicy": {
109+
"methods": [
110+
"get_policy"
111+
]
112+
},
113+
"ListConstraints": {
114+
"methods": [
115+
"list_constraints"
116+
]
117+
},
118+
"ListPolicies": {
119+
"methods": [
120+
"list_policies"
121+
]
122+
},
123+
"UpdatePolicy": {
124+
"methods": [
125+
"update_policy"
126+
]
127+
}
128+
}
89129
}
90130
}
91131
}
Collapse file

‎google/cloud/orgpolicy_v2/services/org_policy/client.py‎

Copy file name to clipboardExpand all lines: google/cloud/orgpolicy_v2/services/org_policy/client.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from .transports.base import OrgPolicyTransport, DEFAULT_CLIENT_INFO
5353
from .transports.grpc import OrgPolicyGrpcTransport
5454
from .transports.grpc_asyncio import OrgPolicyGrpcAsyncIOTransport
55+
from .transports.rest import OrgPolicyRestTransport
5556

5657

5758
class OrgPolicyClientMeta(type):
@@ -65,6 +66,7 @@ class OrgPolicyClientMeta(type):
6566
_transport_registry = OrderedDict() # type: Dict[str, Type[OrgPolicyTransport]]
6667
_transport_registry["grpc"] = OrgPolicyGrpcTransport
6768
_transport_registry["grpc_asyncio"] = OrgPolicyGrpcAsyncIOTransport
69+
_transport_registry["rest"] = OrgPolicyRestTransport
6870

6971
def get_transport_class(
7072
cls,
Collapse file

‎google/cloud/orgpolicy_v2/services/org_policy/transports/__init__.py‎

Copy file name to clipboardExpand all lines: google/cloud/orgpolicy_v2/services/org_policy/transports/__init__.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@
1919
from .base import OrgPolicyTransport
2020
from .grpc import OrgPolicyGrpcTransport
2121
from .grpc_asyncio import OrgPolicyGrpcAsyncIOTransport
22+
from .rest import OrgPolicyRestTransport
23+
from .rest import OrgPolicyRestInterceptor
2224

2325

2426
# Compile a registry of transports.
2527
_transport_registry = OrderedDict() # type: Dict[str, Type[OrgPolicyTransport]]
2628
_transport_registry["grpc"] = OrgPolicyGrpcTransport
2729
_transport_registry["grpc_asyncio"] = OrgPolicyGrpcAsyncIOTransport
30+
_transport_registry["rest"] = OrgPolicyRestTransport
2831

2932
__all__ = (
3033
"OrgPolicyTransport",
3134
"OrgPolicyGrpcTransport",
3235
"OrgPolicyGrpcAsyncIOTransport",
36+
"OrgPolicyRestTransport",
37+
"OrgPolicyRestInterceptor",
3338
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.