google-cloud-devicestreaming 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/cloud/devicestreaming/__init__.py +69 -0
- google/cloud/devicestreaming/gapic_version.py +16 -0
- google/cloud/devicestreaming/py.typed +2 -0
- google/cloud/devicestreaming_v1/__init__.py +67 -0
- google/cloud/devicestreaming_v1/gapic_metadata.json +118 -0
- google/cloud/devicestreaming_v1/gapic_version.py +16 -0
- google/cloud/devicestreaming_v1/py.typed +2 -0
- google/cloud/devicestreaming_v1/services/__init__.py +15 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/__init__.py +22 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/async_client.py +1001 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/client.py +1410 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/pagers.py +197 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/__init__.py +38 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/base.py +262 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc.py +512 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/grpc_asyncio.py +592 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest.py +1234 -0
- google/cloud/devicestreaming_v1/services/direct_access_service/transports/rest_base.py +361 -0
- google/cloud/devicestreaming_v1/types/__init__.py +56 -0
- google/cloud/devicestreaming_v1/types/adb_service.py +317 -0
- google/cloud/devicestreaming_v1/types/service.py +410 -0
- google_cloud_devicestreaming-0.1.0.dist-info/LICENSE +202 -0
- google_cloud_devicestreaming-0.1.0.dist-info/METADATA +228 -0
- google_cloud_devicestreaming-0.1.0.dist-info/RECORD +26 -0
- google_cloud_devicestreaming-0.1.0.dist-info/WHEEL +5 -0
- google_cloud_devicestreaming-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from typing import MutableMapping, MutableSequence
|
|
19
|
+
|
|
20
|
+
import proto # type: ignore
|
|
21
|
+
|
|
22
|
+
__protobuf__ = proto.module(
|
|
23
|
+
package="google.cloud.devicestreaming.v1",
|
|
24
|
+
manifest={
|
|
25
|
+
"DeviceMessage",
|
|
26
|
+
"AdbMessage",
|
|
27
|
+
"StatusUpdate",
|
|
28
|
+
"StreamStatus",
|
|
29
|
+
"Open",
|
|
30
|
+
"StreamData",
|
|
31
|
+
"Okay",
|
|
32
|
+
"Fail",
|
|
33
|
+
"Close",
|
|
34
|
+
},
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DeviceMessage(proto.Message):
|
|
39
|
+
r"""A message returned from a device.
|
|
40
|
+
|
|
41
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
42
|
+
For each oneof, at most one member field can be set at the same time.
|
|
43
|
+
Setting any member of the oneof automatically clears all other
|
|
44
|
+
members.
|
|
45
|
+
|
|
46
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
47
|
+
|
|
48
|
+
Attributes:
|
|
49
|
+
status_update (google.cloud.devicestreaming_v1.types.StatusUpdate):
|
|
50
|
+
Information about the device's state.
|
|
51
|
+
|
|
52
|
+
This field is a member of `oneof`_ ``contents``.
|
|
53
|
+
stream_status (google.cloud.devicestreaming_v1.types.StreamStatus):
|
|
54
|
+
The result of a device stream from ADB.
|
|
55
|
+
|
|
56
|
+
This field is a member of `oneof`_ ``contents``.
|
|
57
|
+
stream_data (google.cloud.devicestreaming_v1.types.StreamData):
|
|
58
|
+
Data from an open stream.
|
|
59
|
+
|
|
60
|
+
This field is a member of `oneof`_ ``contents``.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
status_update: "StatusUpdate" = proto.Field(
|
|
64
|
+
proto.MESSAGE,
|
|
65
|
+
number=1,
|
|
66
|
+
oneof="contents",
|
|
67
|
+
message="StatusUpdate",
|
|
68
|
+
)
|
|
69
|
+
stream_status: "StreamStatus" = proto.Field(
|
|
70
|
+
proto.MESSAGE,
|
|
71
|
+
number=2,
|
|
72
|
+
oneof="contents",
|
|
73
|
+
message="StreamStatus",
|
|
74
|
+
)
|
|
75
|
+
stream_data: "StreamData" = proto.Field(
|
|
76
|
+
proto.MESSAGE,
|
|
77
|
+
number=3,
|
|
78
|
+
oneof="contents",
|
|
79
|
+
message="StreamData",
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class AdbMessage(proto.Message):
|
|
84
|
+
r"""A message to an ADB server.
|
|
85
|
+
|
|
86
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
87
|
+
For each oneof, at most one member field can be set at the same time.
|
|
88
|
+
Setting any member of the oneof automatically clears all other
|
|
89
|
+
members.
|
|
90
|
+
|
|
91
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
92
|
+
|
|
93
|
+
Attributes:
|
|
94
|
+
open_ (google.cloud.devicestreaming_v1.types.Open):
|
|
95
|
+
Open a new stream.
|
|
96
|
+
|
|
97
|
+
This field is a member of `oneof`_ ``contents``.
|
|
98
|
+
stream_data (google.cloud.devicestreaming_v1.types.StreamData):
|
|
99
|
+
Send data to a stream.
|
|
100
|
+
|
|
101
|
+
This field is a member of `oneof`_ ``contents``.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
open_: "Open" = proto.Field(
|
|
105
|
+
proto.MESSAGE,
|
|
106
|
+
number=1,
|
|
107
|
+
oneof="contents",
|
|
108
|
+
message="Open",
|
|
109
|
+
)
|
|
110
|
+
stream_data: "StreamData" = proto.Field(
|
|
111
|
+
proto.MESSAGE,
|
|
112
|
+
number=2,
|
|
113
|
+
oneof="contents",
|
|
114
|
+
message="StreamData",
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class StatusUpdate(proto.Message):
|
|
119
|
+
r"""A StatusUpdate message given over the ADB protocol for the
|
|
120
|
+
device state.
|
|
121
|
+
|
|
122
|
+
Attributes:
|
|
123
|
+
state (google.cloud.devicestreaming_v1.types.StatusUpdate.DeviceState):
|
|
124
|
+
The device's state
|
|
125
|
+
properties (MutableMapping[str, str]):
|
|
126
|
+
A map of properties with information about
|
|
127
|
+
this device.
|
|
128
|
+
features (str):
|
|
129
|
+
A comma-separated list of "features" that
|
|
130
|
+
this device supports.
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
class DeviceState(proto.Enum):
|
|
134
|
+
r"""The state displayed with the ADB Device when running "adb
|
|
135
|
+
devices"
|
|
136
|
+
|
|
137
|
+
Values:
|
|
138
|
+
DEVICE_STATE_UNSPECIFIED (0):
|
|
139
|
+
The device state is unknown.
|
|
140
|
+
DEVICE (1):
|
|
141
|
+
The ADB device is in the "device" status.
|
|
142
|
+
RECOVERY (2):
|
|
143
|
+
The ADB device is in the "recovery" status.
|
|
144
|
+
RESCUE (3):
|
|
145
|
+
The ADB device is in the "rescue" status.
|
|
146
|
+
SIDELOAD (4):
|
|
147
|
+
The ADB device is in the "sideload" status.
|
|
148
|
+
MISSING (10):
|
|
149
|
+
The ADB device is in the "missing" status.
|
|
150
|
+
OFFLINE (11):
|
|
151
|
+
The ADB device is in the "offline" status.
|
|
152
|
+
UNAUTHORIZED (12):
|
|
153
|
+
The ADB device is in the "unauthorized"
|
|
154
|
+
status.
|
|
155
|
+
AUTHORIZING (13):
|
|
156
|
+
The ADB device is in the "authorizing"
|
|
157
|
+
status.
|
|
158
|
+
CONNECTING (14):
|
|
159
|
+
The ADB device is in the "connecting" status.
|
|
160
|
+
"""
|
|
161
|
+
DEVICE_STATE_UNSPECIFIED = 0
|
|
162
|
+
DEVICE = 1
|
|
163
|
+
RECOVERY = 2
|
|
164
|
+
RESCUE = 3
|
|
165
|
+
SIDELOAD = 4
|
|
166
|
+
MISSING = 10
|
|
167
|
+
OFFLINE = 11
|
|
168
|
+
UNAUTHORIZED = 12
|
|
169
|
+
AUTHORIZING = 13
|
|
170
|
+
CONNECTING = 14
|
|
171
|
+
|
|
172
|
+
state: DeviceState = proto.Field(
|
|
173
|
+
proto.ENUM,
|
|
174
|
+
number=1,
|
|
175
|
+
enum=DeviceState,
|
|
176
|
+
)
|
|
177
|
+
properties: MutableMapping[str, str] = proto.MapField(
|
|
178
|
+
proto.STRING,
|
|
179
|
+
proto.STRING,
|
|
180
|
+
number=2,
|
|
181
|
+
)
|
|
182
|
+
features: str = proto.Field(
|
|
183
|
+
proto.STRING,
|
|
184
|
+
number=3,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class StreamStatus(proto.Message):
|
|
189
|
+
r"""The result of a stream.
|
|
190
|
+
|
|
191
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
192
|
+
For each oneof, at most one member field can be set at the same time.
|
|
193
|
+
Setting any member of the oneof automatically clears all other
|
|
194
|
+
members.
|
|
195
|
+
|
|
196
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
197
|
+
|
|
198
|
+
Attributes:
|
|
199
|
+
stream_id (int):
|
|
200
|
+
The unique ID of this stream, assigned by the
|
|
201
|
+
client.
|
|
202
|
+
okay (google.cloud.devicestreaming_v1.types.Okay):
|
|
203
|
+
Okay for success.
|
|
204
|
+
|
|
205
|
+
This field is a member of `oneof`_ ``status``.
|
|
206
|
+
fail (google.cloud.devicestreaming_v1.types.Fail):
|
|
207
|
+
Fail for failure.
|
|
208
|
+
|
|
209
|
+
This field is a member of `oneof`_ ``status``.
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
stream_id: int = proto.Field(
|
|
213
|
+
proto.INT32,
|
|
214
|
+
number=1,
|
|
215
|
+
)
|
|
216
|
+
okay: "Okay" = proto.Field(
|
|
217
|
+
proto.MESSAGE,
|
|
218
|
+
number=2,
|
|
219
|
+
oneof="status",
|
|
220
|
+
message="Okay",
|
|
221
|
+
)
|
|
222
|
+
fail: "Fail" = proto.Field(
|
|
223
|
+
proto.MESSAGE,
|
|
224
|
+
number=3,
|
|
225
|
+
oneof="status",
|
|
226
|
+
message="Fail",
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class Open(proto.Message):
|
|
231
|
+
r"""Message for opening a new stream.
|
|
232
|
+
|
|
233
|
+
Attributes:
|
|
234
|
+
stream_id (int):
|
|
235
|
+
Required. The unique ID that will be used to
|
|
236
|
+
talk to this stream. This should probably just
|
|
237
|
+
be a number that increments for each new Open
|
|
238
|
+
request.
|
|
239
|
+
service (str):
|
|
240
|
+
Optional. An ADB service to use in the new
|
|
241
|
+
stream.
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
stream_id: int = proto.Field(
|
|
245
|
+
proto.INT32,
|
|
246
|
+
number=1,
|
|
247
|
+
)
|
|
248
|
+
service: str = proto.Field(
|
|
249
|
+
proto.STRING,
|
|
250
|
+
number=2,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class StreamData(proto.Message):
|
|
255
|
+
r"""Data for a stream.
|
|
256
|
+
|
|
257
|
+
This message has `oneof`_ fields (mutually exclusive fields).
|
|
258
|
+
For each oneof, at most one member field can be set at the same time.
|
|
259
|
+
Setting any member of the oneof automatically clears all other
|
|
260
|
+
members.
|
|
261
|
+
|
|
262
|
+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
|
|
263
|
+
|
|
264
|
+
Attributes:
|
|
265
|
+
stream_id (int):
|
|
266
|
+
Required. The unique ID of this stream,
|
|
267
|
+
assigned by the client.
|
|
268
|
+
data (bytes):
|
|
269
|
+
Data in the stream.
|
|
270
|
+
|
|
271
|
+
This field is a member of `oneof`_ ``contents``.
|
|
272
|
+
close (google.cloud.devicestreaming_v1.types.Close):
|
|
273
|
+
The stream is closing. EOF.
|
|
274
|
+
|
|
275
|
+
This field is a member of `oneof`_ ``contents``.
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
stream_id: int = proto.Field(
|
|
279
|
+
proto.INT32,
|
|
280
|
+
number=1,
|
|
281
|
+
)
|
|
282
|
+
data: bytes = proto.Field(
|
|
283
|
+
proto.BYTES,
|
|
284
|
+
number=2,
|
|
285
|
+
oneof="contents",
|
|
286
|
+
)
|
|
287
|
+
close: "Close" = proto.Field(
|
|
288
|
+
proto.MESSAGE,
|
|
289
|
+
number=3,
|
|
290
|
+
oneof="contents",
|
|
291
|
+
message="Close",
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
class Okay(proto.Message):
|
|
296
|
+
r"""Message signifying that the stream is open"""
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
class Fail(proto.Message):
|
|
300
|
+
r"""Message signifying that the stream failed to open
|
|
301
|
+
|
|
302
|
+
Attributes:
|
|
303
|
+
reason (str):
|
|
304
|
+
A user-displayable failure reason.
|
|
305
|
+
"""
|
|
306
|
+
|
|
307
|
+
reason: str = proto.Field(
|
|
308
|
+
proto.STRING,
|
|
309
|
+
number=1,
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
class Close(proto.Message):
|
|
314
|
+
r"""Message signifying that the stream closed."""
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
__all__ = tuple(sorted(__protobuf__.manifest))
|