google-cloud-devicestreaming 0.3.0__tar.gz → 0.5.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 (40) hide show
  1. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/MANIFEST.in +1 -1
  2. {google_cloud_devicestreaming-0.3.0/google_cloud_devicestreaming.egg-info → google_cloud_devicestreaming-0.5.0}/PKG-INFO +18 -20
  3. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/README.rst +12 -11
  4. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/__init__.py +1 -1
  5. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/gapic_version.py +2 -2
  6. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/__init__.py +4 -20
  7. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/gapic_version.py +2 -2
  8. {google_cloud_devicestreaming-0.3.0/tests/unit → google_cloud_devicestreaming-0.5.0/google/cloud/devicestreaming_v1/services}/__init__.py +1 -1
  9. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/__init__.py +1 -1
  10. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/async_client.py +18 -10
  11. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/client.py +22 -23
  12. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/pagers.py +3 -3
  13. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/__init__.py +2 -4
  14. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/base.py +17 -8
  15. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc.py +13 -9
  16. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc_asyncio.py +12 -8
  17. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest.py +16 -20
  18. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest_base.py +2 -2
  19. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/__init__.py +1 -1
  20. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/adb_service.py +2 -1
  21. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/types/service.py +5 -4
  22. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0/google_cloud_devicestreaming.egg-info}/PKG-INFO +18 -20
  23. google_cloud_devicestreaming-0.5.0/google_cloud_devicestreaming.egg-info/requires.txt +11 -0
  24. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/setup.py +6 -9
  25. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/tests/__init__.py +1 -1
  26. {google_cloud_devicestreaming-0.3.0/tests/unit/gapic → google_cloud_devicestreaming-0.5.0/tests/unit}/__init__.py +1 -1
  27. {google_cloud_devicestreaming-0.3.0/google/cloud/devicestreaming_v1/services → google_cloud_devicestreaming-0.5.0/tests/unit/gapic}/__init__.py +1 -1
  28. google_cloud_devicestreaming-0.5.0/tests/unit/gapic/devicestreaming_v1/__init__.py +15 -0
  29. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/tests/unit/gapic/devicestreaming_v1/test_direct_access_service.py +271 -240
  30. google_cloud_devicestreaming-0.3.0/google_cloud_devicestreaming.egg-info/requires.txt +0 -11
  31. google_cloud_devicestreaming-0.3.0/tests/unit/gapic/devicestreaming_v1/__init__.py +0 -15
  32. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/LICENSE +0 -0
  33. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming/py.typed +0 -0
  34. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/gapic_metadata.json +0 -0
  35. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google/cloud/devicestreaming_v1/py.typed +0 -0
  36. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/SOURCES.txt +0 -0
  37. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/dependency_links.txt +0 -0
  38. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/not-zip-safe +0 -0
  39. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/google_cloud_devicestreaming.egg-info/top_level.txt +0 -0
  40. {google_cloud_devicestreaming-0.3.0 → google_cloud_devicestreaming-0.5.0}/setup.cfg +0 -0
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,20 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-devicestreaming
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: Google Cloud Devicestreaming API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-devicestreaming
6
6
  Author: Google LLC
7
7
  Author-email: googleapis-packages@google.com
8
- License: Apache 2.0
8
+ License: Apache-2.0
9
9
  Platform: Posix; MacOS X; Windows
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  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
- Classifier: Programming Language :: Python :: 3.9
18
15
  Classifier: Programming Language :: Python :: 3.10
19
16
  Classifier: Programming Language :: Python :: 3.11
20
17
  Classifier: Programming Language :: Python :: 3.12
@@ -22,15 +19,15 @@ Classifier: Programming Language :: Python :: 3.13
22
19
  Classifier: Programming Language :: Python :: 3.14
23
20
  Classifier: Operating System :: OS Independent
24
21
  Classifier: Topic :: Internet
25
- Requires-Python: >=3.7
22
+ Requires-Python: >=3.10
26
23
  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
24
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.17.1
28
25
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
29
- Requires-Dist: grpcio<2.0.0,>=1.33.2
26
+ Requires-Dist: grpcio<2.0.0,>=1.59.0
30
27
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
31
28
  Requires-Dist: proto-plus<2.0.0,>=1.22.3
32
29
  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
30
+ Requires-Dist: protobuf<8.0.0,>=4.25.8
34
31
  Dynamic: author
35
32
  Dynamic: author-email
36
33
  Dynamic: classifier
