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