Skip to content
This repository has been archived by the owner on Sep 5, 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 (#256)

* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 9, 2023
1 parent 53ef7fd commit 0bc759d
Show file tree
Hide file tree
Showing 10 changed files with 3,507 additions and 8 deletions.
25 changes: 25 additions & 0 deletions google/cloud/webrisk_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@
]
}
}
},
"rest": {
"libraryClient": "WebRiskServiceClient",
"rpcs": {
"ComputeThreatListDiff": {
"methods": [
"compute_threat_list_diff"
]
},
"CreateSubmission": {
"methods": [
"create_submission"
]
},
"SearchHashes": {
"methods": [
"search_hashes"
]
},
"SearchUris": {
"methods": [
"search_uris"
]
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/webrisk_v1/services/web_risk_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, WebRiskServiceTransport
from .transports.grpc import WebRiskServiceGrpcTransport
from .transports.grpc_asyncio import WebRiskServiceGrpcAsyncIOTransport
from .transports.rest import WebRiskServiceRestTransport


class WebRiskServiceClientMeta(type):
Expand All @@ -68,6 +69,7 @@ class WebRiskServiceClientMeta(type):
) # type: Dict[str, Type[WebRiskServiceTransport]]
_transport_registry["grpc"] = WebRiskServiceGrpcTransport
_transport_registry["grpc_asyncio"] = WebRiskServiceGrpcAsyncIOTransport
_transport_registry["rest"] = WebRiskServiceRestTransport

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 WebRiskServiceTransport
from .grpc import WebRiskServiceGrpcTransport
from .grpc_asyncio import WebRiskServiceGrpcAsyncIOTransport
from .rest import WebRiskServiceRestInterceptor, WebRiskServiceRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[WebRiskServiceTransport]]
_transport_registry["grpc"] = WebRiskServiceGrpcTransport
_transport_registry["grpc_asyncio"] = WebRiskServiceGrpcAsyncIOTransport
_transport_registry["rest"] = WebRiskServiceRestTransport

__all__ = (
"WebRiskServiceTransport",
"WebRiskServiceGrpcTransport",
"WebRiskServiceGrpcAsyncIOTransport",
"WebRiskServiceRestTransport",
"WebRiskServiceRestInterceptor",
)
Loading

0 comments on commit 0bc759d

Please sign in to comment.