google-cloud-datastream 1.13.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/cloud/datastream/__init__.py +219 -0
- google/cloud/datastream/gapic_version.py +16 -0
- google/cloud/datastream/py.typed +2 -0
- google/cloud/datastream_v1/__init__.py +216 -0
- google/cloud/datastream_v1/gapic_metadata.json +418 -0
- google/cloud/datastream_v1/gapic_version.py +16 -0
- google/cloud/datastream_v1/py.typed +2 -0
- google/cloud/datastream_v1/services/__init__.py +15 -0
- google/cloud/datastream_v1/services/datastream/__init__.py +22 -0
- google/cloud/datastream_v1/services/datastream/async_client.py +3939 -0
- google/cloud/datastream_v1/services/datastream/client.py +4420 -0
- google/cloud/datastream_v1/services/datastream/pagers.py +977 -0
- google/cloud/datastream_v1/services/datastream/transports/__init__.py +36 -0
- google/cloud/datastream_v1/services/datastream/transports/base.py +639 -0
- google/cloud/datastream_v1/services/datastream/transports/grpc.py +1193 -0
- google/cloud/datastream_v1/services/datastream/transports/grpc_asyncio.py +1389 -0
- google/cloud/datastream_v1/services/datastream/transports/rest.py +6861 -0
- google/cloud/datastream_v1/services/datastream/transports/rest_base.py +1591 -0
- google/cloud/datastream_v1/types/__init__.py +208 -0
- google/cloud/datastream_v1/types/datastream.py +1491 -0
- google/cloud/datastream_v1/types/datastream_resources.py +2986 -0
- google/cloud/datastream_v1alpha1/__init__.py +156 -0
- google/cloud/datastream_v1alpha1/gapic_metadata.json +343 -0
- google/cloud/datastream_v1alpha1/gapic_version.py +16 -0
- google/cloud/datastream_v1alpha1/py.typed +2 -0
- google/cloud/datastream_v1alpha1/services/__init__.py +15 -0
- google/cloud/datastream_v1alpha1/services/datastream/__init__.py +22 -0
- google/cloud/datastream_v1alpha1/services/datastream/async_client.py +3018 -0
- google/cloud/datastream_v1alpha1/services/datastream/client.py +3458 -0
- google/cloud/datastream_v1alpha1/services/datastream/pagers.py +821 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/__init__.py +36 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/base.py +467 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/grpc.py +942 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/grpc_asyncio.py +1078 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/rest.py +4770 -0
- google/cloud/datastream_v1alpha1/services/datastream/transports/rest_base.py +1152 -0
- google/cloud/datastream_v1alpha1/types/__init__.py +148 -0
- google/cloud/datastream_v1alpha1/types/datastream.py +1230 -0
- google/cloud/datastream_v1alpha1/types/datastream_resources.py +1416 -0
- google_cloud_datastream-1.13.2.dist-info/LICENSE +202 -0
- google_cloud_datastream-1.13.2.dist-info/METADATA +229 -0
- google_cloud_datastream-1.13.2.dist-info/RECORD +44 -0
- google_cloud_datastream-1.13.2.dist-info/WHEEL +5 -0
- google_cloud_datastream-1.13.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1389 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2024 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
import inspect
|
|
17
|
+
import json
|
|
18
|
+
import logging as std_logging
|
|
19
|
+
import pickle
|
|
20
|
+
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
|
|
21
|
+
import warnings
|
|
22
|
+
|
|
23
|
+
from google.api_core import exceptions as core_exceptions
|
|
24
|
+
from google.api_core import gapic_v1, grpc_helpers_async, operations_v1
|
|
25
|
+
from google.api_core import retry_async as retries
|
|
26
|
+
from google.auth import credentials as ga_credentials # type: ignore
|
|
27
|
+
from google.auth.transport.grpc import SslCredentials # type: ignore
|
|
28
|
+
from google.cloud.location import locations_pb2 # type: ignore
|
|
29
|
+
from google.iam.v1 import iam_policy_pb2 # type: ignore
|
|
30
|
+
from google.iam.v1 import policy_pb2 # type: ignore
|
|
31
|
+
from google.longrunning import operations_pb2 # type: ignore
|
|
32
|
+
from google.protobuf.json_format import MessageToJson
|
|
33
|
+
import google.protobuf.message
|
|
34
|
+
import grpc # type: ignore
|
|
35
|
+
from grpc.experimental import aio # type: ignore
|
|
36
|
+
import proto # type: ignore
|
|
37
|
+
|
|
38
|
+
from google.cloud.datastream_v1.types import datastream, datastream_resources
|
|
39
|
+
|
|
40
|
+
from .base import DEFAULT_CLIENT_INFO, DatastreamTransport
|
|
41
|
+
from .grpc import DatastreamGrpcTransport
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
from google.api_core import client_logging # type: ignore
|
|
45
|
+
|
|
46
|
+
CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
|
|
47
|
+
except ImportError: # pragma: NO COVER
|
|
48
|
+
CLIENT_LOGGING_SUPPORTED = False
|
|
49
|
+
|
|
50
|
+
_LOGGER = std_logging.getLogger(__name__)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class _LoggingClientAIOInterceptor(
|
|
54
|
+
grpc.aio.UnaryUnaryClientInterceptor
|
|
55
|
+
): # pragma: NO COVER
|
|
56
|
+
async def intercept_unary_unary(self, continuation, client_call_details, request):
|
|
57
|
+
logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
|
|
58
|
+
std_logging.DEBUG
|
|
59
|
+
)
|
|
60
|
+
if logging_enabled: # pragma: NO COVER
|
|
61
|
+
request_metadata = client_call_details.metadata
|
|
62
|
+
if isinstance(request, proto.Message):
|
|
63
|
+
request_payload = type(request).to_json(request)
|
|
64
|
+
elif isinstance(request, google.protobuf.message.Message):
|
|
65
|
+
request_payload = MessageToJson(request)
|
|
66
|
+
else:
|
|
67
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
68
|
+
|
|
69
|
+
request_metadata = {
|
|
70
|
+
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
71
|
+
for key, value in request_metadata
|
|
72
|
+
}
|
|
73
|
+
grpc_request = {
|
|
74
|
+
"payload": request_payload,
|
|
75
|
+
"requestMethod": "grpc",
|
|
76
|
+
"metadata": dict(request_metadata),
|
|
77
|
+
}
|
|
78
|
+
_LOGGER.debug(
|
|
79
|
+
f"Sending request for {client_call_details.method}",
|
|
80
|
+
extra={
|
|
81
|
+
"serviceName": "google.cloud.datastream.v1.Datastream",
|
|
82
|
+
"rpcName": str(client_call_details.method),
|
|
83
|
+
"request": grpc_request,
|
|
84
|
+
"metadata": grpc_request["metadata"],
|
|
85
|
+
},
|
|
86
|
+
)
|
|
87
|
+
response = await continuation(client_call_details, request)
|
|
88
|
+
if logging_enabled: # pragma: NO COVER
|
|
89
|
+
response_metadata = await response.trailing_metadata()
|
|
90
|
+
# Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
|
|
91
|
+
metadata = (
|
|
92
|
+
dict([(k, str(v)) for k, v in response_metadata])
|
|
93
|
+
if response_metadata
|
|
94
|
+
else None
|
|
95
|
+
)
|
|
96
|
+
result = await response
|
|
97
|
+
if isinstance(result, proto.Message):
|
|
98
|
+
response_payload = type(result).to_json(result)
|
|
99
|
+
elif isinstance(result, google.protobuf.message.Message):
|
|
100
|
+
response_payload = MessageToJson(result)
|
|
101
|
+
else:
|
|
102
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
103
|
+
grpc_response = {
|
|
104
|
+
"payload": response_payload,
|
|
105
|
+
"metadata": metadata,
|
|
106
|
+
"status": "OK",
|
|
107
|
+
}
|
|
108
|
+
_LOGGER.debug(
|
|
109
|
+
f"Received response to rpc {client_call_details.method}.",
|
|
110
|
+
extra={
|
|
111
|
+
"serviceName": "google.cloud.datastream.v1.Datastream",
|
|
112
|
+
"rpcName": str(client_call_details.method),
|
|
113
|
+
"response": grpc_response,
|
|
114
|
+
"metadata": grpc_response["metadata"],
|
|
115
|
+
},
|
|
116
|
+
)
|
|
117
|
+
return response
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class DatastreamGrpcAsyncIOTransport(DatastreamTransport):
|
|
121
|
+
"""gRPC AsyncIO backend transport for Datastream.
|
|
122
|
+
|
|
123
|
+
Datastream service
|
|
124
|
+
|
|
125
|
+
This class defines the same methods as the primary client, so the
|
|
126
|
+
primary client can load the underlying transport implementation
|
|
127
|
+
and call it.
|
|
128
|
+
|
|
129
|
+
It sends protocol buffers over the wire using gRPC (which is built on
|
|
130
|
+
top of HTTP/2); the ``grpcio`` package must be installed.
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
_grpc_channel: aio.Channel
|
|
134
|
+
_stubs: Dict[str, Callable] = {}
|
|
135
|
+
|
|
136
|
+
@classmethod
|
|
137
|
+
def create_channel(
|
|
138
|
+
cls,
|
|
139
|
+
host: str = "datastream.googleapis.com",
|
|
140
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
141
|
+
credentials_file: Optional[str] = None,
|
|
142
|
+
scopes: Optional[Sequence[str]] = None,
|
|
143
|
+
quota_project_id: Optional[str] = None,
|
|
144
|
+
**kwargs,
|
|
145
|
+
) -> aio.Channel:
|
|
146
|
+
"""Create and return a gRPC AsyncIO channel object.
|
|
147
|
+
Args:
|
|
148
|
+
host (Optional[str]): The host for the channel to use.
|
|
149
|
+
credentials (Optional[~.Credentials]): The
|
|
150
|
+
authorization credentials to attach to requests. These
|
|
151
|
+
credentials identify this application to the service. If
|
|
152
|
+
none are specified, the client will attempt to ascertain
|
|
153
|
+
the credentials from the environment.
|
|
154
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
155
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
156
|
+
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
|
|
157
|
+
service. These are only used when credentials are not specified and
|
|
158
|
+
are passed to :func:`google.auth.default`.
|
|
159
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
160
|
+
and quota.
|
|
161
|
+
kwargs (Optional[dict]): Keyword arguments, which are passed to the
|
|
162
|
+
channel creation.
|
|
163
|
+
Returns:
|
|
164
|
+
aio.Channel: A gRPC AsyncIO channel object.
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return grpc_helpers_async.create_channel(
|
|
168
|
+
host,
|
|
169
|
+
credentials=credentials,
|
|
170
|
+
credentials_file=credentials_file,
|
|
171
|
+
quota_project_id=quota_project_id,
|
|
172
|
+
default_scopes=cls.AUTH_SCOPES,
|
|
173
|
+
scopes=scopes,
|
|
174
|
+
default_host=cls.DEFAULT_HOST,
|
|
175
|
+
**kwargs,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
def __init__(
|
|
179
|
+
self,
|
|
180
|
+
*,
|
|
181
|
+
host: str = "datastream.googleapis.com",
|
|
182
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
183
|
+
credentials_file: Optional[str] = None,
|
|
184
|
+
scopes: Optional[Sequence[str]] = None,
|
|
185
|
+
channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None,
|
|
186
|
+
api_mtls_endpoint: Optional[str] = None,
|
|
187
|
+
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
|
|
188
|
+
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
|
|
189
|
+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
|
|
190
|
+
quota_project_id: Optional[str] = None,
|
|
191
|
+
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
|
|
192
|
+
always_use_jwt_access: Optional[bool] = False,
|
|
193
|
+
api_audience: Optional[str] = None,
|
|
194
|
+
) -> None:
|
|
195
|
+
"""Instantiate the transport.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
host (Optional[str]):
|
|
199
|
+
The hostname to connect to (default: 'datastream.googleapis.com').
|
|
200
|
+
credentials (Optional[google.auth.credentials.Credentials]): The
|
|
201
|
+
authorization credentials to attach to requests. These
|
|
202
|
+
credentials identify the application to the service; if none
|
|
203
|
+
are specified, the client will attempt to ascertain the
|
|
204
|
+
credentials from the environment.
|
|
205
|
+
This argument is ignored if a ``channel`` instance is provided.
|
|
206
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
207
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
208
|
+
This argument is ignored if a ``channel`` instance is provided.
|
|
209
|
+
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
|
|
210
|
+
service. These are only used when credentials are not specified and
|
|
211
|
+
are passed to :func:`google.auth.default`.
|
|
212
|
+
channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]):
|
|
213
|
+
A ``Channel`` instance through which to make calls, or a Callable
|
|
214
|
+
that constructs and returns one. If set to None, ``self.create_channel``
|
|
215
|
+
is used to create the channel. If a Callable is given, it will be called
|
|
216
|
+
with the same arguments as used in ``self.create_channel``.
|
|
217
|
+
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
|
|
218
|
+
If provided, it overrides the ``host`` argument and tries to create
|
|
219
|
+
a mutual TLS channel with client SSL credentials from
|
|
220
|
+
``client_cert_source`` or application default SSL credentials.
|
|
221
|
+
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
|
|
222
|
+
Deprecated. A callback to provide client SSL certificate bytes and
|
|
223
|
+
private key bytes, both in PEM format. It is ignored if
|
|
224
|
+
``api_mtls_endpoint`` is None.
|
|
225
|
+
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
|
|
226
|
+
for the grpc channel. It is ignored if a ``channel`` instance is provided.
|
|
227
|
+
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
|
|
228
|
+
A callback to provide client certificate bytes and private key bytes,
|
|
229
|
+
both in PEM format. It is used to configure a mutual TLS channel. It is
|
|
230
|
+
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
|
|
231
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
232
|
+
and quota.
|
|
233
|
+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
|
|
234
|
+
The client info used to send a user-agent string along with
|
|
235
|
+
API requests. If ``None``, then default info will be used.
|
|
236
|
+
Generally, you only need to set this if you're developing
|
|
237
|
+
your own client library.
|
|
238
|
+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
239
|
+
be used for service account credentials.
|
|
240
|
+
|
|
241
|
+
Raises:
|
|
242
|
+
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
|
|
243
|
+
creation failed for any reason.
|
|
244
|
+
google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
|
|
245
|
+
and ``credentials_file`` are passed.
|
|
246
|
+
"""
|
|
247
|
+
self._grpc_channel = None
|
|
248
|
+
self._ssl_channel_credentials = ssl_channel_credentials
|
|
249
|
+
self._stubs: Dict[str, Callable] = {}
|
|
250
|
+
self._operations_client: Optional[operations_v1.OperationsAsyncClient] = None
|
|
251
|
+
|
|
252
|
+
if api_mtls_endpoint:
|
|
253
|
+
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
|
|
254
|
+
if client_cert_source:
|
|
255
|
+
warnings.warn("client_cert_source is deprecated", DeprecationWarning)
|
|
256
|
+
|
|
257
|
+
if isinstance(channel, aio.Channel):
|
|
258
|
+
# Ignore credentials if a channel was passed.
|
|
259
|
+
credentials = None
|
|
260
|
+
self._ignore_credentials = True
|
|
261
|
+
# If a channel was explicitly provided, set it.
|
|
262
|
+
self._grpc_channel = channel
|
|
263
|
+
self._ssl_channel_credentials = None
|
|
264
|
+
else:
|
|
265
|
+
if api_mtls_endpoint:
|
|
266
|
+
host = api_mtls_endpoint
|
|
267
|
+
|
|
268
|
+
# Create SSL credentials with client_cert_source or application
|
|
269
|
+
# default SSL credentials.
|
|
270
|
+
if client_cert_source:
|
|
271
|
+
cert, key = client_cert_source()
|
|
272
|
+
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
|
|
273
|
+
certificate_chain=cert, private_key=key
|
|
274
|
+
)
|
|
275
|
+
else:
|
|
276
|
+
self._ssl_channel_credentials = SslCredentials().ssl_credentials
|
|
277
|
+
|
|
278
|
+
else:
|
|
279
|
+
if client_cert_source_for_mtls and not ssl_channel_credentials:
|
|
280
|
+
cert, key = client_cert_source_for_mtls()
|
|
281
|
+
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
|
|
282
|
+
certificate_chain=cert, private_key=key
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
# The base transport sets the host, credentials and scopes
|
|
286
|
+
super().__init__(
|
|
287
|
+
host=host,
|
|
288
|
+
credentials=credentials,
|
|
289
|
+
credentials_file=credentials_file,
|
|
290
|
+
scopes=scopes,
|
|
291
|
+
quota_project_id=quota_project_id,
|
|
292
|
+
client_info=client_info,
|
|
293
|
+
always_use_jwt_access=always_use_jwt_access,
|
|
294
|
+
api_audience=api_audience,
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
if not self._grpc_channel:
|
|
298
|
+
# initialize with the provided callable or the default channel
|
|
299
|
+
channel_init = channel or type(self).create_channel
|
|
300
|
+
self._grpc_channel = channel_init(
|
|
301
|
+
self._host,
|
|
302
|
+
# use the credentials which are saved
|
|
303
|
+
credentials=self._credentials,
|
|
304
|
+
# Set ``credentials_file`` to ``None`` here as
|
|
305
|
+
# the credentials that we saved earlier should be used.
|
|
306
|
+
credentials_file=None,
|
|
307
|
+
scopes=self._scopes,
|
|
308
|
+
ssl_credentials=self._ssl_channel_credentials,
|
|
309
|
+
quota_project_id=quota_project_id,
|
|
310
|
+
options=[
|
|
311
|
+
("grpc.max_send_message_length", -1),
|
|
312
|
+
("grpc.max_receive_message_length", -1),
|
|
313
|
+
],
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
self._interceptor = _LoggingClientAIOInterceptor()
|
|
317
|
+
self._grpc_channel._unary_unary_interceptors.append(self._interceptor)
|
|
318
|
+
self._logged_channel = self._grpc_channel
|
|
319
|
+
self._wrap_with_kind = (
|
|
320
|
+
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
|
|
321
|
+
)
|
|
322
|
+
# Wrap messages. This must be done after self._logged_channel exists
|
|
323
|
+
self._prep_wrapped_messages(client_info)
|
|
324
|
+
|
|
325
|
+
@property
|
|
326
|
+
def grpc_channel(self) -> aio.Channel:
|
|
327
|
+
"""Create the channel designed to connect to this service.
|
|
328
|
+
|
|
329
|
+
This property caches on the instance; repeated calls return
|
|
330
|
+
the same channel.
|
|
331
|
+
"""
|
|
332
|
+
# Return the channel from cache.
|
|
333
|
+
return self._grpc_channel
|
|
334
|
+
|
|
335
|
+
@property
|
|
336
|
+
def operations_client(self) -> operations_v1.OperationsAsyncClient:
|
|
337
|
+
"""Create the client designed to process long-running operations.
|
|
338
|
+
|
|
339
|
+
This property caches on the instance; repeated calls return the same
|
|
340
|
+
client.
|
|
341
|
+
"""
|
|
342
|
+
# Quick check: Only create a new client if we do not already have one.
|
|
343
|
+
if self._operations_client is None:
|
|
344
|
+
self._operations_client = operations_v1.OperationsAsyncClient(
|
|
345
|
+
self._logged_channel
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
# Return the client from cache.
|
|
349
|
+
return self._operations_client
|
|
350
|
+
|
|
351
|
+
@property
|
|
352
|
+
def list_connection_profiles(
|
|
353
|
+
self,
|
|
354
|
+
) -> Callable[
|
|
355
|
+
[datastream.ListConnectionProfilesRequest],
|
|
356
|
+
Awaitable[datastream.ListConnectionProfilesResponse],
|
|
357
|
+
]:
|
|
358
|
+
r"""Return a callable for the list connection profiles method over gRPC.
|
|
359
|
+
|
|
360
|
+
Use this method to list connection profiles created
|
|
361
|
+
in a project and location.
|
|
362
|
+
|
|
363
|
+
Returns:
|
|
364
|
+
Callable[[~.ListConnectionProfilesRequest],
|
|
365
|
+
Awaitable[~.ListConnectionProfilesResponse]]:
|
|
366
|
+
A function that, when called, will call the underlying RPC
|
|
367
|
+
on the server.
|
|
368
|
+
"""
|
|
369
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
370
|
+
# the request.
|
|
371
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
372
|
+
# to pass in the functions for each.
|
|
373
|
+
if "list_connection_profiles" not in self._stubs:
|
|
374
|
+
self._stubs["list_connection_profiles"] = self._logged_channel.unary_unary(
|
|
375
|
+
"/google.cloud.datastream.v1.Datastream/ListConnectionProfiles",
|
|
376
|
+
request_serializer=datastream.ListConnectionProfilesRequest.serialize,
|
|
377
|
+
response_deserializer=datastream.ListConnectionProfilesResponse.deserialize,
|
|
378
|
+
)
|
|
379
|
+
return self._stubs["list_connection_profiles"]
|
|
380
|
+
|
|
381
|
+
@property
|
|
382
|
+
def get_connection_profile(
|
|
383
|
+
self,
|
|
384
|
+
) -> Callable[
|
|
385
|
+
[datastream.GetConnectionProfileRequest],
|
|
386
|
+
Awaitable[datastream_resources.ConnectionProfile],
|
|
387
|
+
]:
|
|
388
|
+
r"""Return a callable for the get connection profile method over gRPC.
|
|
389
|
+
|
|
390
|
+
Use this method to get details about a connection
|
|
391
|
+
profile.
|
|
392
|
+
|
|
393
|
+
Returns:
|
|
394
|
+
Callable[[~.GetConnectionProfileRequest],
|
|
395
|
+
Awaitable[~.ConnectionProfile]]:
|
|
396
|
+
A function that, when called, will call the underlying RPC
|
|
397
|
+
on the server.
|
|
398
|
+
"""
|
|
399
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
400
|
+
# the request.
|
|
401
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
402
|
+
# to pass in the functions for each.
|
|
403
|
+
if "get_connection_profile" not in self._stubs:
|
|
404
|
+
self._stubs["get_connection_profile"] = self._logged_channel.unary_unary(
|
|
405
|
+
"/google.cloud.datastream.v1.Datastream/GetConnectionProfile",
|
|
406
|
+
request_serializer=datastream.GetConnectionProfileRequest.serialize,
|
|
407
|
+
response_deserializer=datastream_resources.ConnectionProfile.deserialize,
|
|
408
|
+
)
|
|
409
|
+
return self._stubs["get_connection_profile"]
|
|
410
|
+
|
|
411
|
+
@property
|
|
412
|
+
def create_connection_profile(
|
|
413
|
+
self,
|
|
414
|
+
) -> Callable[
|
|
415
|
+
[datastream.CreateConnectionProfileRequest], Awaitable[operations_pb2.Operation]
|
|
416
|
+
]:
|
|
417
|
+
r"""Return a callable for the create connection profile method over gRPC.
|
|
418
|
+
|
|
419
|
+
Use this method to create a connection profile in a
|
|
420
|
+
project and location.
|
|
421
|
+
|
|
422
|
+
Returns:
|
|
423
|
+
Callable[[~.CreateConnectionProfileRequest],
|
|
424
|
+
Awaitable[~.Operation]]:
|
|
425
|
+
A function that, when called, will call the underlying RPC
|
|
426
|
+
on the server.
|
|
427
|
+
"""
|
|
428
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
429
|
+
# the request.
|
|
430
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
431
|
+
# to pass in the functions for each.
|
|
432
|
+
if "create_connection_profile" not in self._stubs:
|
|
433
|
+
self._stubs["create_connection_profile"] = self._logged_channel.unary_unary(
|
|
434
|
+
"/google.cloud.datastream.v1.Datastream/CreateConnectionProfile",
|
|
435
|
+
request_serializer=datastream.CreateConnectionProfileRequest.serialize,
|
|
436
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
437
|
+
)
|
|
438
|
+
return self._stubs["create_connection_profile"]
|
|
439
|
+
|
|
440
|
+
@property
|
|
441
|
+
def update_connection_profile(
|
|
442
|
+
self,
|
|
443
|
+
) -> Callable[
|
|
444
|
+
[datastream.UpdateConnectionProfileRequest], Awaitable[operations_pb2.Operation]
|
|
445
|
+
]:
|
|
446
|
+
r"""Return a callable for the update connection profile method over gRPC.
|
|
447
|
+
|
|
448
|
+
Use this method to update the parameters of a
|
|
449
|
+
connection profile.
|
|
450
|
+
|
|
451
|
+
Returns:
|
|
452
|
+
Callable[[~.UpdateConnectionProfileRequest],
|
|
453
|
+
Awaitable[~.Operation]]:
|
|
454
|
+
A function that, when called, will call the underlying RPC
|
|
455
|
+
on the server.
|
|
456
|
+
"""
|
|
457
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
458
|
+
# the request.
|
|
459
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
460
|
+
# to pass in the functions for each.
|
|
461
|
+
if "update_connection_profile" not in self._stubs:
|
|
462
|
+
self._stubs["update_connection_profile"] = self._logged_channel.unary_unary(
|
|
463
|
+
"/google.cloud.datastream.v1.Datastream/UpdateConnectionProfile",
|
|
464
|
+
request_serializer=datastream.UpdateConnectionProfileRequest.serialize,
|
|
465
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
466
|
+
)
|
|
467
|
+
return self._stubs["update_connection_profile"]
|
|
468
|
+
|
|
469
|
+
@property
|
|
470
|
+
def delete_connection_profile(
|
|
471
|
+
self,
|
|
472
|
+
) -> Callable[
|
|
473
|
+
[datastream.DeleteConnectionProfileRequest], Awaitable[operations_pb2.Operation]
|
|
474
|
+
]:
|
|
475
|
+
r"""Return a callable for the delete connection profile method over gRPC.
|
|
476
|
+
|
|
477
|
+
Use this method to delete a connection profile.
|
|
478
|
+
|
|
479
|
+
Returns:
|
|
480
|
+
Callable[[~.DeleteConnectionProfileRequest],
|
|
481
|
+
Awaitable[~.Operation]]:
|
|
482
|
+
A function that, when called, will call the underlying RPC
|
|
483
|
+
on the server.
|
|
484
|
+
"""
|
|
485
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
486
|
+
# the request.
|
|
487
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
488
|
+
# to pass in the functions for each.
|
|
489
|
+
if "delete_connection_profile" not in self._stubs:
|
|
490
|
+
self._stubs["delete_connection_profile"] = self._logged_channel.unary_unary(
|
|
491
|
+
"/google.cloud.datastream.v1.Datastream/DeleteConnectionProfile",
|
|
492
|
+
request_serializer=datastream.DeleteConnectionProfileRequest.serialize,
|
|
493
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
494
|
+
)
|
|
495
|
+
return self._stubs["delete_connection_profile"]
|
|
496
|
+
|
|
497
|
+
@property
|
|
498
|
+
def discover_connection_profile(
|
|
499
|
+
self,
|
|
500
|
+
) -> Callable[
|
|
501
|
+
[datastream.DiscoverConnectionProfileRequest],
|
|
502
|
+
Awaitable[datastream.DiscoverConnectionProfileResponse],
|
|
503
|
+
]:
|
|
504
|
+
r"""Return a callable for the discover connection profile method over gRPC.
|
|
505
|
+
|
|
506
|
+
Use this method to discover a connection profile.
|
|
507
|
+
The discover API call exposes the data objects and
|
|
508
|
+
metadata belonging to the profile. Typically, a request
|
|
509
|
+
returns children data objects of a parent data object
|
|
510
|
+
that's optionally supplied in the request.
|
|
511
|
+
|
|
512
|
+
Returns:
|
|
513
|
+
Callable[[~.DiscoverConnectionProfileRequest],
|
|
514
|
+
Awaitable[~.DiscoverConnectionProfileResponse]]:
|
|
515
|
+
A function that, when called, will call the underlying RPC
|
|
516
|
+
on the server.
|
|
517
|
+
"""
|
|
518
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
519
|
+
# the request.
|
|
520
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
521
|
+
# to pass in the functions for each.
|
|
522
|
+
if "discover_connection_profile" not in self._stubs:
|
|
523
|
+
self._stubs[
|
|
524
|
+
"discover_connection_profile"
|
|
525
|
+
] = self._logged_channel.unary_unary(
|
|
526
|
+
"/google.cloud.datastream.v1.Datastream/DiscoverConnectionProfile",
|
|
527
|
+
request_serializer=datastream.DiscoverConnectionProfileRequest.serialize,
|
|
528
|
+
response_deserializer=datastream.DiscoverConnectionProfileResponse.deserialize,
|
|
529
|
+
)
|
|
530
|
+
return self._stubs["discover_connection_profile"]
|
|
531
|
+
|
|
532
|
+
@property
|
|
533
|
+
def list_streams(
|
|
534
|
+
self,
|
|
535
|
+
) -> Callable[
|
|
536
|
+
[datastream.ListStreamsRequest], Awaitable[datastream.ListStreamsResponse]
|
|
537
|
+
]:
|
|
538
|
+
r"""Return a callable for the list streams method over gRPC.
|
|
539
|
+
|
|
540
|
+
Use this method to list streams in a project and
|
|
541
|
+
location.
|
|
542
|
+
|
|
543
|
+
Returns:
|
|
544
|
+
Callable[[~.ListStreamsRequest],
|
|
545
|
+
Awaitable[~.ListStreamsResponse]]:
|
|
546
|
+
A function that, when called, will call the underlying RPC
|
|
547
|
+
on the server.
|
|
548
|
+
"""
|
|
549
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
550
|
+
# the request.
|
|
551
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
552
|
+
# to pass in the functions for each.
|
|
553
|
+
if "list_streams" not in self._stubs:
|
|
554
|
+
self._stubs["list_streams"] = self._logged_channel.unary_unary(
|
|
555
|
+
"/google.cloud.datastream.v1.Datastream/ListStreams",
|
|
556
|
+
request_serializer=datastream.ListStreamsRequest.serialize,
|
|
557
|
+
response_deserializer=datastream.ListStreamsResponse.deserialize,
|
|
558
|
+
)
|
|
559
|
+
return self._stubs["list_streams"]
|
|
560
|
+
|
|
561
|
+
@property
|
|
562
|
+
def get_stream(
|
|
563
|
+
self,
|
|
564
|
+
) -> Callable[
|
|
565
|
+
[datastream.GetStreamRequest], Awaitable[datastream_resources.Stream]
|
|
566
|
+
]:
|
|
567
|
+
r"""Return a callable for the get stream method over gRPC.
|
|
568
|
+
|
|
569
|
+
Use this method to get details about a stream.
|
|
570
|
+
|
|
571
|
+
Returns:
|
|
572
|
+
Callable[[~.GetStreamRequest],
|
|
573
|
+
Awaitable[~.Stream]]:
|
|
574
|
+
A function that, when called, will call the underlying RPC
|
|
575
|
+
on the server.
|
|
576
|
+
"""
|
|
577
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
578
|
+
# the request.
|
|
579
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
580
|
+
# to pass in the functions for each.
|
|
581
|
+
if "get_stream" not in self._stubs:
|
|
582
|
+
self._stubs["get_stream"] = self._logged_channel.unary_unary(
|
|
583
|
+
"/google.cloud.datastream.v1.Datastream/GetStream",
|
|
584
|
+
request_serializer=datastream.GetStreamRequest.serialize,
|
|
585
|
+
response_deserializer=datastream_resources.Stream.deserialize,
|
|
586
|
+
)
|
|
587
|
+
return self._stubs["get_stream"]
|
|
588
|
+
|
|
589
|
+
@property
|
|
590
|
+
def create_stream(
|
|
591
|
+
self,
|
|
592
|
+
) -> Callable[
|
|
593
|
+
[datastream.CreateStreamRequest], Awaitable[operations_pb2.Operation]
|
|
594
|
+
]:
|
|
595
|
+
r"""Return a callable for the create stream method over gRPC.
|
|
596
|
+
|
|
597
|
+
Use this method to create a stream.
|
|
598
|
+
|
|
599
|
+
Returns:
|
|
600
|
+
Callable[[~.CreateStreamRequest],
|
|
601
|
+
Awaitable[~.Operation]]:
|
|
602
|
+
A function that, when called, will call the underlying RPC
|
|
603
|
+
on the server.
|
|
604
|
+
"""
|
|
605
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
606
|
+
# the request.
|
|
607
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
608
|
+
# to pass in the functions for each.
|
|
609
|
+
if "create_stream" not in self._stubs:
|
|
610
|
+
self._stubs["create_stream"] = self._logged_channel.unary_unary(
|
|
611
|
+
"/google.cloud.datastream.v1.Datastream/CreateStream",
|
|
612
|
+
request_serializer=datastream.CreateStreamRequest.serialize,
|
|
613
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
614
|
+
)
|
|
615
|
+
return self._stubs["create_stream"]
|
|
616
|
+
|
|
617
|
+
@property
|
|
618
|
+
def update_stream(
|
|
619
|
+
self,
|
|
620
|
+
) -> Callable[
|
|
621
|
+
[datastream.UpdateStreamRequest], Awaitable[operations_pb2.Operation]
|
|
622
|
+
]:
|
|
623
|
+
r"""Return a callable for the update stream method over gRPC.
|
|
624
|
+
|
|
625
|
+
Use this method to update the configuration of a
|
|
626
|
+
stream.
|
|
627
|
+
|
|
628
|
+
Returns:
|
|
629
|
+
Callable[[~.UpdateStreamRequest],
|
|
630
|
+
Awaitable[~.Operation]]:
|
|
631
|
+
A function that, when called, will call the underlying RPC
|
|
632
|
+
on the server.
|
|
633
|
+
"""
|
|
634
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
635
|
+
# the request.
|
|
636
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
637
|
+
# to pass in the functions for each.
|
|
638
|
+
if "update_stream" not in self._stubs:
|
|
639
|
+
self._stubs["update_stream"] = self._logged_channel.unary_unary(
|
|
640
|
+
"/google.cloud.datastream.v1.Datastream/UpdateStream",
|
|
641
|
+
request_serializer=datastream.UpdateStreamRequest.serialize,
|
|
642
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
643
|
+
)
|
|
644
|
+
return self._stubs["update_stream"]
|
|
645
|
+
|
|
646
|
+
@property
|
|
647
|
+
def delete_stream(
|
|
648
|
+
self,
|
|
649
|
+
) -> Callable[
|
|
650
|
+
[datastream.DeleteStreamRequest], Awaitable[operations_pb2.Operation]
|
|
651
|
+
]:
|
|
652
|
+
r"""Return a callable for the delete stream method over gRPC.
|
|
653
|
+
|
|
654
|
+
Use this method to delete a stream.
|
|
655
|
+
|
|
656
|
+
Returns:
|
|
657
|
+
Callable[[~.DeleteStreamRequest],
|
|
658
|
+
Awaitable[~.Operation]]:
|
|
659
|
+
A function that, when called, will call the underlying RPC
|
|
660
|
+
on the server.
|
|
661
|
+
"""
|
|
662
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
663
|
+
# the request.
|
|
664
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
665
|
+
# to pass in the functions for each.
|
|
666
|
+
if "delete_stream" not in self._stubs:
|
|
667
|
+
self._stubs["delete_stream"] = self._logged_channel.unary_unary(
|
|
668
|
+
"/google.cloud.datastream.v1.Datastream/DeleteStream",
|
|
669
|
+
request_serializer=datastream.DeleteStreamRequest.serialize,
|
|
670
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
671
|
+
)
|
|
672
|
+
return self._stubs["delete_stream"]
|
|
673
|
+
|
|
674
|
+
@property
|
|
675
|
+
def run_stream(
|
|
676
|
+
self,
|
|
677
|
+
) -> Callable[[datastream.RunStreamRequest], Awaitable[operations_pb2.Operation]]:
|
|
678
|
+
r"""Return a callable for the run stream method over gRPC.
|
|
679
|
+
|
|
680
|
+
Use this method to start, resume or recover a stream
|
|
681
|
+
with a non default CDC strategy.
|
|
682
|
+
|
|
683
|
+
Returns:
|
|
684
|
+
Callable[[~.RunStreamRequest],
|
|
685
|
+
Awaitable[~.Operation]]:
|
|
686
|
+
A function that, when called, will call the underlying RPC
|
|
687
|
+
on the server.
|
|
688
|
+
"""
|
|
689
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
690
|
+
# the request.
|
|
691
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
692
|
+
# to pass in the functions for each.
|
|
693
|
+
if "run_stream" not in self._stubs:
|
|
694
|
+
self._stubs["run_stream"] = self._logged_channel.unary_unary(
|
|
695
|
+
"/google.cloud.datastream.v1.Datastream/RunStream",
|
|
696
|
+
request_serializer=datastream.RunStreamRequest.serialize,
|
|
697
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
698
|
+
)
|
|
699
|
+
return self._stubs["run_stream"]
|
|
700
|
+
|
|
701
|
+
@property
|
|
702
|
+
def get_stream_object(
|
|
703
|
+
self,
|
|
704
|
+
) -> Callable[
|
|
705
|
+
[datastream.GetStreamObjectRequest],
|
|
706
|
+
Awaitable[datastream_resources.StreamObject],
|
|
707
|
+
]:
|
|
708
|
+
r"""Return a callable for the get stream object method over gRPC.
|
|
709
|
+
|
|
710
|
+
Use this method to get details about a stream object.
|
|
711
|
+
|
|
712
|
+
Returns:
|
|
713
|
+
Callable[[~.GetStreamObjectRequest],
|
|
714
|
+
Awaitable[~.StreamObject]]:
|
|
715
|
+
A function that, when called, will call the underlying RPC
|
|
716
|
+
on the server.
|
|
717
|
+
"""
|
|
718
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
719
|
+
# the request.
|
|
720
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
721
|
+
# to pass in the functions for each.
|
|
722
|
+
if "get_stream_object" not in self._stubs:
|
|
723
|
+
self._stubs["get_stream_object"] = self._logged_channel.unary_unary(
|
|
724
|
+
"/google.cloud.datastream.v1.Datastream/GetStreamObject",
|
|
725
|
+
request_serializer=datastream.GetStreamObjectRequest.serialize,
|
|
726
|
+
response_deserializer=datastream_resources.StreamObject.deserialize,
|
|
727
|
+
)
|
|
728
|
+
return self._stubs["get_stream_object"]
|
|
729
|
+
|
|
730
|
+
@property
|
|
731
|
+
def lookup_stream_object(
|
|
732
|
+
self,
|
|
733
|
+
) -> Callable[
|
|
734
|
+
[datastream.LookupStreamObjectRequest],
|
|
735
|
+
Awaitable[datastream_resources.StreamObject],
|
|
736
|
+
]:
|
|
737
|
+
r"""Return a callable for the lookup stream object method over gRPC.
|
|
738
|
+
|
|
739
|
+
Use this method to look up a stream object by its
|
|
740
|
+
source object identifier.
|
|
741
|
+
|
|
742
|
+
Returns:
|
|
743
|
+
Callable[[~.LookupStreamObjectRequest],
|
|
744
|
+
Awaitable[~.StreamObject]]:
|
|
745
|
+
A function that, when called, will call the underlying RPC
|
|
746
|
+
on the server.
|
|
747
|
+
"""
|
|
748
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
749
|
+
# the request.
|
|
750
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
751
|
+
# to pass in the functions for each.
|
|
752
|
+
if "lookup_stream_object" not in self._stubs:
|
|
753
|
+
self._stubs["lookup_stream_object"] = self._logged_channel.unary_unary(
|
|
754
|
+
"/google.cloud.datastream.v1.Datastream/LookupStreamObject",
|
|
755
|
+
request_serializer=datastream.LookupStreamObjectRequest.serialize,
|
|
756
|
+
response_deserializer=datastream_resources.StreamObject.deserialize,
|
|
757
|
+
)
|
|
758
|
+
return self._stubs["lookup_stream_object"]
|
|
759
|
+
|
|
760
|
+
@property
|
|
761
|
+
def list_stream_objects(
|
|
762
|
+
self,
|
|
763
|
+
) -> Callable[
|
|
764
|
+
[datastream.ListStreamObjectsRequest],
|
|
765
|
+
Awaitable[datastream.ListStreamObjectsResponse],
|
|
766
|
+
]:
|
|
767
|
+
r"""Return a callable for the list stream objects method over gRPC.
|
|
768
|
+
|
|
769
|
+
Use this method to list the objects of a specific
|
|
770
|
+
stream.
|
|
771
|
+
|
|
772
|
+
Returns:
|
|
773
|
+
Callable[[~.ListStreamObjectsRequest],
|
|
774
|
+
Awaitable[~.ListStreamObjectsResponse]]:
|
|
775
|
+
A function that, when called, will call the underlying RPC
|
|
776
|
+
on the server.
|
|
777
|
+
"""
|
|
778
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
779
|
+
# the request.
|
|
780
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
781
|
+
# to pass in the functions for each.
|
|
782
|
+
if "list_stream_objects" not in self._stubs:
|
|
783
|
+
self._stubs["list_stream_objects"] = self._logged_channel.unary_unary(
|
|
784
|
+
"/google.cloud.datastream.v1.Datastream/ListStreamObjects",
|
|
785
|
+
request_serializer=datastream.ListStreamObjectsRequest.serialize,
|
|
786
|
+
response_deserializer=datastream.ListStreamObjectsResponse.deserialize,
|
|
787
|
+
)
|
|
788
|
+
return self._stubs["list_stream_objects"]
|
|
789
|
+
|
|
790
|
+
@property
|
|
791
|
+
def start_backfill_job(
|
|
792
|
+
self,
|
|
793
|
+
) -> Callable[
|
|
794
|
+
[datastream.StartBackfillJobRequest],
|
|
795
|
+
Awaitable[datastream.StartBackfillJobResponse],
|
|
796
|
+
]:
|
|
797
|
+
r"""Return a callable for the start backfill job method over gRPC.
|
|
798
|
+
|
|
799
|
+
Use this method to start a backfill job for the
|
|
800
|
+
specified stream object.
|
|
801
|
+
|
|
802
|
+
Returns:
|
|
803
|
+
Callable[[~.StartBackfillJobRequest],
|
|
804
|
+
Awaitable[~.StartBackfillJobResponse]]:
|
|
805
|
+
A function that, when called, will call the underlying RPC
|
|
806
|
+
on the server.
|
|
807
|
+
"""
|
|
808
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
809
|
+
# the request.
|
|
810
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
811
|
+
# to pass in the functions for each.
|
|
812
|
+
if "start_backfill_job" not in self._stubs:
|
|
813
|
+
self._stubs["start_backfill_job"] = self._logged_channel.unary_unary(
|
|
814
|
+
"/google.cloud.datastream.v1.Datastream/StartBackfillJob",
|
|
815
|
+
request_serializer=datastream.StartBackfillJobRequest.serialize,
|
|
816
|
+
response_deserializer=datastream.StartBackfillJobResponse.deserialize,
|
|
817
|
+
)
|
|
818
|
+
return self._stubs["start_backfill_job"]
|
|
819
|
+
|
|
820
|
+
@property
|
|
821
|
+
def stop_backfill_job(
|
|
822
|
+
self,
|
|
823
|
+
) -> Callable[
|
|
824
|
+
[datastream.StopBackfillJobRequest],
|
|
825
|
+
Awaitable[datastream.StopBackfillJobResponse],
|
|
826
|
+
]:
|
|
827
|
+
r"""Return a callable for the stop backfill job method over gRPC.
|
|
828
|
+
|
|
829
|
+
Use this method to stop a backfill job for the
|
|
830
|
+
specified stream object.
|
|
831
|
+
|
|
832
|
+
Returns:
|
|
833
|
+
Callable[[~.StopBackfillJobRequest],
|
|
834
|
+
Awaitable[~.StopBackfillJobResponse]]:
|
|
835
|
+
A function that, when called, will call the underlying RPC
|
|
836
|
+
on the server.
|
|
837
|
+
"""
|
|
838
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
839
|
+
# the request.
|
|
840
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
841
|
+
# to pass in the functions for each.
|
|
842
|
+
if "stop_backfill_job" not in self._stubs:
|
|
843
|
+
self._stubs["stop_backfill_job"] = self._logged_channel.unary_unary(
|
|
844
|
+
"/google.cloud.datastream.v1.Datastream/StopBackfillJob",
|
|
845
|
+
request_serializer=datastream.StopBackfillJobRequest.serialize,
|
|
846
|
+
response_deserializer=datastream.StopBackfillJobResponse.deserialize,
|
|
847
|
+
)
|
|
848
|
+
return self._stubs["stop_backfill_job"]
|
|
849
|
+
|
|
850
|
+
@property
|
|
851
|
+
def fetch_static_ips(
|
|
852
|
+
self,
|
|
853
|
+
) -> Callable[
|
|
854
|
+
[datastream.FetchStaticIpsRequest], Awaitable[datastream.FetchStaticIpsResponse]
|
|
855
|
+
]:
|
|
856
|
+
r"""Return a callable for the fetch static ips method over gRPC.
|
|
857
|
+
|
|
858
|
+
The FetchStaticIps API call exposes the static IP
|
|
859
|
+
addresses used by Datastream.
|
|
860
|
+
|
|
861
|
+
Returns:
|
|
862
|
+
Callable[[~.FetchStaticIpsRequest],
|
|
863
|
+
Awaitable[~.FetchStaticIpsResponse]]:
|
|
864
|
+
A function that, when called, will call the underlying RPC
|
|
865
|
+
on the server.
|
|
866
|
+
"""
|
|
867
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
868
|
+
# the request.
|
|
869
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
870
|
+
# to pass in the functions for each.
|
|
871
|
+
if "fetch_static_ips" not in self._stubs:
|
|
872
|
+
self._stubs["fetch_static_ips"] = self._logged_channel.unary_unary(
|
|
873
|
+
"/google.cloud.datastream.v1.Datastream/FetchStaticIps",
|
|
874
|
+
request_serializer=datastream.FetchStaticIpsRequest.serialize,
|
|
875
|
+
response_deserializer=datastream.FetchStaticIpsResponse.deserialize,
|
|
876
|
+
)
|
|
877
|
+
return self._stubs["fetch_static_ips"]
|
|
878
|
+
|
|
879
|
+
@property
|
|
880
|
+
def create_private_connection(
|
|
881
|
+
self,
|
|
882
|
+
) -> Callable[
|
|
883
|
+
[datastream.CreatePrivateConnectionRequest], Awaitable[operations_pb2.Operation]
|
|
884
|
+
]:
|
|
885
|
+
r"""Return a callable for the create private connection method over gRPC.
|
|
886
|
+
|
|
887
|
+
Use this method to create a private connectivity
|
|
888
|
+
configuration.
|
|
889
|
+
|
|
890
|
+
Returns:
|
|
891
|
+
Callable[[~.CreatePrivateConnectionRequest],
|
|
892
|
+
Awaitable[~.Operation]]:
|
|
893
|
+
A function that, when called, will call the underlying RPC
|
|
894
|
+
on the server.
|
|
895
|
+
"""
|
|
896
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
897
|
+
# the request.
|
|
898
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
899
|
+
# to pass in the functions for each.
|
|
900
|
+
if "create_private_connection" not in self._stubs:
|
|
901
|
+
self._stubs["create_private_connection"] = self._logged_channel.unary_unary(
|
|
902
|
+
"/google.cloud.datastream.v1.Datastream/CreatePrivateConnection",
|
|
903
|
+
request_serializer=datastream.CreatePrivateConnectionRequest.serialize,
|
|
904
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
905
|
+
)
|
|
906
|
+
return self._stubs["create_private_connection"]
|
|
907
|
+
|
|
908
|
+
@property
|
|
909
|
+
def get_private_connection(
|
|
910
|
+
self,
|
|
911
|
+
) -> Callable[
|
|
912
|
+
[datastream.GetPrivateConnectionRequest],
|
|
913
|
+
Awaitable[datastream_resources.PrivateConnection],
|
|
914
|
+
]:
|
|
915
|
+
r"""Return a callable for the get private connection method over gRPC.
|
|
916
|
+
|
|
917
|
+
Use this method to get details about a private
|
|
918
|
+
connectivity configuration.
|
|
919
|
+
|
|
920
|
+
Returns:
|
|
921
|
+
Callable[[~.GetPrivateConnectionRequest],
|
|
922
|
+
Awaitable[~.PrivateConnection]]:
|
|
923
|
+
A function that, when called, will call the underlying RPC
|
|
924
|
+
on the server.
|
|
925
|
+
"""
|
|
926
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
927
|
+
# the request.
|
|
928
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
929
|
+
# to pass in the functions for each.
|
|
930
|
+
if "get_private_connection" not in self._stubs:
|
|
931
|
+
self._stubs["get_private_connection"] = self._logged_channel.unary_unary(
|
|
932
|
+
"/google.cloud.datastream.v1.Datastream/GetPrivateConnection",
|
|
933
|
+
request_serializer=datastream.GetPrivateConnectionRequest.serialize,
|
|
934
|
+
response_deserializer=datastream_resources.PrivateConnection.deserialize,
|
|
935
|
+
)
|
|
936
|
+
return self._stubs["get_private_connection"]
|
|
937
|
+
|
|
938
|
+
@property
|
|
939
|
+
def list_private_connections(
|
|
940
|
+
self,
|
|
941
|
+
) -> Callable[
|
|
942
|
+
[datastream.ListPrivateConnectionsRequest],
|
|
943
|
+
Awaitable[datastream.ListPrivateConnectionsResponse],
|
|
944
|
+
]:
|
|
945
|
+
r"""Return a callable for the list private connections method over gRPC.
|
|
946
|
+
|
|
947
|
+
Use this method to list private connectivity
|
|
948
|
+
configurations in a project and location.
|
|
949
|
+
|
|
950
|
+
Returns:
|
|
951
|
+
Callable[[~.ListPrivateConnectionsRequest],
|
|
952
|
+
Awaitable[~.ListPrivateConnectionsResponse]]:
|
|
953
|
+
A function that, when called, will call the underlying RPC
|
|
954
|
+
on the server.
|
|
955
|
+
"""
|
|
956
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
957
|
+
# the request.
|
|
958
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
959
|
+
# to pass in the functions for each.
|
|
960
|
+
if "list_private_connections" not in self._stubs:
|
|
961
|
+
self._stubs["list_private_connections"] = self._logged_channel.unary_unary(
|
|
962
|
+
"/google.cloud.datastream.v1.Datastream/ListPrivateConnections",
|
|
963
|
+
request_serializer=datastream.ListPrivateConnectionsRequest.serialize,
|
|
964
|
+
response_deserializer=datastream.ListPrivateConnectionsResponse.deserialize,
|
|
965
|
+
)
|
|
966
|
+
return self._stubs["list_private_connections"]
|
|
967
|
+
|
|
968
|
+
@property
|
|
969
|
+
def delete_private_connection(
|
|
970
|
+
self,
|
|
971
|
+
) -> Callable[
|
|
972
|
+
[datastream.DeletePrivateConnectionRequest], Awaitable[operations_pb2.Operation]
|
|
973
|
+
]:
|
|
974
|
+
r"""Return a callable for the delete private connection method over gRPC.
|
|
975
|
+
|
|
976
|
+
Use this method to delete a private connectivity
|
|
977
|
+
configuration.
|
|
978
|
+
|
|
979
|
+
Returns:
|
|
980
|
+
Callable[[~.DeletePrivateConnectionRequest],
|
|
981
|
+
Awaitable[~.Operation]]:
|
|
982
|
+
A function that, when called, will call the underlying RPC
|
|
983
|
+
on the server.
|
|
984
|
+
"""
|
|
985
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
986
|
+
# the request.
|
|
987
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
988
|
+
# to pass in the functions for each.
|
|
989
|
+
if "delete_private_connection" not in self._stubs:
|
|
990
|
+
self._stubs["delete_private_connection"] = self._logged_channel.unary_unary(
|
|
991
|
+
"/google.cloud.datastream.v1.Datastream/DeletePrivateConnection",
|
|
992
|
+
request_serializer=datastream.DeletePrivateConnectionRequest.serialize,
|
|
993
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
994
|
+
)
|
|
995
|
+
return self._stubs["delete_private_connection"]
|
|
996
|
+
|
|
997
|
+
@property
|
|
998
|
+
def create_route(
|
|
999
|
+
self,
|
|
1000
|
+
) -> Callable[[datastream.CreateRouteRequest], Awaitable[operations_pb2.Operation]]:
|
|
1001
|
+
r"""Return a callable for the create route method over gRPC.
|
|
1002
|
+
|
|
1003
|
+
Use this method to create a route for a private
|
|
1004
|
+
connectivity configuration in a project and location.
|
|
1005
|
+
|
|
1006
|
+
Returns:
|
|
1007
|
+
Callable[[~.CreateRouteRequest],
|
|
1008
|
+
Awaitable[~.Operation]]:
|
|
1009
|
+
A function that, when called, will call the underlying RPC
|
|
1010
|
+
on the server.
|
|
1011
|
+
"""
|
|
1012
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1013
|
+
# the request.
|
|
1014
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1015
|
+
# to pass in the functions for each.
|
|
1016
|
+
if "create_route" not in self._stubs:
|
|
1017
|
+
self._stubs["create_route"] = self._logged_channel.unary_unary(
|
|
1018
|
+
"/google.cloud.datastream.v1.Datastream/CreateRoute",
|
|
1019
|
+
request_serializer=datastream.CreateRouteRequest.serialize,
|
|
1020
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1021
|
+
)
|
|
1022
|
+
return self._stubs["create_route"]
|
|
1023
|
+
|
|
1024
|
+
@property
|
|
1025
|
+
def get_route(
|
|
1026
|
+
self,
|
|
1027
|
+
) -> Callable[[datastream.GetRouteRequest], Awaitable[datastream_resources.Route]]:
|
|
1028
|
+
r"""Return a callable for the get route method over gRPC.
|
|
1029
|
+
|
|
1030
|
+
Use this method to get details about a route.
|
|
1031
|
+
|
|
1032
|
+
Returns:
|
|
1033
|
+
Callable[[~.GetRouteRequest],
|
|
1034
|
+
Awaitable[~.Route]]:
|
|
1035
|
+
A function that, when called, will call the underlying RPC
|
|
1036
|
+
on the server.
|
|
1037
|
+
"""
|
|
1038
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1039
|
+
# the request.
|
|
1040
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1041
|
+
# to pass in the functions for each.
|
|
1042
|
+
if "get_route" not in self._stubs:
|
|
1043
|
+
self._stubs["get_route"] = self._logged_channel.unary_unary(
|
|
1044
|
+
"/google.cloud.datastream.v1.Datastream/GetRoute",
|
|
1045
|
+
request_serializer=datastream.GetRouteRequest.serialize,
|
|
1046
|
+
response_deserializer=datastream_resources.Route.deserialize,
|
|
1047
|
+
)
|
|
1048
|
+
return self._stubs["get_route"]
|
|
1049
|
+
|
|
1050
|
+
@property
|
|
1051
|
+
def list_routes(
|
|
1052
|
+
self,
|
|
1053
|
+
) -> Callable[
|
|
1054
|
+
[datastream.ListRoutesRequest], Awaitable[datastream.ListRoutesResponse]
|
|
1055
|
+
]:
|
|
1056
|
+
r"""Return a callable for the list routes method over gRPC.
|
|
1057
|
+
|
|
1058
|
+
Use this method to list routes created for a private
|
|
1059
|
+
connectivity configuration in a project and location.
|
|
1060
|
+
|
|
1061
|
+
Returns:
|
|
1062
|
+
Callable[[~.ListRoutesRequest],
|
|
1063
|
+
Awaitable[~.ListRoutesResponse]]:
|
|
1064
|
+
A function that, when called, will call the underlying RPC
|
|
1065
|
+
on the server.
|
|
1066
|
+
"""
|
|
1067
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1068
|
+
# the request.
|
|
1069
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1070
|
+
# to pass in the functions for each.
|
|
1071
|
+
if "list_routes" not in self._stubs:
|
|
1072
|
+
self._stubs["list_routes"] = self._logged_channel.unary_unary(
|
|
1073
|
+
"/google.cloud.datastream.v1.Datastream/ListRoutes",
|
|
1074
|
+
request_serializer=datastream.ListRoutesRequest.serialize,
|
|
1075
|
+
response_deserializer=datastream.ListRoutesResponse.deserialize,
|
|
1076
|
+
)
|
|
1077
|
+
return self._stubs["list_routes"]
|
|
1078
|
+
|
|
1079
|
+
@property
|
|
1080
|
+
def delete_route(
|
|
1081
|
+
self,
|
|
1082
|
+
) -> Callable[[datastream.DeleteRouteRequest], Awaitable[operations_pb2.Operation]]:
|
|
1083
|
+
r"""Return a callable for the delete route method over gRPC.
|
|
1084
|
+
|
|
1085
|
+
Use this method to delete a route.
|
|
1086
|
+
|
|
1087
|
+
Returns:
|
|
1088
|
+
Callable[[~.DeleteRouteRequest],
|
|
1089
|
+
Awaitable[~.Operation]]:
|
|
1090
|
+
A function that, when called, will call the underlying RPC
|
|
1091
|
+
on the server.
|
|
1092
|
+
"""
|
|
1093
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1094
|
+
# the request.
|
|
1095
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1096
|
+
# to pass in the functions for each.
|
|
1097
|
+
if "delete_route" not in self._stubs:
|
|
1098
|
+
self._stubs["delete_route"] = self._logged_channel.unary_unary(
|
|
1099
|
+
"/google.cloud.datastream.v1.Datastream/DeleteRoute",
|
|
1100
|
+
request_serializer=datastream.DeleteRouteRequest.serialize,
|
|
1101
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1102
|
+
)
|
|
1103
|
+
return self._stubs["delete_route"]
|
|
1104
|
+
|
|
1105
|
+
def _prep_wrapped_messages(self, client_info):
|
|
1106
|
+
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
|
|
1107
|
+
self._wrapped_methods = {
|
|
1108
|
+
self.list_connection_profiles: self._wrap_method(
|
|
1109
|
+
self.list_connection_profiles,
|
|
1110
|
+
default_timeout=None,
|
|
1111
|
+
client_info=client_info,
|
|
1112
|
+
),
|
|
1113
|
+
self.get_connection_profile: self._wrap_method(
|
|
1114
|
+
self.get_connection_profile,
|
|
1115
|
+
default_timeout=None,
|
|
1116
|
+
client_info=client_info,
|
|
1117
|
+
),
|
|
1118
|
+
self.create_connection_profile: self._wrap_method(
|
|
1119
|
+
self.create_connection_profile,
|
|
1120
|
+
default_timeout=60.0,
|
|
1121
|
+
client_info=client_info,
|
|
1122
|
+
),
|
|
1123
|
+
self.update_connection_profile: self._wrap_method(
|
|
1124
|
+
self.update_connection_profile,
|
|
1125
|
+
default_timeout=60.0,
|
|
1126
|
+
client_info=client_info,
|
|
1127
|
+
),
|
|
1128
|
+
self.delete_connection_profile: self._wrap_method(
|
|
1129
|
+
self.delete_connection_profile,
|
|
1130
|
+
default_timeout=60.0,
|
|
1131
|
+
client_info=client_info,
|
|
1132
|
+
),
|
|
1133
|
+
self.discover_connection_profile: self._wrap_method(
|
|
1134
|
+
self.discover_connection_profile,
|
|
1135
|
+
default_timeout=None,
|
|
1136
|
+
client_info=client_info,
|
|
1137
|
+
),
|
|
1138
|
+
self.list_streams: self._wrap_method(
|
|
1139
|
+
self.list_streams,
|
|
1140
|
+
default_timeout=None,
|
|
1141
|
+
client_info=client_info,
|
|
1142
|
+
),
|
|
1143
|
+
self.get_stream: self._wrap_method(
|
|
1144
|
+
self.get_stream,
|
|
1145
|
+
default_timeout=None,
|
|
1146
|
+
client_info=client_info,
|
|
1147
|
+
),
|
|
1148
|
+
self.create_stream: self._wrap_method(
|
|
1149
|
+
self.create_stream,
|
|
1150
|
+
default_timeout=60.0,
|
|
1151
|
+
client_info=client_info,
|
|
1152
|
+
),
|
|
1153
|
+
self.update_stream: self._wrap_method(
|
|
1154
|
+
self.update_stream,
|
|
1155
|
+
default_timeout=60.0,
|
|
1156
|
+
client_info=client_info,
|
|
1157
|
+
),
|
|
1158
|
+
self.delete_stream: self._wrap_method(
|
|
1159
|
+
self.delete_stream,
|
|
1160
|
+
default_timeout=60.0,
|
|
1161
|
+
client_info=client_info,
|
|
1162
|
+
),
|
|
1163
|
+
self.run_stream: self._wrap_method(
|
|
1164
|
+
self.run_stream,
|
|
1165
|
+
default_timeout=None,
|
|
1166
|
+
client_info=client_info,
|
|
1167
|
+
),
|
|
1168
|
+
self.get_stream_object: self._wrap_method(
|
|
1169
|
+
self.get_stream_object,
|
|
1170
|
+
default_timeout=None,
|
|
1171
|
+
client_info=client_info,
|
|
1172
|
+
),
|
|
1173
|
+
self.lookup_stream_object: self._wrap_method(
|
|
1174
|
+
self.lookup_stream_object,
|
|
1175
|
+
default_timeout=None,
|
|
1176
|
+
client_info=client_info,
|
|
1177
|
+
),
|
|
1178
|
+
self.list_stream_objects: self._wrap_method(
|
|
1179
|
+
self.list_stream_objects,
|
|
1180
|
+
default_timeout=None,
|
|
1181
|
+
client_info=client_info,
|
|
1182
|
+
),
|
|
1183
|
+
self.start_backfill_job: self._wrap_method(
|
|
1184
|
+
self.start_backfill_job,
|
|
1185
|
+
default_timeout=None,
|
|
1186
|
+
client_info=client_info,
|
|
1187
|
+
),
|
|
1188
|
+
self.stop_backfill_job: self._wrap_method(
|
|
1189
|
+
self.stop_backfill_job,
|
|
1190
|
+
default_timeout=None,
|
|
1191
|
+
client_info=client_info,
|
|
1192
|
+
),
|
|
1193
|
+
self.fetch_static_ips: self._wrap_method(
|
|
1194
|
+
self.fetch_static_ips,
|
|
1195
|
+
default_timeout=None,
|
|
1196
|
+
client_info=client_info,
|
|
1197
|
+
),
|
|
1198
|
+
self.create_private_connection: self._wrap_method(
|
|
1199
|
+
self.create_private_connection,
|
|
1200
|
+
default_timeout=60.0,
|
|
1201
|
+
client_info=client_info,
|
|
1202
|
+
),
|
|
1203
|
+
self.get_private_connection: self._wrap_method(
|
|
1204
|
+
self.get_private_connection,
|
|
1205
|
+
default_timeout=None,
|
|
1206
|
+
client_info=client_info,
|
|
1207
|
+
),
|
|
1208
|
+
self.list_private_connections: self._wrap_method(
|
|
1209
|
+
self.list_private_connections,
|
|
1210
|
+
default_timeout=None,
|
|
1211
|
+
client_info=client_info,
|
|
1212
|
+
),
|
|
1213
|
+
self.delete_private_connection: self._wrap_method(
|
|
1214
|
+
self.delete_private_connection,
|
|
1215
|
+
default_timeout=60.0,
|
|
1216
|
+
client_info=client_info,
|
|
1217
|
+
),
|
|
1218
|
+
self.create_route: self._wrap_method(
|
|
1219
|
+
self.create_route,
|
|
1220
|
+
default_timeout=60.0,
|
|
1221
|
+
client_info=client_info,
|
|
1222
|
+
),
|
|
1223
|
+
self.get_route: self._wrap_method(
|
|
1224
|
+
self.get_route,
|
|
1225
|
+
default_timeout=None,
|
|
1226
|
+
client_info=client_info,
|
|
1227
|
+
),
|
|
1228
|
+
self.list_routes: self._wrap_method(
|
|
1229
|
+
self.list_routes,
|
|
1230
|
+
default_timeout=None,
|
|
1231
|
+
client_info=client_info,
|
|
1232
|
+
),
|
|
1233
|
+
self.delete_route: self._wrap_method(
|
|
1234
|
+
self.delete_route,
|
|
1235
|
+
default_timeout=60.0,
|
|
1236
|
+
client_info=client_info,
|
|
1237
|
+
),
|
|
1238
|
+
self.get_location: self._wrap_method(
|
|
1239
|
+
self.get_location,
|
|
1240
|
+
default_timeout=None,
|
|
1241
|
+
client_info=client_info,
|
|
1242
|
+
),
|
|
1243
|
+
self.list_locations: self._wrap_method(
|
|
1244
|
+
self.list_locations,
|
|
1245
|
+
default_timeout=None,
|
|
1246
|
+
client_info=client_info,
|
|
1247
|
+
),
|
|
1248
|
+
self.cancel_operation: self._wrap_method(
|
|
1249
|
+
self.cancel_operation,
|
|
1250
|
+
default_timeout=None,
|
|
1251
|
+
client_info=client_info,
|
|
1252
|
+
),
|
|
1253
|
+
self.delete_operation: self._wrap_method(
|
|
1254
|
+
self.delete_operation,
|
|
1255
|
+
default_timeout=None,
|
|
1256
|
+
client_info=client_info,
|
|
1257
|
+
),
|
|
1258
|
+
self.get_operation: self._wrap_method(
|
|
1259
|
+
self.get_operation,
|
|
1260
|
+
default_timeout=None,
|
|
1261
|
+
client_info=client_info,
|
|
1262
|
+
),
|
|
1263
|
+
self.list_operations: self._wrap_method(
|
|
1264
|
+
self.list_operations,
|
|
1265
|
+
default_timeout=None,
|
|
1266
|
+
client_info=client_info,
|
|
1267
|
+
),
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
def _wrap_method(self, func, *args, **kwargs):
|
|
1271
|
+
if self._wrap_with_kind: # pragma: NO COVER
|
|
1272
|
+
kwargs["kind"] = self.kind
|
|
1273
|
+
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
|
|
1274
|
+
|
|
1275
|
+
def close(self):
|
|
1276
|
+
return self._logged_channel.close()
|
|
1277
|
+
|
|
1278
|
+
@property
|
|
1279
|
+
def kind(self) -> str:
|
|
1280
|
+
return "grpc_asyncio"
|
|
1281
|
+
|
|
1282
|
+
@property
|
|
1283
|
+
def delete_operation(
|
|
1284
|
+
self,
|
|
1285
|
+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
|
|
1286
|
+
r"""Return a callable for the delete_operation method over gRPC."""
|
|
1287
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1288
|
+
# the request.
|
|
1289
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1290
|
+
# to pass in the functions for each.
|
|
1291
|
+
if "delete_operation" not in self._stubs:
|
|
1292
|
+
self._stubs["delete_operation"] = self._logged_channel.unary_unary(
|
|
1293
|
+
"/google.longrunning.Operations/DeleteOperation",
|
|
1294
|
+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
|
|
1295
|
+
response_deserializer=None,
|
|
1296
|
+
)
|
|
1297
|
+
return self._stubs["delete_operation"]
|
|
1298
|
+
|
|
1299
|
+
@property
|
|
1300
|
+
def cancel_operation(
|
|
1301
|
+
self,
|
|
1302
|
+
) -> Callable[[operations_pb2.CancelOperationRequest], None]:
|
|
1303
|
+
r"""Return a callable for the cancel_operation method over gRPC."""
|
|
1304
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1305
|
+
# the request.
|
|
1306
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1307
|
+
# to pass in the functions for each.
|
|
1308
|
+
if "cancel_operation" not in self._stubs:
|
|
1309
|
+
self._stubs["cancel_operation"] = self._logged_channel.unary_unary(
|
|
1310
|
+
"/google.longrunning.Operations/CancelOperation",
|
|
1311
|
+
request_serializer=operations_pb2.CancelOperationRequest.SerializeToString,
|
|
1312
|
+
response_deserializer=None,
|
|
1313
|
+
)
|
|
1314
|
+
return self._stubs["cancel_operation"]
|
|
1315
|
+
|
|
1316
|
+
@property
|
|
1317
|
+
def get_operation(
|
|
1318
|
+
self,
|
|
1319
|
+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
|
|
1320
|
+
r"""Return a callable for the get_operation method over gRPC."""
|
|
1321
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1322
|
+
# the request.
|
|
1323
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1324
|
+
# to pass in the functions for each.
|
|
1325
|
+
if "get_operation" not in self._stubs:
|
|
1326
|
+
self._stubs["get_operation"] = self._logged_channel.unary_unary(
|
|
1327
|
+
"/google.longrunning.Operations/GetOperation",
|
|
1328
|
+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
|
|
1329
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1330
|
+
)
|
|
1331
|
+
return self._stubs["get_operation"]
|
|
1332
|
+
|
|
1333
|
+
@property
|
|
1334
|
+
def list_operations(
|
|
1335
|
+
self,
|
|
1336
|
+
) -> Callable[
|
|
1337
|
+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
|
|
1338
|
+
]:
|
|
1339
|
+
r"""Return a callable for the list_operations method over gRPC."""
|
|
1340
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1341
|
+
# the request.
|
|
1342
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1343
|
+
# to pass in the functions for each.
|
|
1344
|
+
if "list_operations" not in self._stubs:
|
|
1345
|
+
self._stubs["list_operations"] = self._logged_channel.unary_unary(
|
|
1346
|
+
"/google.longrunning.Operations/ListOperations",
|
|
1347
|
+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
|
|
1348
|
+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
|
|
1349
|
+
)
|
|
1350
|
+
return self._stubs["list_operations"]
|
|
1351
|
+
|
|
1352
|
+
@property
|
|
1353
|
+
def list_locations(
|
|
1354
|
+
self,
|
|
1355
|
+
) -> Callable[
|
|
1356
|
+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
|
|
1357
|
+
]:
|
|
1358
|
+
r"""Return a callable for the list locations method over gRPC."""
|
|
1359
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1360
|
+
# the request.
|
|
1361
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1362
|
+
# to pass in the functions for each.
|
|
1363
|
+
if "list_locations" not in self._stubs:
|
|
1364
|
+
self._stubs["list_locations"] = self._logged_channel.unary_unary(
|
|
1365
|
+
"/google.cloud.location.Locations/ListLocations",
|
|
1366
|
+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
|
|
1367
|
+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
|
|
1368
|
+
)
|
|
1369
|
+
return self._stubs["list_locations"]
|
|
1370
|
+
|
|
1371
|
+
@property
|
|
1372
|
+
def get_location(
|
|
1373
|
+
self,
|
|
1374
|
+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
|
|
1375
|
+
r"""Return a callable for the list locations method over gRPC."""
|
|
1376
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1377
|
+
# the request.
|
|
1378
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1379
|
+
# to pass in the functions for each.
|
|
1380
|
+
if "get_location" not in self._stubs:
|
|
1381
|
+
self._stubs["get_location"] = self._logged_channel.unary_unary(
|
|
1382
|
+
"/google.cloud.location.Locations/GetLocation",
|
|
1383
|
+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
|
|
1384
|
+
response_deserializer=locations_pb2.Location.FromString,
|
|
1385
|
+
)
|
|
1386
|
+
return self._stubs["get_location"]
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
__all__ = ("DatastreamGrpcAsyncIOTransport",)
|