google-cloud-dataform 0.11.5__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.5/google_cloud_dataform.egg-info → google_cloud_dataform-0.11.6}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform/__init__.py +2 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/__init__.py +2 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/gapic_metadata.json +15 -0
- {google_cloud_dataform-0.11.5/google/cloud/dataform_v1beta1 → google_cloud_dataform-0.11.6/google/cloud/dataform_v1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/async_client.py +148 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/client.py +147 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/base.py +14 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/grpc.py +29 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +36 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/rest.py +217 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/rest_base.py +19 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/types/__init__.py +2 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/types/dataform.py +68 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/__init__.py +2 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/gapic_metadata.json +15 -0
- {google_cloud_dataform-0.11.5/google/cloud/dataform_v1 → google_cloud_dataform-0.11.6/google/cloud/dataform_v1beta1}/gapic_version.py +1 -1
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +148 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/client.py +147 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +14 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +29 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +36 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +217 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +19 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/types/__init__.py +2 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/types/dataform.py +369 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6/google_cloud_dataform.egg-info}/PKG-INFO +1 -1
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/test_dataform.py +852 -13
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +862 -13
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/LICENSE +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/MANIFEST.in +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/README.rst +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform/py.typed +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/_compat.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/py.typed +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/pagers.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/_compat.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/py.typed +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/SOURCES.txt +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/requires.txt +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google_cloud_dataform.egg-info/top_level.txt +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/setup.cfg +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/setup.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1/test_compat.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
- {google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/tests/unit/gapic/dataform_v1beta1/test_compat.py +0 -0
{google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform/__init__.py
RENAMED
|
@@ -48,6 +48,7 @@ from google.cloud.dataform_v1beta1.types.dataform import (
|
|
|
48
48
|
CreateTeamFolderRequest,
|
|
49
49
|
CreateWorkflowConfigRequest,
|
|
50
50
|
CreateWorkflowInvocationRequest,
|
|
51
|
+
CreateWorkspaceMetadata,
|
|
51
52
|
CreateWorkspaceRequest,
|
|
52
53
|
DataEncryptionState,
|
|
53
54
|
DeleteBranchRequest,
|
|
@@ -213,6 +214,7 @@ __all__ = (
|
|
|
213
214
|
"CreateTeamFolderRequest",
|
|
214
215
|
"CreateWorkflowConfigRequest",
|
|
215
216
|
"CreateWorkflowInvocationRequest",
|
|
217
|
+
"CreateWorkspaceMetadata",
|
|
216
218
|
"CreateWorkspaceRequest",
|
|
217
219
|
"DataEncryptionState",
|
|
218
220
|
"DeleteBranchRequest",
|
{google_cloud_dataform-0.11.5 → google_cloud_dataform-0.11.6}/google/cloud/dataform_v1/__init__.py
RENAMED
|
@@ -56,6 +56,7 @@ from .types.dataform import (
|
|
|
56
56
|
CreateTeamFolderRequest,
|
|
57
57
|
CreateWorkflowConfigRequest,
|
|
58
58
|
CreateWorkflowInvocationRequest,
|
|
59
|
+
CreateWorkspaceMetadata,
|
|
59
60
|
CreateWorkspaceRequest,
|
|
60
61
|
DataEncryptionState,
|
|
61
62
|
DeleteFolderRequest,
|
|
@@ -201,6 +202,7 @@ __all__ = (
|
|
|
201
202
|
"CreateTeamFolderRequest",
|
|
202
203
|
"CreateWorkflowConfigRequest",
|
|
203
204
|
"CreateWorkflowInvocationRequest",
|
|
205
|
+
"CreateWorkspaceMetadata",
|
|
204
206
|
"CreateWorkspaceRequest",
|
|
205
207
|
"DataEncryptionState",
|
|
206
208
|
"DataformClient",
|
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
"create_workspace"
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
|
+
"CreateWorkspaceLongRunning": {
|
|
79
|
+
"methods": [
|
|
80
|
+
"create_workspace_long_running"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
78
83
|
"DeleteFolder": {
|
|
79
84
|
"methods": [
|
|
80
85
|
"delete_folder"
|
|
@@ -450,6 +455,11 @@
|
|
|
450
455
|
"create_workspace"
|
|
451
456
|
]
|
|
452
457
|
},
|
|
458
|
+
"CreateWorkspaceLongRunning": {
|
|
459
|
+
"methods": [
|
|
460
|
+
"create_workspace_long_running"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
453
463
|
"DeleteFolder": {
|
|
454
464
|
"methods": [
|
|
455
465
|
"delete_folder"
|
|
@@ -825,6 +835,11 @@
|
|
|
825
835
|
"create_workspace"
|
|
826
836
|
]
|
|
827
837
|
},
|
|
838
|
+
"CreateWorkspaceLongRunning": {
|
|
839
|
+
"methods": [
|
|
840
|
+
"create_workspace_long_running"
|
|
841
|
+
]
|
|
842
|
+
},
|
|
828
843
|
"DeleteFolder": {
|
|
829
844
|
"methods": [
|
|
830
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,
|
|
@@ -4326,6 +4326,153 @@ class DataformClient(metaclass=DataformClientMeta):
|
|
|
4326
4326
|
# Done; return the response.
|
|
4327
4327
|
return response
|
|
4328
4328
|
|
|
4329
|
+
def create_workspace_long_running(
|
|
4330
|
+
self,
|
|
4331
|
+
request: Optional[Union[dataform.CreateWorkspaceRequest, dict]] = None,
|
|
4332
|
+
*,
|
|
4333
|
+
parent: Optional[str] = None,
|
|
4334
|
+
workspace: Optional[dataform.Workspace] = None,
|
|
4335
|
+
workspace_id: Optional[str] = None,
|
|
4336
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4337
|
+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
4338
|
+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
|
|
4339
|
+
) -> operation.Operation:
|
|
4340
|
+
r"""Creates a new Workspace in a given Repository
|
|
4341
|
+
asynchronously.
|
|
4342
|
+
|
|
4343
|
+
.. code-block:: python
|
|
4344
|
+
|
|
4345
|
+
# This snippet has been automatically generated and should be regarded as a
|
|
4346
|
+
# code template only.
|
|
4347
|
+
# It will require modifications to work:
|
|
4348
|
+
# - It may require correct/in-range values for request initialization.
|
|
4349
|
+
# - It may require specifying regional endpoints when creating the service
|
|
4350
|
+
# client as shown in:
|
|
4351
|
+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
|
|
4352
|
+
from google.cloud import dataform_v1
|
|
4353
|
+
|
|
4354
|
+
def sample_create_workspace_long_running():
|
|
4355
|
+
# Create a client
|
|
4356
|
+
client = dataform_v1.DataformClient()
|
|
4357
|
+
|
|
4358
|
+
# Initialize request argument(s)
|
|
4359
|
+
request = dataform_v1.CreateWorkspaceRequest(
|
|
4360
|
+
parent="parent_value",
|
|
4361
|
+
workspace_id="workspace_id_value",
|
|
4362
|
+
)
|
|
4363
|
+
|
|
4364
|
+
# Make the request
|
|
4365
|
+
operation = client.create_workspace_long_running(request=request)
|
|
4366
|
+
|
|
4367
|
+
print("Waiting for operation to complete...")
|
|
4368
|
+
|
|
4369
|
+
response = operation.result()
|
|
4370
|
+
|
|
4371
|
+
# Handle the response
|
|
4372
|
+
print(response)
|
|
4373
|
+
|
|
4374
|
+
Args:
|
|
4375
|
+
request (Union[google.cloud.dataform_v1.types.CreateWorkspaceRequest, dict]):
|
|
4376
|
+
The request object. ``CreateWorkspace`` request message.
|
|
4377
|
+
parent (str):
|
|
4378
|
+
Required. The repository in which to create the
|
|
4379
|
+
workspace. Must be in the format
|
|
4380
|
+
``projects/*/locations/*/repositories/*``.
|
|
4381
|
+
|
|
4382
|
+
This corresponds to the ``parent`` field
|
|
4383
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
4384
|
+
should not be set.
|
|
4385
|
+
workspace (google.cloud.dataform_v1.types.Workspace):
|
|
4386
|
+
Required. The workspace to create.
|
|
4387
|
+
This corresponds to the ``workspace`` field
|
|
4388
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
4389
|
+
should not be set.
|
|
4390
|
+
workspace_id (str):
|
|
4391
|
+
Required. The ID to use for the
|
|
4392
|
+
workspace, which will become the final
|
|
4393
|
+
component of the workspace's resource
|
|
4394
|
+
name.
|
|
4395
|
+
|
|
4396
|
+
This corresponds to the ``workspace_id`` field
|
|
4397
|
+
on the ``request`` instance; if ``request`` is provided, this
|
|
4398
|
+
should not be set.
|
|
4399
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
4400
|
+
should be retried.
|
|
4401
|
+
timeout (float): The timeout for this request.
|
|
4402
|
+
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
|
|
4403
|
+
sent along with the request as metadata. Normally, each value must be of type `str`,
|
|
4404
|
+
but for metadata keys ending with the suffix `-bin`, the corresponding values must
|
|
4405
|
+
be of type `bytes`.
|
|
4406
|
+
|
|
4407
|
+
Returns:
|
|
4408
|
+
google.api_core.operation.Operation:
|
|
4409
|
+
An object representing a long-running operation.
|
|
4410
|
+
|
|
4411
|
+
The result type for the operation will be
|
|
4412
|
+
:class:`google.cloud.dataform_v1.types.Workspace`
|
|
4413
|
+
Represents a Dataform Git workspace.
|
|
4414
|
+
|
|
4415
|
+
"""
|
|
4416
|
+
# Create or coerce a protobuf request object.
|
|
4417
|
+
# - Quick check: If we got a request object, we should *not* have
|
|
4418
|
+
# gotten any keyword arguments that map to the request.
|
|
4419
|
+
flattened_params = [parent, workspace, workspace_id]
|
|
4420
|
+
has_flattened_params = (
|
|
4421
|
+
len([param for param in flattened_params if param is not None]) > 0
|
|
4422
|
+
)
|
|
4423
|
+
if request is not None and has_flattened_params:
|
|
4424
|
+
raise ValueError(
|
|
4425
|
+
"If the `request` argument is set, then none of "
|
|
4426
|
+
"the individual field arguments should be set."
|
|
4427
|
+
)
|
|
4428
|
+
|
|
4429
|
+
# - Use the request object if provided (there's no risk of modifying the input as
|
|
4430
|
+
# there are no flattened fields), or create one.
|
|
4431
|
+
if not isinstance(request, dataform.CreateWorkspaceRequest):
|
|
4432
|
+
request = dataform.CreateWorkspaceRequest(request)
|
|
4433
|
+
# If we have keyword arguments corresponding to fields on the
|
|
4434
|
+
# request, apply these.
|
|
4435
|
+
if parent is not None:
|
|
4436
|
+
request.parent = parent
|
|
4437
|
+
if workspace is not None:
|
|
4438
|
+
request.workspace = workspace
|
|
4439
|
+
if workspace_id is not None:
|
|
4440
|
+
request.workspace_id = workspace_id
|
|
4441
|
+
|
|
4442
|
+
# Wrap the RPC method; this adds retry and timeout information,
|
|
4443
|
+
# and friendly error handling.
|
|
4444
|
+
rpc = self._transport._wrapped_methods[
|
|
4445
|
+
self._transport.create_workspace_long_running
|
|
4446
|
+
]
|
|
4447
|
+
|
|
4448
|
+
# Certain fields should be provided within the metadata header;
|
|
4449
|
+
# add these here.
|
|
4450
|
+
metadata = tuple(metadata) + (
|
|
4451
|
+
gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
|
|
4452
|
+
)
|
|
4453
|
+
|
|
4454
|
+
# Validate the universe domain.
|
|
4455
|
+
self._validate_universe_domain()
|
|
4456
|
+
|
|
4457
|
+
# Send the request.
|
|
4458
|
+
response = rpc(
|
|
4459
|
+
request,
|
|
4460
|
+
retry=retry,
|
|
4461
|
+
timeout=timeout,
|
|
4462
|
+
metadata=metadata,
|
|
4463
|
+
)
|
|
4464
|
+
|
|
4465
|
+
# Wrap the response in an operation future.
|
|
4466
|
+
response = operation.from_gapic(
|
|
4467
|
+
response,
|
|
4468
|
+
self._transport.operations_client,
|
|
4469
|
+
dataform.Workspace,
|
|
4470
|
+
metadata_type=dataform.CreateWorkspaceMetadata,
|
|
4471
|
+
)
|
|
4472
|
+
|
|
4473
|
+
# Done; return the response.
|
|
4474
|
+
return response
|
|
4475
|
+
|
|
4329
4476
|
def delete_workspace(
|
|
4330
4477
|
self,
|
|
4331
4478
|
request: Optional[Union[dataform.DeleteWorkspaceRequest, dict]] = None,
|
|
@@ -302,6 +302,11 @@ class DataformTransport(abc.ABC):
|
|
|
302
302
|
default_timeout=None,
|
|
303
303
|
client_info=client_info,
|
|
304
304
|
),
|
|
305
|
+
self.create_workspace_long_running: gapic_v1.method.wrap_method(
|
|
306
|
+
self.create_workspace_long_running,
|
|
307
|
+
default_timeout=None,
|
|
308
|
+
client_info=client_info,
|
|
309
|
+
),
|
|
305
310
|
self.delete_workspace: gapic_v1.method.wrap_method(
|
|
306
311
|
self.delete_workspace,
|
|
307
312
|
default_timeout=None,
|
|
@@ -872,6 +877,15 @@ class DataformTransport(abc.ABC):
|
|
|
872
877
|
]:
|
|
873
878
|
raise NotImplementedError()
|
|
874
879
|
|
|
880
|
+
@property
|
|
881
|
+
def create_workspace_long_running(
|
|
882
|
+
self,
|
|
883
|
+
) -> Callable[
|
|
884
|
+
[dataform.CreateWorkspaceRequest],
|
|
885
|
+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
|
|
886
|
+
]:
|
|
887
|
+
raise NotImplementedError()
|
|
888
|
+
|
|
875
889
|
@property
|
|
876
890
|
def delete_workspace(
|
|
877
891
|
self,
|
|
@@ -1192,6 +1192,35 @@ class DataformGrpcTransport(DataformTransport):
|
|
|
1192
1192
|
)
|
|
1193
1193
|
return self._stubs["create_workspace"]
|
|
1194
1194
|
|
|
1195
|
+
@property
|
|
1196
|
+
def create_workspace_long_running(
|
|
1197
|
+
self,
|
|
1198
|
+
) -> Callable[[dataform.CreateWorkspaceRequest], operations_pb2.Operation]:
|
|
1199
|
+
r"""Return a callable for the create workspace long running method over gRPC.
|
|
1200
|
+
|
|
1201
|
+
Creates a new Workspace in a given Repository
|
|
1202
|
+
asynchronously.
|
|
1203
|
+
|
|
1204
|
+
Returns:
|
|
1205
|
+
Callable[[~.CreateWorkspaceRequest],
|
|
1206
|
+
~.Operation]:
|
|
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 "create_workspace_long_running" not in self._stubs:
|
|
1215
|
+
self._stubs["create_workspace_long_running"] = (
|
|
1216
|
+
self._logged_channel.unary_unary(
|
|
1217
|
+
"/google.cloud.dataform.v1.Dataform/CreateWorkspaceLongRunning",
|
|
1218
|
+
request_serializer=dataform.CreateWorkspaceRequest.serialize,
|
|
1219
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
return self._stubs["create_workspace_long_running"]
|
|
1223
|
+
|
|
1195
1224
|
@property
|
|
1196
1225
|
def delete_workspace(
|
|
1197
1226
|
self,
|
|
@@ -1215,6 +1215,37 @@ class DataformGrpcAsyncIOTransport(DataformTransport):
|
|
|
1215
1215
|
)
|
|
1216
1216
|
return self._stubs["create_workspace"]
|
|
1217
1217
|
|
|
1218
|
+
@property
|
|
1219
|
+
def create_workspace_long_running(
|
|
1220
|
+
self,
|
|
1221
|
+
) -> Callable[
|
|
1222
|
+
[dataform.CreateWorkspaceRequest], Awaitable[operations_pb2.Operation]
|
|
1223
|
+
]:
|
|
1224
|
+
r"""Return a callable for the create workspace long running method over gRPC.
|
|
1225
|
+
|
|
1226
|
+
Creates a new Workspace in a given Repository
|
|
1227
|
+
asynchronously.
|
|
1228
|
+
|
|
1229
|
+
Returns:
|
|
1230
|
+
Callable[[~.CreateWorkspaceRequest],
|
|
1231
|
+
Awaitable[~.Operation]]:
|
|
1232
|
+
A function that, when called, will call the underlying RPC
|
|
1233
|
+
on the server.
|
|
1234
|
+
"""
|
|
1235
|
+
# Generate a "stub function" on-the-fly which will actually make
|
|
1236
|
+
# the request.
|
|
1237
|
+
# gRPC handles serialization and deserialization, so we just need
|
|
1238
|
+
# to pass in the functions for each.
|
|
1239
|
+
if "create_workspace_long_running" not in self._stubs:
|
|
1240
|
+
self._stubs["create_workspace_long_running"] = (
|
|
1241
|
+
self._logged_channel.unary_unary(
|
|
1242
|
+
"/google.cloud.dataform.v1.Dataform/CreateWorkspaceLongRunning",
|
|
1243
|
+
request_serializer=dataform.CreateWorkspaceRequest.serialize,
|
|
1244
|
+
response_deserializer=operations_pb2.Operation.FromString,
|
|
1245
|
+
)
|
|
1246
|
+
)
|
|
1247
|
+
return self._stubs["create_workspace_long_running"]
|
|
1248
|
+
|
|
1218
1249
|
@property
|
|
1219
1250
|
def delete_workspace(
|
|
1220
1251
|
self,
|
|
@@ -2654,6 +2685,11 @@ class DataformGrpcAsyncIOTransport(DataformTransport):
|
|
|
2654
2685
|
default_timeout=None,
|
|
2655
2686
|
client_info=client_info,
|
|
2656
2687
|
),
|
|
2688
|
+
self.create_workspace_long_running: self._wrap_method(
|
|
2689
|
+
self.create_workspace_long_running,
|
|
2690
|
+
default_timeout=None,
|
|
2691
|
+
client_info=client_info,
|
|
2692
|
+
),
|
|
2657
2693
|
self.delete_workspace: self._wrap_method(
|
|
2658
2694
|
self.delete_workspace,
|
|
2659
2695
|
default_timeout=None,
|