google-cloud-container 2.62.0__tar.gz → 2.64.0__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 (57) hide show
  1. {google_cloud_container-2.62.0/google_cloud_container.egg-info → google_cloud_container-2.64.0}/PKG-INFO +6 -8
  2. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/README.rst +2 -2
  3. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container/__init__.py +8 -0
  4. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container/gapic_version.py +1 -1
  5. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/__init__.py +9 -0
  6. {google_cloud_container-2.62.0/google/cloud/container_v1beta1 → google_cloud_container-2.64.0/google/cloud/container_v1}/gapic_version.py +1 -1
  7. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/async_client.py +15 -7
  8. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/client.py +41 -20
  9. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/pagers.py +2 -2
  10. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/base.py +16 -7
  11. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +42 -38
  12. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +41 -37
  13. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/rest.py +51 -70
  14. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +1 -1
  15. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/types/__init__.py +8 -0
  16. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/types/cluster_service.py +946 -61
  17. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/__init__.py +19 -0
  18. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/gapic_metadata.json +10 -0
  19. {google_cloud_container-2.62.0/google/cloud/container_v1 → google_cloud_container-2.64.0/google/cloud/container_v1beta1}/gapic_version.py +1 -1
  20. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +107 -7
  21. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/client.py +133 -20
  22. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/pagers.py +2 -2
  23. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py +30 -7
  24. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +74 -38
  25. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +79 -37
  26. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/types/__init__.py +18 -0
  27. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/types/cluster_service.py +988 -69
  28. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0/google_cloud_container.egg-info}/PKG-INFO +6 -8
  29. google_cloud_container-2.64.0/google_cloud_container.egg-info/requires.txt +11 -0
  30. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/setup.py +3 -5
  31. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1/test_cluster_manager.py +777 -616
  32. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +508 -100
  33. google_cloud_container-2.62.0/google_cloud_container.egg-info/requires.txt +0 -11
  34. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/LICENSE +0 -0
  35. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/MANIFEST.in +0 -0
  36. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container/py.typed +0 -0
  37. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/gapic_metadata.json +0 -0
  38. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/py.typed +0 -0
  39. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/__init__.py +0 -0
  40. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/__init__.py +0 -0
  41. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/__init__.py +0 -0
  42. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/py.typed +0 -0
  43. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/__init__.py +0 -0
  44. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/__init__.py +0 -0
  45. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py +0 -0
  46. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/SOURCES.txt +0 -0
  47. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/dependency_links.txt +0 -0
  48. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/not-zip-safe +0 -0
  49. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/top_level.txt +0 -0
  50. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/setup.cfg +0 -0
  51. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/__init__.py +0 -0
  52. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/system/__init__.py +0 -0
  53. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/system/smoke_test.py +0 -0
  54. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/__init__.py +0 -0
  55. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/gapic/__init__.py +0 -0
  56. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1/__init__.py +0 -0
  57. {google_cloud_container-2.62.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1beta1/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-container
3
- Version: 2.62.0
3
+ Version: 2.64.0
4
4
  Summary: Google Cloud Container API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container
6
6
  Author: Google LLC
@@ -12,8 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
15
  Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
@@ -22,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Programming Language :: Python :: 3.14
23
21
  Classifier: Operating System :: OS Independent
24
22
  Classifier: Topic :: Internet
25
- Requires-Python: >=3.7
23
+ Requires-Python: >=3.9
26
24
  License-File: LICENSE
27
- Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0,>=1.34.1
25
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
28
26
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
29
27
  Requires-Dist: grpcio<2.0.0,>=1.33.2
30
28
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
31
29
  Requires-Dist: proto-plus<2.0.0,>=1.22.3
32
30
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
33
- Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
31
+ Requires-Dist: protobuf<8.0.0,>=4.25.8
34
32
  Dynamic: author
35
33
  Dynamic: author-email
36
34
  Dynamic: classifier
@@ -106,14 +104,14 @@ Supported Python Versions
106
104
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
107
105
  Python.
108
106
 
109
- Python >= 3.7, including 3.14
107
+ Python >= 3.9, including 3.14
110
108
 
111
109
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
112
110
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
113
111
 
114
112
  Unsupported Python Versions
115
113
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
- Python <= 3.6
114
+ Python <= 3.8
117
115
 
118
116
  If you are using an `end-of-life`_
119
117
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -61,14 +61,14 @@ Supported Python Versions
61
61
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
62
62
  Python.
63
63
 
64
- Python >= 3.7, including 3.14
64
+ Python >= 3.9, including 3.14
65
65
 
66
66
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
67
67
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
68
68
 
69
69
  Unsupported Python Versions
70
70
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
- Python <= 3.6
71
+ Python <= 3.8
72
72
 
73
73
  If you are using an `end-of-life`_
74
74
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -73,6 +73,7 @@ from google.cloud.container_v1.types.cluster_service import (
73
73
  DeleteNodePoolRequest,
74
74
  DesiredAdditionalIPRangesConfig,
75
75
  DesiredEnterpriseConfig,
76
+ DisruptionEvent,
76
77
  DnsCacheConfig,
77
78
  DNSConfig,
78
79
  EnterpriseConfig,
@@ -99,6 +100,7 @@ from google.cloud.container_v1.types.cluster_service import (
99
100
  GetServerConfigRequest,
100
101
  GkeAutoUpgradeConfig,
101
102
  GkeBackupAgentConfig,
103
+ GPUDirectConfig,
102
104
  GPUDriverInstallationConfig,
103
105
  GPUSharingConfig,
104
106
  HighScaleCheckpointingConfig,
@@ -131,6 +133,7 @@ from google.cloud.container_v1.types.cluster_service import (
131
133
  MaintenanceExclusionOptions,
132
134
  MaintenancePolicy,
133
135
  MaintenanceWindow,
136
+ ManagedOpenTelemetryConfig,
134
137
  ManagedPrometheusConfig,
135
138
  MasterAuth,
136
139
  MasterAuthorizedNetworksConfig,
@@ -204,6 +207,7 @@ from google.cloud.container_v1.types.cluster_service import (
204
207
  SetNodePoolSizeRequest,
205
208
  ShieldedInstanceConfig,
206
209
  ShieldedNodes,
210
+ SliceControllerConfig,
207
211
  SoleTenantConfig,
208
212
  StackType,
209
213
  StartIPRotationRequest,
@@ -280,6 +284,7 @@ __all__ = (
280
284
  "DeleteNodePoolRequest",
281
285
  "DesiredAdditionalIPRangesConfig",
282
286
  "DesiredEnterpriseConfig",
287
+ "DisruptionEvent",
283
288
  "DnsCacheConfig",
284
289
  "DNSConfig",
285
290
  "EnterpriseConfig",
@@ -306,6 +311,7 @@ __all__ = (
306
311
  "GetServerConfigRequest",
307
312
  "GkeAutoUpgradeConfig",
308
313
  "GkeBackupAgentConfig",
314
+ "GPUDirectConfig",
309
315
  "GPUDriverInstallationConfig",
310
316
  "GPUSharingConfig",
311
317
  "HighScaleCheckpointingConfig",
@@ -336,6 +342,7 @@ __all__ = (
336
342
  "MaintenanceExclusionOptions",
337
343
  "MaintenancePolicy",
338
344
  "MaintenanceWindow",
345
+ "ManagedOpenTelemetryConfig",
339
346
  "ManagedPrometheusConfig",
340
347
  "MasterAuth",
341
348
  "MasterAuthorizedNetworksConfig",
@@ -407,6 +414,7 @@ __all__ = (
407
414
  "SetNodePoolSizeRequest",
408
415
  "ShieldedInstanceConfig",
409
416
  "ShieldedNodes",
417
+ "SliceControllerConfig",
410
418
  "SoleTenantConfig",
411
419
  "StartIPRotationRequest",
412
420
  "StatefulHAConfig",
@@ -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__ = "2.62.0" # {x-release-please-version}
16
+ __version__ = "2.64.0" # {x-release-please-version}
@@ -28,6 +28,7 @@ else: # pragma: NO COVER
28
28
  # this code path once we drop support for Python 3.7
29
29
  import importlib_metadata as metadata
30
30
 
31
+
31
32
  from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
32
33
  from .types.cluster_service import (
33
34
  AcceleratorConfig,
@@ -78,6 +79,7 @@ from .types.cluster_service import (
78
79
  DeleteNodePoolRequest,
79
80
  DesiredAdditionalIPRangesConfig,
80
81
  DesiredEnterpriseConfig,
82
+ DisruptionEvent,
81
83
  DnsCacheConfig,
82
84
  DNSConfig,
83
85
  EnterpriseConfig,
@@ -104,6 +106,7 @@ from .types.cluster_service import (
104
106
  GetServerConfigRequest,
105
107
  GkeAutoUpgradeConfig,
106
108
  GkeBackupAgentConfig,
109
+ GPUDirectConfig,
107
110
  GPUDriverInstallationConfig,
108
111
  GPUSharingConfig,
109
112
  HighScaleCheckpointingConfig,
@@ -136,6 +139,7 @@ from .types.cluster_service import (
136
139
  MaintenanceExclusionOptions,
137
140
  MaintenancePolicy,
138
141
  MaintenanceWindow,
142
+ ManagedOpenTelemetryConfig,
139
143
  ManagedPrometheusConfig,
140
144
  MasterAuth,
141
145
  MasterAuthorizedNetworksConfig,
@@ -209,6 +213,7 @@ from .types.cluster_service import (
209
213
  SetNodePoolSizeRequest,
210
214
  ShieldedInstanceConfig,
211
215
  ShieldedNodes,
216
+ SliceControllerConfig,
212
217
  SoleTenantConfig,
213
218
  StackType,
214
219
  StartIPRotationRequest,
@@ -381,6 +386,7 @@ __all__ = (
381
386
  "DeleteNodePoolRequest",
382
387
  "DesiredAdditionalIPRangesConfig",
383
388
  "DesiredEnterpriseConfig",
389
+ "DisruptionEvent",
384
390
  "DnsCacheConfig",
385
391
  "EnterpriseConfig",
386
392
  "EphemeralStorageLocalSsdConfig",
@@ -391,6 +397,7 @@ __all__ = (
391
397
  "FetchClusterUpgradeInfoRequest",
392
398
  "FetchNodePoolUpgradeInfoRequest",
393
399
  "Fleet",
400
+ "GPUDirectConfig",
394
401
  "GPUDriverInstallationConfig",
395
402
  "GPUSharingConfig",
396
403
  "GatewayAPIConfig",
@@ -438,6 +445,7 @@ __all__ = (
438
445
  "MaintenanceExclusionOptions",
439
446
  "MaintenancePolicy",
440
447
  "MaintenanceWindow",
448
+ "ManagedOpenTelemetryConfig",
441
449
  "ManagedPrometheusConfig",
442
450
  "MasterAuth",
443
451
  "MasterAuthorizedNetworksConfig",
@@ -511,6 +519,7 @@ __all__ = (
511
519
  "SetNodePoolSizeRequest",
512
520
  "ShieldedInstanceConfig",
513
521
  "ShieldedNodes",
522
+ "SliceControllerConfig",
514
523
  "SoleTenantConfig",
515
524
  "StackType",
516
525
  "StartIPRotationRequest",
@@ -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__ = "2.62.0" # {x-release-please-version}
16
+ __version__ = "2.64.0" # {x-release-please-version}
@@ -13,9 +13,10 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- from collections import OrderedDict
17
16
  import logging as std_logging
18
17
  import re
18
+ import warnings
19
+ from collections import OrderedDict
19
20
  from typing import (
20
21
  Callable,
21
22
  Dict,
@@ -28,15 +29,14 @@ from typing import (
28
29
  Type,
29
30
  Union,
30
31
  )
31
- import warnings
32
32
 
33
+ import google.protobuf
33
34
  from google.api_core import exceptions as core_exceptions
34
35
  from google.api_core import gapic_v1
35
36
  from google.api_core import retry_async as retries
36
37
  from google.api_core.client_options import ClientOptions
37
38
  from google.auth import credentials as ga_credentials # type: ignore
38
39
  from google.oauth2 import service_account # type: ignore
39
- import google.protobuf
40
40
 
41
41
  from google.cloud.container_v1 import gapic_version as package_version
42
42
 
@@ -45,7 +45,7 @@ try:
45
45
  except AttributeError: # pragma: NO COVER
46
46
  OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
47
47
 
48
- from google.rpc import status_pb2 # type: ignore
48
+ import google.rpc.status_pb2 as status_pb2 # type: ignore
49
49
 
50
50
  from google.cloud.container_v1.services.cluster_manager import pagers
51
51
  from google.cloud.container_v1.types import cluster_service
@@ -82,6 +82,8 @@ class ClusterManagerAsyncClient:
82
82
  parse_crypto_key_version_path = staticmethod(
83
83
  ClusterManagerClient.parse_crypto_key_version_path
84
84
  )
85
+ subnetwork_path = staticmethod(ClusterManagerClient.subnetwork_path)
86
+ parse_subnetwork_path = staticmethod(ClusterManagerClient.parse_subnetwork_path)
85
87
  topic_path = staticmethod(ClusterManagerClient.topic_path)
86
88
  parse_topic_path = staticmethod(ClusterManagerClient.parse_topic_path)
87
89
  common_billing_account_path = staticmethod(
@@ -122,7 +124,10 @@ class ClusterManagerAsyncClient:
122
124
  Returns:
123
125
  ClusterManagerAsyncClient: The constructed client.
124
126
  """
125
- return ClusterManagerClient.from_service_account_info.__func__(ClusterManagerAsyncClient, info, *args, **kwargs) # type: ignore
127
+ sa_info_func = (
128
+ ClusterManagerClient.from_service_account_info.__func__ # type: ignore
129
+ )
130
+ return sa_info_func(ClusterManagerAsyncClient, info, *args, **kwargs)
126
131
 
127
132
  @classmethod
128
133
  def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -138,7 +143,10 @@ class ClusterManagerAsyncClient:
138
143
  Returns:
139
144
  ClusterManagerAsyncClient: The constructed client.
140
145
  """
141
- return ClusterManagerClient.from_service_account_file.__func__(ClusterManagerAsyncClient, filename, *args, **kwargs) # type: ignore
146
+ sa_file_func = (
147
+ ClusterManagerClient.from_service_account_file.__func__ # type: ignore
148
+ )
149
+ return sa_file_func(ClusterManagerAsyncClient, filename, *args, **kwargs)
142
150
 
143
151
  from_service_account_json = from_service_account_file
144
152
 
@@ -188,7 +196,7 @@ class ClusterManagerAsyncClient:
188
196
  return self._client.transport
189
197
 
190
198
  @property
191
- def api_endpoint(self):
199
+ def api_endpoint(self) -> str:
192
200
  """Return the API endpoint used by the client instance.
193
201
 
194
202
  Returns:
@@ -13,12 +13,13 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- from collections import OrderedDict
17
- from http import HTTPStatus
18
16
  import json
19
17
  import logging as std_logging
20
18
  import os
21
19
  import re
20
+ import warnings
21
+ from collections import OrderedDict
22
+ from http import HTTPStatus
22
23
  from typing import (
23
24
  Callable,
24
25
  Dict,
@@ -32,8 +33,8 @@ from typing import (
32
33
  Union,
33
34
  cast,
34
35
  )
35
- import warnings
36
36
 
37
+ import google.protobuf
37
38
  from google.api_core import client_options as client_options_lib
38
39
  from google.api_core import exceptions as core_exceptions
39
40
  from google.api_core import gapic_v1
@@ -43,7 +44,6 @@ from google.auth.exceptions import MutualTLSChannelError # type: ignore
43
44
  from google.auth.transport import mtls # type: ignore
44
45
  from google.auth.transport.grpc import SslCredentials # type: ignore
45
46
  from google.oauth2 import service_account # type: ignore
46
- import google.protobuf
47
47
 
48
48
  from google.cloud.container_v1 import gapic_version as package_version
49
49
 
@@ -61,7 +61,7 @@ except ImportError: # pragma: NO COVER
61
61
 
62
62
  _LOGGER = std_logging.getLogger(__name__)
63
63
 
64
- from google.rpc import status_pb2 # type: ignore
64
+ import google.rpc.status_pb2 as status_pb2 # type: ignore
65
65
 
66
66
  from google.cloud.container_v1.services.cluster_manager import pagers
67
67
  from google.cloud.container_v1.types import cluster_service
@@ -80,9 +80,7 @@ class ClusterManagerClientMeta(type):
80
80
  objects.
81
81
  """
82
82
 
83
- _transport_registry = (
84
- OrderedDict()
85
- ) # type: Dict[str, Type[ClusterManagerTransport]]
83
+ _transport_registry = OrderedDict() # type: Dict[str, Type[ClusterManagerTransport]]
86
84
  _transport_registry["grpc"] = ClusterManagerGrpcTransport
87
85
  _transport_registry["grpc_asyncio"] = ClusterManagerGrpcAsyncIOTransport
88
86
  _transport_registry["rest"] = ClusterManagerRestTransport
@@ -113,7 +111,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
113
111
  """Google Kubernetes Engine Cluster Manager v1"""
114
112
 
115
113
  @staticmethod
116
- def _get_default_mtls_endpoint(api_endpoint):
114
+ def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
117
115
  """Converts api endpoint to mTLS endpoint.
118
116
 
119
117
  Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
@@ -121,7 +119,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
121
119
  Args:
122
120
  api_endpoint (Optional[str]): the api endpoint to convert.
123
121
  Returns:
124
- str: converted mTLS api endpoint.
122
+ Optional[str]: converted mTLS api endpoint.
125
123
  """
126
124
  if not api_endpoint:
127
125
  return api_endpoint
@@ -131,6 +129,10 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
131
129
  )
132
130
 
133
131
  m = mtls_endpoint_re.match(api_endpoint)
132
+ if m is None:
133
+ # Could not parse api_endpoint; return as-is.
134
+ return api_endpoint
135
+
134
136
  name, mtls, sandbox, googledomain = m.groups()
135
137
  if mtls or not googledomain:
136
138
  return api_endpoint
@@ -274,6 +276,28 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
274
276
  )
275
277
  return m.groupdict() if m else {}
276
278
 
279
+ @staticmethod
280
+ def subnetwork_path(
281
+ project: str,
282
+ region: str,
283
+ subnetwork: str,
284
+ ) -> str:
285
+ """Returns a fully-qualified subnetwork string."""
286
+ return "projects/{project}/regions/{region}/subnetworks/{subnetwork}".format(
287
+ project=project,
288
+ region=region,
289
+ subnetwork=subnetwork,
290
+ )
291
+
292
+ @staticmethod
293
+ def parse_subnetwork_path(path: str) -> Dict[str, str]:
294
+ """Parses a subnetwork path into its component segments."""
295
+ m = re.match(
296
+ r"^projects/(?P<project>.+?)/regions/(?P<region>.+?)/subnetworks/(?P<subnetwork>.+?)$",
297
+ path,
298
+ )
299
+ return m.groupdict() if m else {}
300
+
277
301
  @staticmethod
278
302
  def topic_path(
279
303
  project: str,
@@ -481,7 +505,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
481
505
  @staticmethod
482
506
  def _get_api_endpoint(
483
507
  api_override, client_cert_source, universe_domain, use_mtls_endpoint
484
- ):
508
+ ) -> str:
485
509
  """Return the API endpoint used by the client.
486
510
 
487
511
  Args:
@@ -578,7 +602,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
578
602
  error._details.append(json.dumps(cred_info))
579
603
 
580
604
  @property
581
- def api_endpoint(self):
605
+ def api_endpoint(self) -> str:
582
606
  """Return the API endpoint used by the client instance.
583
607
 
584
608
  Returns:
@@ -665,18 +689,16 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
665
689
 
666
690
  universe_domain_opt = getattr(self._client_options, "universe_domain", None)
667
691
 
668
- (
669
- self._use_client_cert,
670
- self._use_mtls_endpoint,
671
- self._universe_domain_env,
672
- ) = ClusterManagerClient._read_environment_variables()
692
+ self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
693
+ ClusterManagerClient._read_environment_variables()
694
+ )
673
695
  self._client_cert_source = ClusterManagerClient._get_client_cert_source(
674
696
  self._client_options.client_cert_source, self._use_client_cert
675
697
  )
676
698
  self._universe_domain = ClusterManagerClient._get_universe_domain(
677
699
  universe_domain_opt, self._universe_domain_env
678
700
  )
679
- self._api_endpoint = None # updated below, depending on `transport`
701
+ self._api_endpoint: str = "" # updated below, depending on `transport`
680
702
 
681
703
  # Initialize the universe domain validation.
682
704
  self._is_universe_domain_valid = False
@@ -704,8 +726,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
704
726
  )
705
727
  if self._client_options.scopes:
706
728
  raise ValueError(
707
- "When providing a transport instance, provide its scopes "
708
- "directly."
729
+ "When providing a transport instance, provide its scopes directly."
709
730
  )
710
731
  self._transport = cast(ClusterManagerTransport, transport)
711
732
  self._api_endpoint = self._transport.host
@@ -67,7 +67,7 @@ class ListUsableSubnetworksPager:
67
67
  *,
68
68
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
69
69
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
70
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
70
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
71
71
  ):
72
72
  """Instantiate the pager.
73
73
 
@@ -143,7 +143,7 @@ class ListUsableSubnetworksAsyncPager:
143
143
  *,
144
144
  retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
145
145
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
146
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
146
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
147
147
  ):
148
148
  """Instantiates the pager.
149
149
 
@@ -17,14 +17,14 @@ import abc
17
17
  from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
18
18
 
19
19
  import google.api_core
20
+ import google.auth # type: ignore
21
+ import google.protobuf
22
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
20
23
  from google.api_core import exceptions as core_exceptions
21
24
  from google.api_core import gapic_v1
22
25
  from google.api_core import retry as retries
23
- import google.auth # type: ignore
24
26
  from google.auth import credentials as ga_credentials # type: ignore
25
27
  from google.oauth2 import service_account # type: ignore
26
- import google.protobuf
27
- from google.protobuf import empty_pb2 # type: ignore
28
28
 
29
29
  from google.cloud.container_v1 import gapic_version as package_version
30
30
  from google.cloud.container_v1.types import cluster_service
@@ -81,10 +81,12 @@ class ClusterManagerTransport(abc.ABC):
81
81
  your own client library.
82
82
  always_use_jwt_access (Optional[bool]): Whether self signed JWT should
83
83
  be used for service account credentials.
84
+ api_audience (Optional[str]): The intended audience for the API calls
85
+ to the service that will be set when using certain 3rd party
86
+ authentication flows. Audience is typically a resource identifier.
87
+ If not set, the host value will be used as a default.
84
88
  """
85
89
 
86
- scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
87
-
88
90
  # Save the scopes.
89
91
  self._scopes = scopes
90
92
  if not hasattr(self, "_ignore_credentials"):
@@ -99,11 +101,16 @@ class ClusterManagerTransport(abc.ABC):
99
101
 
100
102
  if credentials_file is not None:
101
103
  credentials, _ = google.auth.load_credentials_from_file(
102
- credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
104
+ credentials_file,
105
+ scopes=scopes,
106
+ quota_project_id=quota_project_id,
107
+ default_scopes=self.AUTH_SCOPES,
103
108
  )
104
109
  elif credentials is None and not self._ignore_credentials:
105
110
  credentials, _ = google.auth.default(
106
- **scopes_kwargs, quota_project_id=quota_project_id
111
+ scopes=scopes,
112
+ quota_project_id=quota_project_id,
113
+ default_scopes=self.AUTH_SCOPES,
107
114
  )
108
115
  # Don't apply audience if the credentials file passed from user.
109
116
  if hasattr(credentials, "with_gdch_audience"):
@@ -127,6 +134,8 @@ class ClusterManagerTransport(abc.ABC):
127
134
  host += ":443"
128
135
  self._host = host
129
136
 
137
+ self._wrapped_methods: Dict[Callable, Callable] = {}
138
+
130
139
  @property
131
140
  def host(self):
132
141
  return self._host