@@ -43,12 +40,12 @@ Dynamic: requires-dist
43
40
  Dynamic: requires-python
44
41
  Dynamic: summary
45
42
 
46
- Python Client for Device Streaming API
47
- ======================================
43
+ Python Client for Device Streaming
44
+ ==================================
48
45
 
49
46
  |preview| |pypi| |versions|
50
47
 
51
- `Device Streaming API`_: The Cloud API for device streaming usage.
48
+ `Device Streaming`_: The Cloud API for device streaming usage.
52
49
 
53
50
  - `Client Library Documentation`_
54
51
  - `Product Documentation`_
@@ -59,7 +56,7 @@ Python Client for Device Streaming API
59
56
  :target: https://pypi.org/project/google-cloud-devicestreaming/
60
57
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-devicestreaming.svg
61
58
  :target: https://pypi.org/project/google-cloud-devicestreaming/
62
- .. _Device Streaming API: https://cloud.google.com/device-streaming/docs
59
+ .. _Device Streaming: https://cloud.google.com/device-streaming/docs
63
60
  .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/summary_overview
64
61
  .. _Product Documentation: https://cloud.google.com/device-streaming/docs
65
62
 
@@ -70,12 +67,12 @@ In order to use this library, you first need to go through the following steps:
70
67
 
71
68
  1. `Select or create a Cloud Platform project.`_
72
69
  2. `Enable billing for your project.`_
73
- 3. `Enable the Device Streaming API.`_
70
+ 3. `Enable the Device Streaming.`_
74
71
  4. `Set up Authentication.`_
75
72
 
76
73
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
77
74
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
78
- .. _Enable the Device Streaming API.: https://cloud.google.com/device-streaming/docs
75
+ .. _Enable the Device Streaming.: https://cloud.google.com/device-streaming/docs
79
76
  .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
80
77
 
81
78
  Installation
@@ -106,14 +103,15 @@ Supported Python Versions
106
103
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
107
104
  Python.
108
105
 
109
- Python >= 3.7, including 3.14
106
+ Python >= 3.10, including 3.14
110
107
 
111
108
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
112
109
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
113
110
 
114
111
  Unsupported Python Versions
115
112
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
- Python <= 3.6
113
+ Python <= 3.9
114
+
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.
@@ -142,14 +140,14 @@ Windows
142
140
  Next Steps
143
141
  ~~~~~~~~~~
144
142
 
145
- - Read the `Client Library Documentation`_ for Device Streaming API
143
+ - Read the `Client Library Documentation`_ for Device Streaming
146
144
  to see other available methods on the client.
147
- - Read the `Device Streaming API Product documentation`_ to learn
145
+ - Read the `Device Streaming Product documentation`_ to learn
148
146
  more about the product and see How-to Guides.
149
147
  - View this `README`_ to see the full list of Cloud
150
148
  APIs that we cover.
151
149
 
152
- .. _Device Streaming API Product documentation: https://cloud.google.com/device-streaming/docs
150
+ .. _Device Streaming Product documentation: https://cloud.google.com/device-streaming/docs
153
151
  .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
154
152
 
155
153
  Logging
@@ -1,9 +1,9 @@
1
- Python Client for Device Streaming API
2
- ======================================
1
+ Python Client for Device Streaming
2
+ ==================================
3
3
 
4
4
  |preview| |pypi| |versions|
5
5
 
6
- `Device Streaming API`_: The Cloud API for device streaming usage.
6
+ `Device Streaming`_: The Cloud API for device streaming usage.
7
7
 
8
8
  - `Client Library Documentation`_
9
9
  - `Product Documentation`_
@@ -14,7 +14,7 @@ Python Client for Device Streaming API
14
14
  :target: https://pypi.org/project/google-cloud-devicestreaming/
15
15
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-devicestreaming.svg
16
16
  :target: https://pypi.org/project/google-cloud-devicestreaming/
17
- .. _Device Streaming API: https://cloud.google.com/device-streaming/docs
17
+ .. _Device Streaming: https://cloud.google.com/device-streaming/docs
18
18
  .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/summary_overview
19
19
  .. _Product Documentation: https://cloud.google.com/device-streaming/docs
20
20
 
@@ -25,12 +25,12 @@ In order to use this library, you first need to go through the following steps:
25
25
 
26
26
  1. `Select or create a Cloud Platform project.`_
27
27
  2. `Enable billing for your project.`_
28
- 3. `Enable the Device Streaming API.`_
28
+ 3. `Enable the Device Streaming.`_
29
29
  4. `Set up Authentication.`_
