Skip to content

Commit

Permalink
chore: restore rest support removed in #47 (#48)
Browse files Browse the repository at this point in the history
* feat: enable REST transport for Python Preview clients

PiperOrigin-RevId: 474571730

Source-Link: googleapis/googleapis@5a9ee4d

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

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Add Secure Boot support to TPU v2alpha1 API

PiperOrigin-RevId: 474644226

Source-Link: googleapis/googleapis@f90b329

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

* 🦉 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 Sep 16, 2022
1 parent 01f5924 commit 97de9a4
Show file tree
Hide file tree
Showing 8 changed files with 4,912 additions and 268 deletions.
65 changes: 65 additions & 0 deletions packages/google-cloud-run/google/cloud/run_v2/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,26 @@
]
}
}
},
"rest": {
"libraryClient": "RevisionsClient",
"rpcs": {
"DeleteRevision": {
"methods": [
"delete_revision"
]
},
"GetRevision": {
"methods": [
"get_revision"
]
},
"ListRevisions": {
"methods": [
"list_revisions"
]
}
}
}
}
},
Expand Down Expand Up @@ -140,6 +160,51 @@
]
}
}
},
"rest": {
"libraryClient": "ServicesClient",
"rpcs": {
"CreateService": {
"methods": [
"create_service"
]
},
"DeleteService": {
"methods": [
"delete_service"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"GetService": {
"methods": [
"get_service"
]
},
"ListServices": {
"methods": [
"list_services"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
]
},
"UpdateService": {
"methods": [
"update_service"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from .transports.base import RevisionsTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import RevisionsGrpcTransport
from .transports.grpc_asyncio import RevisionsGrpcAsyncIOTransport
from .transports.rest import RevisionsRestTransport


class RevisionsClientMeta(type):
Expand All @@ -60,6 +61,7 @@ class RevisionsClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[RevisionsTransport]]
_transport_registry["grpc"] = RevisionsGrpcTransport
_transport_registry["grpc_asyncio"] = RevisionsGrpcAsyncIOTransport
_transport_registry["rest"] = RevisionsRestTransport

def get_transport_class(
cls,
Expand Down Expand Up @@ -462,6 +464,9 @@ def __init__(
transport (Union[str, RevisionsTransport]): 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,15 +19,20 @@
from .base import RevisionsTransport
from .grpc import RevisionsGrpcTransport
from .grpc_asyncio import RevisionsGrpcAsyncIOTransport
from .rest import RevisionsRestTransport
from .rest import RevisionsRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[RevisionsTransport]]
_transport_registry["grpc"] = RevisionsGrpcTransport
_transport_registry["grpc_asyncio"] = RevisionsGrpcAsyncIOTransport
_transport_registry["rest"] = RevisionsRestTransport

__all__ = (
"RevisionsTransport",
"RevisionsGrpcTransport",
"RevisionsGrpcAsyncIOTransport",
"RevisionsRestTransport",
"RevisionsRestInterceptor",
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from .transports.base import ServicesTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import ServicesGrpcTransport
from .transports.grpc_asyncio import ServicesGrpcAsyncIOTransport
from .transports.rest import ServicesRestTransport


class ServicesClientMeta(type):
Expand All @@ -63,6 +64,7 @@ class ServicesClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[ServicesTransport]]
_transport_registry["grpc"] = ServicesGrpcTransport
_transport_registry["grpc_asyncio"] = ServicesGrpcAsyncIOTransport
_transport_registry["rest"] = ServicesRestTransport

def get_transport_class(
cls,
Expand Down Expand Up @@ -465,6 +467,9 @@ def __init__(
transport (Union[str, ServicesTransport]): 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,15 +19,20 @@
from .base import ServicesTransport
from .grpc import ServicesGrpcTransport
from .grpc_asyncio import ServicesGrpcAsyncIOTransport
from .rest import ServicesRestTransport
from .rest import ServicesRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[ServicesTransport]]
_transport_registry["grpc"] = ServicesGrpcTransport
_transport_registry["grpc_asyncio"] = ServicesGrpcAsyncIOTransport
_transport_registry["rest"] = ServicesRestTransport

__all__ = (
"ServicesTransport",
"ServicesGrpcTransport",
"ServicesGrpcAsyncIOTransport",
"ServicesRestTransport",
"ServicesRestInterceptor",
)
Loading

0 comments on commit 97de9a4

Please sign in to comment.