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

Commit

Permalink
feat: Add support for REST transport (#152)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 474644226

Source-Link: googleapis/googleapis@f90b329

Source-Link: googleapis/googleapis-gen@4ad8763
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFkODc2M2JkZTY3NmY5MmEzZWI3MDc1M2FlMWNmZWQwZTgxMzg3ZSJ9

PiperOrigin-RevId: 474571730

Source-Link: googleapis/googleapis@5a9ee4d

Source-Link: googleapis/googleapis-gen@ceafe52
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2VhZmU1MjFmMTM3NjgwZmRlZTJmOWNhOWUxOTQ3Y2RkODI1MDcwZCJ9

fix(deps): require google-api-core>=1.33.1,>=2.8.0
fix(deps): require protobuf >= 3.20.1
  • Loading branch information
gcf-owl-bot[bot] committed Sep 16, 2022
1 parent f53b359 commit 59b3839
Show file tree
Hide file tree
Showing 14 changed files with 2,003 additions and 20 deletions.
20 changes: 20 additions & 0 deletions google/cloud/privatecatalog_v1beta1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,26 @@
]
}
}
},
"rest": {
"libraryClient": "PrivateCatalogClient",
"rpcs": {
"SearchCatalogs": {
"methods": [
"search_catalogs"
]
},
"SearchProducts": {
"methods": [
"search_products"
]
},
"SearchVersions": {
"methods": [
"search_versions"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, PrivateCatalogTransport
from .transports.grpc import PrivateCatalogGrpcTransport
from .transports.grpc_asyncio import PrivateCatalogGrpcAsyncIOTransport
from .transports.rest import PrivateCatalogRestTransport


class PrivateCatalogClientMeta(type):
Expand All @@ -55,6 +56,7 @@ class PrivateCatalogClientMeta(type):
) # type: Dict[str, Type[PrivateCatalogTransport]]
_transport_registry["grpc"] = PrivateCatalogGrpcTransport
_transport_registry["grpc_asyncio"] = PrivateCatalogGrpcAsyncIOTransport
_transport_registry["rest"] = PrivateCatalogRestTransport

def get_transport_class(
cls,
Expand Down Expand Up @@ -400,6 +402,9 @@ def __init__(
transport (Union[str, PrivateCatalogTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
NOTE: "rest" transport functionality is currently in a
beta state (preview). We welcome your feedback via an
issue in this library's source repository.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@
from .base import PrivateCatalogTransport
from .grpc import PrivateCatalogGrpcTransport
from .grpc_asyncio import PrivateCatalogGrpcAsyncIOTransport
from .rest import PrivateCatalogRestInterceptor, PrivateCatalogRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[PrivateCatalogTransport]]
_transport_registry["grpc"] = PrivateCatalogGrpcTransport
_transport_registry["grpc_asyncio"] = PrivateCatalogGrpcAsyncIOTransport
_transport_registry["rest"] = PrivateCatalogRestTransport

__all__ = (
"PrivateCatalogTransport",
"PrivateCatalogGrpcTransport",
"PrivateCatalogGrpcAsyncIOTransport",
"PrivateCatalogRestTransport",
"PrivateCatalogRestInterceptor",
)
Loading

0 comments on commit 59b3839

Please sign in to comment.