30
30
 
31
31
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32
32
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33
- .. _Enable the Device Streaming API.: https://cloud.google.com/device-streaming/docs
33
+ .. _Enable the Device Streaming.: https://cloud.google.com/device-streaming/docs
34
34
  .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
35
35
 
36
36
  Installation
@@ -61,14 +61,15 @@ 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.10, 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.9
72
+
72
73
 
73
74
  If you are using an `end-of-life`_
74
75
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -97,14 +98,14 @@ Windows
97
98
  Next Steps
98
99
  ~~~~~~~~~~
99
100
 
100
- - Read the `Client Library Documentation`_ for Device Streaming API
101
+ - Read the `Client Library Documentation`_ for Device Streaming
101
102
  to see other available methods on the client.
102
- - Read the `Device Streaming API Product documentation`_ to learn
103
+ - Read the `Device Streaming Product documentation`_ to learn
103
104
  more about the product and see How-to Guides.
104
105
  - View this `README`_ to see the full list of Cloud
105
106
  APIs that we cover.
106
107
 
107
- .. _Device Streaming API Product documentation: https://cloud.google.com/device-streaming/docs
108
+ .. _Device Streaming Product documentation: https://cloud.google.com/device-streaming/docs
108
109
  .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
109
110
 
110
111
  Logging
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -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.3.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -21,12 +21,7 @@ from google.cloud.devicestreaming_v1 import gapic_version as package_version
21
21
 
22
22
  __version__ = package_version.__version__
23
23
 
24
- if sys.version_info >= (3, 8): # pragma: NO COVER
25
- from importlib import metadata
26
- else: # pragma: NO COVER
27
- # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
28
- # this code path once we drop support for Python 3.7
29
- import importlib_metadata as metadata
24
+ from importlib import metadata
30
25
 
