google-cloud-dataform 0.11.3__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.
Files changed (62) hide show
  1. {google_cloud_dataform-0.11.3/google_cloud_dataform.egg-info → google_cloud_dataform-0.11.5}/PKG-INFO +3 -2
  2. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform/__init__.py +8 -0
  3. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform/gapic_version.py +1 -1
  4. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/__init__.py +7 -87
  5. google_cloud_dataform-0.11.5/google/cloud/dataform_v1/_compat.py +262 -0
  6. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/gapic_metadata.json +15 -0
  7. {google_cloud_dataform-0.11.3/google/cloud/dataform_v1beta1 → google_cloud_dataform-0.11.5/google/cloud/dataform_v1}/gapic_version.py +1 -1
  8. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/async_client.py +141 -0
  9. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/client.py +163 -157
  10. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/base.py +14 -0
  11. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/grpc.py +30 -0
  12. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/grpc_asyncio.py +37 -0
  13. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/rest.py +934 -940
  14. google_cloud_dataform-0.11.5/google/cloud/dataform_v1/services/dataform/transports/rest_base.py +1459 -0
  15. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/types/__init__.py +4 -0
  16. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/types/dataform.py +296 -1
  17. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/__init__.py +11 -87
  18. google_cloud_dataform-0.11.5/google/cloud/dataform_v1beta1/_compat.py +262 -0
  19. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/gapic_metadata.json +30 -0
  20. {google_cloud_dataform-0.11.3/google/cloud/dataform_v1 → google_cloud_dataform-0.11.5/google/cloud/dataform_v1beta1}/gapic_version.py +1 -1
  21. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +244 -0
  22. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/client.py +282 -157
  23. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +156 -0
  24. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +31 -0
  25. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +58 -0
  26. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +71 -0
  27. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +1204 -1009
  28. google_cloud_dataform-0.11.5/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +1575 -0
  29. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/types/__init__.py +8 -0
  30. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/types/dataform.py +381 -2
  31. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5/google_cloud_dataform.egg-info}/PKG-INFO +3 -2
  32. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/SOURCES.txt +4 -0
  33. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/requires.txt +1 -1
  34. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/setup.py +2 -1
  35. google_cloud_dataform-0.11.5/tests/unit/gapic/dataform_v1/test_compat.py +429 -0
  36. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1/test_dataform.py +1567 -1881
  37. google_cloud_dataform-0.11.5/tests/unit/gapic/dataform_v1beta1/test_compat.py +429 -0
  38. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +2755 -2245
  39. google_cloud_dataform-0.11.3/google/cloud/dataform_v1/services/dataform/transports/rest_base.py +0 -4073
  40. google_cloud_dataform-0.11.3/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +0 -4395
  41. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/LICENSE +0 -0
  42. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/MANIFEST.in +0 -0
  43. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/README.rst +0 -0
  44. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform/py.typed +0 -0
  45. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/py.typed +0 -0
  46. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/__init__.py +0 -0
  47. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/__init__.py +0 -0
  48. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/pagers.py +0 -0
  49. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1/services/dataform/transports/__init__.py +0 -0
  50. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/py.typed +0 -0
  51. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
  52. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
  53. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
  54. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
  55. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
  56. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/google_cloud_dataform.egg-info/top_level.txt +0 -0
  57. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/setup.cfg +0 -0
  58. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/__init__.py +0 -0
  59. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/__init__.py +0 -0
  60. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/gapic/__init__.py +0 -0
  61. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1/__init__.py +0 -0
  62. {google_cloud_dataform-0.11.3 → google_cloud_dataform-0.11.5}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-dataform
3
- Version: 0.11.3
3
+ Version: 0.11.5
4
4
  Summary: Google Cloud Dataform API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-dataform
6
6
  Author: Google LLC
@@ -17,11 +17,12 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
20
21
  Classifier: Operating System :: OS Independent
21
22
  Classifier: Topic :: Internet
22
23
  Requires-Python: >=3.10
23
24
  License-File: LICENSE
24
- Requires-Dist: google-api-core[grpc]<3.0.0,>=2.25.0
25
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.28.0
25
26
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
26
27
  Requires-Dist: grpcio<2.0.0,>=1.59.0
