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

Commit b652b8f

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#271)
* 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 * update sync repo settings --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 1d508b5 commit b652b8f

File tree

11 files changed

+4686
-98
lines changed

11 files changed

+4686
-98
lines changed

.github/sync-repo-settings.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ branchProtectionRules:
1717
- 'unit (3.9)'
1818
- 'unit (3.10)'
1919
- 'cover'
20-
- 'Samples - Lint'
21-
- 'Samples - Python 3.7'
22-
- 'Samples - Python 3.8'
23-
- 'Samples - Python 3.9'
24-
- 'Samples - Python 3.10'
2520
permissionRules:
2621
- team: actools-python
2722
permission: admin

google/cloud/iam_credentials_v1/gapic_metadata.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@
5656
]
5757
}
5858
}
59+
},
60+
"rest": {
61+
"libraryClient": "IAMCredentialsClient",
62+
"rpcs": {
63+
"GenerateAccessToken": {
64+
"methods": [
65+
"generate_access_token"
66+
]
67+
},
68+
"GenerateIdToken": {
69+
"methods": [
70+
"generate_id_token"
71+
]
72+
},
73+
"SignBlob": {
74+
"methods": [
75+
"sign_blob"
76+
]
77+
},
78+
"SignJwt": {
79+
"methods": [
80+
"sign_jwt"
81+
]
82+
}
83+
}
5984
}
6085
}
6186
}

google/cloud/iam_credentials_v1/services/iam_credentials/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from .transports.base import DEFAULT_CLIENT_INFO, IAMCredentialsTransport
5555
from .transports.grpc import IAMCredentialsGrpcTransport
5656
from .transports.grpc_asyncio import IAMCredentialsGrpcAsyncIOTransport
57+
from .transports.rest import IAMCredentialsRestTransport
5758

5859

5960
class IAMCredentialsClientMeta(type):
@@ -69,6 +70,7 @@ class IAMCredentialsClientMeta(type):
6970
) # type: Dict[str, Type[IAMCredentialsTransport]]
7071
_transport_registry["grpc"] = IAMCredentialsGrpcTransport
7172
_transport_registry["grpc_asyncio"] = IAMCredentialsGrpcAsyncIOTransport
73+
_transport_registry["rest"] = IAMCredentialsRestTransport
7274

7375
def get_transport_class(
7476
cls,

google/cloud/iam_credentials_v1/services/iam_credentials/transports/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import IAMCredentialsTransport
2020
from .grpc import IAMCredentialsGrpcTransport
2121
from .grpc_asyncio import IAMCredentialsGrpcAsyncIOTransport
22+
from .rest import IAMCredentialsRestInterceptor, IAMCredentialsRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[IAMCredentialsTransport]]
2526
_transport_registry["grpc"] = IAMCredentialsGrpcTransport
2627
_transport_registry["grpc_asyncio"] = IAMCredentialsGrpcAsyncIOTransport
28+
_transport_registry["rest"] = IAMCredentialsRestTransport
2729

2830
__all__ = (
2931
"IAMCredentialsTransport",
3032
"IAMCredentialsGrpcTransport",
3133
"IAMCredentialsGrpcAsyncIOTransport",
34+
"IAMCredentialsRestTransport",
35+
"IAMCredentialsRestInterceptor",
3236
)

0 commit comments

Comments
 (0)