google-cloud-dataform 0.6.1__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 (42) hide show
  1. google/cloud/dataform/__init__.py +247 -0
  2. google/cloud/dataform/gapic_version.py +16 -0
  3. google/cloud/dataform/py.typed +2 -0
  4. google/cloud/dataform_v1/__init__.py +244 -0
  5. google/cloud/dataform_v1/gapic_metadata.json +838 -0
  6. google/cloud/dataform_v1/gapic_version.py +16 -0
  7. google/cloud/dataform_v1/py.typed +2 -0
  8. google/cloud/dataform_v1/services/__init__.py +15 -0
  9. google/cloud/dataform_v1/services/dataform/__init__.py +22 -0
  10. google/cloud/dataform_v1/services/dataform/async_client.py +6371 -0
  11. google/cloud/dataform_v1/services/dataform/client.py +6895 -0
  12. google/cloud/dataform_v1/services/dataform/pagers.py +1925 -0
  13. google/cloud/dataform_v1/services/dataform/transports/__init__.py +36 -0
  14. google/cloud/dataform_v1/services/dataform/transports/base.py +1060 -0
  15. google/cloud/dataform_v1/services/dataform/transports/grpc.py +1980 -0
  16. google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +2337 -0
  17. google/cloud/dataform_v1/services/dataform/transports/rest.py +12350 -0
  18. google/cloud/dataform_v1/services/dataform/transports/rest_base.py +3028 -0
  19. google/cloud/dataform_v1/types/__init__.py +236 -0
  20. google/cloud/dataform_v1/types/dataform.py +4157 -0
  21. google/cloud/dataform_v1beta1/__init__.py +244 -0
  22. google/cloud/dataform_v1beta1/gapic_metadata.json +838 -0
  23. google/cloud/dataform_v1beta1/gapic_version.py +16 -0
  24. google/cloud/dataform_v1beta1/py.typed +2 -0
  25. google/cloud/dataform_v1beta1/services/__init__.py +15 -0
  26. google/cloud/dataform_v1beta1/services/dataform/__init__.py +22 -0
  27. google/cloud/dataform_v1beta1/services/dataform/async_client.py +6371 -0
  28. google/cloud/dataform_v1beta1/services/dataform/client.py +6895 -0
  29. google/cloud/dataform_v1beta1/services/dataform/pagers.py +1925 -0
  30. google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +36 -0
  31. google/cloud/dataform_v1beta1/services/dataform/transports/base.py +1060 -0
  32. google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +1980 -0
  33. google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +2337 -0
  34. google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +12350 -0
  35. google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +3028 -0
  36. google/cloud/dataform_v1beta1/types/__init__.py +236 -0
  37. google/cloud/dataform_v1beta1/types/dataform.py +4169 -0
  38. google_cloud_dataform-0.6.1.dist-info/LICENSE +202 -0
  39. google_cloud_dataform-0.6.1.dist-info/METADATA +229 -0
  40. google_cloud_dataform-0.6.1.dist-info/RECORD +42 -0
  41. google_cloud_dataform-0.6.1.dist-info/WHEEL +5 -0
  42. google_cloud_dataform-0.6.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1980 @@
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
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.protobuf import empty_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.dataform_v1.types import dataform
36
+
37
+ from .base import DEFAULT_CLIENT_INFO, DataformTransport
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.dataform.v1.Dataform",
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.dataform.v1.Dataform",
107
+ "rpcName": client_call_details.method,
108
+ "response": grpc_response,
109
+ "metadata": grpc_response["metadata"],
110
+ },
111
+ )
112
+ return response
113
+
114
+
115
+ class DataformGrpcTransport(DataformTransport):
116
+ """gRPC backend transport for Dataform.
117
+
118
+ Dataform is a service to develop, create, document, test, and
119
+ update curated tables in BigQuery.
120
+
121
+ This class defines the same methods as the primary client, so the
122
+ primary client can load the underlying transport implementation
123
+ and call it.
124
+
125
+ It sends protocol buffers over the wire using gRPC (which is built on
126
+ top of HTTP/2); the ``grpcio`` package must be installed.
127
+ """
128
+
129
+ _stubs: Dict[str, Callable]
130
+
131
+ def __init__(
132
+ self,
133
+ *,
134
+ host: str = "dataform.googleapis.com",
135
+ credentials: Optional[ga_credentials.Credentials] = None,
136
+ credentials_file: Optional[str] = None,
137
+ scopes: Optional[Sequence[str]] = None,
138
+ channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
139
+ api_mtls_endpoint: Optional[str] = None,
140
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
141
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
142
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
143
+ quota_project_id: Optional[str] = None,
144
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
145
+ always_use_jwt_access: Optional[bool] = False,
146
+ api_audience: Optional[str] = None,
147
+ ) -> None:
148
+ """Instantiate the transport.
149
+
150
+ Args:
151
+ host (Optional[str]):
152
+ The hostname to connect to (default: 'dataform.googleapis.com').
153
+ credentials (Optional[google.auth.credentials.Credentials]): The
154
+ authorization credentials to attach to requests. These
155
+ credentials identify the application to the service; if none
156
+ are specified, the client will attempt to ascertain the
157
+ credentials from the environment.
158
+ This argument is ignored if a ``channel`` instance is provided.
159
+ credentials_file (Optional[str]): A file with credentials that can
160
+ be loaded with :func:`google.auth.load_credentials_from_file`.
161
+ This argument is ignored if a ``channel`` instance is provided.
162
+ scopes (Optional(Sequence[str])): A list of scopes. This argument is
163
+ ignored if a ``channel`` instance is provided.
164
+ channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
165
+ A ``Channel`` instance through which to make calls, or a Callable
166
+ that constructs and returns one. If set to None, ``self.create_channel``
167
+ is used to create the channel. If a Callable is given, it will be called
168
+ with the same arguments as used in ``self.create_channel``.
169
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
170
+ If provided, it overrides the ``host`` argument and tries to create
171
+ a mutual TLS channel with client SSL credentials from
172
+ ``client_cert_source`` or application default SSL credentials.
173
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
174
+ Deprecated. A callback to provide client SSL certificate bytes and
175
+ private key bytes, both in PEM format. It is ignored if
176
+ ``api_mtls_endpoint`` is None.
177
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
178
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
179
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
180
+ A callback to provide client certificate bytes and private key bytes,
181
+ both in PEM format. It is used to configure a mutual TLS channel. It is
182
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
183
+ quota_project_id (Optional[str]): An optional project to use for billing
184
+ and quota.
185
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
186
+ The client info used to send a user-agent string along with
187
+ API requests. If ``None``, then default info will be used.
188
+ Generally, you only need to set this if you're developing
189
+ your own client library.
190
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
191
+ be used for service account credentials.
192
+
193
+ Raises:
194
+ google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
195
+ creation failed for any reason.
196
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
197
+ and ``credentials_file`` are passed.
198
+ """
199
+ self._grpc_channel = None
200
+ self._ssl_channel_credentials = ssl_channel_credentials
201
+ self._stubs: Dict[str, Callable] = {}
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 = "dataform.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 list_repositories(
330
+ self,
331
+ ) -> Callable[
332
+ [dataform.ListRepositoriesRequest], dataform.ListRepositoriesResponse
333
+ ]:
334
+ r"""Return a callable for the list repositories method over gRPC.
335
+
336
+ Lists Repositories in a given project and location.
337
+
338
+ Returns:
339
+ Callable[[~.ListRepositoriesRequest],
340
+ ~.ListRepositoriesResponse]:
341
+ A function that, when called, will call the underlying RPC
342
+ on the server.
343
+ """
344
+ # Generate a "stub function" on-the-fly which will actually make
345
+ # the request.
346
+ # gRPC handles serialization and deserialization, so we just need
347
+ # to pass in the functions for each.
348
+ if "list_repositories" not in self._stubs:
349
+ self._stubs["list_repositories"] = self._logged_channel.unary_unary(
350
+ "/google.cloud.dataform.v1.Dataform/ListRepositories",
351
+ request_serializer=dataform.ListRepositoriesRequest.serialize,
352
+ response_deserializer=dataform.ListRepositoriesResponse.deserialize,
353
+ )
354
+ return self._stubs["list_repositories"]
355
+
356
+ @property
357
+ def get_repository(
358
+ self,
359
+ ) -> Callable[[dataform.GetRepositoryRequest], dataform.Repository]:
360
+ r"""Return a callable for the get repository method over gRPC.
361
+
362
+ Fetches a single Repository.
363
+
364
+ Returns:
365
+ Callable[[~.GetRepositoryRequest],
366
+ ~.Repository]:
367
+ A function that, when called, will call the underlying RPC
368
+ on the server.
369
+ """
370
+ # Generate a "stub function" on-the-fly which will actually make
371
+ # the request.
372
+ # gRPC handles serialization and deserialization, so we just need
373
+ # to pass in the functions for each.
374
+ if "get_repository" not in self._stubs:
375
+ self._stubs["get_repository"] = self._logged_channel.unary_unary(
376
+ "/google.cloud.dataform.v1.Dataform/GetRepository",
377
+ request_serializer=dataform.GetRepositoryRequest.serialize,
378
+ response_deserializer=dataform.Repository.deserialize,
379
+ )
380
+ return self._stubs["get_repository"]
381
+
382
+ @property
383
+ def create_repository(
384
+ self,
385
+ ) -> Callable[[dataform.CreateRepositoryRequest], dataform.Repository]:
386
+ r"""Return a callable for the create repository method over gRPC.
387
+
388
+ Creates a new Repository in a given project and
389
+ location.
390
+
391
+ Returns:
392
+ Callable[[~.CreateRepositoryRequest],
393
+ ~.Repository]:
394
+ A function that, when called, will call the underlying RPC
395
+ on the server.
396
+ """
397
+ # Generate a "stub function" on-the-fly which will actually make
398
+ # the request.
399
+ # gRPC handles serialization and deserialization, so we just need
400
+ # to pass in the functions for each.
401
+ if "create_repository" not in self._stubs:
402
+ self._stubs["create_repository"] = self._logged_channel.unary_unary(
403
+ "/google.cloud.dataform.v1.Dataform/CreateRepository",
404
+ request_serializer=dataform.CreateRepositoryRequest.serialize,
405
+ response_deserializer=dataform.Repository.deserialize,
406
+ )
407
+ return self._stubs["create_repository"]
408
+
409
+ @property
410
+ def update_repository(
411
+ self,
412
+ ) -> Callable[[dataform.UpdateRepositoryRequest], dataform.Repository]:
413
+ r"""Return a callable for the update repository method over gRPC.
414
+
415
+ Updates a single Repository.
416
+
417
+ **Note:** *This method does not fully implement*, (see
418
+ `AIP/134 <https://google.aip.dev/134>`__, in particular:
419
+
420
+ - The wildcard entry (**\***) is treated as a bad request
421
+ - When the **field_mask** is omitted, instead of only updating
422
+ the set fields, the request is treated as a full update on
423
+ all modifiable fields
424
+
425
+ Returns:
426
+ Callable[[~.UpdateRepositoryRequest],
427
+ ~.Repository]:
428
+ A function that, when called, will call the underlying RPC
429
+ on the server.
430
+ """
431
+ # Generate a "stub function" on-the-fly which will actually make
432
+ # the request.
433
+ # gRPC handles serialization and deserialization, so we just need
434
+ # to pass in the functions for each.
435
+ if "update_repository" not in self._stubs:
436
+ self._stubs["update_repository"] = self._logged_channel.unary_unary(
437
+ "/google.cloud.dataform.v1.Dataform/UpdateRepository",
438
+ request_serializer=dataform.UpdateRepositoryRequest.serialize,
439
+ response_deserializer=dataform.Repository.deserialize,
440
+ )
441
+ return self._stubs["update_repository"]
442
+
443
+ @property
444
+ def delete_repository(
445
+ self,
446
+ ) -> Callable[[dataform.DeleteRepositoryRequest], empty_pb2.Empty]:
447
+ r"""Return a callable for the delete repository method over gRPC.
448
+
449
+ Deletes a single Repository.
450
+
451
+ Returns:
452
+ Callable[[~.DeleteRepositoryRequest],
453
+ ~.Empty]:
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 "delete_repository" not in self._stubs:
462
+ self._stubs["delete_repository"] = self._logged_channel.unary_unary(
463
+ "/google.cloud.dataform.v1.Dataform/DeleteRepository",
464
+ request_serializer=dataform.DeleteRepositoryRequest.serialize,
465
+ response_deserializer=empty_pb2.Empty.FromString,
466
+ )
467
+ return self._stubs["delete_repository"]
468
+
469
+ @property
470
+ def commit_repository_changes(
471
+ self,
472
+ ) -> Callable[
473
+ [dataform.CommitRepositoryChangesRequest],
474
+ dataform.CommitRepositoryChangesResponse,
475
+ ]:
476
+ r"""Return a callable for the commit repository changes method over gRPC.
477
+
478
+ Applies a Git commit to a Repository. The Repository must not
479
+ have a value for ``git_remote_settings.url``.
480
+
481
+ Returns:
482
+ Callable[[~.CommitRepositoryChangesRequest],
483
+ ~.CommitRepositoryChangesResponse]:
484
+ A function that, when called, will call the underlying RPC
485
+ on the server.
486
+ """
487
+ # Generate a "stub function" on-the-fly which will actually make
488
+ # the request.
489
+ # gRPC handles serialization and deserialization, so we just need
490
+ # to pass in the functions for each.
491
+ if "commit_repository_changes" not in self._stubs:
492
+ self._stubs["commit_repository_changes"] = self._logged_channel.unary_unary(
493
+ "/google.cloud.dataform.v1.Dataform/CommitRepositoryChanges",
494
+ request_serializer=dataform.CommitRepositoryChangesRequest.serialize,
495
+ response_deserializer=dataform.CommitRepositoryChangesResponse.deserialize,
496
+ )
497
+ return self._stubs["commit_repository_changes"]
498
+
499
+ @property
500
+ def read_repository_file(
501
+ self,
502
+ ) -> Callable[
503
+ [dataform.ReadRepositoryFileRequest], dataform.ReadRepositoryFileResponse
504
+ ]:
505
+ r"""Return a callable for the read repository file method over gRPC.
506
+
507
+ Returns the contents of a file (inside a Repository). The
508
+ Repository must not have a value for
509
+ ``git_remote_settings.url``.
510
+
511
+ Returns:
512
+ Callable[[~.ReadRepositoryFileRequest],
513
+ ~.ReadRepositoryFileResponse]:
514
+ A function that, when called, will call the underlying RPC
515
+ on the server.
516
+ """
517
+ # Generate a "stub function" on-the-fly which will actually make
518
+ # the request.
519
+ # gRPC handles serialization and deserialization, so we just need
520
+ # to pass in the functions for each.
521
+ if "read_repository_file" not in self._stubs:
522
+ self._stubs["read_repository_file"] = self._logged_channel.unary_unary(
523
+ "/google.cloud.dataform.v1.Dataform/ReadRepositoryFile",
524
+ request_serializer=dataform.ReadRepositoryFileRequest.serialize,
525
+ response_deserializer=dataform.ReadRepositoryFileResponse.deserialize,
526
+ )
527
+ return self._stubs["read_repository_file"]
528
+
529
+ @property
530
+ def query_repository_directory_contents(
531
+ self,
532
+ ) -> Callable[
533
+ [dataform.QueryRepositoryDirectoryContentsRequest],
534
+ dataform.QueryRepositoryDirectoryContentsResponse,
535
+ ]:
536
+ r"""Return a callable for the query repository directory
537
+ contents method over gRPC.
538
+
539
+ Returns the contents of a given Repository directory. The
540
+ Repository must not have a value for
541
+ ``git_remote_settings.url``.
542
+
543
+ Returns:
544
+ Callable[[~.QueryRepositoryDirectoryContentsRequest],
545
+ ~.QueryRepositoryDirectoryContentsResponse]:
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 "query_repository_directory_contents" not in self._stubs:
554
+ self._stubs[
555
+ "query_repository_directory_contents"
556
+ ] = self._logged_channel.unary_unary(
557
+ "/google.cloud.dataform.v1.Dataform/QueryRepositoryDirectoryContents",
558
+ request_serializer=dataform.QueryRepositoryDirectoryContentsRequest.serialize,
559
+ response_deserializer=dataform.QueryRepositoryDirectoryContentsResponse.deserialize,
560
+ )
561
+ return self._stubs["query_repository_directory_contents"]
562
+
563
+ @property
564
+ def fetch_repository_history(
565
+ self,
566
+ ) -> Callable[
567
+ [dataform.FetchRepositoryHistoryRequest],
568
+ dataform.FetchRepositoryHistoryResponse,
569
+ ]:
570
+ r"""Return a callable for the fetch repository history method over gRPC.
571
+
572
+ Fetches a Repository's history of commits. The Repository must
573
+ not have a value for ``git_remote_settings.url``.
574
+
575
+ Returns:
576
+ Callable[[~.FetchRepositoryHistoryRequest],
577
+ ~.FetchRepositoryHistoryResponse]:
578
+ A function that, when called, will call the underlying RPC
579
+ on the server.
580
+ """
581
+ # Generate a "stub function" on-the-fly which will actually make
582
+ # the request.
583
+ # gRPC handles serialization and deserialization, so we just need
584
+ # to pass in the functions for each.
585
+ if "fetch_repository_history" not in self._stubs:
586
+ self._stubs["fetch_repository_history"] = self._logged_channel.unary_unary(
587
+ "/google.cloud.dataform.v1.Dataform/FetchRepositoryHistory",
588
+ request_serializer=dataform.FetchRepositoryHistoryRequest.serialize,
589
+ response_deserializer=dataform.FetchRepositoryHistoryResponse.deserialize,
590
+ )
591
+ return self._stubs["fetch_repository_history"]
592
+
593
+ @property
594
+ def compute_repository_access_token_status(
595
+ self,
596
+ ) -> Callable[
597
+ [dataform.ComputeRepositoryAccessTokenStatusRequest],
598
+ dataform.ComputeRepositoryAccessTokenStatusResponse,
599
+ ]:
600
+ r"""Return a callable for the compute repository access
601
+ token status method over gRPC.
602
+
603
+ Computes a Repository's Git access token status.
604
+
605
+ Returns:
606
+ Callable[[~.ComputeRepositoryAccessTokenStatusRequest],
607
+ ~.ComputeRepositoryAccessTokenStatusResponse]:
608
+ A function that, when called, will call the underlying RPC
609
+ on the server.
610
+ """
611
+ # Generate a "stub function" on-the-fly which will actually make
612
+ # the request.
613
+ # gRPC handles serialization and deserialization, so we just need
614
+ # to pass in the functions for each.
615
+ if "compute_repository_access_token_status" not in self._stubs:
616
+ self._stubs[
617
+ "compute_repository_access_token_status"
618
+ ] = self._logged_channel.unary_unary(
619
+ "/google.cloud.dataform.v1.Dataform/ComputeRepositoryAccessTokenStatus",
620
+ request_serializer=dataform.ComputeRepositoryAccessTokenStatusRequest.serialize,
621
+ response_deserializer=dataform.ComputeRepositoryAccessTokenStatusResponse.deserialize,
622
+ )
623
+ return self._stubs["compute_repository_access_token_status"]
624
+
625
+ @property
626
+ def fetch_remote_branches(
627
+ self,
628
+ ) -> Callable[
629
+ [dataform.FetchRemoteBranchesRequest], dataform.FetchRemoteBranchesResponse
630
+ ]:
631
+ r"""Return a callable for the fetch remote branches method over gRPC.
632
+
633
+ Fetches a Repository's remote branches.
634
+
635
+ Returns:
636
+ Callable[[~.FetchRemoteBranchesRequest],
637
+ ~.FetchRemoteBranchesResponse]:
638
+ A function that, when called, will call the underlying RPC
639
+ on the server.
640
+ """
641
+ # Generate a "stub function" on-the-fly which will actually make
642
+ # the request.
643
+ # gRPC handles serialization and deserialization, so we just need
644
+ # to pass in the functions for each.
645
+ if "fetch_remote_branches" not in self._stubs:
646
+ self._stubs["fetch_remote_branches"] = self._logged_channel.unary_unary(
647
+ "/google.cloud.dataform.v1.Dataform/FetchRemoteBranches",
648
+ request_serializer=dataform.FetchRemoteBranchesRequest.serialize,
649
+ response_deserializer=dataform.FetchRemoteBranchesResponse.deserialize,
650
+ )
651
+ return self._stubs["fetch_remote_branches"]
652
+
653
+ @property
654
+ def list_workspaces(
655
+ self,
656
+ ) -> Callable[[dataform.ListWorkspacesRequest], dataform.ListWorkspacesResponse]:
657
+ r"""Return a callable for the list workspaces method over gRPC.
658
+
659
+ Lists Workspaces in a given Repository.
660
+
661
+ Returns:
662
+ Callable[[~.ListWorkspacesRequest],
663
+ ~.ListWorkspacesResponse]:
664
+ A function that, when called, will call the underlying RPC
665
+ on the server.
666
+ """
667
+ # Generate a "stub function" on-the-fly which will actually make
668
+ # the request.
669
+ # gRPC handles serialization and deserialization, so we just need
670
+ # to pass in the functions for each.
671
+ if "list_workspaces" not in self._stubs:
672
+ self._stubs["list_workspaces"] = self._logged_channel.unary_unary(
673
+ "/google.cloud.dataform.v1.Dataform/ListWorkspaces",
674
+ request_serializer=dataform.ListWorkspacesRequest.serialize,
675
+ response_deserializer=dataform.ListWorkspacesResponse.deserialize,
676
+ )
677
+ return self._stubs["list_workspaces"]
678
+
679
+ @property
680
+ def get_workspace(
681
+ self,
682
+ ) -> Callable[[dataform.GetWorkspaceRequest], dataform.Workspace]:
683
+ r"""Return a callable for the get workspace method over gRPC.
684
+
685
+ Fetches a single Workspace.
686
+
687
+ Returns:
688
+ Callable[[~.GetWorkspaceRequest],
689
+ ~.Workspace]:
690
+ A function that, when called, will call the underlying RPC
691
+ on the server.
692
+ """
693
+ # Generate a "stub function" on-the-fly which will actually make
694
+ # the request.
695
+ # gRPC handles serialization and deserialization, so we just need
696
+ # to pass in the functions for each.
697
+ if "get_workspace" not in self._stubs:
698
+ self._stubs["get_workspace"] = self._logged_channel.unary_unary(
699
+ "/google.cloud.dataform.v1.Dataform/GetWorkspace",
700
+ request_serializer=dataform.GetWorkspaceRequest.serialize,
701
+ response_deserializer=dataform.Workspace.deserialize,
702
+ )
703
+ return self._stubs["get_workspace"]
704
+
705
+ @property
706
+ def create_workspace(
707
+ self,
708
+ ) -> Callable[[dataform.CreateWorkspaceRequest], dataform.Workspace]:
709
+ r"""Return a callable for the create workspace method over gRPC.
710
+
711
+ Creates a new Workspace in a given Repository.
712
+
713
+ Returns:
714
+ Callable[[~.CreateWorkspaceRequest],
715
+ ~.Workspace]:
716
+ A function that, when called, will call the underlying RPC
717
+ on the server.
718
+ """
719
+ # Generate a "stub function" on-the-fly which will actually make
720
+ # the request.
721
+ # gRPC handles serialization and deserialization, so we just need
722
+ # to pass in the functions for each.
723
+ if "create_workspace" not in self._stubs:
724
+ self._stubs["create_workspace"] = self._logged_channel.unary_unary(
725
+ "/google.cloud.dataform.v1.Dataform/CreateWorkspace",
726
+ request_serializer=dataform.CreateWorkspaceRequest.serialize,
727
+ response_deserializer=dataform.Workspace.deserialize,
728
+ )
729
+ return self._stubs["create_workspace"]
730
+
731
+ @property
732
+ def delete_workspace(
733
+ self,
734
+ ) -> Callable[[dataform.DeleteWorkspaceRequest], empty_pb2.Empty]:
735
+ r"""Return a callable for the delete workspace method over gRPC.
736
+
737
+ Deletes a single Workspace.
738
+
739
+ Returns:
740
+ Callable[[~.DeleteWorkspaceRequest],
741
+ ~.Empty]:
742
+ A function that, when called, will call the underlying RPC
743
+ on the server.
744
+ """
745
+ # Generate a "stub function" on-the-fly which will actually make
746
+ # the request.
747
+ # gRPC handles serialization and deserialization, so we just need
748
+ # to pass in the functions for each.
749
+ if "delete_workspace" not in self._stubs:
750
+ self._stubs["delete_workspace"] = self._logged_channel.unary_unary(
751
+ "/google.cloud.dataform.v1.Dataform/DeleteWorkspace",
752
+ request_serializer=dataform.DeleteWorkspaceRequest.serialize,
753
+ response_deserializer=empty_pb2.Empty.FromString,
754
+ )
755
+ return self._stubs["delete_workspace"]
756
+
757
+ @property
758
+ def install_npm_packages(
759
+ self,
760
+ ) -> Callable[
761
+ [dataform.InstallNpmPackagesRequest], dataform.InstallNpmPackagesResponse
762
+ ]:
763
+ r"""Return a callable for the install npm packages method over gRPC.
764
+
765
+ Installs dependency NPM packages (inside a
766
+ Workspace).
767
+
768
+ Returns:
769
+ Callable[[~.InstallNpmPackagesRequest],
770
+ ~.InstallNpmPackagesResponse]:
771
+ A function that, when called, will call the underlying RPC
772
+ on the server.
773
+ """
774
+ # Generate a "stub function" on-the-fly which will actually make
775
+ # the request.
776
+ # gRPC handles serialization and deserialization, so we just need
777
+ # to pass in the functions for each.
778
+ if "install_npm_packages" not in self._stubs:
779
+ self._stubs["install_npm_packages"] = self._logged_channel.unary_unary(
780
+ "/google.cloud.dataform.v1.Dataform/InstallNpmPackages",
781
+ request_serializer=dataform.InstallNpmPackagesRequest.serialize,
782
+ response_deserializer=dataform.InstallNpmPackagesResponse.deserialize,
783
+ )
784
+ return self._stubs["install_npm_packages"]
785
+
786
+ @property
787
+ def pull_git_commits(
788
+ self,
789
+ ) -> Callable[[dataform.PullGitCommitsRequest], dataform.PullGitCommitsResponse]:
790
+ r"""Return a callable for the pull git commits method over gRPC.
791
+
792
+ Pulls Git commits from the Repository's remote into a
793
+ Workspace.
794
+
795
+ Returns:
796
+ Callable[[~.PullGitCommitsRequest],
797
+ ~.PullGitCommitsResponse]:
798
+ A function that, when called, will call the underlying RPC
799
+ on the server.
800
+ """
801
+ # Generate a "stub function" on-the-fly which will actually make
802
+ # the request.
803
+ # gRPC handles serialization and deserialization, so we just need
804
+ # to pass in the functions for each.
805
+ if "pull_git_commits" not in self._stubs:
806
+ self._stubs["pull_git_commits"] = self._logged_channel.unary_unary(
807
+ "/google.cloud.dataform.v1.Dataform/PullGitCommits",
808
+ request_serializer=dataform.PullGitCommitsRequest.serialize,
809
+ response_deserializer=dataform.PullGitCommitsResponse.deserialize,
810
+ )
811
+ return self._stubs["pull_git_commits"]
812
+
813
+ @property
814
+ def push_git_commits(
815
+ self,
816
+ ) -> Callable[[dataform.PushGitCommitsRequest], dataform.PushGitCommitsResponse]:
817
+ r"""Return a callable for the push git commits method over gRPC.
818
+
819
+ Pushes Git commits from a Workspace to the
820
+ Repository's remote.
821
+
822
+ Returns:
823
+ Callable[[~.PushGitCommitsRequest],
824
+ ~.PushGitCommitsResponse]:
825
+ A function that, when called, will call the underlying RPC
826
+ on the server.
827
+ """
828
+ # Generate a "stub function" on-the-fly which will actually make
829
+ # the request.
830
+ # gRPC handles serialization and deserialization, so we just need
831
+ # to pass in the functions for each.
832
+ if "push_git_commits" not in self._stubs:
833
+ self._stubs["push_git_commits"] = self._logged_channel.unary_unary(
834
+ "/google.cloud.dataform.v1.Dataform/PushGitCommits",
835
+ request_serializer=dataform.PushGitCommitsRequest.serialize,
836
+ response_deserializer=dataform.PushGitCommitsResponse.deserialize,
837
+ )
838
+ return self._stubs["push_git_commits"]
839
+
840
+ @property
841
+ def fetch_file_git_statuses(
842
+ self,
843
+ ) -> Callable[
844
+ [dataform.FetchFileGitStatusesRequest], dataform.FetchFileGitStatusesResponse
845
+ ]:
846
+ r"""Return a callable for the fetch file git statuses method over gRPC.
847
+
848
+ Fetches Git statuses for the files in a Workspace.
849
+
850
+ Returns:
851
+ Callable[[~.FetchFileGitStatusesRequest],
852
+ ~.FetchFileGitStatusesResponse]:
853
+ A function that, when called, will call the underlying RPC
854
+ on the server.
855
+ """
856
+ # Generate a "stub function" on-the-fly which will actually make
857
+ # the request.
858
+ # gRPC handles serialization and deserialization, so we just need
859
+ # to pass in the functions for each.
860
+ if "fetch_file_git_statuses" not in self._stubs:
861
+ self._stubs["fetch_file_git_statuses"] = self._logged_channel.unary_unary(
862
+ "/google.cloud.dataform.v1.Dataform/FetchFileGitStatuses",
863
+ request_serializer=dataform.FetchFileGitStatusesRequest.serialize,
864
+ response_deserializer=dataform.FetchFileGitStatusesResponse.deserialize,
865
+ )
866
+ return self._stubs["fetch_file_git_statuses"]
867
+
868
+ @property
869
+ def fetch_git_ahead_behind(
870
+ self,
871
+ ) -> Callable[
872
+ [dataform.FetchGitAheadBehindRequest], dataform.FetchGitAheadBehindResponse
873
+ ]:
874
+ r"""Return a callable for the fetch git ahead behind method over gRPC.
875
+
876
+ Fetches Git ahead/behind against a remote branch.
877
+
878
+ Returns:
879
+ Callable[[~.FetchGitAheadBehindRequest],
880
+ ~.FetchGitAheadBehindResponse]:
881
+ A function that, when called, will call the underlying RPC
882
+ on the server.
883
+ """
884
+ # Generate a "stub function" on-the-fly which will actually make
885
+ # the request.
886
+ # gRPC handles serialization and deserialization, so we just need
887
+ # to pass in the functions for each.
888
+ if "fetch_git_ahead_behind" not in self._stubs:
889
+ self._stubs["fetch_git_ahead_behind"] = self._logged_channel.unary_unary(
890
+ "/google.cloud.dataform.v1.Dataform/FetchGitAheadBehind",
891
+ request_serializer=dataform.FetchGitAheadBehindRequest.serialize,
892
+ response_deserializer=dataform.FetchGitAheadBehindResponse.deserialize,
893
+ )
894
+ return self._stubs["fetch_git_ahead_behind"]
895
+
896
+ @property
897
+ def commit_workspace_changes(
898
+ self,
899
+ ) -> Callable[
900
+ [dataform.CommitWorkspaceChangesRequest],
901
+ dataform.CommitWorkspaceChangesResponse,
902
+ ]:
903
+ r"""Return a callable for the commit workspace changes method over gRPC.
904
+
905
+ Applies a Git commit for uncommitted files in a
906
+ Workspace.
907
+
908
+ Returns:
909
+ Callable[[~.CommitWorkspaceChangesRequest],
910
+ ~.CommitWorkspaceChangesResponse]:
911
+ A function that, when called, will call the underlying RPC
912
+ on the server.
913
+ """
914
+ # Generate a "stub function" on-the-fly which will actually make
915
+ # the request.
916
+ # gRPC handles serialization and deserialization, so we just need
917
+ # to pass in the functions for each.
918
+ if "commit_workspace_changes" not in self._stubs:
919
+ self._stubs["commit_workspace_changes"] = self._logged_channel.unary_unary(
920
+ "/google.cloud.dataform.v1.Dataform/CommitWorkspaceChanges",
921
+ request_serializer=dataform.CommitWorkspaceChangesRequest.serialize,
922
+ response_deserializer=dataform.CommitWorkspaceChangesResponse.deserialize,
923
+ )
924
+ return self._stubs["commit_workspace_changes"]
925
+
926
+ @property
927
+ def reset_workspace_changes(
928
+ self,
929
+ ) -> Callable[
930
+ [dataform.ResetWorkspaceChangesRequest], dataform.ResetWorkspaceChangesResponse
931
+ ]:
932
+ r"""Return a callable for the reset workspace changes method over gRPC.
933
+
934
+ Performs a Git reset for uncommitted files in a
935
+ Workspace.
936
+
937
+ Returns:
938
+ Callable[[~.ResetWorkspaceChangesRequest],
939
+ ~.ResetWorkspaceChangesResponse]:
940
+ A function that, when called, will call the underlying RPC
941
+ on the server.
942
+ """
943
+ # Generate a "stub function" on-the-fly which will actually make
944
+ # the request.
945
+ # gRPC handles serialization and deserialization, so we just need
946
+ # to pass in the functions for each.
947
+ if "reset_workspace_changes" not in self._stubs:
948
+ self._stubs["reset_workspace_changes"] = self._logged_channel.unary_unary(
949
+ "/google.cloud.dataform.v1.Dataform/ResetWorkspaceChanges",
950
+ request_serializer=dataform.ResetWorkspaceChangesRequest.serialize,
951
+ response_deserializer=dataform.ResetWorkspaceChangesResponse.deserialize,
952
+ )
953
+ return self._stubs["reset_workspace_changes"]
954
+
955
+ @property
956
+ def fetch_file_diff(
957
+ self,
958
+ ) -> Callable[[dataform.FetchFileDiffRequest], dataform.FetchFileDiffResponse]:
959
+ r"""Return a callable for the fetch file diff method over gRPC.
960
+
961
+ Fetches Git diff for an uncommitted file in a
962
+ Workspace.
963
+
964
+ Returns:
965
+ Callable[[~.FetchFileDiffRequest],
966
+ ~.FetchFileDiffResponse]:
967
+ A function that, when called, will call the underlying RPC
968
+ on the server.
969
+ """
970
+ # Generate a "stub function" on-the-fly which will actually make
971
+ # the request.
972
+ # gRPC handles serialization and deserialization, so we just need
973
+ # to pass in the functions for each.
974
+ if "fetch_file_diff" not in self._stubs:
975
+ self._stubs["fetch_file_diff"] = self._logged_channel.unary_unary(
976
+ "/google.cloud.dataform.v1.Dataform/FetchFileDiff",
977
+ request_serializer=dataform.FetchFileDiffRequest.serialize,
978
+ response_deserializer=dataform.FetchFileDiffResponse.deserialize,
979
+ )
980
+ return self._stubs["fetch_file_diff"]
981
+
982
+ @property
983
+ def query_directory_contents(
984
+ self,
985
+ ) -> Callable[
986
+ [dataform.QueryDirectoryContentsRequest],
987
+ dataform.QueryDirectoryContentsResponse,
988
+ ]:
989
+ r"""Return a callable for the query directory contents method over gRPC.
990
+
991
+ Returns the contents of a given Workspace directory.
992
+
993
+ Returns:
994
+ Callable[[~.QueryDirectoryContentsRequest],
995
+ ~.QueryDirectoryContentsResponse]:
996
+ A function that, when called, will call the underlying RPC
997
+ on the server.
998
+ """
999
+ # Generate a "stub function" on-the-fly which will actually make
1000
+ # the request.
1001
+ # gRPC handles serialization and deserialization, so we just need
1002
+ # to pass in the functions for each.
1003
+ if "query_directory_contents" not in self._stubs:
1004
+ self._stubs["query_directory_contents"] = self._logged_channel.unary_unary(
1005
+ "/google.cloud.dataform.v1.Dataform/QueryDirectoryContents",
1006
+ request_serializer=dataform.QueryDirectoryContentsRequest.serialize,
1007
+ response_deserializer=dataform.QueryDirectoryContentsResponse.deserialize,
1008
+ )
1009
+ return self._stubs["query_directory_contents"]
1010
+
1011
+ @property
1012
+ def search_files(
1013
+ self,
1014
+ ) -> Callable[[dataform.SearchFilesRequest], dataform.SearchFilesResponse]:
1015
+ r"""Return a callable for the search files method over gRPC.
1016
+
1017
+ Finds the contents of a given Workspace directory by
1018
+ filter.
1019
+
1020
+ Returns:
1021
+ Callable[[~.SearchFilesRequest],
1022
+ ~.SearchFilesResponse]:
1023
+ A function that, when called, will call the underlying RPC
1024
+ on the server.
1025
+ """
1026
+ # Generate a "stub function" on-the-fly which will actually make
1027
+ # the request.
1028
+ # gRPC handles serialization and deserialization, so we just need
1029
+ # to pass in the functions for each.
1030
+ if "search_files" not in self._stubs:
1031
+ self._stubs["search_files"] = self._logged_channel.unary_unary(
1032
+ "/google.cloud.dataform.v1.Dataform/SearchFiles",
1033
+ request_serializer=dataform.SearchFilesRequest.serialize,
1034
+ response_deserializer=dataform.SearchFilesResponse.deserialize,
1035
+ )
1036
+ return self._stubs["search_files"]
1037
+
1038
+ @property
1039
+ def make_directory(
1040
+ self,
1041
+ ) -> Callable[[dataform.MakeDirectoryRequest], dataform.MakeDirectoryResponse]:
1042
+ r"""Return a callable for the make directory method over gRPC.
1043
+
1044
+ Creates a directory inside a Workspace.
1045
+
1046
+ Returns:
1047
+ Callable[[~.MakeDirectoryRequest],
1048
+ ~.MakeDirectoryResponse]:
1049
+ A function that, when called, will call the underlying RPC
1050
+ on the server.
1051
+ """
1052
+ # Generate a "stub function" on-the-fly which will actually make
1053
+ # the request.
1054
+ # gRPC handles serialization and deserialization, so we just need
1055
+ # to pass in the functions for each.
1056
+ if "make_directory" not in self._stubs:
1057
+ self._stubs["make_directory"] = self._logged_channel.unary_unary(
1058
+ "/google.cloud.dataform.v1.Dataform/MakeDirectory",
1059
+ request_serializer=dataform.MakeDirectoryRequest.serialize,
1060
+ response_deserializer=dataform.MakeDirectoryResponse.deserialize,
1061
+ )
1062
+ return self._stubs["make_directory"]
1063
+
1064
+ @property
1065
+ def remove_directory(
1066
+ self,
1067
+ ) -> Callable[[dataform.RemoveDirectoryRequest], dataform.RemoveDirectoryResponse]:
1068
+ r"""Return a callable for the remove directory method over gRPC.
1069
+
1070
+ Deletes a directory (inside a Workspace) and all of
1071
+ its contents.
1072
+
1073
+ Returns:
1074
+ Callable[[~.RemoveDirectoryRequest],
1075
+ ~.RemoveDirectoryResponse]:
1076
+ A function that, when called, will call the underlying RPC
1077
+ on the server.
1078
+ """
1079
+ # Generate a "stub function" on-the-fly which will actually make
1080
+ # the request.
1081
+ # gRPC handles serialization and deserialization, so we just need
1082
+ # to pass in the functions for each.
1083
+ if "remove_directory" not in self._stubs:
1084
+ self._stubs["remove_directory"] = self._logged_channel.unary_unary(
1085
+ "/google.cloud.dataform.v1.Dataform/RemoveDirectory",
1086
+ request_serializer=dataform.RemoveDirectoryRequest.serialize,
1087
+ response_deserializer=dataform.RemoveDirectoryResponse.deserialize,
1088
+ )
1089
+ return self._stubs["remove_directory"]
1090
+
1091
+ @property
1092
+ def move_directory(
1093
+ self,
1094
+ ) -> Callable[[dataform.MoveDirectoryRequest], dataform.MoveDirectoryResponse]:
1095
+ r"""Return a callable for the move directory method over gRPC.
1096
+
1097
+ Moves a directory (inside a Workspace), and all of
1098
+ its contents, to a new location.
1099
+
1100
+ Returns:
1101
+ Callable[[~.MoveDirectoryRequest],
1102
+ ~.MoveDirectoryResponse]:
1103
+ A function that, when called, will call the underlying RPC
1104
+ on the server.
1105
+ """
1106
+ # Generate a "stub function" on-the-fly which will actually make
1107
+ # the request.
1108
+ # gRPC handles serialization and deserialization, so we just need
1109
+ # to pass in the functions for each.
1110
+ if "move_directory" not in self._stubs:
1111
+ self._stubs["move_directory"] = self._logged_channel.unary_unary(
1112
+ "/google.cloud.dataform.v1.Dataform/MoveDirectory",
1113
+ request_serializer=dataform.MoveDirectoryRequest.serialize,
1114
+ response_deserializer=dataform.MoveDirectoryResponse.deserialize,
1115
+ )
1116
+ return self._stubs["move_directory"]
1117
+
1118
+ @property
1119
+ def read_file(
1120
+ self,
1121
+ ) -> Callable[[dataform.ReadFileRequest], dataform.ReadFileResponse]:
1122
+ r"""Return a callable for the read file method over gRPC.
1123
+
1124
+ Returns the contents of a file (inside a Workspace).
1125
+
1126
+ Returns:
1127
+ Callable[[~.ReadFileRequest],
1128
+ ~.ReadFileResponse]:
1129
+ A function that, when called, will call the underlying RPC
1130
+ on the server.
1131
+ """
1132
+ # Generate a "stub function" on-the-fly which will actually make
1133
+ # the request.
1134
+ # gRPC handles serialization and deserialization, so we just need
1135
+ # to pass in the functions for each.
1136
+ if "read_file" not in self._stubs:
1137
+ self._stubs["read_file"] = self._logged_channel.unary_unary(
1138
+ "/google.cloud.dataform.v1.Dataform/ReadFile",
1139
+ request_serializer=dataform.ReadFileRequest.serialize,
1140
+ response_deserializer=dataform.ReadFileResponse.deserialize,
1141
+ )
1142
+ return self._stubs["read_file"]
1143
+
1144
+ @property
1145
+ def remove_file(
1146
+ self,
1147
+ ) -> Callable[[dataform.RemoveFileRequest], dataform.RemoveFileResponse]:
1148
+ r"""Return a callable for the remove file method over gRPC.
1149
+
1150
+ Deletes a file (inside a Workspace).
1151
+
1152
+ Returns:
1153
+ Callable[[~.RemoveFileRequest],
1154
+ ~.RemoveFileResponse]:
1155
+ A function that, when called, will call the underlying RPC
1156
+ on the server.
1157
+ """
1158
+ # Generate a "stub function" on-the-fly which will actually make
1159
+ # the request.
1160
+ # gRPC handles serialization and deserialization, so we just need
1161
+ # to pass in the functions for each.
1162
+ if "remove_file" not in self._stubs:
1163
+ self._stubs["remove_file"] = self._logged_channel.unary_unary(
1164
+ "/google.cloud.dataform.v1.Dataform/RemoveFile",
1165
+ request_serializer=dataform.RemoveFileRequest.serialize,
1166
+ response_deserializer=dataform.RemoveFileResponse.deserialize,
1167
+ )
1168
+ return self._stubs["remove_file"]
1169
+
1170
+ @property
1171
+ def move_file(
1172
+ self,
1173
+ ) -> Callable[[dataform.MoveFileRequest], dataform.MoveFileResponse]:
1174
+ r"""Return a callable for the move file method over gRPC.
1175
+
1176
+ Moves a file (inside a Workspace) to a new location.
1177
+
1178
+ Returns:
1179
+ Callable[[~.MoveFileRequest],
1180
+ ~.MoveFileResponse]:
1181
+ A function that, when called, will call the underlying RPC
1182
+ on the server.
1183
+ """
1184
+ # Generate a "stub function" on-the-fly which will actually make
1185
+ # the request.
1186
+ # gRPC handles serialization and deserialization, so we just need
1187
+ # to pass in the functions for each.
1188
+ if "move_file" not in self._stubs:
1189
+ self._stubs["move_file"] = self._logged_channel.unary_unary(
1190
+ "/google.cloud.dataform.v1.Dataform/MoveFile",
1191
+ request_serializer=dataform.MoveFileRequest.serialize,
1192
+ response_deserializer=dataform.MoveFileResponse.deserialize,
1193
+ )
1194
+ return self._stubs["move_file"]
1195
+
1196
+ @property
1197
+ def write_file(
1198
+ self,
1199
+ ) -> Callable[[dataform.WriteFileRequest], dataform.WriteFileResponse]:
1200
+ r"""Return a callable for the write file method over gRPC.
1201
+
1202
+ Writes to a file (inside a Workspace).
1203
+
1204
+ Returns:
1205
+ Callable[[~.WriteFileRequest],
1206
+ ~.WriteFileResponse]:
1207
+ A function that, when called, will call the underlying RPC
1208
+ on the server.
1209
+ """
1210
+ # Generate a "stub function" on-the-fly which will actually make
1211
+ # the request.
1212
+ # gRPC handles serialization and deserialization, so we just need
1213
+ # to pass in the functions for each.
1214
+ if "write_file" not in self._stubs:
1215
+ self._stubs["write_file"] = self._logged_channel.unary_unary(
1216
+ "/google.cloud.dataform.v1.Dataform/WriteFile",
1217
+ request_serializer=dataform.WriteFileRequest.serialize,
1218
+ response_deserializer=dataform.WriteFileResponse.deserialize,
1219
+ )
1220
+ return self._stubs["write_file"]
1221
+
1222
+ @property
1223
+ def list_release_configs(
1224
+ self,
1225
+ ) -> Callable[
1226
+ [dataform.ListReleaseConfigsRequest], dataform.ListReleaseConfigsResponse
1227
+ ]:
1228
+ r"""Return a callable for the list release configs method over gRPC.
1229
+
1230
+ Lists ReleaseConfigs in a given Repository.
1231
+
1232
+ Returns:
1233
+ Callable[[~.ListReleaseConfigsRequest],
1234
+ ~.ListReleaseConfigsResponse]:
1235
+ A function that, when called, will call the underlying RPC
1236
+ on the server.
1237
+ """
1238
+ # Generate a "stub function" on-the-fly which will actually make
1239
+ # the request.
1240
+ # gRPC handles serialization and deserialization, so we just need
1241
+ # to pass in the functions for each.
1242
+ if "list_release_configs" not in self._stubs:
1243
+ self._stubs["list_release_configs"] = self._logged_channel.unary_unary(
1244
+ "/google.cloud.dataform.v1.Dataform/ListReleaseConfigs",
1245
+ request_serializer=dataform.ListReleaseConfigsRequest.serialize,
1246
+ response_deserializer=dataform.ListReleaseConfigsResponse.deserialize,
1247
+ )
1248
+ return self._stubs["list_release_configs"]
1249
+
1250
+ @property
1251
+ def get_release_config(
1252
+ self,
1253
+ ) -> Callable[[dataform.GetReleaseConfigRequest], dataform.ReleaseConfig]:
1254
+ r"""Return a callable for the get release config method over gRPC.
1255
+
1256
+ Fetches a single ReleaseConfig.
1257
+
1258
+ Returns:
1259
+ Callable[[~.GetReleaseConfigRequest],
1260
+ ~.ReleaseConfig]:
1261
+ A function that, when called, will call the underlying RPC
1262
+ on the server.
1263
+ """
1264
+ # Generate a "stub function" on-the-fly which will actually make
1265
+ # the request.
1266
+ # gRPC handles serialization and deserialization, so we just need
1267
+ # to pass in the functions for each.
1268
+ if "get_release_config" not in self._stubs:
1269
+ self._stubs["get_release_config"] = self._logged_channel.unary_unary(
1270
+ "/google.cloud.dataform.v1.Dataform/GetReleaseConfig",
1271
+ request_serializer=dataform.GetReleaseConfigRequest.serialize,
1272
+ response_deserializer=dataform.ReleaseConfig.deserialize,
1273
+ )
1274
+ return self._stubs["get_release_config"]
1275
+
1276
+ @property
1277
+ def create_release_config(
1278
+ self,
1279
+ ) -> Callable[[dataform.CreateReleaseConfigRequest], dataform.ReleaseConfig]:
1280
+ r"""Return a callable for the create release config method over gRPC.
1281
+
1282
+ Creates a new ReleaseConfig in a given Repository.
1283
+
1284
+ Returns:
1285
+ Callable[[~.CreateReleaseConfigRequest],
1286
+ ~.ReleaseConfig]:
1287
+ A function that, when called, will call the underlying RPC
1288
+ on the server.
1289
+ """
1290
+ # Generate a "stub function" on-the-fly which will actually make
1291
+ # the request.
1292
+ # gRPC handles serialization and deserialization, so we just need
1293
+ # to pass in the functions for each.
1294
+ if "create_release_config" not in self._stubs:
1295
+ self._stubs["create_release_config"] = self._logged_channel.unary_unary(
1296
+ "/google.cloud.dataform.v1.Dataform/CreateReleaseConfig",
1297
+ request_serializer=dataform.CreateReleaseConfigRequest.serialize,
1298
+ response_deserializer=dataform.ReleaseConfig.deserialize,
1299
+ )
1300
+ return self._stubs["create_release_config"]
1301
+
1302
+ @property
1303
+ def update_release_config(
1304
+ self,
1305
+ ) -> Callable[[dataform.UpdateReleaseConfigRequest], dataform.ReleaseConfig]:
1306
+ r"""Return a callable for the update release config method over gRPC.
1307
+
1308
+ Updates a single ReleaseConfig.
1309
+
1310
+ **Note:** *This method does not fully implement*, (see
1311
+ `AIP/134 <https://google.aip.dev/134>`__, in particular:
1312
+
1313
+ - The wildcard entry (**\***) is treated as a bad request
1314
+ - When the **field_mask** is omitted, instead of only updating
1315
+ the set fields, the request is treated as a full update on
1316
+ all modifiable fields
1317
+
1318
+ Returns:
1319
+ Callable[[~.UpdateReleaseConfigRequest],
1320
+ ~.ReleaseConfig]:
1321
+ A function that, when called, will call the underlying RPC
1322
+ on the server.
1323
+ """
1324
+ # Generate a "stub function" on-the-fly which will actually make
1325
+ # the request.
1326
+ # gRPC handles serialization and deserialization, so we just need
1327
+ # to pass in the functions for each.
1328
+ if "update_release_config" not in self._stubs:
1329
+ self._stubs["update_release_config"] = self._logged_channel.unary_unary(
1330
+ "/google.cloud.dataform.v1.Dataform/UpdateReleaseConfig",
1331
+ request_serializer=dataform.UpdateReleaseConfigRequest.serialize,
1332
+ response_deserializer=dataform.ReleaseConfig.deserialize,
1333
+ )
1334
+ return self._stubs["update_release_config"]
1335
+
1336
+ @property
1337
+ def delete_release_config(
1338
+ self,
1339
+ ) -> Callable[[dataform.DeleteReleaseConfigRequest], empty_pb2.Empty]:
1340
+ r"""Return a callable for the delete release config method over gRPC.
1341
+
1342
+ Deletes a single ReleaseConfig.
1343
+
1344
+ Returns:
1345
+ Callable[[~.DeleteReleaseConfigRequest],
1346
+ ~.Empty]:
1347
+ A function that, when called, will call the underlying RPC
1348
+ on the server.
1349
+ """
1350
+ # Generate a "stub function" on-the-fly which will actually make
1351
+ # the request.
1352
+ # gRPC handles serialization and deserialization, so we just need
1353
+ # to pass in the functions for each.
1354
+ if "delete_release_config" not in self._stubs:
1355
+ self._stubs["delete_release_config"] = self._logged_channel.unary_unary(
1356
+ "/google.cloud.dataform.v1.Dataform/DeleteReleaseConfig",
1357
+ request_serializer=dataform.DeleteReleaseConfigRequest.serialize,
1358
+ response_deserializer=empty_pb2.Empty.FromString,
1359
+ )
1360
+ return self._stubs["delete_release_config"]
1361
+
1362
+ @property
1363
+ def list_compilation_results(
1364
+ self,
1365
+ ) -> Callable[
1366
+ [dataform.ListCompilationResultsRequest],
1367
+ dataform.ListCompilationResultsResponse,
1368
+ ]:
1369
+ r"""Return a callable for the list compilation results method over gRPC.
1370
+
1371
+ Lists CompilationResults in a given Repository.
1372
+
1373
+ Returns:
1374
+ Callable[[~.ListCompilationResultsRequest],
1375
+ ~.ListCompilationResultsResponse]:
1376
+ A function that, when called, will call the underlying RPC
1377
+ on the server.
1378
+ """
1379
+ # Generate a "stub function" on-the-fly which will actually make
1380
+ # the request.
1381
+ # gRPC handles serialization and deserialization, so we just need
1382
+ # to pass in the functions for each.
1383
+ if "list_compilation_results" not in self._stubs:
1384
+ self._stubs["list_compilation_results"] = self._logged_channel.unary_unary(
1385
+ "/google.cloud.dataform.v1.Dataform/ListCompilationResults",
1386
+ request_serializer=dataform.ListCompilationResultsRequest.serialize,
1387
+ response_deserializer=dataform.ListCompilationResultsResponse.deserialize,
1388
+ )
1389
+ return self._stubs["list_compilation_results"]
1390
+
1391
+ @property
1392
+ def get_compilation_result(
1393
+ self,
1394
+ ) -> Callable[[dataform.GetCompilationResultRequest], dataform.CompilationResult]:
1395
+ r"""Return a callable for the get compilation result method over gRPC.
1396
+
1397
+ Fetches a single CompilationResult.
1398
+
1399
+ Returns:
1400
+ Callable[[~.GetCompilationResultRequest],
1401
+ ~.CompilationResult]:
1402
+ A function that, when called, will call the underlying RPC
1403
+ on the server.
1404
+ """
1405
+ # Generate a "stub function" on-the-fly which will actually make
1406
+ # the request.
1407
+ # gRPC handles serialization and deserialization, so we just need
1408
+ # to pass in the functions for each.
1409
+ if "get_compilation_result" not in self._stubs:
1410
+ self._stubs["get_compilation_result"] = self._logged_channel.unary_unary(
1411
+ "/google.cloud.dataform.v1.Dataform/GetCompilationResult",
1412
+ request_serializer=dataform.GetCompilationResultRequest.serialize,
1413
+ response_deserializer=dataform.CompilationResult.deserialize,
1414
+ )
1415
+ return self._stubs["get_compilation_result"]
1416
+
1417
+ @property
1418
+ def create_compilation_result(
1419
+ self,
1420
+ ) -> Callable[
1421
+ [dataform.CreateCompilationResultRequest], dataform.CompilationResult
1422
+ ]:
1423
+ r"""Return a callable for the create compilation result method over gRPC.
1424
+
1425
+ Creates a new CompilationResult in a given project
1426
+ and location.
1427
+
1428
+ Returns:
1429
+ Callable[[~.CreateCompilationResultRequest],
1430
+ ~.CompilationResult]:
1431
+ A function that, when called, will call the underlying RPC
1432
+ on the server.
1433
+ """
1434
+ # Generate a "stub function" on-the-fly which will actually make
1435
+ # the request.
1436
+ # gRPC handles serialization and deserialization, so we just need
1437
+ # to pass in the functions for each.
1438
+ if "create_compilation_result" not in self._stubs:
1439
+ self._stubs["create_compilation_result"] = self._logged_channel.unary_unary(
1440
+ "/google.cloud.dataform.v1.Dataform/CreateCompilationResult",
1441
+ request_serializer=dataform.CreateCompilationResultRequest.serialize,
1442
+ response_deserializer=dataform.CompilationResult.deserialize,
1443
+ )
1444
+ return self._stubs["create_compilation_result"]
1445
+
1446
+ @property
1447
+ def query_compilation_result_actions(
1448
+ self,
1449
+ ) -> Callable[
1450
+ [dataform.QueryCompilationResultActionsRequest],
1451
+ dataform.QueryCompilationResultActionsResponse,
1452
+ ]:
1453
+ r"""Return a callable for the query compilation result
1454
+ actions method over gRPC.
1455
+
1456
+ Returns CompilationResultActions in a given
1457
+ CompilationResult.
1458
+
1459
+ Returns:
1460
+ Callable[[~.QueryCompilationResultActionsRequest],
1461
+ ~.QueryCompilationResultActionsResponse]:
1462
+ A function that, when called, will call the underlying RPC
1463
+ on the server.
1464
+ """
1465
+ # Generate a "stub function" on-the-fly which will actually make
1466
+ # the request.
1467
+ # gRPC handles serialization and deserialization, so we just need
1468
+ # to pass in the functions for each.
1469
+ if "query_compilation_result_actions" not in self._stubs:
1470
+ self._stubs[
1471
+ "query_compilation_result_actions"
1472
+ ] = self._logged_channel.unary_unary(
1473
+ "/google.cloud.dataform.v1.Dataform/QueryCompilationResultActions",
1474
+ request_serializer=dataform.QueryCompilationResultActionsRequest.serialize,
1475
+ response_deserializer=dataform.QueryCompilationResultActionsResponse.deserialize,
1476
+ )
1477
+ return self._stubs["query_compilation_result_actions"]
1478
+
1479
+ @property
1480
+ def list_workflow_configs(
1481
+ self,
1482
+ ) -> Callable[
1483
+ [dataform.ListWorkflowConfigsRequest], dataform.ListWorkflowConfigsResponse
1484
+ ]:
1485
+ r"""Return a callable for the list workflow configs method over gRPC.
1486
+
1487
+ Lists WorkflowConfigs in a given Repository.
1488
+
1489
+ Returns:
1490
+ Callable[[~.ListWorkflowConfigsRequest],
1491
+ ~.ListWorkflowConfigsResponse]:
1492
+ A function that, when called, will call the underlying RPC
1493
+ on the server.
1494
+ """
1495
+ # Generate a "stub function" on-the-fly which will actually make
1496
+ # the request.
1497
+ # gRPC handles serialization and deserialization, so we just need
1498
+ # to pass in the functions for each.
1499
+ if "list_workflow_configs" not in self._stubs:
1500
+ self._stubs["list_workflow_configs"] = self._logged_channel.unary_unary(
1501
+ "/google.cloud.dataform.v1.Dataform/ListWorkflowConfigs",
1502
+ request_serializer=dataform.ListWorkflowConfigsRequest.serialize,
1503
+ response_deserializer=dataform.ListWorkflowConfigsResponse.deserialize,
1504
+ )
1505
+ return self._stubs["list_workflow_configs"]
1506
+
1507
+ @property
1508
+ def get_workflow_config(
1509
+ self,
1510
+ ) -> Callable[[dataform.GetWorkflowConfigRequest], dataform.WorkflowConfig]:
1511
+ r"""Return a callable for the get workflow config method over gRPC.
1512
+
1513
+ Fetches a single WorkflowConfig.
1514
+
1515
+ Returns:
1516
+ Callable[[~.GetWorkflowConfigRequest],
1517
+ ~.WorkflowConfig]:
1518
+ A function that, when called, will call the underlying RPC
1519
+ on the server.
1520
+ """
1521
+ # Generate a "stub function" on-the-fly which will actually make
1522
+ # the request.
1523
+ # gRPC handles serialization and deserialization, so we just need
1524
+ # to pass in the functions for each.
1525
+ if "get_workflow_config" not in self._stubs:
1526
+ self._stubs["get_workflow_config"] = self._logged_channel.unary_unary(
1527
+ "/google.cloud.dataform.v1.Dataform/GetWorkflowConfig",
1528
+ request_serializer=dataform.GetWorkflowConfigRequest.serialize,
1529
+ response_deserializer=dataform.WorkflowConfig.deserialize,
1530
+ )
1531
+ return self._stubs["get_workflow_config"]
1532
+
1533
+ @property
1534
+ def create_workflow_config(
1535
+ self,
1536
+ ) -> Callable[[dataform.CreateWorkflowConfigRequest], dataform.WorkflowConfig]:
1537
+ r"""Return a callable for the create workflow config method over gRPC.
1538
+
1539
+ Creates a new WorkflowConfig in a given Repository.
1540
+
1541
+ Returns:
1542
+ Callable[[~.CreateWorkflowConfigRequest],
1543
+ ~.WorkflowConfig]:
1544
+ A function that, when called, will call the underlying RPC
1545
+ on the server.
1546
+ """
1547
+ # Generate a "stub function" on-the-fly which will actually make
1548
+ # the request.
1549
+ # gRPC handles serialization and deserialization, so we just need
1550
+ # to pass in the functions for each.
1551
+ if "create_workflow_config" not in self._stubs:
1552
+ self._stubs["create_workflow_config"] = self._logged_channel.unary_unary(
1553
+ "/google.cloud.dataform.v1.Dataform/CreateWorkflowConfig",
1554
+ request_serializer=dataform.CreateWorkflowConfigRequest.serialize,
1555
+ response_deserializer=dataform.WorkflowConfig.deserialize,
1556
+ )
1557
+ return self._stubs["create_workflow_config"]
1558
+
1559
+ @property
1560
+ def update_workflow_config(
1561
+ self,
1562
+ ) -> Callable[[dataform.UpdateWorkflowConfigRequest], dataform.WorkflowConfig]:
1563
+ r"""Return a callable for the update workflow config method over gRPC.
1564
+
1565
+ Updates a single WorkflowConfig.
1566
+
1567
+ **Note:** *This method does not fully implement*, (see
1568
+ `AIP/134 <https://google.aip.dev/134>`__, in particular:
1569
+
1570
+ - The wildcard entry (**\***) is treated as a bad request
1571
+ - When the **field_mask** is omitted, instead of only updating
1572
+ the set fields, the request is treated as a full update on
1573
+ all modifiable fields
1574
+
1575
+ Returns:
1576
+ Callable[[~.UpdateWorkflowConfigRequest],
1577
+ ~.WorkflowConfig]:
1578
+ A function that, when called, will call the underlying RPC
1579
+ on the server.
1580
+ """
1581
+ # Generate a "stub function" on-the-fly which will actually make
1582
+ # the request.
1583
+ # gRPC handles serialization and deserialization, so we just need
1584
+ # to pass in the functions for each.
1585
+ if "update_workflow_config" not in self._stubs:
1586
+ self._stubs["update_workflow_config"] = self._logged_channel.unary_unary(
1587
+ "/google.cloud.dataform.v1.Dataform/UpdateWorkflowConfig",
1588
+ request_serializer=dataform.UpdateWorkflowConfigRequest.serialize,
1589
+ response_deserializer=dataform.WorkflowConfig.deserialize,
1590
+ )
1591
+ return self._stubs["update_workflow_config"]
1592
+
1593
+ @property
1594
+ def delete_workflow_config(
1595
+ self,
1596
+ ) -> Callable[[dataform.DeleteWorkflowConfigRequest], empty_pb2.Empty]:
1597
+ r"""Return a callable for the delete workflow config method over gRPC.
1598
+
1599
+ Deletes a single WorkflowConfig.
1600
+
1601
+ Returns:
1602
+ Callable[[~.DeleteWorkflowConfigRequest],
1603
+ ~.Empty]:
1604
+ A function that, when called, will call the underlying RPC
1605
+ on the server.
1606
+ """
1607
+ # Generate a "stub function" on-the-fly which will actually make
1608
+ # the request.
1609
+ # gRPC handles serialization and deserialization, so we just need
1610
+ # to pass in the functions for each.
1611
+ if "delete_workflow_config" not in self._stubs:
1612
+ self._stubs["delete_workflow_config"] = self._logged_channel.unary_unary(
1613
+ "/google.cloud.dataform.v1.Dataform/DeleteWorkflowConfig",
1614
+ request_serializer=dataform.DeleteWorkflowConfigRequest.serialize,
1615
+ response_deserializer=empty_pb2.Empty.FromString,
1616
+ )
1617
+ return self._stubs["delete_workflow_config"]
1618
+
1619
+ @property
1620
+ def list_workflow_invocations(
1621
+ self,
1622
+ ) -> Callable[
1623
+ [dataform.ListWorkflowInvocationsRequest],
1624
+ dataform.ListWorkflowInvocationsResponse,
1625
+ ]:
1626
+ r"""Return a callable for the list workflow invocations method over gRPC.
1627
+
1628
+ Lists WorkflowInvocations in a given Repository.
1629
+
1630
+ Returns:
1631
+ Callable[[~.ListWorkflowInvocationsRequest],
1632
+ ~.ListWorkflowInvocationsResponse]:
1633
+ A function that, when called, will call the underlying RPC
1634
+ on the server.
1635
+ """
1636
+ # Generate a "stub function" on-the-fly which will actually make
1637
+ # the request.
1638
+ # gRPC handles serialization and deserialization, so we just need
1639
+ # to pass in the functions for each.
1640
+ if "list_workflow_invocations" not in self._stubs:
1641
+ self._stubs["list_workflow_invocations"] = self._logged_channel.unary_unary(
1642
+ "/google.cloud.dataform.v1.Dataform/ListWorkflowInvocations",
1643
+ request_serializer=dataform.ListWorkflowInvocationsRequest.serialize,
1644
+ response_deserializer=dataform.ListWorkflowInvocationsResponse.deserialize,
1645
+ )
1646
+ return self._stubs["list_workflow_invocations"]
1647
+
1648
+ @property
1649
+ def get_workflow_invocation(
1650
+ self,
1651
+ ) -> Callable[[dataform.GetWorkflowInvocationRequest], dataform.WorkflowInvocation]:
1652
+ r"""Return a callable for the get workflow invocation method over gRPC.
1653
+
1654
+ Fetches a single WorkflowInvocation.
1655
+
1656
+ Returns:
1657
+ Callable[[~.GetWorkflowInvocationRequest],
1658
+ ~.WorkflowInvocation]:
1659
+ A function that, when called, will call the underlying RPC
1660
+ on the server.
1661
+ """
1662
+ # Generate a "stub function" on-the-fly which will actually make
1663
+ # the request.
1664
+ # gRPC handles serialization and deserialization, so we just need
1665
+ # to pass in the functions for each.
1666
+ if "get_workflow_invocation" not in self._stubs:
1667
+ self._stubs["get_workflow_invocation"] = self._logged_channel.unary_unary(
1668
+ "/google.cloud.dataform.v1.Dataform/GetWorkflowInvocation",
1669
+ request_serializer=dataform.GetWorkflowInvocationRequest.serialize,
1670
+ response_deserializer=dataform.WorkflowInvocation.deserialize,
1671
+ )
1672
+ return self._stubs["get_workflow_invocation"]
1673
+
1674
+ @property
1675
+ def create_workflow_invocation(
1676
+ self,
1677
+ ) -> Callable[
1678
+ [dataform.CreateWorkflowInvocationRequest], dataform.WorkflowInvocation
1679
+ ]:
1680
+ r"""Return a callable for the create workflow invocation method over gRPC.
1681
+
1682
+ Creates a new WorkflowInvocation in a given
1683
+ Repository.
1684
+
1685
+ Returns:
1686
+ Callable[[~.CreateWorkflowInvocationRequest],
1687
+ ~.WorkflowInvocation]:
1688
+ A function that, when called, will call the underlying RPC
1689
+ on the server.
1690
+ """
1691
+ # Generate a "stub function" on-the-fly which will actually make
1692
+ # the request.
1693
+ # gRPC handles serialization and deserialization, so we just need
1694
+ # to pass in the functions for each.
1695
+ if "create_workflow_invocation" not in self._stubs:
1696
+ self._stubs[
1697
+ "create_workflow_invocation"
1698
+ ] = self._logged_channel.unary_unary(
1699
+ "/google.cloud.dataform.v1.Dataform/CreateWorkflowInvocation",
1700
+ request_serializer=dataform.CreateWorkflowInvocationRequest.serialize,
1701
+ response_deserializer=dataform.WorkflowInvocation.deserialize,
1702
+ )
1703
+ return self._stubs["create_workflow_invocation"]
1704
+
1705
+ @property
1706
+ def delete_workflow_invocation(
1707
+ self,
1708
+ ) -> Callable[[dataform.DeleteWorkflowInvocationRequest], empty_pb2.Empty]:
1709
+ r"""Return a callable for the delete workflow invocation method over gRPC.
1710
+
1711
+ Deletes a single WorkflowInvocation.
1712
+
1713
+ Returns:
1714
+ Callable[[~.DeleteWorkflowInvocationRequest],
1715
+ ~.Empty]:
1716
+ A function that, when called, will call the underlying RPC
1717
+ on the server.
1718
+ """
1719
+ # Generate a "stub function" on-the-fly which will actually make
1720
+ # the request.
1721
+ # gRPC handles serialization and deserialization, so we just need
1722
+ # to pass in the functions for each.
1723
+ if "delete_workflow_invocation" not in self._stubs:
1724
+ self._stubs[
1725
+ "delete_workflow_invocation"
1726
+ ] = self._logged_channel.unary_unary(
1727
+ "/google.cloud.dataform.v1.Dataform/DeleteWorkflowInvocation",
1728
+ request_serializer=dataform.DeleteWorkflowInvocationRequest.serialize,
1729
+ response_deserializer=empty_pb2.Empty.FromString,
1730
+ )
1731
+ return self._stubs["delete_workflow_invocation"]
1732
+
1733
+ @property
1734
+ def cancel_workflow_invocation(
1735
+ self,
1736
+ ) -> Callable[
1737
+ [dataform.CancelWorkflowInvocationRequest],
1738
+ dataform.CancelWorkflowInvocationResponse,
1739
+ ]:
1740
+ r"""Return a callable for the cancel workflow invocation method over gRPC.
1741
+
1742
+ Requests cancellation of a running
1743
+ WorkflowInvocation.
1744
+
1745
+ Returns:
1746
+ Callable[[~.CancelWorkflowInvocationRequest],
1747
+ ~.CancelWorkflowInvocationResponse]:
1748
+ A function that, when called, will call the underlying RPC
1749
+ on the server.
1750
+ """
1751
+ # Generate a "stub function" on-the-fly which will actually make
1752
+ # the request.
1753
+ # gRPC handles serialization and deserialization, so we just need
1754
+ # to pass in the functions for each.
1755
+ if "cancel_workflow_invocation" not in self._stubs:
1756
+ self._stubs[
1757
+ "cancel_workflow_invocation"
1758
+ ] = self._logged_channel.unary_unary(
1759
+ "/google.cloud.dataform.v1.Dataform/CancelWorkflowInvocation",
1760
+ request_serializer=dataform.CancelWorkflowInvocationRequest.serialize,
1761
+ response_deserializer=dataform.CancelWorkflowInvocationResponse.deserialize,
1762
+ )
1763
+ return self._stubs["cancel_workflow_invocation"]
1764
+
1765
+ @property
1766
+ def query_workflow_invocation_actions(
1767
+ self,
1768
+ ) -> Callable[
1769
+ [dataform.QueryWorkflowInvocationActionsRequest],
1770
+ dataform.QueryWorkflowInvocationActionsResponse,
1771
+ ]:
1772
+ r"""Return a callable for the query workflow invocation
1773
+ actions method over gRPC.
1774
+
1775
+ Returns WorkflowInvocationActions in a given
1776
+ WorkflowInvocation.
1777
+
1778
+ Returns:
1779
+ Callable[[~.QueryWorkflowInvocationActionsRequest],
1780
+ ~.QueryWorkflowInvocationActionsResponse]:
1781
+ A function that, when called, will call the underlying RPC
1782
+ on the server.
1783
+ """
1784
+ # Generate a "stub function" on-the-fly which will actually make
1785
+ # the request.
1786
+ # gRPC handles serialization and deserialization, so we just need
1787
+ # to pass in the functions for each.
1788
+ if "query_workflow_invocation_actions" not in self._stubs:
1789
+ self._stubs[
1790
+ "query_workflow_invocation_actions"
1791
+ ] = self._logged_channel.unary_unary(
1792
+ "/google.cloud.dataform.v1.Dataform/QueryWorkflowInvocationActions",
1793
+ request_serializer=dataform.QueryWorkflowInvocationActionsRequest.serialize,
1794
+ response_deserializer=dataform.QueryWorkflowInvocationActionsResponse.deserialize,
1795
+ )
1796
+ return self._stubs["query_workflow_invocation_actions"]
1797
+
1798
+ @property
1799
+ def get_config(self) -> Callable[[dataform.GetConfigRequest], dataform.Config]:
1800
+ r"""Return a callable for the get config method over gRPC.
1801
+
1802
+ Get default config for a given project and location.
1803
+
1804
+ Returns:
1805
+ Callable[[~.GetConfigRequest],
1806
+ ~.Config]:
1807
+ A function that, when called, will call the underlying RPC
1808
+ on the server.
1809
+ """
1810
+ # Generate a "stub function" on-the-fly which will actually make
1811
+ # the request.
1812
+ # gRPC handles serialization and deserialization, so we just need
1813
+ # to pass in the functions for each.
1814
+ if "get_config" not in self._stubs:
1815
+ self._stubs["get_config"] = self._logged_channel.unary_unary(
1816
+ "/google.cloud.dataform.v1.Dataform/GetConfig",
1817
+ request_serializer=dataform.GetConfigRequest.serialize,
1818
+ response_deserializer=dataform.Config.deserialize,
1819
+ )
1820
+ return self._stubs["get_config"]
1821
+
1822
+ @property
1823
+ def update_config(
1824
+ self,
1825
+ ) -> Callable[[dataform.UpdateConfigRequest], dataform.Config]:
1826
+ r"""Return a callable for the update config method over gRPC.
1827
+
1828
+ Update default config for a given project and location.
1829
+
1830
+ **Note:** *This method does not fully implement*, (see
1831
+ `AIP/134 <https://google.aip.dev/134>`__, in particular:
1832
+
1833
+ - The wildcard entry (**\***) is treated as a bad request
1834
+ - When the **field_mask** is omitted, instead of only updating
1835
+ the set fields, the request is treated as a full update on
1836
+ all modifiable fields
1837
+
1838
+ Returns:
1839
+ Callable[[~.UpdateConfigRequest],
1840
+ ~.Config]:
1841
+ A function that, when called, will call the underlying RPC
1842
+ on the server.
1843
+ """
1844
+ # Generate a "stub function" on-the-fly which will actually make
1845
+ # the request.
1846
+ # gRPC handles serialization and deserialization, so we just need
1847
+ # to pass in the functions for each.
1848
+ if "update_config" not in self._stubs:
1849
+ self._stubs["update_config"] = self._logged_channel.unary_unary(
1850
+ "/google.cloud.dataform.v1.Dataform/UpdateConfig",
1851
+ request_serializer=dataform.UpdateConfigRequest.serialize,
1852
+ response_deserializer=dataform.Config.deserialize,
1853
+ )
1854
+ return self._stubs["update_config"]
1855
+
1856
+ def close(self):
1857
+ self._logged_channel.close()
1858
+
1859
+ @property
1860
+ def list_locations(
1861
+ self,
1862
+ ) -> Callable[
1863
+ [locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
1864
+ ]:
1865
+ r"""Return a callable for the list locations method over gRPC."""
1866
+ # Generate a "stub function" on-the-fly which will actually make
1867
+ # the request.
1868
+ # gRPC handles serialization and deserialization, so we just need
1869
+ # to pass in the functions for each.
1870
+ if "list_locations" not in self._stubs:
1871
+ self._stubs["list_locations"] = self._logged_channel.unary_unary(
1872
+ "/google.cloud.location.Locations/ListLocations",
1873
+ request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
1874
+ response_deserializer=locations_pb2.ListLocationsResponse.FromString,
1875
+ )
1876
+ return self._stubs["list_locations"]
1877
+
1878
+ @property
1879
+ def get_location(
1880
+ self,
1881
+ ) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
1882
+ r"""Return a callable for the list locations method over gRPC."""
1883
+ # Generate a "stub function" on-the-fly which will actually make
1884
+ # the request.
1885
+ # gRPC handles serialization and deserialization, so we just need
1886
+ # to pass in the functions for each.
1887
+ if "get_location" not in self._stubs:
1888
+ self._stubs["get_location"] = self._logged_channel.unary_unary(
1889
+ "/google.cloud.location.Locations/GetLocation",
1890
+ request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
1891
+ response_deserializer=locations_pb2.Location.FromString,
1892
+ )
1893
+ return self._stubs["get_location"]
1894
+
1895
+ @property
1896
+ def set_iam_policy(
1897
+ self,
1898
+ ) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
1899
+ r"""Return a callable for the set iam policy method over gRPC.
1900
+ Sets the IAM access control policy on the specified
1901
+ function. Replaces any existing policy.
1902
+ Returns:
1903
+ Callable[[~.SetIamPolicyRequest],
1904
+ ~.Policy]:
1905
+ A function that, when called, will call the underlying RPC
1906
+ on the server.
1907
+ """
1908
+ # Generate a "stub function" on-the-fly which will actually make
1909
+ # the request.
1910
+ # gRPC handles serialization and deserialization, so we just need
1911
+ # to pass in the functions for each.
1912
+ if "set_iam_policy" not in self._stubs:
1913
+ self._stubs["set_iam_policy"] = self._logged_channel.unary_unary(
1914
+ "/google.iam.v1.IAMPolicy/SetIamPolicy",
1915
+ request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
1916
+ response_deserializer=policy_pb2.Policy.FromString,
1917
+ )
1918
+ return self._stubs["set_iam_policy"]
1919
+
1920
+ @property
1921
+ def get_iam_policy(
1922
+ self,
1923
+ ) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
1924
+ r"""Return a callable for the get iam policy method over gRPC.
1925
+ Gets the IAM access control policy for a function.
1926
+ Returns an empty policy if the function exists and does
1927
+ not have a policy set.
1928
+ Returns:
1929
+ Callable[[~.GetIamPolicyRequest],
1930
+ ~.Policy]:
1931
+ A function that, when called, will call the underlying RPC
1932
+ on the server.
1933
+ """
1934
+ # Generate a "stub function" on-the-fly which will actually make
1935
+ # the request.
1936
+ # gRPC handles serialization and deserialization, so we just need
1937
+ # to pass in the functions for each.
1938
+ if "get_iam_policy" not in self._stubs:
1939
+ self._stubs["get_iam_policy"] = self._logged_channel.unary_unary(
1940
+ "/google.iam.v1.IAMPolicy/GetIamPolicy",
1941
+ request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
1942
+ response_deserializer=policy_pb2.Policy.FromString,
1943
+ )
1944
+ return self._stubs["get_iam_policy"]
1945
+
1946
+ @property
1947
+ def test_iam_permissions(
1948
+ self,
1949
+ ) -> Callable[
1950
+ [iam_policy_pb2.TestIamPermissionsRequest],
1951
+ iam_policy_pb2.TestIamPermissionsResponse,
1952
+ ]:
1953
+ r"""Return a callable for the test iam permissions method over gRPC.
1954
+ Tests the specified permissions against the IAM access control
1955
+ policy for a function. If the function does not exist, this will
1956
+ return an empty set of permissions, not a NOT_FOUND error.
1957
+ Returns:
1958
+ Callable[[~.TestIamPermissionsRequest],
1959
+ ~.TestIamPermissionsResponse]:
1960
+ A function that, when called, will call the underlying RPC
1961
+ on the server.
1962
+ """
1963
+ # Generate a "stub function" on-the-fly which will actually make
1964
+ # the request.
1965
+ # gRPC handles serialization and deserialization, so we just need
1966
+ # to pass in the functions for each.
1967
+ if "test_iam_permissions" not in self._stubs:
1968
+ self._stubs["test_iam_permissions"] = self._logged_channel.unary_unary(
1969
+ "/google.iam.v1.IAMPolicy/TestIamPermissions",
1970
+ request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
1971
+ response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
1972
+ )
1973
+ return self._stubs["test_iam_permissions"]
1974
+
1975
+ @property
1976
+ def kind(self) -> str:
1977
+ return "grpc"
1978
+
1979
+
1980
+ __all__ = ("DataformGrpcTransport",)