google-cloud-container 2.63.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.63.0/google_cloud_container.egg-info → google_cloud_container-2.64.0}/PKG-INFO +6 -8
  2. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/README.rst +2 -2
  3. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container/gapic_version.py +1 -1
  4. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/__init__.py +1 -0
  5. {google_cloud_container-2.63.0/google/cloud/container_v1beta1 → google_cloud_container-2.64.0/google/cloud/container_v1}/gapic_version.py +1 -1
  6. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/async_client.py +13 -7
  7. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/client.py +19 -20
  8. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/pagers.py +2 -2
  9. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/base.py +9 -3
  10. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +42 -38
  11. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +41 -37
  12. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/rest.py +51 -70
  13. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +1 -1
  14. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/types/cluster_service.py +130 -52
  15. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/__init__.py +1 -0
  16. {google_cloud_container-2.63.0/google/cloud/container_v1 → google_cloud_container-2.64.0/google/cloud/container_v1beta1}/gapic_version.py +1 -1
  17. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +13 -7
  18. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/client.py +19 -20
  19. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/pagers.py +2 -2
  20. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py +9 -3
  21. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +48 -44
  22. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +47 -43
  23. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/types/cluster_service.py +141 -53
  24. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0/google_cloud_container.egg-info}/PKG-INFO +6 -8
  25. google_cloud_container-2.64.0/google_cloud_container.egg-info/requires.txt +11 -0
  26. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/setup.py +3 -5
  27. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1/test_cluster_manager.py +735 -600
  28. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +99 -84
  29. google_cloud_container-2.63.0/google_cloud_container.egg-info/requires.txt +0 -11
  30. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/LICENSE +0 -0
  31. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/MANIFEST.in +0 -0
  32. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container/__init__.py +0 -0
  33. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container/py.typed +0 -0
  34. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/gapic_metadata.json +0 -0
  35. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/py.typed +0 -0
  36. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/__init__.py +0 -0
  37. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/__init__.py +0 -0
  38. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/services/cluster_manager/transports/__init__.py +0 -0
  39. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1/types/__init__.py +0 -0
  40. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/gapic_metadata.json +0 -0
  41. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/py.typed +0 -0
  42. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/__init__.py +0 -0
  43. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/__init__.py +0 -0
  44. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py +0 -0
  45. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google/cloud/container_v1beta1/types/__init__.py +0 -0
  46. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/SOURCES.txt +0 -0
  47. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/dependency_links.txt +0 -0
  48. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/not-zip-safe +0 -0
  49. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/google_cloud_container.egg-info/top_level.txt +0 -0
  50. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/setup.cfg +0 -0
  51. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/__init__.py +0 -0
  52. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/system/__init__.py +0 -0
  53. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/system/smoke_test.py +0 -0
  54. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/unit/__init__.py +0 -0
  55. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/unit/gapic/__init__.py +0 -0
  56. {google_cloud_container-2.63.0 → google_cloud_container-2.64.0}/tests/unit/gapic/container_v1/__init__.py +0 -0
  57. {google_cloud_container-2.63.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.63.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.
@@ -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.63.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,
@@ -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.63.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
@@ -124,7 +124,10 @@ class ClusterManagerAsyncClient:
124
124
  Returns:
125
125
  ClusterManagerAsyncClient: The constructed client.
126
126
  """
127
- 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)
128
131
 
129
132
  @classmethod
130
133
  def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -140,7 +143,10 @@ class ClusterManagerAsyncClient:
140
143
  Returns:
141
144
  ClusterManagerAsyncClient: The constructed client.
142
145
  """
143
- 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)
144
150
 
145
151
  from_service_account_json = from_service_account_file
146
152
 
@@ -190,7 +196,7 @@ class ClusterManagerAsyncClient:
190
196
  return self._client.transport
191
197
 
192
198
  @property
193
- def api_endpoint(self):
199
+ def api_endpoint(self) -> str:
194
200
  """Return the API endpoint used by the client instance.
195
201
 
196
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
@@ -503,7 +505,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
503
505
  @staticmethod
504
506
  def _get_api_endpoint(
505
507
  api_override, client_cert_source, universe_domain, use_mtls_endpoint
506
- ):
508
+ ) -> str:
507
509
  """Return the API endpoint used by the client.
508
510
 
509
511
  Args:
@@ -600,7 +602,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
600
602
  error._details.append(json.dumps(cred_info))
601
603
 
602
604
  @property
