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

Commit

Permalink
feat: enable "rest" transport in Python for services supporting numer…
Browse files Browse the repository at this point in the history
…ic enums (#271)

* 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

* 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>
  • Loading branch information
3 people committed Feb 19, 2023
1 parent 1d508b5 commit b652b8f
Show file tree
Hide file tree
Showing 11 changed files with 4,686 additions and 98 deletions.
5 changes: 0 additions & 5 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ branchProtectionRules:
- 'unit (3.9)'
- 'unit (3.10)'
- 'cover'
- 'Samples - Lint'
- 'Samples - Python 3.7'
- 'Samples - Python 3.8'
- 'Samples - Python 3.9'
- 'Samples - Python 3.10'
permissionRules:
- team: actools-python
permission: admin
Expand Down
25 changes: 25 additions & 0 deletions google/cloud/iam_credentials_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@
]
}
}
},
"rest": {
"libraryClient": "IAMCredentialsClient",
"rpcs": {
"GenerateAccessToken": {
"methods": [
"generate_access_token"
]
},
"GenerateIdToken": {
"methods": [
"generate_id_token"
]
},
"SignBlob": {
"methods": [
"sign_blob"
]
},
"SignJwt": {
"methods": [
"sign_jwt"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, IAMCredentialsTransport
from .transports.grpc import IAMCredentialsGrpcTransport
from .transports.grpc_asyncio import IAMCredentialsGrpcAsyncIOTransport
from .transports.rest import IAMCredentialsRestTransport


class IAMCredentialsClientMeta(type):
Expand All @@ -69,6 +70,7 @@ class IAMCredentialsClientMeta(type):
) # type: Dict[str, Type[IAMCredentialsTransport]]
_transport_registry["grpc"] = IAMCredentialsGrpcTransport
_transport_registry["grpc_asyncio"] = IAMCredentialsGrpcAsyncIOTransport
_transport_registry["rest"] = IAMCredentialsRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@
from .base import IAMCredentialsTransport
from .grpc import IAMCredentialsGrpcTransport
from .grpc_asyncio import IAMCredentialsGrpcAsyncIOTransport
from .rest import IAMCredentialsRestInterceptor, IAMCredentialsRestTransport

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

__all__ = (
"IAMCredentialsTransport",
"IAMCredentialsGrpcTransport",
"IAMCredentialsGrpcAsyncIOTransport",
"IAMCredentialsRestTransport",
"IAMCredentialsRestInterceptor",
)
Loading

0 comments on commit b652b8f

Please sign in to comment.