Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 3ef88ce

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#204)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd 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 871555d commit 3ef88ce

File tree

22 files changed

+8853
-248
lines changed

22 files changed

+8853
-248
lines changed

google/cloud/binaryauthorization_v1/gapic_metadata.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,46 @@
8686
]
8787
}
8888
}
89+
},
90+
"rest": {
91+
"libraryClient": "BinauthzManagementServiceV1Client",
92+
"rpcs": {
93+
"CreateAttestor": {
94+
"methods": [
95+
"create_attestor"
96+
]
97+
},
98+
"DeleteAttestor": {
99+
"methods": [
100+
"delete_attestor"
101+
]
102+
},
103+
"GetAttestor": {
104+
"methods": [
105+
"get_attestor"
106+
]
107+
},
108+
"GetPolicy": {
109+
"methods": [
110+
"get_policy"
111+
]
112+
},
113+
"ListAttestors": {
114+
"methods": [
115+
"list_attestors"
116+
]
117+
},
118+
"UpdateAttestor": {
119+
"methods": [
120+
"update_attestor"
121+
]
122+
},
123+
"UpdatePolicy": {
124+
"methods": [
125+
"update_policy"
126+
]
127+
}
128+
}
89129
}
90130
}
91131
},
@@ -110,6 +150,16 @@
110150
]
111151
}
112152
}
153+
},
154+
"rest": {
155+
"libraryClient": "SystemPolicyV1Client",
156+
"rpcs": {
157+
"GetSystemPolicy": {
158+
"methods": [
159+
"get_system_policy"
160+
]
161+
}
162+
}
113163
}
114164
}
115165
},
@@ -134,6 +184,16 @@
134184
]
135185
}
136186
}
187+
},
188+
"rest": {
189+
"libraryClient": "ValidationHelperV1Client",
190+
"rpcs": {
191+
"ValidateAttestationOccurrence": {
192+
"methods": [
193+
"validate_attestation_occurrence"
194+
]
195+
}
196+
}
137197
}
138198
}
139199
}

google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
from .transports.base import DEFAULT_CLIENT_INFO, BinauthzManagementServiceV1Transport
5757
from .transports.grpc import BinauthzManagementServiceV1GrpcTransport
5858
from .transports.grpc_asyncio import BinauthzManagementServiceV1GrpcAsyncIOTransport
59+
from .transports.rest import BinauthzManagementServiceV1RestTransport
5960

6061

6162
class BinauthzManagementServiceV1ClientMeta(type):
@@ -73,6 +74,7 @@ class BinauthzManagementServiceV1ClientMeta(type):
7374
_transport_registry[
7475
"grpc_asyncio"
7576
] = BinauthzManagementServiceV1GrpcAsyncIOTransport
77+
_transport_registry["rest"] = BinauthzManagementServiceV1RestTransport
7678

7779
def get_transport_class(
7880
cls,

google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,23 @@
1919
from .base import BinauthzManagementServiceV1Transport
2020
from .grpc import BinauthzManagementServiceV1GrpcTransport
2121
from .grpc_asyncio import BinauthzManagementServiceV1GrpcAsyncIOTransport
22+
from .rest import (
23+
BinauthzManagementServiceV1RestInterceptor,
24+
BinauthzManagementServiceV1RestTransport,
25+
)
2226

2327
# Compile a registry of transports.
2428
_transport_registry = (
2529
OrderedDict()
2630
) # type: Dict[str, Type[BinauthzManagementServiceV1Transport]]
2731
_transport_registry["grpc"] = BinauthzManagementServiceV1GrpcTransport
2832
_transport_registry["grpc_asyncio"] = BinauthzManagementServiceV1GrpcAsyncIOTransport
33+
_transport_registry["rest"] = BinauthzManagementServiceV1RestTransport
2934

3035
__all__ = (
3136
"BinauthzManagementServiceV1Transport",
3237
"BinauthzManagementServiceV1GrpcTransport",
3338
"BinauthzManagementServiceV1GrpcAsyncIOTransport",
39+
"BinauthzManagementServiceV1RestTransport",
40+
"BinauthzManagementServiceV1RestInterceptor",
3441
)

0 commit comments

Comments
 (0)