Skip to content

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 (#105)

* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 9, 2023
1 parent 4f24440 commit 78900e5
Show file tree
Hide file tree
Showing 5 changed files with 2,042 additions and 4 deletions.
25 changes: 25 additions & 0 deletions packages/google-cloud-ids/google/cloud/ids_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@
]
}
}
},
"rest": {
"libraryClient": "IDSClient",
"rpcs": {
"CreateEndpoint": {
"methods": [
"create_endpoint"
]
},
"DeleteEndpoint": {
"methods": [
"delete_endpoint"
]
},
"GetEndpoint": {
"methods": [
"get_endpoint"
]
},
"ListEndpoints": {
"methods": [
"list_endpoints"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, IDSTransport
from .transports.grpc import IDSGrpcTransport
from .transports.grpc_asyncio import IDSGrpcAsyncIOTransport
from .transports.rest import IDSRestTransport


class IDSClientMeta(type):
Expand All @@ -70,6 +71,7 @@ class IDSClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[IDSTransport]]
_transport_registry["grpc"] = IDSGrpcTransport
_transport_registry["grpc_asyncio"] = IDSGrpcAsyncIOTransport
_transport_registry["rest"] = IDSRestTransport

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 IDSTransport
from .grpc import IDSGrpcTransport
from .grpc_asyncio import IDSGrpcAsyncIOTransport
from .rest import IDSRestInterceptor, IDSRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[IDSTransport]]
_transport_registry["grpc"] = IDSGrpcTransport
_transport_registry["grpc_asyncio"] = IDSGrpcAsyncIOTransport
_transport_registry["rest"] = IDSRestTransport

__all__ = (
"IDSTransport",
"IDSGrpcTransport",
"IDSGrpcAsyncIOTransport",
"IDSRestTransport",
"IDSRestInterceptor",
)
Loading

0 comments on commit 78900e5

Please sign in to comment.