603
- def api_endpoint(self):
605
+ def api_endpoint(self) -> str:
604
606
  """Return the API endpoint used by the client instance.
605
607
 
606
608
  Returns:
@@ -687,18 +689,16 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
687
689
 
688
690
  universe_domain_opt = getattr(self._client_options, "universe_domain", None)
689
691
 
690
- (
691
- self._use_client_cert,
692
- self._use_mtls_endpoint,
693
- self._universe_domain_env,
694
- ) = ClusterManagerClient._read_environment_variables()
692
+ self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
693
+ ClusterManagerClient._read_environment_variables()
694
+ )
695
695
  self._client_cert_source = ClusterManagerClient._get_client_cert_source(
696
696
  self._client_options.client_cert_source, self._use_client_cert
697
697
  )
698
698
  self._universe_domain = ClusterManagerClient._get_universe_domain(
699
699
  universe_domain_opt, self._universe_domain_env
700
700
  )
701
- self._api_endpoint = None # updated below, depending on `transport`
701
+ self._api_endpoint: str = "" # updated below, depending on `transport`
702
702
 
703
703
  # Initialize the universe domain validation.
704
704
  self._is_universe_domain_valid = False
@@ -726,8 +726,7 @@ class ClusterManagerClient(metaclass=ClusterManagerClientMeta):
726
726
  )
727
727
  if self._client_options.scopes:
728
728
  raise ValueError(
729
- "When providing a transport instance, provide its scopes "
730
- "directly."
729
+ "When providing a transport instance, provide its scopes directly."
731
730
  )
732
731
  self._transport = cast(ClusterManagerTransport, transport)
733
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,6 +81,10 @@ 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
90
  # Save the scopes.
@@ -130,6 +134,8 @@ class ClusterManagerTransport(abc.ABC):
130
134
  host += ":443"
131
135
  self._host = host
132
136
 
137
+ self._wrapped_methods: Dict[Callable, Callable] = {}
138
+
133
139
  @property
134
140
  def host(self):
135
141
  return self._host
@@ -16,18 +16,18 @@
16
16
  import json
17
17
  import logging as std_logging
18
18
  import pickle
19
- from typing import Callable, Dict, Optional, Sequence, Tuple, Union
20
19
  import warnings
20
+ from typing import Callable, Dict, Optional, Sequence, Tuple, Union
21
21
 
22
- from google.api_core import gapic_v1, grpc_helpers
23
22
  import google.auth # type: ignore
24
- from google.auth import credentials as ga_credentials # type: ignore
25
- from google.auth.transport.grpc import SslCredentials # type: ignore
26
- from google.protobuf import empty_pb2 # type: ignore
27
- from google.protobuf.json_format import MessageToJson
23
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
28
24
  import google.protobuf.message
29
25
  import grpc # type: ignore
30
26
  import proto # type: ignore
27
+ from google.api_core import gapic_v1, grpc_helpers
28
+ from google.auth import credentials as ga_credentials # type: ignore
29
+ from google.auth.transport.grpc import SslCredentials # type: ignore
30
+ from google.protobuf.json_format import MessageToJson
31
31
 
32
32
  from google.cloud.container_v1.types import cluster_service
33
33
 
@@ -55,7 +55,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
55
55
  elif isinstance(request, google.protobuf.message.Message):
56
56
  request_payload = MessageToJson(request)
57
57
  else:
58
- request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
58
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
59
59
 
60
60
  request_metadata = {
61
61
  key: value.decode("utf-8") if isinstance(value, bytes) else value
@@ -90,7 +90,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
90
90
  elif isinstance(result, google.protobuf.message.Message):
91
91
  response_payload = MessageToJson(result)
92
92
  else:
93
- response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
93
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
94
94
  grpc_response = {
95
95
  "payload": response_payload,
96
96
  "metadata": metadata,
@@ -185,6 +185,10 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
185
185
  your own client library.
186
186
  always_use_jwt_access (Optional[bool]): Whether self signed JWT should
187
187
  be used for service account credentials.
188
+ api_audience (Optional[str]): The intended audience for the API calls
189
+ to the service that will be set when using certain 3rd party
190
+ authentication flows. Audience is typically a resource identifier.
191
+ If not set, the host value will be used as a default.
188
192
 
189
193
  Raises:
190
194
  google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -962,12 +966,12 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
962
966
  # gRPC handles serialization and deserialization, so we just need
963
967
  # to pass in the functions for each.
964
968
  if "complete_node_pool_upgrade" not in self._stubs:
965
- self._stubs[
966
- "complete_node_pool_upgrade"
967
- ] = self._logged_channel.unary_unary(
968
- "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade",
969
- request_serializer=cluster_service.CompleteNodePoolUpgradeRequest.serialize,
970
- response_deserializer=empty_pb2.Empty.FromString,
969
+ self._stubs["complete_node_pool_upgrade"] = (
970
+ self._logged_channel.unary_unary(
971
+ "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade",
972
+ request_serializer=cluster_service.CompleteNodePoolUpgradeRequest.serialize,
973
+ response_deserializer=empty_pb2.Empty.FromString,
974
+ )
971
975
  )
972
976
  return self._stubs["complete_node_pool_upgrade"]
973
977
 
@@ -994,12 +998,12 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
994
998
  # gRPC handles serialization and deserialization, so we just need
995
999
  # to pass in the functions for each.
996
1000
  if "rollback_node_pool_upgrade" not in self._stubs:
997
- self._stubs[
998
- "rollback_node_pool_upgrade"
999
- ] = self._logged_channel.unary_unary(
1000
- "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade",
1001
- request_serializer=cluster_service.RollbackNodePoolUpgradeRequest.serialize,
1002
- response_deserializer=cluster_service.Operation.deserialize,
1001
+ self._stubs["rollback_node_pool_upgrade"] = (
1002
+ self._logged_channel.unary_unary(
1003
+ "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade",
1004
+ request_serializer=cluster_service.RollbackNodePoolUpgradeRequest.serialize,
1005
+ response_deserializer=cluster_service.Operation.deserialize,
1006
+ )
1003
1007
  )
1004
1008
  return self._stubs["rollback_node_pool_upgrade"]
1005
1009
 
@@ -1274,12 +1278,12 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
1274
1278
  # gRPC handles serialization and deserialization, so we just need
1275
1279
  # to pass in the functions for each.
1276
1280
  if "check_autopilot_compatibility" not in self._stubs:
1277
- self._stubs[
1278
- "check_autopilot_compatibility"
1279
- ] = self._logged_channel.unary_unary(
1280
- "/google.container.v1.ClusterManager/CheckAutopilotCompatibility",
1281
- request_serializer=cluster_service.CheckAutopilotCompatibilityRequest.serialize,
1282
- response_deserializer=cluster_service.CheckAutopilotCompatibilityResponse.deserialize,
1281
+ self._stubs["check_autopilot_compatibility"] = (
1282
+ self._logged_channel.unary_unary(
1283
+ "/google.container.v1.ClusterManager/CheckAutopilotCompatibility",
1284
+ request_serializer=cluster_service.CheckAutopilotCompatibilityRequest.serialize,
1285
+ response_deserializer=cluster_service.CheckAutopilotCompatibilityResponse.deserialize,
1286
+ )
1283
1287
  )
1284
1288
  return self._stubs["check_autopilot_compatibility"]
1285
1289
 
@@ -1305,12 +1309,12 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
1305
1309
  # gRPC handles serialization and deserialization, so we just need
1306
1310
  # to pass in the functions for each.
1307
1311
  if "fetch_cluster_upgrade_info" not in self._stubs:
1308
- self._stubs[
1309
- "fetch_cluster_upgrade_info"
1310
- ] = self._logged_channel.unary_unary(
1311
- "/google.container.v1.ClusterManager/FetchClusterUpgradeInfo",
1312
- request_serializer=cluster_service.FetchClusterUpgradeInfoRequest.serialize,
1313
- response_deserializer=cluster_service.ClusterUpgradeInfo.deserialize,
1312
+ self._stubs["fetch_cluster_upgrade_info"] = (
1313
+ self._logged_channel.unary_unary(
1314
+ "/google.container.v1.ClusterManager/FetchClusterUpgradeInfo",
1315
+ request_serializer=cluster_service.FetchClusterUpgradeInfoRequest.serialize,
1316
+ response_deserializer=cluster_service.ClusterUpgradeInfo.deserialize,
1317
+ )
1314
1318
  )
1315
1319
  return self._stubs["fetch_cluster_upgrade_info"]
1316
1320
 
@@ -1336,12 +1340,12 @@ class ClusterManagerGrpcTransport(ClusterManagerTransport):
1336
1340
  # gRPC handles serialization and deserialization, so we just need
1337
1341
  # to pass in the functions for each.
1338
1342
  if "fetch_node_pool_upgrade_info" not in self._stubs:
1339
- self._stubs[
1340
- "fetch_node_pool_upgrade_info"
1341
- ] = self._logged_channel.unary_unary(
1342
- "/google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo",
1343
- request_serializer=cluster_service.FetchNodePoolUpgradeInfoRequest.serialize,
1344
- response_deserializer=cluster_service.NodePoolUpgradeInfo.deserialize,
1343
+ self._stubs["fetch_node_pool_upgrade_info"] = (
1344
+ self._logged_channel.unary_unary(
1345
+ "/google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo",
1346
+ request_serializer=cluster_service.FetchNodePoolUpgradeInfoRequest.serialize,
1347
+ response_deserializer=cluster_service.NodePoolUpgradeInfo.deserialize,
1348
+ )
1345
1349
  )
1346
1350
  return self._stubs["fetch_node_pool_upgrade_info"]
1347
1351
 
@@ -17,20 +17,20 @@ import inspect
17
17
  import json
18
18
  import logging as std_logging
19
19
  import pickle
20
- from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
21
20
  import warnings
21
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
22
22
 
23
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
24
+ import google.protobuf.message
25
+ import grpc # type: ignore
26
+ import proto # type: ignore
23
27
  from google.api_core import exceptions as core_exceptions
24
28
  from google.api_core import gapic_v1, grpc_helpers_async
25
29
  from google.api_core import retry_async as retries
26
30
  from google.auth import credentials as ga_credentials # type: ignore
27
31
  from google.auth.transport.grpc import SslCredentials # type: ignore
28
- from google.protobuf import empty_pb2 # type: ignore
29
32
  from google.protobuf.json_format import MessageToJson
30
- import google.protobuf.message
31
- import grpc # type: ignore
32
33
  from grpc.experimental import aio # type: ignore
33
- import proto # type: ignore
34
34
 
35
35
  from google.cloud.container_v1.types import cluster_service
36
36
 
@@ -61,7 +61,7 @@ class _LoggingClientAIOInterceptor(
61
61
  elif isinstance(request, google.protobuf.message.Message):
62
62
  request_payload = MessageToJson(request)
63
63
  else:
64
- request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
64
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
65
65
 
66
66
  request_metadata = {
67
67
  key: value.decode("utf-8") if isinstance(value, bytes) else value
@@ -96,7 +96,7 @@ class _LoggingClientAIOInterceptor(
96
96
  elif isinstance(result, google.protobuf.message.Message):
97
97
  response_payload = MessageToJson(result)
98
98
  else:
99
- response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
99
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
100
100
  grpc_response = {
101
101
  "payload": response_payload,
102
102
  "metadata": metadata,
@@ -236,6 +236,10 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
236
236
  your own client library.
237
237
  always_use_jwt_access (Optional[bool]): Whether self signed JWT should
238
238
  be used for service account credentials.
239
+ api_audience (Optional[str]): The intended audience for the API calls
240
+ to the service that will be set when using certain 3rd party
241
+ authentication flows. Audience is typically a resource identifier.
242
+ If not set, the host value will be used as a default.
239
243
 
240
244
  Raises:
241
245
  google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -1005,12 +1009,12 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
1005
1009
  # gRPC handles serialization and deserialization, so we just need
1006
1010
  # to pass in the functions for each.
1007
1011
  if "complete_node_pool_upgrade" not in self._stubs:
1008
- self._stubs[
1009
- "complete_node_pool_upgrade"
1010
- ] = self._logged_channel.unary_unary(
1011
- "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade",
1012
- request_serializer=cluster_service.CompleteNodePoolUpgradeRequest.serialize,
1013
- response_deserializer=empty_pb2.Empty.FromString,
1012
+ self._stubs["complete_node_pool_upgrade"] = (
1013
+ self._logged_channel.unary_unary(
1014
+ "/google.container.v1.ClusterManager/CompleteNodePoolUpgrade",
1015
+ request_serializer=cluster_service.CompleteNodePoolUpgradeRequest.serialize,
1016
+ response_deserializer=empty_pb2.Empty.FromString,
1017
+ )
1014
1018
  )
1015
1019
  return self._stubs["complete_node_pool_upgrade"]
1016
1020
 
@@ -1038,12 +1042,12 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
1038
1042
  # gRPC handles serialization and deserialization, so we just need
1039
1043
  # to pass in the functions for each.
1040
1044
  if "rollback_node_pool_upgrade" not in self._stubs:
1041
- self._stubs[
1042
- "rollback_node_pool_upgrade"
1043
- ] = self._logged_channel.unary_unary(
1044
- "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade",
1045
- request_serializer=cluster_service.RollbackNodePoolUpgradeRequest.serialize,
1046
- response_deserializer=cluster_service.Operation.deserialize,
1045
+ self._stubs["rollback_node_pool_upgrade"] = (
1046
+ self._logged_channel.unary_unary(
1047
+ "/google.container.v1.ClusterManager/RollbackNodePoolUpgrade",
1048
+ request_serializer=cluster_service.RollbackNodePoolUpgradeRequest.serialize,
1049
+ response_deserializer=cluster_service.Operation.deserialize,
1050
+ )
1047
1051
  )
1048
1052
  return self._stubs["rollback_node_pool_upgrade"]
1049
1053
 
@@ -1331,12 +1335,12 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
1331
1335
  # gRPC handles serialization and deserialization, so we just need
1332
1336
  # to pass in the functions for each.
1333
1337
  if "check_autopilot_compatibility" not in self._stubs:
1334
- self._stubs[
1335
- "check_autopilot_compatibility"
1336
- ] = self._logged_channel.unary_unary(
1337
- "/google.container.v1.ClusterManager/CheckAutopilotCompatibility",
1338
- request_serializer=cluster_service.CheckAutopilotCompatibilityRequest.serialize,
1339
- response_deserializer=cluster_service.CheckAutopilotCompatibilityResponse.deserialize,
1338
+ self._stubs["check_autopilot_compatibility"] = (
1339
+ self._logged_channel.unary_unary(
1340
+ "/google.container.v1.ClusterManager/CheckAutopilotCompatibility",
1341
+ request_serializer=cluster_service.CheckAutopilotCompatibilityRequest.serialize,
1342
+ response_deserializer=cluster_service.CheckAutopilotCompatibilityResponse.deserialize,
1343
+ )
1340
1344
  )
1341
1345
  return self._stubs["check_autopilot_compatibility"]
1342
1346
 
@@ -1362,12 +1366,12 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
1362
1366
  # gRPC handles serialization and deserialization, so we just need
1363
1367
  # to pass in the functions for each.
1364
1368
  if "fetch_cluster_upgrade_info" not in self._stubs:
1365
- self._stubs[
1366
- "fetch_cluster_upgrade_info"
1367
- ] = self._logged_channel.unary_unary(
1368
- "/google.container.v1.ClusterManager/FetchClusterUpgradeInfo",
1369
- request_serializer=cluster_service.FetchClusterUpgradeInfoRequest.serialize,
1370
- response_deserializer=cluster_service.ClusterUpgradeInfo.deserialize,
1369
+ self._stubs["fetch_cluster_upgrade_info"] = (
1370
+ self._logged_channel.unary_unary(
1371
+ "/google.container.v1.ClusterManager/FetchClusterUpgradeInfo",
1372
+ request_serializer=cluster_service.FetchClusterUpgradeInfoRequest.serialize,
1373
+ response_deserializer=cluster_service.ClusterUpgradeInfo.deserialize,
1374
+ )
1371
1375
  )
1372
1376
  return self._stubs["fetch_cluster_upgrade_info"]
1373
1377
 
@@ -1393,12 +1397,12 @@ class ClusterManagerGrpcAsyncIOTransport(ClusterManagerTransport):
1393
1397
  # gRPC handles serialization and deserialization, so we just need
1394
1398
  # to pass in the functions for each.
1395
1399
  if "fetch_node_pool_upgrade_info" not in self._stubs:
1396
- self._stubs[
1397
- "fetch_node_pool_upgrade_info"
1398
- ] = self._logged_channel.unary_unary(
1399
- "/google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo",
1400
- request_serializer=cluster_service.FetchNodePoolUpgradeInfoRequest.serialize,
1401
- response_deserializer=cluster_service.NodePoolUpgradeInfo.deserialize,
1400
+ self._stubs["fetch_node_pool_upgrade_info"] = (
1401
+ self._logged_channel.unary_unary(
1402
+ "/google.container.v1.ClusterManager/FetchNodePoolUpgradeInfo",
1403
+ request_serializer=cluster_service.FetchNodePoolUpgradeInfoRequest.serialize,
1404
+ response_deserializer=cluster_service.NodePoolUpgradeInfo.deserialize,
1405
+ )
1402
1406
  )
1403
1407
  return self._stubs["fetch_node_pool_upgrade_info"]
1404
1408