google-cloud-dataform 0.11.4__tar.gz → 0.11.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_dataform-0.11.4/google_cloud_dataform.egg-info → google_cloud_dataform-0.11.5}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform/__init__.py +6 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/__init__.py +2 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/gapic_metadata.json +15 -0
- {google_cloud_dataform-0.11.4/google/cloud/dataform_v1beta1 → google_cloud_dataform-0.11.5/google/cloud/dataform_v1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/async_client.py +141 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/client.py +140 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/base.py +14 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/grpc.py +30 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +37 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/rest.py +222 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/rest_base.py +17 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/types/__init__.py +2 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/types/dataform.py +227 -4
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/__init__.py +6 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/gapic_metadata.json +30 -0
- {google_cloud_dataform-0.11.4/google/cloud/dataform_v1 → google_cloud_dataform-0.11.5/google/cloud/dataform_v1beta1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +244 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/client.py +259 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +156 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +31 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +58 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +71 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +437 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +33 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/types/__init__.py +6 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/types/dataform.py +312 -5
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5/google_cloud_dataform.egg-info}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1/test_dataform.py +874 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +2004 -226
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/LICENSE +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/MANIFEST.in +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/README.rst +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/pagers.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/SOURCES.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/requires.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/top_level.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/setup.cfg +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/setup.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1/test_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1beta1/test_compat.py +0 -0
{google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform/__init__.py
RENAMED
|
@@ -40,6 +40,7 @@ from google.cloud.dataform_v1beta1.types.dataform import (
|
|
|
40
40
|
ComputeRepositoryAccessTokenStatusRequest,
|
|
41
41
|
ComputeRepositoryAccessTokenStatusResponse,
|
|
42
42
|
Config,
|
|
43
|
+
CreateCompilationResultMetadata,
|
|
43
44
|
CreateCompilationResultRequest,
|
|
44
45
|
CreateFolderRequest,
|
|
45
46
|
CreateReleaseConfigRequest,
|
|
@@ -81,6 +82,8 @@ from google.cloud.dataform_v1beta1.types.dataform import (
|
|
|
81
82
|
FetchRepositoryHistoryResponse,
|
|
82
83
|
FetchWorkspaceBranchesRequest,
|
|
83
84
|
FetchWorkspaceBranchesResponse,
|
|
85
|
+
FetchWorkspaceHistoryRequest,
|
|
86
|
+
FetchWorkspaceHistoryResponse,
|
|
84
87
|
FileSearchResult,
|
|
85
88
|
FilesystemEntryMetadata,
|
|
86
89
|
Folder,
|
|
@@ -202,6 +205,7 @@ __all__ = (
|
|
|
202
205
|
"ComputeRepositoryAccessTokenStatusRequest",
|
|
203
206
|
"ComputeRepositoryAccessTokenStatusResponse",
|
|
204
207
|
"Config",
|
|
208
|
+
"CreateCompilationResultMetadata",
|
|
205
209
|
"CreateCompilationResultRequest",
|
|
206
210
|
"CreateFolderRequest",
|
|
207
211
|
"CreateReleaseConfigRequest",
|
|
@@ -242,6 +246,8 @@ __all__ = (
|
|
|
242
246
|
"FetchRepositoryHistoryResponse",
|
|
243
247
|
"FetchWorkspaceBranchesRequest",
|
|
244
248
|
"FetchWorkspaceBranchesResponse",
|
|
249
|
+
"FetchWorkspaceHistoryRequest",
|
|
250
|
+
"FetchWorkspaceHistoryResponse",
|
|
245
251
|
"FileSearchResult",
|
|
246
252
|
"FilesystemEntryMetadata",
|
|
247
253
|
"Folder",
|
{google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/__init__.py
RENAMED
|
@@ -48,6 +48,7 @@ from .types.dataform import (
|
|
|
48
48
|
ComputeRepositoryAccessTokenStatusRequest,
|
|
49
49
|
ComputeRepositoryAccessTokenStatusResponse,
|
|
50
50
|
Config,
|
|
51
|
+
CreateCompilationResultMetadata,
|
|
51
52
|
CreateCompilationResultRequest,
|
|
52
53
|
CreateFolderRequest,
|
|
53
54
|
CreateReleaseConfigRequest,
|
|
@@ -192,6 +193,7 @@ __all__ = (
|
|
|
192
193
|
"ComputeRepositoryAccessTokenStatusRequest",
|
|
193
194
|
"ComputeRepositoryAccessTokenStatusResponse",
|
|
194
195
|
"Config",
|
|
196
|
+
"CreateCompilationResultMetadata",
|
|
195
197
|
"CreateCompilationResultRequest",
|
|
196
198
|
"CreateFolderRequest",
|
|
197
199
|
"CreateReleaseConfigRequest",
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"create_compilation_result"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
|
+
"CreateCompilationResultLongRunning": {
|
|
39
|
+
"methods": [
|
|
40
|
+
"create_compilation_result_long_running"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
38
43
|
"CreateFolder": {
|
|
39
44
|
"methods": [
|
|
40
45
|
"create_folder"
|
|
@@ -405,6 +410,11 @@
|
|
|
405
410
|
"create_compilation_result"
|
|
406
411
|
]
|
|
407
412
|
},
|
|
413
|
+
"CreateCompilationResultLongRunning": {
|
|
414
|
+
"methods": [
|
|
415
|
+
"create_compilation_result_long_running"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
408
418
|
"CreateFolder": {
|
|
409
419
|
"methods": [
|
|
410
420
|
"create_folder"
|
|
@@ -775,6 +785,11 @@
|
|
|
775
785
|
"create_compilation_result"
|
|
776
786
|
]
|
|
777
787
|
},
|
|
788
|
+
"CreateCompilationResultLongRunning": {
|
|
789
|
+
"methods": [
|
|
790
|
+
"create_compilation_result_long_running"
|
|
791
|
+
]
|
|
792
|
+
},
|
|
778
793
|
"CreateFolder": {
|
|
779
794
|
"methods": [
|
|
780
795
|
"create_folder"
|
|
@@ -6384,6 +6384,147 @@ class DataformAsyncClient:
|
|
|
6384
6384
|
# Done; return the response.
|
|
6385
6385
|
return response
|
|
6386
6386
|
|
|
6387
|
+
async def create_compilation_result_long_running(
|
|
6388
|
+
self,
|
|
6389
|
+
request: Optional[Union[dataform.CreateCompilationResultRequest, dict]] = None,
|
|
6390
|
+
*,
|
|
6391
|
+
parent: Optional[str] = None,
|
|
6392
|
+
compilation_result: Optional[dataform.CompilationResult] = None,
|
|
6393
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
6394
|
+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
6395
|
+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
|
|
6396
|
+
) -> operation_async.AsyncOperation:
|
|
6397
|
+
r"""Creates a new CompilationResult in a given project
|
|
6398
|
+
and location asynchronously.
|
|
6399
|
+
|
|
6400
|
+
.. code-block:: python
|
|
6401
|
+
|
|
6402
|
+
# This snippet has been automatically generated and should be regarded as a
|
|
6403
|
+
# code template only.
|
|
6404
|
+
# It will require modifications to work:
|
|
6405
|
+
# - It may require correct/in-range values for request initialization.
|
|
6406
|
+
# - It may require specifying regional endpoints when creating the service
|
|
6407
|
+
# client as shown in:
|
|
6408
|
+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
|
|
6409
|
+
from google.cloud import dataform_v1
|
|
6410
|
+
|
|
6411
|
+
async def sample_create_compilation_result_long_running():
|
|
6412
|
+
# Create a client
|
|
6413
|
+
client = dataform_v1.DataformAsyncClient()
|
|
6414
|
+
|
|
6415
|
+
# Initialize request argument(s)
|
|
6416
|
+
compilation_result = dataform_v1.CompilationResult()
|
|
6417
|
+
compilation_result.git_commitish = "git_commitish_value"
|
|
6418
|
+
|
|
6419
|
+
request = dataform_v1.CreateCompilationResultRequest(
|
|
6420
|
+
parent="parent_value",
|
|
6421
|
+
compilation_result=compilation_result,
|
|
6422
|
+
)
|
|
6423
|
+
|
|
6424
|
+
# Make the request
|
|
6425
|
+
operation = await client.create_compilation_result_long_running(request=request)
|
|
6426
|
+
|
|
6427
|
+
print("Waiting for operation to complete...")
|
|
6428
|
+
|
|
6429
|
+
response = await operation.result()
|
|
6430
|
+
|
|
6431
|
+
# Handle the response
|
|
6432
|
+
print(response)
|
|
6433
|
+
|
|
6434
|
+
Args:
|
|
6435
|
+
request (Optional[Union[google.cloud.dataform_v1.types.CreateCompilationResultRequest, dict]]):
|
|
6436
|
+
The request object. ``CreateCompilationResult`` request message.
|
|
6437
|
+
parent (:class:`str`):
|
|
6438
|
+
Required. The repository in which to create the
|
|
6439
|
+
compilation result. Must be in the format
|
|
6440
|
+
``projects/*/locations/*/repositories/*``.
|
|
6441
|
+
|
|
6442
|
+
This corresponds to the ``parent`` field
|
|
6443
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6444
|
+
should not be set.
|
|
6445
|
+
compilation_result (:class:`google.cloud.dataform_v1.types.CompilationResult`):
|
|
6446
|
+
Required. The compilation result to
|
|
6447
|
+
create.
|
|
6448
|
+
|
|
6449
|
+
This corresponds to the ``compilation_result`` field
|
|
6450
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6451
|
+
should not be set.
|
|
6452
|
+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
|
|
6453
|
+
should be retried.
|
|
6454
|
+
timeout (float): The timeout for this request.
|
|
6455
|
+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
|
|
6456
|
+
sent along with the request as metadata. Normally, each value must be of type `str`,
|
|
6457
|
+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
|
|
6458
|
+
be of type `bytes`.
|
|
6459
|
+
|
|
6460
|
+
Returns:
|
|
6461
|
+
google.api_core.operation_async.AsyncOperation:
|
|
6462
|
+
An object representing a long-running operation.
|
|
6463
|
+
|
|
6464
|
+
The result type for the operation will be
|
|
6465
|
+
:class:`google.cloud.dataform_v1.types.CompilationResult`
|
|
6466
|
+
Represents the result of compiling a Dataform project.
|
|
6467
|
+
|
|
6468
|
+
"""
|
|
6469
|
+
# Create or coerce a protobuf request object.
|
|
6470
|
+
# - Quick check: If we got a request object, we should *not* have
|
|
6471
|
+
# gotten any keyword arguments that map to the request.
|
|
6472
|
+
flattened_params = [parent, compilation_result]
|
|
6473
|
+
has_flattened_params = (
|
|
6474
|
+
len([param for param in flattened_params if param is not None]) > 0
|
|
6475
|
+
)
|
|
6476
|
+
if request is not None and has_flattened_params:
|
|
6477
|
+
raise ValueError(
|
|
6478
|
+
"If the `request` argument is set, then none of "
|
|
6479
|
+
"the individual field arguments should be set."
|
|
6480
|
+
)
|
|
6481
|
+
|
|
6482
|
+
# - Use the request object if provided (there's no risk of modifying the input as
|
|
6483
|
+
# there are no flattened fields), or create one.
|
|
6484
|
+
if not isinstance(request, dataform.CreateCompilationResultRequest):
|
|
6485
|
+
request = dataform.CreateCompilationResultRequest(request)
|
|
6486
|
+
|
|
6487
|
+
# If we have keyword arguments corresponding to fields on the
|
|
6488
|
+
# request, apply these.
|
|
6489
|
+
if parent is not None:
|
|
6490
|
+
request.parent = parent
|
|
6491
|
+
if compilation_result is not None:
|
|
6492
|
+
request.compilation_result = compilation_result
|
|
6493
|
+
|
|
6494
|
+
# Wrap the RPC method; this adds retry and timeout information,
|
|
6495
|
+
# and friendly error handling.
|
|
6496
|
+
rpc = self._client._transport._wrapped_methods[
|
|
6497
|
+
self._client._transport.create_compilation_result_long_running
|
|
6498
|
+
]
|
|
6499
|
+
|
|
6500
|
+
# Certain fields should be provided within the metadata header;
|
|
6501
|
+
# add these here.
|
|
6502
|
+
metadata = tuple(metadata) + (
|
|
6503
|
+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
|
|
6504
|
+
)
|
|
6505
|
+
|
|
6506
|
+
# Validate the universe domain.
|
|
6507
|
+
self._client._validate_universe_domain()
|
|
6508
|
+
|
|
6509
|
+
# Send the request.
|
|
6510
|
+
response = await rpc(
|
|
6511
|
+
request,
|
|
6512
|
+
retry=retry,
|
|
6513
|
+
timeout=timeout,
|
|
6514
|
+
metadata=metadata,
|
|
6515
|
+
)
|
|
6516
|
+
|
|
6517
|
+
# Wrap the response in an operation future.
|
|
6518
|
+
response = operation_async.from_gapic(
|
|
6519
|
+
response,
|
|
6520
|
+
self._client._transport.operations_client,
|
|
6521
|
+
dataform.CompilationResult,
|
|
6522
|
+
metadata_type=dataform.CreateCompilationResultMetadata,
|
|
6523
|
+
)
|
|
6524
|
+
|
|
6525
|
+
# Done; return the response.
|
|
6526
|
+
return response
|
|
6527
|
+
|
|
6387
6528
|
async def query_compilation_result_actions(
|
|
6388
6529
|
self,
|
|
6389
6530
|
request: Optional[
|
|
@@ -6822,6 +6822,146 @@ class DataformClient(metaclass=DataformClientMeta):
|
|
|
6822
6822
|
# Done; return the response.
|
|
6823
6823
|
return response
|
|
6824
6824
|
|
|
6825
|
+
def create_compilation_result_long_running(
|
|
6826
|
+
self,
|
|
6827
|
+
request: Optional[Union[dataform.CreateCompilationResultRequest, dict]] = None,
|
|
6828
|
+
*,
|
|
6829
|
+
parent: Optional[str] = None,
|
|
6830
|
+
compilation_result: Optional[dataform.CompilationResult] = None,
|
|
6831
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
6832
|
+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
6833
|
+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
|
|
6834
|
+
) -> operation.Operation:
|
|
6835
|
+
r"""Creates a new CompilationResult in a given project
|
|
6836
|
+
and location asynchronously.
|
|
6837
|
+
|
|
6838
|
+
.. code-block:: python
|
|
6839
|
+
|
|
6840
|
+
# This snippet has been automatically generated and should be regarded as a
|
|
6841
|
+
# code template only.
|
|
6842
|
+
# It will require modifications to work:
|
|
6843
|
+
# - It may require correct/in-range values for request initialization.
|
|
6844
|
+
# - It may require specifying regional endpoints when creating the service
|
|
6845
|
+
# client as shown in:
|
|
6846
|
+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
|
|
6847
|
+
from google.cloud import dataform_v1
|
|
6848
|
+
|
|
6849
|
+
def sample_create_compilation_result_long_running():
|
|
6850
|
+
# Create a client
|
|
6851
|
+
client = dataform_v1.DataformClient()
|
|
6852
|
+
|
|
6853
|
+
# Initialize request argument(s)
|
|
6854
|
+
compilation_result = dataform_v1.CompilationResult()
|
|
6855
|
+
compilation_result.git_commitish = "git_commitish_value"
|
|
6856
|
+
|
|
6857
|
+
request = dataform_v1.CreateCompilationResultRequest(
|
|
6858
|
+
parent="parent_value",
|
|
6859
|
+
compilation_result=compilation_result,
|
|
6860
|
+
)
|
|
6861
|
+
|
|
6862
|
+
# Make the request
|
|
6863
|
+
operation = client.create_compilation_result_long_running(request=request)
|
|
6864
|
+
|
|
6865
|
+
print("Waiting for operation to complete...")
|
|
6866
|
+
|
|
6867
|
+
response = operation.result()
|
|
6868
|
+
|
|
6869
|
+
# Handle the response
|
|
6870
|
+
print(response)
|
|
6871
|
+
|
|
6872
|
+
Args:
|
|
6873
|
+
request (Union[google.cloud.dataform_v1.types.CreateCompilationResultRequest, dict]):
|
|
6874
|
+
The request object. ``CreateCompilationResult`` request message.
|
|
6875
|
+
parent (str):
|
|
6876
|
+
Required. The repository in which to create the
|
|
6877
|
+
compilation result. Must be in the format
|
|
6878
|
+
``projects/*/locations/*/repositories/*``.
|
|
6879
|
+
|
|
6880
|
+
This corresponds to the ``parent`` field
|
|
6881
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6882
|
+
should not be set.
|
|
6883
|
+
compilation_result (google.cloud.dataform_v1.types.CompilationResult):
|
|
6884
|
+
Required. The compilation result to
|
|
6885
|
+
create.
|
|
6886
|
+
|
|
6887
|
+
This corresponds to the ``compilation_result`` field
|
|
6888
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6889
|
+
should not be set.
|
|
6890
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
6891
|
+
should be retried.
|
|
6892
|
+
timeout (float): The timeout for this request.
|
|
6893
|
+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
|
|
6894
|
+
sent along with the request as metadata. Normally, each value must be of type `str`,
|
|
6895
|
+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
|
|
6896
|
+
be of type `bytes`.
|
|
6897
|
+
|
|
6898
|
+
Returns:
|
|
6899
|
+
google.api_core.operation.Operation:
|
|
6900
|
+
An object representing a long-running operation.
|
|
6901
|
+
|
|
6902
|
+
The result type for the operation will be
|
|
6903
|
+
:class:`google.cloud.dataform_v1.types.CompilationResult`
|
|
6904
|
+
Represents the result of compiling a Dataform project.
|
|
6905
|
+
|
|
6906
|
+
"""
|
|
6907
|
+
# Create or coerce a protobuf request object.
|
|
6908
|
+
# - Quick check: If we got a request object, we should *not* have
|
|
6909
|
+
# gotten any keyword arguments that map to the request.
|
|
6910
|
+
flattened_params = [parent, compilation_result]
|
|
6911
|
+
has_flattened_params = (
|
|
6912
|
+
len([param for param in flattened_params if param is not None]) > 0
|
|
6913
|
+
)
|
|
6914
|
+
if request is not None and has_flattened_params:
|
|
6915
|
+
raise ValueError(
|
|
6916
|
+
"If the `request` argument is set, then none of "
|
|
6917
|
+
"the individual field arguments should be set."
|
|
6918
|
+
)
|
|
6919
|
+
|
|
6920
|
+
# - Use the request object if provided (there's no risk of modifying the input as
|
|
6921
|
+
# there are no flattened fields), or create one.
|
|
6922
|
+
if not isinstance(request, dataform.CreateCompilationResultRequest):
|
|
6923
|
+
request = dataform.CreateCompilationResultRequest(request)
|
|
6924
|
+
# If we have keyword arguments corresponding to fields on the
|
|
6925
|
+
# request, apply these.
|
|
6926
|
+
if parent is not None:
|
|
6927
|
+
request.parent = parent
|
|
6928
|
+
if compilation_result is not None:
|
|
6929
|
+
request.compilation_result = compilation_result
|
|
6930
|
+
|
|
6931
|
+
# Wrap the RPC method; this adds retry and timeout information,
|
|
6932
|
+
# and friendly error handling.
|
|
6933
|
+
rpc = self._transport._wrapped_methods[
|
|
6934
|
+
self._transport.create_compilation_result_long_running
|
|
6935
|
+
]
|
|
6936
|
+
|
|
6937
|
+
# Certain fields should be provided within the metadata header;
|
|
6938
|
+
# add these here.
|
|
6939
|
+
metadata = tuple(metadata) + (
|
|
6940
|
+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
|
|
6941
|
+
)
|
|
6942
|
+
|
|
6943
|
+
# Validate the universe domain.
|
|
6944
|
+
self._validate_universe_domain()
|
|
6945
|
+
|
|
6946
|
+
# Send the request.
|
|
6947
|
+
response = rpc(
|
|
6948
|
+
request,
|
|
6949
|
+
retry=retry,
|
|
6950
|
+
timeout=timeout,
|
|
6951
|
+
metadata=metadata,
|
|
6952
|
+
)
|
|
6953
|
+
|
|
6954
|
+
# Wrap the response in an operation future.
|
|
6955
|
+
response = operation.from_gapic(
|
|
6956
|
+
response,
|
|
6957
|
+
self._transport.operations_client,
|
|
6958
|
+
dataform.CompilationResult,
|
|
6959
|
+
metadata_type=dataform.CreateCompilationResultMetadata,
|
|
6960
|
+
)
|
|
6961
|
+
|
|
6962
|
+
# Done; return the response.
|
|
6963
|
+
return response
|
|
6964
|
+
|
|
6825
6965
|
def query_compilation_result_actions(
|
|
6826
6966
|
self,
|
|
6827
6967
|
request: Optional[
|
|
@@ -432,6 +432,11 @@ class DataformTransport(abc.ABC):
|
|
|
432
432
|
default_timeout=None,
|
|
433
433
|
client_info=client_info,
|
|
434
434
|
),
|
|
435
|
+
self.create_compilation_result_long_running: gapic_v1.method.wrap_method(
|
|
436
|
+
self.create_compilation_result_long_running,
|
|
437
|
+
default_timeout=None,
|
|
438
|
+
client_info=client_info,
|
|
439
|
+
),
|
|
435
440
|
self.query_compilation_result_actions: gapic_v1.method.wrap_method(
|
|
436
441
|
self.query_compilation_result_actions,
|
|
437
442
|
default_timeout=None,
|
|
@@ -1138,6 +1143,15 @@ class DataformTransport(abc.ABC):
|
|
|
1138
1143
|
]:
|
|
1139
1144
|
raise NotImplementedError()
|
|
1140
1145
|
|
|
1146
|
+
@property
|
|
1147
|
+
def create_compilation_result_long_running(
|
|
1148
|
+
self,
|
|
1149
|
+
) -> Callable[
|
|
1150
|
+
[dataform.CreateCompilationResultRequest],
|
|
1151
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
1152
|
+
]:
|
|
1153
|
+
raise NotImplementedError()
|
|
1154
|
+
|
|
1141
1155
|
@property
|
|
1142
1156
|
def query_compilation_result_actions(
|
|
1143
1157
|
self,
|
|
@@ -1905,6 +1905,36 @@ class DataformGrpcTransport(DataformTransport):
|
|
|
1905
1905
|
)
|
|
1906
1906
|
return self._stubs["create_compilation_result"]
|
|
1907
1907
|
|
|
1908
|
+
@property
|
|
1909
|
+
def create_compilation_result_long_running(
|
|
1910
|
+
self,
|
|
1911
|
+
) -> Callable[[dataform.CreateCompilationResultRequest], operations_pb2.Operation]:
|
|
1912
|
+
r"""Return a callable for the create compilation result long
|
|
1913
|
+
running method over gRPC.
|
|
1914
|
+
|
|
1915
|
+
Creates a new CompilationResult in a given project
|
|
1916
|
+
and location asynchronously.
|
|
1917
|
+
|
|
1918
|
+
Returns:
|
|
1919
|
+
Callable[[~.CreateCompilationResultRequest],
|
|
1920
|
+
~.Operation]:
|
|
1921
|
+
A function that, when called, will call the underlying RPC
|
|
1922
|
+
on the server.
|
|
1923
|
+
"""
|
|
1924
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1925
|
+
# the request.
|
|
1926
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1927
|
+
# to pass in the functions for each.
|
|
1928
|
+
if "create_compilation_result_long_running" not in self._stubs:
|
|
1929
|
+
self._stubs["create_compilation_result_long_running"] = (
|
|
1930
|
+
self._logged_channel.unary_unary(
|
|
1931
|
+
"/google.cloud.dataform.v1.Dataform/CreateCompilationResultLongRunning",
|
|
1932
|
+
request_serializer=dataform.CreateCompilationResultRequest.serialize,
|
|
1933
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1934
|
+
)
|
|
1935
|
+
)
|
|
1936
|
+
return self._stubs["create_compilation_result_long_running"]
|
|
1937
|
+
|
|
1908
1938
|
@property
|
|
1909
1939
|
def query_compilation_result_actions(
|
|
1910
1940
|
self,
|
|
@@ -1955,6 +1955,38 @@ class DataformGrpcAsyncIOTransport(DataformTransport):
|
|
|
1955
1955
|
)
|
|
1956
1956
|
return self._stubs["create_compilation_result"]
|
|
1957
1957
|
|
|
1958
|
+
@property
|
|
1959
|
+
def create_compilation_result_long_running(
|
|
1960
|
+
self,
|
|
1961
|
+
) -> Callable[
|
|
1962
|
+
[dataform.CreateCompilationResultRequest], Awaitable[operations_pb2.Operation]
|
|
1963
|
+
]:
|
|
1964
|
+
r"""Return a callable for the create compilation result long
|
|
1965
|
+
running method over gRPC.
|
|
1966
|
+
|
|
1967
|
+
Creates a new CompilationResult in a given project
|
|
1968
|
+
and location asynchronously.
|
|
1969
|
+
|
|
1970
|
+
Returns:
|
|
1971
|
+
Callable[[~.CreateCompilationResultRequest],
|
|
1972
|
+
Awaitable[~.Operation]]:
|
|
1973
|
+
A function that, when called, will call the underlying RPC
|
|
1974
|
+
on the server.
|
|
1975
|
+
"""
|
|
1976
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1977
|
+
# the request.
|
|
1978
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1979
|
+
# to pass in the functions for each.
|
|
1980
|
+
if "create_compilation_result_long_running" not in self._stubs:
|
|
1981
|
+
self._stubs["create_compilation_result_long_running"] = (
|
|
1982
|
+
self._logged_channel.unary_unary(
|
|
1983
|
+
"/google.cloud.dataform.v1.Dataform/CreateCompilationResultLongRunning",
|
|
1984
|
+
request_serializer=dataform.CreateCompilationResultRequest.serialize,
|
|
1985
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1986
|
+
)
|
|
1987
|
+
)
|
|
1988
|
+
return self._stubs["create_compilation_result_long_running"]
|
|
1989
|
+
|
|
1958
1990
|
@property
|
|
1959
1991
|
def query_compilation_result_actions(
|
|
1960
1992
|
self,
|
|
@@ -2752,6 +2784,11 @@ class DataformGrpcAsyncIOTransport(DataformTransport):
|
|
|
2752
2784
|
default_timeout=None,
|
|
2753
2785
|
client_info=client_info,
|
|
2754
2786
|
),
|
|
2787
|
+
self.create_compilation_result_long_running: self._wrap_method(
|
|
2788
|
+
self.create_compilation_result_long_running,
|
|
2789
|
+
default_timeout=None,
|
|
2790
|
+
client_info=client_info,
|
|
2791
|
+
),
|
|
2755
2792
|
self.query_compilation_result_actions: self._wrap_method(
|
|
2756
2793
|
self.query_compilation_result_actions,
|
|
2757
2794
|
default_timeout=None,
|