31
26
  from .services.direct_access_service import (
32
27
  DirectAccessServiceAsyncClient,
@@ -63,28 +58,17 @@ else: # pragma: NO COVER
63
58
  # An older version of api_core is installed which does not define the
64
59
  # functions above. We do equivalent checks manually.
65
60
  try:
66
- import sys
67
61
  import warnings
68
62
 
69
63
  _py_version_str = sys.version.split()[0]
70
64
  _package_label = "google.cloud.devicestreaming_v1"
71
- if sys.version_info < (3, 9):
65
+ if sys.version_info < (3, 10):
72
66
  warnings.warn(
73
67
  "You are using a non-supported Python version "
74
68
  + f"({_py_version_str}). Google will not post any further "
75
69
  + f"updates to {_package_label} supporting this Python version. "
76
70
  + "Please upgrade to the latest Python version, or at "
77
- + f"least to Python 3.9, and then update {_package_label}.",
78
- FutureWarning,
79
- )
80
- if sys.version_info[:2] == (3, 9):
81
- warnings.warn(
82
- f"You are using a Python version ({_py_version_str}) "
83
- + f"which Google will stop supporting in {_package_label} in "
84
- + "January 2026. Please "
85
- + "upgrade to the latest Python version, or at "
86
- + "least to Python 3.10, before then, and "
87
- + f"then update {_package_label}.",
71
+ + f"least to Python 3.10, and then update {_package_label}.",
88
72
  FutureWarning,
89
73
  )
90
74
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -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.3.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -13,9 +13,9 @@
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
+ from collections import OrderedDict
19
19
  from typing import (
20
20
  AsyncIterable,
21
21
  AsyncIterator,
@@ -32,13 +32,13 @@ from typing import (
32
32
  Union,
33
33
  )
34
34
 
35
+ import google.protobuf
35
36
  from google.api_core import exceptions as core_exceptions
36
37
  from google.api_core import gapic_v1
37
38
  from google.api_core import retry_async as retries
38
39
  from google.api_core.client_options import ClientOptions
39
40
  from google.auth import credentials as ga_credentials # type: ignore
40
41
  from google.oauth2 import service_account # type: ignore
41
- import google.protobuf
42
42
 
43
43
  from google.cloud.devicestreaming_v1 import gapic_version as package_version
44
44
 
@@ -47,9 +47,9 @@ try:
47
47
  except AttributeError: # pragma: NO COVER
48
48
  OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
49
49
 
50
- from google.protobuf import duration_pb2 # type: ignore
51
- from google.protobuf import field_mask_pb2 # type: ignore
52
- from google.protobuf import timestamp_pb2 # type: ignore
50
+ import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
51
+ import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
52
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
53
53
 
54
54
  from google.cloud.devicestreaming_v1.services.direct_access_service import pagers
55
55
  from google.cloud.devicestreaming_v1.types import adb_service, service
@@ -133,7 +133,10 @@ class DirectAccessServiceAsyncClient:
133
133
  Returns:
134
134
  DirectAccessServiceAsyncClient: The constructed client.
135
135
  """
136
- return DirectAccessServiceClient.from_service_account_info.__func__(DirectAccessServiceAsyncClient, info, *args, **kwargs) # type: ignore
136
+ sa_info_func = (
137
+ DirectAccessServiceClient.from_service_account_info.__func__ # type: ignore
138
+ )
139
+ return sa_info_func(DirectAccessServiceAsyncClient, info, *args, **kwargs)
137
140
 
138
141
  @classmethod
139
142
  def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -149,7 +152,10 @@ class DirectAccessServiceAsyncClient:
149
152
  Returns:
150
153
  DirectAccessServiceAsyncClient: The constructed client.
151
154
  """
152
- return DirectAccessServiceClient.from_service_account_file.__func__(DirectAccessServiceAsyncClient, filename, *args, **kwargs) # type: ignore
155
+ sa_file_func = (
156
+ DirectAccessServiceClient.from_service_account_file.__func__ # type: ignore
157
+ )
158
+ return sa_file_func(DirectAccessServiceAsyncClient, filename, *args, **kwargs)
153
159
 
154
160
  from_service_account_json = from_service_account_file
155
161
 
@@ -187,7 +193,9 @@ class DirectAccessServiceAsyncClient:
187
193
  Raises:
188
194
  google.auth.exceptions.MutualTLSChannelError: If any errors happen.
189
195
  """
190
- return DirectAccessServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore
196
+ return DirectAccessServiceClient.get_mtls_endpoint_and_cert_source(
197
+ client_options
198
+ ) # type: ignore
191
199
 
192
200
  @property
193
201
  def transport(self) -> DirectAccessServiceTransport:
@@ -199,7 +207,7 @@ class DirectAccessServiceAsyncClient:
199
207
  return self._client.transport
200
208
 
201
209
  @property
202
- def api_endpoint(self):
210
+ def api_endpoint(self) -> str:
203
211
  """Return the API endpoint used by the client instance.
204
212
 
205
213
  Returns:
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -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,
@@ -34,8 +35,8 @@ from typing import (
34
35
  Union,
35
36
  cast,
36
37
  )
37
- import warnings
38
38
 
39
+ import google.protobuf
39
40
  from google.api_core import client_options as client_options_lib
40
41
  from google.api_core import exceptions as core_exceptions
41
42
  from google.api_core import gapic_v1
@@ -45,7 +46,6 @@ from google.auth.exceptions import MutualTLSChannelError # type: ignore
45
46
  from google.auth.transport import mtls # type: ignore
46
47
  from google.auth.transport.grpc import SslCredentials # type: ignore
47
48
  from google.oauth2 import service_account # type: ignore
48
- import google.protobuf
49
49
 
50
50
  from google.cloud.devicestreaming_v1 import gapic_version as package_version
51
51
 
@@ -63,9 +63,9 @@ except ImportError: # pragma: NO COVER
63
63
 
64
64
  _LOGGER = std_logging.getLogger(__name__)
65
65
 
66
- from google.protobuf import duration_pb2 # type: ignore
67
- from google.protobuf import field_mask_pb2 # type: ignore
68
- from google.protobuf import timestamp_pb2 # type: ignore
66
+ import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
67
+ import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
68
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
69
69
 
70
70
  from google.cloud.devicestreaming_v1.services.direct_access_service import pagers
71
71
  from google.cloud.devicestreaming_v1.types import adb_service, service
@@ -84,9 +84,7 @@ class DirectAccessServiceClientMeta(type):
84
84
  objects.
85
85
  """
86
86
 
87
- _transport_registry = (
88
- OrderedDict()
89
- ) # type: Dict[str, Type[DirectAccessServiceTransport]]
87
+ _transport_registry = OrderedDict() # type: Dict[str, Type[DirectAccessServiceTransport]]
90
88
  _transport_registry["grpc"] = DirectAccessServiceGrpcTransport
91
89
  _transport_registry["grpc_asyncio"] = DirectAccessServiceGrpcAsyncIOTransport
92
90
  _transport_registry["rest"] = DirectAccessServiceRestTransport
@@ -128,7 +126,7 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
128
126
  """
129
127
 
130
128
  @staticmethod
131
- def _get_default_mtls_endpoint(api_endpoint):
129
+ def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
132
130
  """Converts api endpoint to mTLS endpoint.
133
131
 
134
132
  Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
@@ -136,7 +134,7 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
136
134
  Args:
137
135
  api_endpoint (Optional[str]): the api endpoint to convert.
138
136
  Returns:
139
- str: converted mTLS api endpoint.
137
+ Optional[str]: converted mTLS api endpoint.
140
138
  """
141
139
  if not api_endpoint:
142
140
  return api_endpoint
@@ -146,6 +144,10 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
146
144
  )
147
145
 
148
146
  m = mtls_endpoint_re.match(api_endpoint)
147
+ if m is None:
148
+ # Could not parse api_endpoint; return as-is.
149
+ return api_endpoint
150
+
149
151
  name, mtls, sandbox, googledomain = m.groups()
150
152
  if mtls or not googledomain:
151
153
  return api_endpoint
@@ -450,7 +452,7 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
450
452
  @staticmethod
451
453
  def _get_api_endpoint(
452
454
  api_override, client_cert_source, universe_domain, use_mtls_endpoint
453
- ):
455
+ ) -> str:
454
456
  """Return the API endpoint used by the client.
455
457
 
456
458
  Args:
@@ -547,7 +549,7 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
547
549
  error._details.append(json.dumps(cred_info))
548
550
 
549
551
  @property
550
- def api_endpoint(self):
552
+ def api_endpoint(self) -> str:
551
553
  """Return the API endpoint used by the client instance.