27
28
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
@@ -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,
@@ -121,6 +124,7 @@ from google.cloud.dataform_v1beta1.types.dataform import (
121
124
  MoveRepositoryMetadata,
122
125
  MoveRepositoryRequest,
123
126
  NotebookRuntimeOptions,
127
+ OAuthConfig,
124
128
  PipelineConfig,
125
129
  PrivateResourceMetadata,
126
130
  PullGitCommitsRequest,
@@ -201,6 +205,7 @@ __all__ = (
201
205
  "ComputeRepositoryAccessTokenStatusRequest",
202
206
  "ComputeRepositoryAccessTokenStatusResponse",
203
207
  "Config",
208
+ "CreateCompilationResultMetadata",
204
209
  "CreateCompilationResultRequest",
205
210
  "CreateFolderRequest",
206
211
  "CreateReleaseConfigRequest",
@@ -241,6 +246,8 @@ __all__ = (
241
246
  "FetchRepositoryHistoryResponse",
242
247
  "FetchWorkspaceBranchesRequest",
243
248
  "FetchWorkspaceBranchesResponse",
249
+ "FetchWorkspaceHistoryRequest",
250
+ "FetchWorkspaceHistoryResponse",
244
251
  "FileSearchResult",
245
252
  "FilesystemEntryMetadata",
246
253
  "Folder",
@@ -281,6 +288,7 @@ __all__ = (
281
288
  "MoveRepositoryMetadata",
282
289
  "MoveRepositoryRequest",
283
290
  "NotebookRuntimeOptions",
291
+ "OAuthConfig",
284
292
  "PipelineConfig",
285
293
  "PrivateResourceMetadata",
286
294
  "PullGitCommitsRequest",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.11.3" # {x-release-please-version}
16
+ __version__ = "0.11.5" # {x-release-please-version}
@@ -13,16 +13,12 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- import sys
17
-
18
16
  import google.api_core as api_core
19
17
 
20
18
  from google.cloud.dataform_v1 import gapic_version as package_version
21
19
 
22
20
  __version__ = package_version.__version__
23
21
 
24
- from importlib import metadata
25
-
26
22
  # PEP 0810: Explicit Lazy Imports
27
23
  # Python 3.15+ natively intercepts and defers these imports.
28
24
  # Developers can disable this behavior and force eager imports.
@@ -52,6 +48,7 @@ from .types.dataform import (
52
48
  ComputeRepositoryAccessTokenStatusRequest,
53
49
  ComputeRepositoryAccessTokenStatusResponse,
54
50
  Config,
51
+ CreateCompilationResultMetadata,
55
52
  CreateCompilationResultRequest,
56
53
  CreateFolderRequest,
57
54
  CreateReleaseConfigRequest,
@@ -124,6 +121,7 @@ from .types.dataform import (
124
121
  MoveRepositoryMetadata,
125
122
  MoveRepositoryRequest,
126
123
  NotebookRuntimeOptions,
124
+ OAuthConfig,
127
125
  PipelineConfig,
128
126
  PrivateResourceMetadata,
129
127
  PullGitCommitsRequest,
@@ -178,89 +176,6 @@ from .types.dataform import (
178
176
  WriteFileResponse,
179
177
  )
180
178
 
181
- if hasattr(api_core, "check_python_version") and hasattr(
182
- api_core, "check_dependency_versions"
183
- ): # pragma: NO COVER
184
- api_core.check_python_version("google.cloud.dataform_v1") # type: ignore
185
- api_core.check_dependency_versions("google.cloud.dataform_v1") # type: ignore
186
- else: # pragma: NO COVER
187
- # An older version of api_core is installed which does not define the
188
- # functions above. We do equivalent checks manually.
189
- try:
190
- import warnings
191
-
192
- _py_version_str = sys.version.split()[0]
193
- _package_label = "google.cloud.dataform_v1"
194
- if sys.version_info < (3, 10):
195
- warnings.warn(
196
- "You are using a non-supported Python version "
197
- + f"({_py_version_str}). Google will not post any further "
198
- + f"updates to {_package_label} supporting this Python version. "
199
- + "Please upgrade to the latest Python version, or at "
200
- + f"least to Python 3.10, and then update {_package_label}.",
201
- FutureWarning,
202
- )
203
-
204
- def parse_version_to_tuple(version_string: str):
205
- """Safely converts a semantic version string to a comparable tuple of integers.
206
- Example: "6.33.5" -> (6, 33, 5)
207
- Ignores non-numeric parts and handles common version formats.
208
- Args:
209
- version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
210
- Returns:
211
- Tuple of integers for the parsed version string.
212
- """
213
- parts = []
214
- for part in version_string.split("."):
215
- try:
216
- parts.append(int(part))
217
- except ValueError:
218
- # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
219
- # This is a simplification compared to 'packaging.parse_version', but sufficient
220
- # for comparing strictly numeric semantic versions.
221
- break
222
- return tuple(parts)
223
-
224
- def _get_version(dependency_name):
225
- try:
226
- version_string: str = metadata.version(dependency_name)
227
- parsed_version = parse_version_to_tuple(version_string)
228
- return (parsed_version, version_string)
229
- except Exception:
230
- # Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
231
- # or errors during parse_version_to_tuple
232
- return (None, "--")
233
-
234
- _dependency_package = "google.protobuf"
235
- _next_supported_version = "6.33.5"
236
- _next_supported_version_tuple = (6, 33, 5)
237
- _recommendation = " (we recommend 7.x)"
238
- (_version_used, _version_used_string) = _get_version(_dependency_package)
239
- if _version_used and _version_used < _next_supported_version_tuple:
240
- warnings.warn(
241
- f"Package {_package_label} depends on "
242
- + f"{_dependency_package}, currently installed at version "
243
- + f"{_version_used_string}. Future updates to "
244
- + f"{_package_label} will require {_dependency_package} at "
245
- + f"version {_next_supported_version} or higher{_recommendation}."
246
- + " Please ensure "
247
- + "that either (a) your Python environment doesn't pin the "
248
- + f"version of {_dependency_package}, so that updates to "
249
- + f"{_package_label} can require the higher version, or "
250
- + "(b) you manually update your Python environment to use at "
251
- + f"least version {_next_supported_version} of "
252
- + f"{_dependency_package}.",
253
- FutureWarning,
254
- )
255
- except Exception:
256
- warnings.warn(
257
- "Could not determine the version of Python "
258
- + "currently being used. To continue receiving "
259
- + "updates for {_package_label}, ensure you are "
260
- + "using a supported version of Python; see "
261
- + "https://devguide.python.org/versions/"
262
- )
263
-
264
179
  __all__ = (
265
180
  "DataformAsyncClient",
266
181
  "CancelWorkflowInvocationRequest",
@@ -278,6 +193,7 @@ __all__ = (
278
193
  "ComputeRepositoryAccessTokenStatusRequest",
279
194
  "ComputeRepositoryAccessTokenStatusResponse",
280
195
  "Config",
196
+ "CreateCompilationResultMetadata",
281
197
  "CreateCompilationResultRequest",
282
198
  "CreateFolderRequest",
283
199
  "CreateReleaseConfigRequest",
@@ -351,6 +267,7 @@ __all__ = (
351
267
  "MoveRepositoryMetadata",
352
268
  "MoveRepositoryRequest",
353
269
  "NotebookRuntimeOptions",
270
+ "OAuthConfig",
354
271
  "PipelineConfig",
355
272
  "PrivateResourceMetadata",
356
273
  "PullGitCommitsRequest",
@@ -404,3 +321,6 @@ __all__ = (
404
321
  "WriteFileRequest",
405
322
  "WriteFileResponse",
406
323
  )
324
+
325
+ api_core.check_python_version("google.cloud.dataform_v1")
326
+ api_core.check_dependency_versions("google.cloud.dataform_v1")
@@ -0,0 +1,262 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 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
+ """A compatibility module for older versions of google-api-core."""
17
+
18
+ import json
19
+ import os
20
+ from typing import Any, Dict, List, Optional, Tuple
21
+ from urllib.parse import urlparse, urlunparse
22
+
23
+ from google.api_core import path_template
24
+ from google.api_core.universe import EmptyUniverseError
25
+ from google.auth.exceptions import MutualTLSChannelError
26
+ from google.protobuf import json_format
27
+
28
+ try:
29
+ # note: `#type: ignore` is added because the return type for `should_use_client_cert`
30
+ # is different than that of the fallback implementation below. This will be removed once
31
+ # we bump the minimum supported version of google-auth.
32
+ from google.auth.transport.mtls import should_use_client_cert # type: ignore
33
+ except ImportError: # pragma: NO COVER
34
+
35
+ def should_use_client_cert():
36
+ """Returns whether client certificate should be used for mTLS."""
37
+ use_client_cert = os.getenv(
38
+ "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
39
+ ).lower()
40
+ if use_client_cert not in ("true", "false"):
41
+ raise ValueError(
42
+ "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
43
+ " either `true` or `false`"
44
+ )
45
+ return use_client_cert == "true"
46
+
47
+
48
+ def read_environment_variables():
49
+ """Returns the environment variables used by the client.
50
+
51
+ Returns:
52
+ Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE,
53
+ GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables.
54
+
55
+ Raises:
56
+ ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not
57
+ any of ["true", "false"].
58
+ google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
59
+ is not any of ["auto", "never", "always"].
60
+ """
61
+ use_client_cert = should_use_client_cert()
62
+ use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
63
+ universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
64
+ if use_mtls_endpoint not in ("auto", "never", "always"):
65
+ raise MutualTLSChannelError(
66
+ "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`,"
67
+ " `auto` or `always`"
68
+ )
69
+ return use_client_cert, use_mtls_endpoint, universe_domain_env
70
+
71
+
72
+ DEFAULT_UNIVERSE = "googleapis.com"
73
+
74
+ try:
75
+ from google.api_core.universe import get_default_mtls_endpoint
76
+ except ImportError: # pragma: NO COVER
77
+
78
+ def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
79
+ """Converts api endpoint to mTLS endpoint.
80
+
81
+ Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
82
+ "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
83
+ Other URLs (including those that do not match these domain suffixes or
84
+ already contain '.mtls.') are passed through as-is.
85
+
86
+ Args:
87
+ api_endpoint (Optional[str]): the api endpoint to convert.
88
+
89
+ Returns:
90
+ Optional[str]: converted mTLS api endpoint.
91
+ """
92
+ if not api_endpoint or ".mtls." in api_endpoint.lower():
93
+ return api_endpoint
94
+
95
+ has_scheme = "://" in api_endpoint
96
+ if not has_scheme:
97
+ parsed = urlparse("//" + api_endpoint)
98
+ else:
99
+ parsed = urlparse(api_endpoint)
100
+
101
+ host = parsed.hostname
102
+ if not host:
103
+ return api_endpoint
104
+
105
+ port = f":{parsed.port}" if parsed.port else ""
106
+
107
+ lowered_host = host.lower()
108
+ suffix_sandbox = ".sandbox.googleapis.com"
109
+ suffix_google = ".googleapis.com"
110
+ if lowered_host.endswith(suffix_sandbox):
111
+ new_host = host[: -len(suffix_sandbox)] + ".mtls.sandbox.googleapis.com"
112
+ elif lowered_host.endswith(suffix_google):
113
+ new_host = host[: -len(suffix_google)] + ".mtls.googleapis.com"
114
+ else:
115
+ return api_endpoint
116
+
117
+ netloc = new_host + port
118
+ new_parsed = parsed._replace(netloc=netloc)
119
+
120
+ if not has_scheme:
121
+ return urlunparse(new_parsed)[2:]
122
+ else:
123
+ return urlunparse(new_parsed)
124
+
125
+
126
+ try:
127
+ from google.api_core.universe import get_api_endpoint
128
+ except ImportError: # pragma: NO COVER
129
+
130
+ def get_api_endpoint(
131
+ api_override: Optional[str],
132
+ universe_domain: str,
133
+ default_universe: str,
134
+ default_mtls_endpoint: Optional[str],
135
+ default_endpoint_template: str,
136
+ use_mtls: bool,
137
+ ) -> str:
138
+ """Return the API endpoint used by the client.
139
+
140
+ Args:
141
+ api_override (Optional[str]): The API endpoint override. If specified,
142
+ this is always returned.
143
+ universe_domain (str): The universe domain used by the client.
144
+ default_universe (str): The default universe domain.
145
+ default_mtls_endpoint (Optional[str]): The default mTLS endpoint.
146
+ default_endpoint_template (str): The default endpoint template containing
147
+ a placeholder `{UNIVERSE_DOMAIN}`.
148
+ use_mtls (bool): Whether to use the mTLS endpoint.
149
+
150
+ Returns:
151
+ str: The API endpoint to be used by the client.
152
+
153
+ Raises:
154
+ google.auth.exceptions.MutualTLSChannelError: If mTLS is requested but
155
+ not supported in the configured universe domain.
156
+ ValueError: If mTLS is requested but no mTLS endpoint is available.
157
+ """
158
+ if api_override is not None:
159
+ return api_override
160
+
161
+ if use_mtls:
162
+ if universe_domain.lower() != default_universe.lower():
163
+ raise MutualTLSChannelError(
164
+ f"mTLS is not supported in any universe other than {default_universe}."
165
+ )
166
+ if not default_mtls_endpoint:
167
+ raise ValueError("mTLS endpoint is not available.")
168
+ return default_mtls_endpoint
169
+ else:
170
+ return default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
171
+
172
+
173
+ try:
174
+ from google.api_core.universe import get_universe_domain
175
+ except ImportError: # pragma: NO COVER
176
+
177
+ def get_universe_domain(
178
+ *potential_universes: Optional[str],
179
+ default_universe: str,
180
+ ) -> str:
181
+ """Return the universe domain used by the client.
182
+
183
+ Args:
184
+ *potential_universes (Optional[str]): Potential universe domains in order of preference.
185
+ default_universe (str): The default universe domain.
186
+
187
+ Returns:
188
+ str: The universe domain to be used by the client.
189
+
190
+ Raises:
191
+ EmptyUniverseError: If the resolved universe domain is an empty string.
192
+ """
193
+ resolved = next(
194
+ (x.strip() for x in potential_universes if x is not None),
195
+ default_universe,
196
+ )
197
+
198
+ if not resolved:
199
+ raise EmptyUniverseError()
200
+ return resolved
201
+
202
+
203
+ try:
204
+ from google.api_core.rest_helpers import transcode_request # type: ignore
205
+ except ImportError: # pragma: NO COVER
206
+
207
+ def transcode_request(
208
+ http_options: List[Dict[str, str]],
209
+ request: Any,
210
+ required_fields_default_values: Optional[Dict[str, Any]] = None,
211
+ rest_numeric_enums: bool = False,
212
+ ) -> Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]:
213
+ """Transcodes a request into HTTP method, URI, body, and query parameters.
214
+
215
+ Args:
216
+ http_options (List[Dict[str, str]]): List of HTTP transcoding rules.
217
+ request (Any): The protobuf or proto-plus request message.
218
+ required_fields_default_values (Optional[Dict[str, Any]]): Dictionary
219
+ of required fields default values to merge into query parameters if missing.
220
+ rest_numeric_enums (bool): Whether to encode enums as integers.
221
+
222
+ Returns:
223
+ Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]: A tuple containing:
224
+ - The raw transcoded request dictionary (containing keys like 'uri', 'method').
225
+ - The serialized request body JSON string, or None if no body.
226
+ - The query parameters dictionary.
227
+ """
228
+ if request is None:
229
+ raise TypeError("request cannot be None")
230
+
231
+ # Convert proto-plus message to its underlying protobuf message if needed
232
+ pb_request = getattr(request, "_pb", request)
233
+
234
+ transcoded_request = path_template.transcode(http_options, pb_request)
235
+
236
+ body_json = None
237
+ if transcoded_request.get("body") is not None:
238
+ body_json = json_format.MessageToJson(
239
+ transcoded_request["body"],
240
+ use_integers_for_enums=rest_numeric_enums,
241
+ )
242
+
243
+ query_params_json = {}
244
+ if transcoded_request.get("query_params") is not None:
245
+ query_params_json = json.loads(
246
+ json_format.MessageToJson(
247
+ transcoded_request["query_params"],
248
+ use_integers_for_enums=rest_numeric_enums,
249
+ )
250
+ )
251
+
252
+ # If required_fields_default_values is provided, we merge default values for missing
253
+ # required fields into the query parameters.
254
+ if required_fields_default_values:
255
+ for k, v in required_fields_default_values.items():
256
+ if k not in query_params_json:
257
+ query_params_json[k] = v
258
+
259
+ if rest_numeric_enums:
260
+ query_params_json["$alt"] = "json;enum-encoding=int"
261
+
262
+ return transcoded_request, body_json, query_params_json
@@ -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"
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.11.3" # {x-release-please-version}
16
+ __version__ = "0.11.5" # {x-release-please-version}
@@ -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[