Skip to content

Commit

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

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] authored Sep 16, 2022
1 parent 7fcb994 commit a778761
Show file tree
Hide file tree
Showing 32 changed files with 6,764 additions and 470 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,71 @@
]
}
}
},
"rest": {
"libraryClient": "TablesServiceClient",
"rpcs": {
"BatchCreateRows": {
"methods": [
"batch_create_rows"
]
},
"BatchDeleteRows": {
"methods": [
"batch_delete_rows"
]
},
"BatchUpdateRows": {
"methods": [
"batch_update_rows"
]
},
"CreateRow": {
"methods": [
"create_row"
]
},
"DeleteRow": {
"methods": [
"delete_row"
]
},
"GetRow": {
"methods": [
"get_row"
]
},
"GetTable": {
"methods": [
"get_table"
]
},
"GetWorkspace": {
"methods": [
"get_workspace"
]
},
"ListRows": {
"methods": [
"list_rows"
]
},
"ListTables": {
"methods": [
"list_tables"
]
},
"ListWorkspaces": {
"methods": [
"list_workspaces"
]
},
"UpdateRow": {
"methods": [
"update_row"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, TablesServiceTransport
from .transports.grpc import TablesServiceGrpcTransport
from .transports.grpc_asyncio import TablesServiceGrpcAsyncIOTransport
from .transports.rest import TablesServiceRestTransport


class TablesServiceClientMeta(type):
Expand All @@ -55,6 +56,7 @@ class TablesServiceClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[TablesServiceTransport]]
_transport_registry["grpc"] = TablesServiceGrpcTransport
_transport_registry["grpc_asyncio"] = TablesServiceGrpcAsyncIOTransport
_transport_registry["rest"] = TablesServiceRestTransport

def get_transport_class(
cls,
Expand Down Expand Up @@ -387,6 +389,9 @@ def __init__(
transport (Union[str, TablesServiceTransport]): 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 TablesServiceTransport
from .grpc import TablesServiceGrpcTransport
from .grpc_asyncio import TablesServiceGrpcAsyncIOTransport
from .rest import TablesServiceRestInterceptor, TablesServiceRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[TablesServiceTransport]]
_transport_registry["grpc"] = TablesServiceGrpcTransport
_transport_registry["grpc_asyncio"] = TablesServiceGrpcAsyncIOTransport
_transport_registry["rest"] = TablesServiceRestTransport

__all__ = (
"TablesServiceTransport",
"TablesServiceGrpcTransport",
"TablesServiceGrpcAsyncIOTransport",
"TablesServiceRestTransport",
"TablesServiceRestInterceptor",
)
Loading

0 comments on commit a778761

Please sign in to comment.