552
554
 
553
555
  Returns:
@@ -638,18 +640,16 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
638
640
 
639
641
  universe_domain_opt = getattr(self._client_options, "universe_domain", None)
640
642
 
641
- (
642
- self._use_client_cert,
643
- self._use_mtls_endpoint,
644
- self._universe_domain_env,
645
- ) = DirectAccessServiceClient._read_environment_variables()
643
+ self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
644
+ DirectAccessServiceClient._read_environment_variables()
645
+ )
646
646
  self._client_cert_source = DirectAccessServiceClient._get_client_cert_source(
647
647
  self._client_options.client_cert_source, self._use_client_cert
648
648
  )
649
649
  self._universe_domain = DirectAccessServiceClient._get_universe_domain(
650
650
  universe_domain_opt, self._universe_domain_env
651
651
  )
652
- self._api_endpoint = None # updated below, depending on `transport`
652
+ self._api_endpoint: str = "" # updated below, depending on `transport`
653
653
 
654
654
  # Initialize the universe domain validation.
655
655
  self._is_universe_domain_valid = False
@@ -677,8 +677,7 @@ class DirectAccessServiceClient(metaclass=DirectAccessServiceClientMeta):
677
677
  )
678
678
  if self._client_options.scopes:
679
679
  raise ValueError(
680
- "When providing a transport instance, provide its scopes "
681
- "directly."
680
+ "When providing a transport instance, provide its scopes directly."
682
681
  )
683
682
  self._transport = cast(DirectAccessServiceTransport, transport)
684
683
  self._api_endpoint = self._transport.host
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ class ListDeviceSessionsPager:
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 ListDeviceSessionsAsyncPager:
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
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -22,9 +22,7 @@ from .grpc_asyncio import DirectAccessServiceGrpcAsyncIOTransport
22
22
  from .rest import DirectAccessServiceRestInterceptor, DirectAccessServiceRestTransport
23
23
 
24
24
  # Compile a registry of transports.
25
- _transport_registry = (
26
- OrderedDict()
27
- ) # type: Dict[str, Type[DirectAccessServiceTransport]]
25
+ _transport_registry = OrderedDict() # type: Dict[str, Type[DirectAccessServiceTransport]]
28
26
  _transport_registry["grpc"] = DirectAccessServiceGrpcTransport
29
27
  _transport_registry["grpc_asyncio"] = DirectAccessServiceGrpcAsyncIOTransport
30
28
  _transport_registry["rest"] = DirectAccessServiceRestTransport
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- # Copyright 2025 Google LLC
2
+ # Copyright 2026 Google LLC
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -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.devicestreaming_v1 import gapic_version as package_version
30
30
  from google.cloud.devicestreaming_v1.types import adb_service, service
@@ -81,10 +81,12 @@ class DirectAccessServiceTransport(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 DirectAccessServiceTransport(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 DirectAccessServiceTransport(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