google-cloud-dataform 0.11.4__tar.gz → 0.11.6__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.6}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform/__init__.py +8 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/__init__.py +4 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/gapic_metadata.json +30 -0
- {google_cloud_dataform-0.11.4/google/cloud/dataform_v1beta1 → google_cloud_dataform-0.11.6/google/cloud/dataform_v1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/async_client.py +289 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/client.py +287 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/base.py +28 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/grpc.py +59 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +73 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/rest.py +439 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/rest_base.py +36 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/types/__init__.py +4 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/types/dataform.py +295 -4
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/__init__.py +8 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/gapic_metadata.json +45 -0
- {google_cloud_dataform-0.11.4/google/cloud/dataform_v1 → google_cloud_dataform-0.11.6/google/cloud/dataform_v1beta1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +392 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/client.py +406 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +156 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +45 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +87 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +107 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +709 -55
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +52 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/types/__init__.py +8 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/types/dataform.py +681 -5
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6/google_cloud_dataform.egg-info}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/test_dataform.py +1713 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +2761 -134
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/LICENSE +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/MANIFEST.in +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/README.rst +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/pagers.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/py.typed +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/SOURCES.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/requires.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/top_level.txt +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/setup.cfg +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/setup.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/test_compat.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
- {google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/test_compat.py +0 -0
{google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/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,
|
|
@@ -47,6 +48,7 @@ from google.cloud.dataform_v1beta1.types.dataform import (
|
|
|
47
48
|
CreateTeamFolderRequest,
|
|
48
49
|
CreateWorkflowConfigRequest,
|
|
49
50
|
CreateWorkflowInvocationRequest,
|
|
51
|
+
CreateWorkspaceMetadata,
|
|
50
52
|
CreateWorkspaceRequest,
|
|
51
53
|
DataEncryptionState,
|
|
52
54
|
DeleteBranchRequest,
|
|
@@ -81,6 +83,8 @@ from google.cloud.dataform_v1beta1.types.dataform import (
|
|
|
81
83
|
FetchRepositoryHistoryResponse,
|
|
82
84
|
FetchWorkspaceBranchesRequest,
|
|
83
85
|
FetchWorkspaceBranchesResponse,
|
|
86
|
+
FetchWorkspaceHistoryRequest,
|
|
87
|
+
FetchWorkspaceHistoryResponse,
|
|
84
88
|
FileSearchResult,
|
|
85
89
|
FilesystemEntryMetadata,
|
|
86
90
|
Folder,
|
|
@@ -202,6 +206,7 @@ __all__ = (
|
|
|
202
206
|
"ComputeRepositoryAccessTokenStatusRequest",
|
|
203
207
|
"ComputeRepositoryAccessTokenStatusResponse",
|
|
204
208
|
"Config",
|
|
209
|
+
"CreateCompilationResultMetadata",
|
|
205
210
|
"CreateCompilationResultRequest",
|
|
206
211
|
"CreateFolderRequest",
|
|
207
212
|
"CreateReleaseConfigRequest",
|
|
@@ -209,6 +214,7 @@ __all__ = (
|
|
|
209
214
|
"CreateTeamFolderRequest",
|
|
210
215
|
"CreateWorkflowConfigRequest",
|
|
211
216
|
"CreateWorkflowInvocationRequest",
|
|
217
|
+
"CreateWorkspaceMetadata",
|
|
212
218
|
"CreateWorkspaceRequest",
|
|
213
219
|
"DataEncryptionState",
|
|
214
220
|
"DeleteBranchRequest",
|
|
@@ -242,6 +248,8 @@ __all__ = (
|
|
|
242
248
|
"FetchRepositoryHistoryResponse",
|
|
243
249
|
"FetchWorkspaceBranchesRequest",
|
|
244
250
|
"FetchWorkspaceBranchesResponse",
|
|
251
|
+
"FetchWorkspaceHistoryRequest",
|
|
252
|
+
"FetchWorkspaceHistoryResponse",
|
|
245
253
|
"FileSearchResult",
|
|
246
254
|
"FilesystemEntryMetadata",
|
|
247
255
|
"Folder",
|
{google_cloud_dataform-0.11.4 → google_cloud_dataform-0.11.6}/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,
|
|
@@ -55,6 +56,7 @@ from .types.dataform import (
|
|
|
55
56
|
CreateTeamFolderRequest,
|
|
56
57
|
CreateWorkflowConfigRequest,
|
|
57
58
|
CreateWorkflowInvocationRequest,
|
|
59
|
+
CreateWorkspaceMetadata,
|
|
58
60
|
CreateWorkspaceRequest,
|
|
59
61
|
DataEncryptionState,
|
|
60
62
|
DeleteFolderRequest,
|
|
@@ -192,6 +194,7 @@ __all__ = (
|
|
|
192
194
|
"ComputeRepositoryAccessTokenStatusRequest",
|
|
193
195
|
"ComputeRepositoryAccessTokenStatusResponse",
|
|
194
196
|
"Config",
|
|
197
|
+
"CreateCompilationResultMetadata",
|
|
195
198
|
"CreateCompilationResultRequest",
|
|
196
199
|
"CreateFolderRequest",
|
|
197
200
|
"CreateReleaseConfigRequest",
|
|
@@ -199,6 +202,7 @@ __all__ = (
|
|
|
199
202
|
"CreateTeamFolderRequest",
|
|
200
203
|
"CreateWorkflowConfigRequest",
|
|
201
204
|
"CreateWorkflowInvocationRequest",
|
|
205
|
+
"CreateWorkspaceMetadata",
|
|
202
206
|
"CreateWorkspaceRequest",
|
|
203
207
|
"DataEncryptionState",
|
|
204
208
|
"DataformClient",
|
|
@@ -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"
|
|
@@ -70,6 +75,11 @@
|
|
|
70
75
|
"create_workspace"
|
|
71
76
|
]
|
|
72
77
|
},
|
|
78
|
+
"CreateWorkspaceLongRunning": {
|
|
79
|
+
"methods": [
|
|
80
|
+
"create_workspace_long_running"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
73
83
|
"DeleteFolder": {
|
|
74
84
|
"methods": [
|
|
75
85
|
"delete_folder"
|
|
@@ -405,6 +415,11 @@
|
|
|
405
415
|
"create_compilation_result"
|
|
406
416
|
]
|
|
407
417
|
},
|
|
418
|
+
"CreateCompilationResultLongRunning": {
|
|
419
|
+
"methods": [
|
|
420
|
+
"create_compilation_result_long_running"
|
|
421
|
+
]
|
|
422
|
+
},
|
|
408
423
|
"CreateFolder": {
|
|
409
424
|
"methods": [
|
|
410
425
|
"create_folder"
|
|
@@ -440,6 +455,11 @@
|
|
|
440
455
|
"create_workspace"
|
|
441
456
|
]
|
|
442
457
|
},
|
|
458
|
+
"CreateWorkspaceLongRunning": {
|
|
459
|
+
"methods": [
|
|
460
|
+
"create_workspace_long_running"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
443
463
|
"DeleteFolder": {
|
|
444
464
|
"methods": [
|
|
445
465
|
"delete_folder"
|
|
@@ -775,6 +795,11 @@
|
|
|
775
795
|
"create_compilation_result"
|
|
776
796
|
]
|
|
777
797
|
},
|
|
798
|
+
"CreateCompilationResultLongRunning": {
|
|
799
|
+
"methods": [
|
|
800
|
+
"create_compilation_result_long_running"
|
|
801
|
+
]
|
|
802
|
+
},
|
|
778
803
|
"CreateFolder": {
|
|
779
804
|
"methods": [
|
|
780
805
|
"create_folder"
|
|
@@ -810,6 +835,11 @@
|
|
|
810
835
|
"create_workspace"
|
|
811
836
|
]
|
|
812
837
|
},
|
|
838
|
+
"CreateWorkspaceLongRunning": {
|
|
839
|
+
"methods": [
|
|
840
|
+
"create_workspace_long_running"
|
|
841
|
+
]
|
|
842
|
+
},
|
|
813
843
|
"DeleteFolder": {
|
|
814
844
|
"methods": [
|
|
815
845
|
"delete_folder"
|
|
@@ -3829,6 +3829,154 @@ class DataformAsyncClient:
|
|
|
3829
3829
|
# Done; return the response.
|
|
3830
3830
|
return response
|
|
3831
3831
|
|
|
3832
|
+
async def create_workspace_long_running(
|
|
3833
|
+
self,
|
|
3834
|
+
request: Optional[Union[dataform.CreateWorkspaceRequest, dict]] = None,
|
|
3835
|
+
*,
|
|
3836
|
+
parent: Optional[str] = None,
|
|
3837
|
+
workspace: Optional[dataform.Workspace] = None,
|
|
3838
|
+
workspace_id: Optional[str] = None,
|
|
3839
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3840
|
+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
3841
|
+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
|
|
3842
|
+
) -> operation_async.AsyncOperation:
|
|
3843
|
+
r"""Creates a new Workspace in a given Repository
|
|
3844
|
+
asynchronously.
|
|
3845
|
+
|
|
3846
|
+
.. code-block:: python
|
|
3847
|
+
|
|
3848
|
+
# This snippet has been automatically generated and should be regarded as a
|
|
3849
|
+
# code template only.
|
|
3850
|
+
# It will require modifications to work:
|
|
3851
|
+
# - It may require correct/in-range values for request initialization.
|
|
3852
|
+
# - It may require specifying regional endpoints when creating the service
|
|
3853
|
+
# client as shown in:
|
|
3854
|
+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
|
|
3855
|
+
from google.cloud import dataform_v1
|
|
3856
|
+
|
|
3857
|
+
async def sample_create_workspace_long_running():
|
|
3858
|
+
# Create a client
|
|
3859
|
+
client = dataform_v1.DataformAsyncClient()
|
|
3860
|
+
|
|
3861
|
+
# Initialize request argument(s)
|
|
3862
|
+
request = dataform_v1.CreateWorkspaceRequest(
|
|
3863
|
+
parent="parent_value",
|
|
3864
|
+
workspace_id="workspace_id_value",
|
|
3865
|
+
)
|
|
3866
|
+
|
|
3867
|
+
# Make the request
|
|
3868
|
+
operation = await client.create_workspace_long_running(request=request)
|
|
3869
|
+
|
|
3870
|
+
print("Waiting for operation to complete...")
|
|
3871
|
+
|
|
3872
|
+
response = await operation.result()
|
|
3873
|
+
|
|
3874
|
+
# Handle the response
|
|
3875
|
+
print(response)
|
|
3876
|
+
|
|
3877
|
+
Args:
|
|
3878
|
+
request (Optional[Union[google.cloud.dataform_v1.types.CreateWorkspaceRequest, dict]]):
|
|
3879
|
+
The request object. ``CreateWorkspace`` request message.
|
|
3880
|
+
parent (:class:`str`):
|
|
3881
|
+
Required. The repository in which to create the
|
|
3882
|
+
workspace. Must be in the format
|
|
3883
|
+
``projects/*/locations/*/repositories/*``.
|
|
3884
|
+
|
|
3885
|
+
This corresponds to the ``parent`` field
|
|
3886
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
3887
|
+
should not be set.
|
|
3888
|
+
workspace (:class:`google.cloud.dataform_v1.types.Workspace`):
|
|
3889
|
+
Required. The workspace to create.
|
|
3890
|
+
This corresponds to the ``workspace`` field
|
|
3891
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
3892
|
+
should not be set.
|
|
3893
|
+
workspace_id (:class:`str`):
|
|
3894
|
+
Required. The ID to use for the
|
|
3895
|
+
workspace, which will become the final
|
|
3896
|
+
component of the workspace's resource
|
|
3897
|
+
name.
|
|
3898
|
+
|
|
3899
|
+
This corresponds to the ``workspace_id`` field
|
|
3900
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
3901
|
+
should not be set.
|
|
3902
|
+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
|
|
3903
|
+
should be retried.
|
|
3904
|
+
timeout (float): The timeout for this request.
|
|
3905
|
+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
|
|
3906
|
+
sent along with the request as metadata. Normally, each value must be of type `str`,
|
|
3907
|
+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
|
|
3908
|
+
be of type `bytes`.
|
|
3909
|
+
|
|
3910
|
+
Returns:
|
|
3911
|
+
google.api_core.operation_async.AsyncOperation:
|
|
3912
|
+
An object representing a long-running operation.
|
|
3913
|
+
|
|
3914
|
+
The result type for the operation will be
|
|
3915
|
+
:class:`google.cloud.dataform_v1.types.Workspace`
|
|
3916
|
+
Represents a Dataform Git workspace.
|
|
3917
|
+
|
|
3918
|
+
"""
|
|
3919
|
+
# Create or coerce a protobuf request object.
|
|
3920
|
+
# - Quick check: If we got a request object, we should *not* have
|
|
3921
|
+
# gotten any keyword arguments that map to the request.
|
|
3922
|
+
flattened_params = [parent, workspace, workspace_id]
|
|
3923
|
+
has_flattened_params = (
|
|
3924
|
+
len([param for param in flattened_params if param is not None]) > 0
|
|
3925
|
+
)
|
|
3926
|
+
if request is not None and has_flattened_params:
|
|
3927
|
+
raise ValueError(
|
|
3928
|
+
"If the `request` argument is set, then none of "
|
|
3929
|
+
"the individual field arguments should be set."
|
|
3930
|
+
)
|
|
3931
|
+
|
|
3932
|
+
# - Use the request object if provided (there's no risk of modifying the input as
|
|
3933
|
+
# there are no flattened fields), or create one.
|
|
3934
|
+
if not isinstance(request, dataform.CreateWorkspaceRequest):
|
|
3935
|
+
request = dataform.CreateWorkspaceRequest(request)
|
|
3936
|
+
|
|
3937
|
+
# If we have keyword arguments corresponding to fields on the
|
|
3938
|
+
# request, apply these.
|
|
3939
|
+
if parent is not None:
|
|
3940
|
+
request.parent = parent
|
|
3941
|
+
if workspace is not None:
|
|
3942
|
+
request.workspace = workspace
|
|
3943
|
+
if workspace_id is not None:
|
|
3944
|
+
request.workspace_id = workspace_id
|
|
3945
|
+
|
|
3946
|
+
# Wrap the RPC method; this adds retry and timeout information,
|
|
3947
|
+
# and friendly error handling.
|
|
3948
|
+
rpc = self._client._transport._wrapped_methods[
|
|
3949
|
+
self._client._transport.create_workspace_long_running
|
|
3950
|
+
]
|
|
3951
|
+
|
|
3952
|
+
# Certain fields should be provided within the metadata header;
|
|
3953
|
+
# add these here.
|
|
3954
|
+
metadata = tuple(metadata) + (
|
|
3955
|
+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
|
|
3956
|
+
)
|
|
3957
|
+
|
|
3958
|
+
# Validate the universe domain.
|
|
3959
|
+
self._client._validate_universe_domain()
|
|
3960
|
+
|
|
3961
|
+
# Send the request.
|
|
3962
|
+
response = await rpc(
|
|
3963
|
+
request,
|
|
3964
|
+
retry=retry,
|
|
3965
|
+
timeout=timeout,
|
|
3966
|
+
metadata=metadata,
|
|
3967
|
+
)
|
|
3968
|
+
|
|
3969
|
+
# Wrap the response in an operation future.
|
|
3970
|
+
response = operation_async.from_gapic(
|
|
3971
|
+
response,
|
|
3972
|
+
self._client._transport.operations_client,
|
|
3973
|
+
dataform.Workspace,
|
|
3974
|
+
metadata_type=dataform.CreateWorkspaceMetadata,
|
|
3975
|
+
)
|
|
3976
|
+
|
|
3977
|
+
# Done; return the response.
|
|
3978
|
+
return response
|
|
3979
|
+
|
|
3832
3980
|
async def delete_workspace(
|
|
3833
3981
|
self,
|
|
3834
3982
|
request: Optional[Union[dataform.DeleteWorkspaceRequest, dict]] = None,
|
|
@@ -6384,6 +6532,147 @@ class DataformAsyncClient:
|
|
|
6384
6532
|
# Done; return the response.
|
|
6385
6533
|
return response
|
|
6386
6534
|
|
|
6535
|
+
async def create_compilation_result_long_running(
|
|
6536
|
+
self,
|
|
6537
|
+
request: Optional[Union[dataform.CreateCompilationResultRequest, dict]] = None,
|
|
6538
|
+
*,
|
|
6539
|
+
parent: Optional[str] = None,
|
|
6540
|
+
compilation_result: Optional[dataform.CompilationResult] = None,
|
|
6541
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
6542
|
+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
6543
|
+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
|
|
6544
|
+
) -> operation_async.AsyncOperation:
|
|
6545
|
+
r"""Creates a new CompilationResult in a given project
|
|
6546
|
+
and location asynchronously.
|
|
6547
|
+
|
|
6548
|
+
.. code-block:: python
|
|
6549
|
+
|
|
6550
|
+
# This snippet has been automatically generated and should be regarded as a
|
|
6551
|
+
# code template only.
|
|
6552
|
+
# It will require modifications to work:
|
|
6553
|
+
# - It may require correct/in-range values for request initialization.
|
|
6554
|
+
# - It may require specifying regional endpoints when creating the service
|
|
6555
|
+
# client as shown in:
|
|
6556
|
+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
|
|
6557
|
+
from google.cloud import dataform_v1
|
|
6558
|
+
|
|
6559
|
+
async def sample_create_compilation_result_long_running():
|
|
6560
|
+
# Create a client
|
|
6561
|
+
client = dataform_v1.DataformAsyncClient()
|
|
6562
|
+
|
|
6563
|
+
# Initialize request argument(s)
|
|
6564
|
+
compilation_result = dataform_v1.CompilationResult()
|
|
6565
|
+
compilation_result.git_commitish = "git_commitish_value"
|
|
6566
|
+
|
|
6567
|
+
request = dataform_v1.CreateCompilationResultRequest(
|
|
6568
|
+
parent="parent_value",
|
|
6569
|
+
compilation_result=compilation_result,
|
|
6570
|
+
)
|
|
6571
|
+
|
|
6572
|
+
# Make the request
|
|
6573
|
+
operation = await client.create_compilation_result_long_running(request=request)
|
|
6574
|
+
|
|
6575
|
+
print("Waiting for operation to complete...")
|
|
6576
|
+
|
|
6577
|
+
response = await operation.result()
|
|
6578
|
+
|
|
6579
|
+
# Handle the response
|
|
6580
|
+
print(response)
|
|
6581
|
+
|
|
6582
|
+
Args:
|
|
6583
|
+
request (Optional[Union[google.cloud.dataform_v1.types.CreateCompilationResultRequest, dict]]):
|
|
6584
|
+
The request object. ``CreateCompilationResult`` request message.
|
|
6585
|
+
parent (:class:`str`):
|
|
6586
|
+
Required. The repository in which to create the
|
|
6587
|
+
compilation result. Must be in the format
|
|
6588
|
+
``projects/*/locations/*/repositories/*``.
|
|
6589
|
+
|
|
6590
|
+
This corresponds to the ``parent`` field
|
|
6591
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6592
|
+
should not be set.
|
|
6593
|
+
compilation_result (:class:`google.cloud.dataform_v1.types.CompilationResult`):
|
|
6594
|
+
Required. The compilation result to
|
|
6595
|
+
create.
|
|
6596
|
+
|
|
6597
|
+
This corresponds to the ``compilation_result`` field
|
|
6598
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
6599
|
+
should not be set.
|
|
6600
|
+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
|
|
6601
|
+
should be retried.
|
|
6602
|
+
timeout (float): The timeout for this request.
|
|
6603
|
+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
|
|
6604
|
+
sent along with the request as metadata. Normally, each value must be of type `str`,
|
|
6605
|
+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
|
|
6606
|
+
be of type `bytes`.
|
|
6607
|
+
|
|
6608
|
+
Returns:
|
|
6609
|
+
google.api_core.operation_async.AsyncOperation:
|
|
6610
|
+
An object representing a long-running operation.
|
|
6611
|
+
|
|
6612
|
+
The result type for the operation will be
|
|
6613
|
+
:class:`google.cloud.dataform_v1.types.CompilationResult`
|
|
6614
|
+
Represents the result of compiling a Dataform project.
|
|
6615
|
+
|
|
6616
|
+
"""
|
|
6617
|
+
# Create or coerce a protobuf request object.
|
|
6618
|
+
# - Quick check: If we got a request object, we should *not* have
|
|
6619
|
+
# gotten any keyword arguments that map to the request.
|
|
6620
|
+
flattened_params = [parent, compilation_result]
|
|
6621
|
+
has_flattened_params = (
|
|
6622
|
+
len([param for param in flattened_params if param is not None]) > 0
|
|
6623
|
+
)
|
|
6624
|
+
if request is not None and has_flattened_params:
|
|
6625
|
+
raise ValueError(
|
|
6626
|
+
"If the `request` argument is set, then none of "
|
|
6627
|
+
"the individual field arguments should be set."
|
|
6628
|
+
)
|
|
6629
|
+
|
|
6630
|
+
# - Use the request object if provided (there's no risk of modifying the input as
|
|
6631
|
+
# there are no flattened fields), or create one.
|
|
6632
|
+
if not isinstance(request, dataform.CreateCompilationResultRequest):
|
|
6633
|
+
request = dataform.CreateCompilationResultRequest(request)
|
|
6634
|
+
|
|
6635
|
+
# If we have keyword arguments corresponding to fields on the
|
|
6636
|
+
# request, apply these.
|
|
6637
|
+
if parent is not None:
|
|
6638
|
+
request.parent = parent
|
|
6639
|
+
if compilation_result is not None:
|
|
6640
|
+
request.compilation_result = compilation_result
|
|
6641
|
+
|
|
6642
|
+
# Wrap the RPC method; this adds retry and timeout information,
|
|
6643
|
+
# and friendly error handling.
|
|
6644
|
+
rpc = self._client._transport._wrapped_methods[
|
|
6645
|
+
self._client._transport.create_compilation_result_long_running
|
|
6646
|
+
]
|
|
6647
|
+
|
|
6648
|
+
# Certain fields should be provided within the metadata header;
|
|
6649
|
+
# add these here.
|
|
6650
|
+
metadata = tuple(metadata) + (
|
|
6651
|
+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
|
|
6652
|
+
)
|
|
6653
|
+
|
|
6654
|
+
# Validate the universe domain.
|
|
6655
|
+
self._client._validate_universe_domain()
|
|
6656
|
+
|
|
6657
|
+
# Send the request.
|
|
6658
|
+
response = await rpc(
|
|
6659
|
+
request,
|
|
6660
|
+
retry=retry,
|
|
6661
|
+
timeout=timeout,
|
|
6662
|
+
metadata=metadata,
|
|
6663
|
+
)
|
|
6664
|
+
|
|
6665
|
+
# Wrap the response in an operation future.
|
|
6666
|
+
response = operation_async.from_gapic(
|
|
6667
|
+
response,
|
|
6668
|
+
self._client._transport.operations_client,
|
|
6669
|
+
dataform.CompilationResult,
|
|
6670
|
+
metadata_type=dataform.CreateCompilationResultMetadata,
|
|
6671
|
+
)
|
|
6672
|
+
|
|
6673
|
+
# Done; return the response.
|
|
6674
|
+
return response
|
|
6675
|
+
|
|
6387
6676
|
async def query_compilation_result_actions(
|
|
6388
6677
|
self,
|
|
6389
6678
|
request: Optional[
|