blob: 9bdb60b5e9b150753bc9cf66cb61bb215e417b04 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudiot_v1.html">Cloud IoT API</a> . <a href="cloudiot_v1.projects.html">projects</a> . <a href="cloudiot_v1.projects.locations.html">locations</a> . <a href="cloudiot_v1.projects.locations.registries.html">registries</a> . <a href="cloudiot_v1.projects.locations.registries.devices.html">devices</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudiot_v1.projects.locations.registries.devices.configVersions.html">configVersions()</a></code>
79</p>
80<p class="firstline">Returns the configVersions Resource.</p>
81
82<p class="toc_element">
83 <code><a href="cloudiot_v1.projects.locations.registries.devices.states.html">states()</a></code>
84</p>
85<p class="firstline">Returns the states Resource.</p>
86
87<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070088 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="firstline">Creates a device in a device registry.</p>
90<p class="toc_element">
91 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
92<p class="firstline">Deletes a device.</p>
93<p class="toc_element">
94 <code><a href="#get">get(name, fieldMask=None, x__xgafv=None)</a></code></p>
95<p class="firstline">Gets details about a device.</p>
96<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070097 <code><a href="#list">list(parent, deviceIds=None, gatewayListOptions_associationsDeviceId=None, deviceNumIds=None, gatewayListOptions_gatewayType=None, gatewayListOptions_associationsGatewayId=None, fieldMask=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="firstline">List devices in a device registry.</p>
99<p class="toc_element">
100 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
101<p class="firstline">Retrieves the next page of results.</p>
102<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code><a href="#modifyCloudToDeviceConfig">modifyCloudToDeviceConfig(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104<p class="firstline">Modifies the configuration for the device, which is eventually sent from</p>
105<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107<p class="firstline">Updates a device.</p>
108<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code><a href="#sendCommandToDevice">sendCommandToDevice(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110<p class="firstline">Sends a command to the specified device. In order for a device to be able</p>
111<h3>Method Details</h3>
112<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <pre>Creates a device in a device registry.
115
116Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 parent: string, Required. The name of the device registry where this device should be created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118For example,
119`projects/example-project/locations/us-central1/registries/my-registry`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 The object takes the form of:
122
123{ # The device resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700124 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
125 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
126 # field. If no errors have occurred, this field has an empty message
127 # and the status code 0 == OK. Otherwise, this field is expected to have a
128 # status code other than OK.
129 # different programming environments, including REST APIs and RPC APIs. It is
130 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
131 # three pieces of data: error code, error message, and error details.
132 #
133 # You can find out more about this error model and how to work with it in the
134 # [API Design Guide](https://cloud.google.com/apis/design/errors).
135 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
136 # message types for APIs to use.
137 {
138 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
139 },
140 ],
141 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
142 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
143 # user-facing error message should be localized and sent in the
144 # google.rpc.Status.details field, or localized by the client.
145 },
146 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
147 # periodically collected and written to storage; they may be stale by a few
148 # minutes.
149 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
150 # Cloud IoT Core to the device. If not present on creation, the
151 # configuration will be initialized with an empty payload and version value
152 # of `1`. To update this field after creation, use the
153 # `DeviceManager.ModifyCloudToDeviceConfig` method.
154 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
155 # the server, and is always greater than 0 after device creation. The
156 # version must be 0 on the `CreateDevice` request if a `config` is
157 # specified; the response of `CreateDevice` will always have a value of 1.
158 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
159 # Cloud IoT Core. This timestamp is set by the server.
160 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
161 # acknowledgment from the device, indicating that the device has received
162 # this configuration version. If this field is not present, the device has
163 # not yet acknowledged that it received this version. Note that when
164 # the config was sent to the device, many config versions may have been
165 # available in Cloud IoT Core while the device was disconnected, and on
166 # connection, only the latest version is sent to the device. Some
167 # versions may never be sent to the device, and therefore are never
168 # acknowledged. This timestamp is set by Cloud IoT Core.
169 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
170 },
171 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
172 # has been reported, this field is not present.
173 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
174 # IoT Core.
175 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
176 },
177 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
178 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
179 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
180 # When `name` is populated as a response from the service, it always ends
181 # in the device numeric ID.
182 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
183 # rotation without interruption, multiple device credentials can be bound to
184 # this device. No more than 3 credentials can be bound to a single device at
185 # a time. When new credentials are added to a device, they are verified
186 # against the registry credentials. For details, see the description of the
187 # `DeviceRegistry.credentials` field.
188 { # A server-stored device credential used for authentication.
189 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
190 # credential will be ignored for new client authentication requests after
191 # this timestamp; however, it will not be automatically deleted.
192 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
193 # When adding a new device credential, either via device creation or via
194 # modifications, this public key credential may be required to be signed by
195 # one of the registry level certificates. More specifically, if the
196 # registry contains at least one certificate, any new device credential
197 # must be signed by one of the registry certificates. As a result,
198 # when the registry contains certificates, only X.509 certificates are
199 # accepted as device credentials. However, if the registry does
200 # not contain a certificate, self-signed certificates and public keys will
201 # be accepted. New device credentials must be different from every
202 # registry-level certificate.
203 &quot;key&quot;: &quot;A String&quot;, # The key data.
204 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
205 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700207 ],
208 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
209 # publish to Cloud Pub/Sub. This field is the timestamp of
210 # &#x27;last_error_status&#x27;.
211 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
212 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
213 # information for the device.
214 #
215 # Keys must conform to the regular expression a-zA-Z+ and
216 # be less than 128 bytes in length.
217 #
218 # Values are free-form strings. Each value must be less than or equal to 32
219 # KB in size.
220 #
221 # The total size of all keys and values must be less than 256 KB, and the
222 # maximum number of key-value pairs is 500.
223 &quot;a_key&quot;: &quot;A String&quot;,
224 },
225 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
226 #
227 # The logging verbosity for device activity. If unspecified,
228 # DeviceRegistry.log_level will be used.
229 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
230 # within a device registry.
231 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
232 # was received from the device. This field is only for configurations
233 # sent through MQTT.
234 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
235 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
236 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
237 # gateway.
238 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
239 # specified in `last_accessed_gateway`.
240 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
241 },
242 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
243 # more compact way to identify devices, and it is globally unique.
244 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
245 # Can be used to temporarily prevent the device from connecting if, for
246 # example, the sensor is generating bad data and needs maintenance.
247 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
248 # applies only to devices connecting through MQTT. MQTT clients usually only
249 # send `PINGREQ` messages if the connection is idle, and no other messages
250 # have been sent. Timestamps are periodically collected and written to
251 # storage; they may be stale by a few minutes.
252 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
253 # periodically collected and written to storage; they may be stale by a few
254 # minutes.
255 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
256 # the device.
257}
258
259 x__xgafv: string, V1 error format.
260 Allowed values
261 1 - v1 error format
262 2 - v2 error format
263
264Returns:
265 An object of the form:
266
267 { # The device resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
269 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 # field. If no errors have occurred, this field has an empty message
271 # and the status code 0 == OK. Otherwise, this field is expected to have a
272 # status code other than OK.
273 # different programming environments, including REST APIs and RPC APIs. It is
274 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
275 # three pieces of data: error code, error message, and error details.
276 #
277 # You can find out more about this error model and how to work with it in the
278 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # message types for APIs to use.
281 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 },
284 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700285 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
286 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
287 # user-facing error message should be localized and sent in the
288 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
291 # periodically collected and written to storage; they may be stale by a few
292 # minutes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
294 # Cloud IoT Core to the device. If not present on creation, the
295 # configuration will be initialized with an empty payload and version value
296 # of `1`. To update this field after creation, use the
297 # `DeviceManager.ModifyCloudToDeviceConfig` method.
298 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
299 # the server, and is always greater than 0 after device creation. The
300 # version must be 0 on the `CreateDevice` request if a `config` is
301 # specified; the response of `CreateDevice` will always have a value of 1.
302 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
303 # Cloud IoT Core. This timestamp is set by the server.
304 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
305 # acknowledgment from the device, indicating that the device has received
306 # this configuration version. If this field is not present, the device has
307 # not yet acknowledged that it received this version. Note that when
308 # the config was sent to the device, many config versions may have been
309 # available in Cloud IoT Core while the device was disconnected, and on
310 # connection, only the latest version is sent to the device. Some
311 # versions may never be sent to the device, and therefore are never
312 # acknowledged. This timestamp is set by Cloud IoT Core.
313 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
314 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700315 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
316 # has been reported, this field is not present.
317 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
318 # IoT Core.
319 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
320 },
321 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
322 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
323 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
324 # When `name` is populated as a response from the service, it always ends
325 # in the device numeric ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 # rotation without interruption, multiple device credentials can be bound to
328 # this device. No more than 3 credentials can be bound to a single device at
329 # a time. When new credentials are added to a device, they are verified
330 # against the registry credentials. For details, see the description of the
331 # `DeviceRegistry.credentials` field.
332 { # A server-stored device credential used for authentication.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
334 # credential will be ignored for new client authentication requests after
335 # this timestamp; however, it will not be automatically deleted.
336 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 # When adding a new device credential, either via device creation or via
338 # modifications, this public key credential may be required to be signed by
339 # one of the registry level certificates. More specifically, if the
340 # registry contains at least one certificate, any new device credential
341 # must be signed by one of the registry certificates. As a result,
342 # when the registry contains certificates, only X.509 certificates are
343 # accepted as device credentials. However, if the registry does
344 # not contain a certificate, self-signed certificates and public keys will
345 # be accepted. New device credentials must be different from every
346 # registry-level certificate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;key&quot;: &quot;A String&quot;, # The key data.
348 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 },
351 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
353 # publish to Cloud Pub/Sub. This field is the timestamp of
354 # &#x27;last_error_status&#x27;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
357 # information for the device.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 # Keys must conform to the regular expression a-zA-Z+ and
360 # be less than 128 bytes in length.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700361 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # Values are free-form strings. Each value must be less than or equal to 32
363 # KB in size.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700364 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 # The total size of all keys and values must be less than 256 KB, and the
366 # maximum number of key-value pairs is 500.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700369 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
370 #
371 # The logging verbosity for device activity. If unspecified,
372 # DeviceRegistry.log_level will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
374 # within a device registry.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700375 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
376 # was received from the device. This field is only for configurations
377 # sent through MQTT.
378 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
379 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
380 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
381 # gateway.
382 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
383 # specified in `last_accessed_gateway`.
384 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
385 },
386 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
387 # more compact way to identify devices, and it is globally unique.
388 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
389 # Can be used to temporarily prevent the device from connecting if, for
390 # example, the sensor is generating bad data and needs maintenance.
391 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
392 # applies only to devices connecting through MQTT. MQTT clients usually only
393 # send `PINGREQ` messages if the connection is idle, and no other messages
394 # have been sent. Timestamps are periodically collected and written to
395 # storage; they may be stale by a few minutes.
396 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
397 # periodically collected and written to storage; they may be stale by a few
398 # minutes.
399 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
400 # the device.
401 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402</div>
403
404<div class="method">
405 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
406 <pre>Deletes a device.
407
408Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 name: string, Required. The name of the device. For example,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410`projects/p0/locations/us-central1/registries/registry0/devices/device0` or
411`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. (required)
412 x__xgafv: string, V1 error format.
413 Allowed values
414 1 - v1 error format
415 2 - v2 error format
416
417Returns:
418 An object of the form:
419
420 { # A generic empty message that you can re-use to avoid defining duplicated
421 # empty messages in your APIs. A typical example is to use it as the request
422 # or the response type of an API method. For instance:
423 #
424 # service Foo {
425 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
426 # }
427 #
428 # The JSON representation for `Empty` is empty JSON object `{}`.
429 }</pre>
430</div>
431
432<div class="method">
433 <code class="details" id="get">get(name, fieldMask=None, x__xgafv=None)</code>
434 <pre>Gets details about a device.
435
436Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 name: string, Required. The name of the device. For example,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438`projects/p0/locations/us-central1/registries/registry0/devices/device0` or
439`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. (required)
440 fieldMask: string, The fields of the `Device` resource to be returned in the response. If the
441field mask is unset or empty, all fields are returned.
442 x__xgafv: string, V1 error format.
443 Allowed values
444 1 - v1 error format
445 2 - v2 error format
446
447Returns:
448 An object of the form:
449
450 { # The device resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700451 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
452 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
453 # field. If no errors have occurred, this field has an empty message
454 # and the status code 0 == OK. Otherwise, this field is expected to have a
455 # status code other than OK.
456 # different programming environments, including REST APIs and RPC APIs. It is
457 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
458 # three pieces of data: error code, error message, and error details.
459 #
460 # You can find out more about this error model and how to work with it in the
461 # [API Design Guide](https://cloud.google.com/apis/design/errors).
462 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
463 # message types for APIs to use.
464 {
465 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 },
467 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700468 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
469 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
470 # user-facing error message should be localized and sent in the
471 # google.rpc.Status.details field, or localized by the client.
472 },
473 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
474 # periodically collected and written to storage; they may be stale by a few
475 # minutes.
476 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
477 # Cloud IoT Core to the device. If not present on creation, the
478 # configuration will be initialized with an empty payload and version value
479 # of `1`. To update this field after creation, use the
480 # `DeviceManager.ModifyCloudToDeviceConfig` method.
481 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
482 # the server, and is always greater than 0 after device creation. The
483 # version must be 0 on the `CreateDevice` request if a `config` is
484 # specified; the response of `CreateDevice` will always have a value of 1.
485 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
486 # Cloud IoT Core. This timestamp is set by the server.
487 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
488 # acknowledgment from the device, indicating that the device has received
489 # this configuration version. If this field is not present, the device has
490 # not yet acknowledged that it received this version. Note that when
491 # the config was sent to the device, many config versions may have been
492 # available in Cloud IoT Core while the device was disconnected, and on
493 # connection, only the latest version is sent to the device. Some
494 # versions may never be sent to the device, and therefore are never
495 # acknowledged. This timestamp is set by Cloud IoT Core.
496 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
497 },
498 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
499 # has been reported, this field is not present.
500 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
501 # IoT Core.
502 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
503 },
504 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
505 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
506 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
507 # When `name` is populated as a response from the service, it always ends
508 # in the device numeric ID.
509 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
510 # rotation without interruption, multiple device credentials can be bound to
511 # this device. No more than 3 credentials can be bound to a single device at
512 # a time. When new credentials are added to a device, they are verified
513 # against the registry credentials. For details, see the description of the
514 # `DeviceRegistry.credentials` field.
515 { # A server-stored device credential used for authentication.
516 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
517 # credential will be ignored for new client authentication requests after
518 # this timestamp; however, it will not be automatically deleted.
519 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
520 # When adding a new device credential, either via device creation or via
521 # modifications, this public key credential may be required to be signed by
522 # one of the registry level certificates. More specifically, if the
523 # registry contains at least one certificate, any new device credential
524 # must be signed by one of the registry certificates. As a result,
525 # when the registry contains certificates, only X.509 certificates are
526 # accepted as device credentials. However, if the registry does
527 # not contain a certificate, self-signed certificates and public keys will
528 # be accepted. New device credentials must be different from every
529 # registry-level certificate.
530 &quot;key&quot;: &quot;A String&quot;, # The key data.
531 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
532 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 ],
535 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
536 # publish to Cloud Pub/Sub. This field is the timestamp of
537 # &#x27;last_error_status&#x27;.
538 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
539 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
540 # information for the device.
541 #
542 # Keys must conform to the regular expression a-zA-Z+ and
543 # be less than 128 bytes in length.
544 #
545 # Values are free-form strings. Each value must be less than or equal to 32
546 # KB in size.
547 #
548 # The total size of all keys and values must be less than 256 KB, and the
549 # maximum number of key-value pairs is 500.
550 &quot;a_key&quot;: &quot;A String&quot;,
551 },
552 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
553 #
554 # The logging verbosity for device activity. If unspecified,
555 # DeviceRegistry.log_level will be used.
556 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
557 # within a device registry.
558 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
559 # was received from the device. This field is only for configurations
560 # sent through MQTT.
561 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
562 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
563 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
564 # gateway.
565 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
566 # specified in `last_accessed_gateway`.
567 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
568 },
569 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
570 # more compact way to identify devices, and it is globally unique.
571 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
572 # Can be used to temporarily prevent the device from connecting if, for
573 # example, the sensor is generating bad data and needs maintenance.
574 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
575 # applies only to devices connecting through MQTT. MQTT clients usually only
576 # send `PINGREQ` messages if the connection is idle, and no other messages
577 # have been sent. Timestamps are periodically collected and written to
578 # storage; they may be stale by a few minutes.
579 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
580 # periodically collected and written to storage; they may be stale by a few
581 # minutes.
582 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
583 # the device.
584 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585</div>
586
587<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700588 <code class="details" id="list">list(parent, deviceIds=None, gatewayListOptions_associationsDeviceId=None, deviceNumIds=None, gatewayListOptions_gatewayType=None, gatewayListOptions_associationsGatewayId=None, fieldMask=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 <pre>List devices in a device registry.
590
591Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 parent: string, Required. The device registry path. Required. For example,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593`projects/my-project/locations/us-central1/registries/my-registry`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 deviceIds: string, A list of device string IDs. For example, `[&#x27;device0&#x27;, &#x27;device12&#x27;]`.
595If empty, this field is ignored. Maximum IDs: 10,000 (repeated)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 gatewayListOptions_associationsDeviceId: string, If set, returns only the gateways with which the specified device is
597associated. The device ID can be numeric (`num_id`) or the user-defined
598string (`id`). For example, if `456` is specified, returns only the
599gateways to which the device with `num_id` 456 is bound.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700600 deviceNumIds: string, A list of device numeric IDs. If empty, this field is ignored. Maximum
601IDs: 10,000. (repeated)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 gatewayListOptions_gatewayType: string, If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
603is specified, only non-gateway devices are returned. If
604`GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 gatewayListOptions_associationsGatewayId: string, If set, only devices associated with the specified gateway are returned.
606The gateway ID can be numeric (`num_id`) or the user-defined string
607(`id`). For example, if `123` is specified, only devices bound to the
608gateway with `num_id` 123 are returned.
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 fieldMask: string, The fields of the `Device` resource to be returned in the response. The
610fields `id` and `num_id` are always returned, along with any
611other fields specified.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700612 pageToken: string, The value returned by the last `ListDevicesResponse`; indicates
613that this is a continuation of a prior `ListDevices` call and
614the system should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 pageSize: integer, The maximum number of devices to return in the response. If this value
616is zero, the service will select a default size. A call may return fewer
617objects than requested. A non-empty `next_page_token` in the response
618indicates that more data is available.
619 x__xgafv: string, V1 error format.
620 Allowed values
621 1 - v1 error format
622 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623
624Returns:
625 An object of the form:
626
627 { # Response for `ListDevices`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more devices that match the
629 # request; this value should be passed in a new `ListDevicesRequest`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700630 &quot;devices&quot;: [ # The devices that match the request.
631 { # The device resource.
632 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
633 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
634 # field. If no errors have occurred, this field has an empty message
635 # and the status code 0 == OK. Otherwise, this field is expected to have a
636 # status code other than OK.
637 # different programming environments, including REST APIs and RPC APIs. It is
638 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
639 # three pieces of data: error code, error message, and error details.
640 #
641 # You can find out more about this error model and how to work with it in the
642 # [API Design Guide](https://cloud.google.com/apis/design/errors).
643 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
644 # message types for APIs to use.
645 {
646 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
647 },
648 ],
649 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
650 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
651 # user-facing error message should be localized and sent in the
652 # google.rpc.Status.details field, or localized by the client.
653 },
654 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
655 # periodically collected and written to storage; they may be stale by a few
656 # minutes.
657 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
658 # Cloud IoT Core to the device. If not present on creation, the
659 # configuration will be initialized with an empty payload and version value
660 # of `1`. To update this field after creation, use the
661 # `DeviceManager.ModifyCloudToDeviceConfig` method.
662 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
663 # the server, and is always greater than 0 after device creation. The
664 # version must be 0 on the `CreateDevice` request if a `config` is
665 # specified; the response of `CreateDevice` will always have a value of 1.
666 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
667 # Cloud IoT Core. This timestamp is set by the server.
668 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
669 # acknowledgment from the device, indicating that the device has received
670 # this configuration version. If this field is not present, the device has
671 # not yet acknowledged that it received this version. Note that when
672 # the config was sent to the device, many config versions may have been
673 # available in Cloud IoT Core while the device was disconnected, and on
674 # connection, only the latest version is sent to the device. Some
675 # versions may never be sent to the device, and therefore are never
676 # acknowledged. This timestamp is set by Cloud IoT Core.
677 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
678 },
679 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
680 # has been reported, this field is not present.
681 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
682 # IoT Core.
683 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
684 },
685 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
686 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
687 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
688 # When `name` is populated as a response from the service, it always ends
689 # in the device numeric ID.
690 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
691 # rotation without interruption, multiple device credentials can be bound to
692 # this device. No more than 3 credentials can be bound to a single device at
693 # a time. When new credentials are added to a device, they are verified
694 # against the registry credentials. For details, see the description of the
695 # `DeviceRegistry.credentials` field.
696 { # A server-stored device credential used for authentication.
697 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
698 # credential will be ignored for new client authentication requests after
699 # this timestamp; however, it will not be automatically deleted.
700 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
701 # When adding a new device credential, either via device creation or via
702 # modifications, this public key credential may be required to be signed by
703 # one of the registry level certificates. More specifically, if the
704 # registry contains at least one certificate, any new device credential
705 # must be signed by one of the registry certificates. As a result,
706 # when the registry contains certificates, only X.509 certificates are
707 # accepted as device credentials. However, if the registry does
708 # not contain a certificate, self-signed certificates and public keys will
709 # be accepted. New device credentials must be different from every
710 # registry-level certificate.
711 &quot;key&quot;: &quot;A String&quot;, # The key data.
712 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
713 },
714 },
715 ],
716 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
717 # publish to Cloud Pub/Sub. This field is the timestamp of
718 # &#x27;last_error_status&#x27;.
719 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
720 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
721 # information for the device.
722 #
723 # Keys must conform to the regular expression a-zA-Z+ and
724 # be less than 128 bytes in length.
725 #
726 # Values are free-form strings. Each value must be less than or equal to 32
727 # KB in size.
728 #
729 # The total size of all keys and values must be less than 256 KB, and the
730 # maximum number of key-value pairs is 500.
731 &quot;a_key&quot;: &quot;A String&quot;,
732 },
733 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
734 #
735 # The logging verbosity for device activity. If unspecified,
736 # DeviceRegistry.log_level will be used.
737 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
738 # within a device registry.
739 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
740 # was received from the device. This field is only for configurations
741 # sent through MQTT.
742 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
743 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
744 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
745 # gateway.
746 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
747 # specified in `last_accessed_gateway`.
748 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
749 },
750 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
751 # more compact way to identify devices, and it is globally unique.
752 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
753 # Can be used to temporarily prevent the device from connecting if, for
754 # example, the sensor is generating bad data and needs maintenance.
755 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
756 # applies only to devices connecting through MQTT. MQTT clients usually only
757 # send `PINGREQ` messages if the connection is idle, and no other messages
758 # have been sent. Timestamps are periodically collected and written to
759 # storage; they may be stale by a few minutes.
760 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
761 # periodically collected and written to storage; they may be stale by a few
762 # minutes.
763 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
764 # the device.
765 },
766 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700767 }</pre>
768</div>
769
770<div class="method">
771 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
772 <pre>Retrieves the next page of results.
773
774Args:
775 previous_request: The request for the previous page. (required)
776 previous_response: The response from the request for the previous page. (required)
777
778Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 page. Returns None if there are no more items in the collection.
781 </pre>
782</div>
783
784<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 <code class="details" id="modifyCloudToDeviceConfig">modifyCloudToDeviceConfig(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 <pre>Modifies the configuration for the device, which is eventually sent from
787the Cloud IoT Core servers. Returns the modified configuration version and
788its metadata.
789
790Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 name: string, Required. The name of the device. For example,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792`projects/p0/locations/us-central1/registries/registry0/devices/device0` or
793`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700794 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700795 The object takes the form of:
796
797{ # Request for `ModifyCloudToDeviceConfig`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700798 &quot;binaryData&quot;: &quot;A String&quot;, # Required. The configuration data for the device.
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 &quot;versionToUpdate&quot;: &quot;A String&quot;, # The version number to update. If this value is zero, it will not check the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 # version number of the server and will always update the current version;
801 # otherwise, this update will fail if the version number found on the server
802 # does not match this version number. This is used to support multiple
803 # simultaneous updates without losing data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 }
805
806 x__xgafv: string, V1 error format.
807 Allowed values
808 1 - v1 error format
809 2 - v2 error format
810
811Returns:
812 An object of the form:
813
814 { # The device configuration. Eventually delivered to devices.
Bu Sun Kim65020912020-05-20 12:08:20 -0700815 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 # the server, and is always greater than 0 after device creation. The
817 # version must be 0 on the `CreateDevice` request if a `config` is
818 # specified; the response of `CreateDevice` will always have a value of 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700819 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 # Cloud IoT Core. This timestamp is set by the server.
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 # acknowledgment from the device, indicating that the device has received
823 # this configuration version. If this field is not present, the device has
824 # not yet acknowledged that it received this version. Note that when
825 # the config was sent to the device, many config versions may have been
826 # available in Cloud IoT Core while the device was disconnected, and on
827 # connection, only the latest version is sent to the device. Some
828 # versions may never be sent to the device, and therefore are never
829 # acknowledged. This timestamp is set by Cloud IoT Core.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 }</pre>
832</div>
833
834<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 <pre>Updates a device.
837
838Args:
839 name: string, The resource path name. For example,
840`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
841`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
842When `name` is populated as a response from the service, it always ends
843in the device numeric ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 The object takes the form of:
846
847{ # The device resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700848 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
849 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
850 # field. If no errors have occurred, this field has an empty message
851 # and the status code 0 == OK. Otherwise, this field is expected to have a
852 # status code other than OK.
853 # different programming environments, including REST APIs and RPC APIs. It is
854 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
855 # three pieces of data: error code, error message, and error details.
856 #
857 # You can find out more about this error model and how to work with it in the
858 # [API Design Guide](https://cloud.google.com/apis/design/errors).
859 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
860 # message types for APIs to use.
861 {
862 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
863 },
864 ],
865 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
866 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
867 # user-facing error message should be localized and sent in the
868 # google.rpc.Status.details field, or localized by the client.
869 },
870 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
871 # periodically collected and written to storage; they may be stale by a few
872 # minutes.
873 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
874 # Cloud IoT Core to the device. If not present on creation, the
875 # configuration will be initialized with an empty payload and version value
876 # of `1`. To update this field after creation, use the
877 # `DeviceManager.ModifyCloudToDeviceConfig` method.
878 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
879 # the server, and is always greater than 0 after device creation. The
880 # version must be 0 on the `CreateDevice` request if a `config` is
881 # specified; the response of `CreateDevice` will always have a value of 1.
882 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
883 # Cloud IoT Core. This timestamp is set by the server.
884 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
885 # acknowledgment from the device, indicating that the device has received
886 # this configuration version. If this field is not present, the device has
887 # not yet acknowledged that it received this version. Note that when
888 # the config was sent to the device, many config versions may have been
889 # available in Cloud IoT Core while the device was disconnected, and on
890 # connection, only the latest version is sent to the device. Some
891 # versions may never be sent to the device, and therefore are never
892 # acknowledged. This timestamp is set by Cloud IoT Core.
893 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
894 },
895 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
896 # has been reported, this field is not present.
897 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
898 # IoT Core.
899 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
900 },
901 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
902 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
903 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
904 # When `name` is populated as a response from the service, it always ends
905 # in the device numeric ID.
906 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
907 # rotation without interruption, multiple device credentials can be bound to
908 # this device. No more than 3 credentials can be bound to a single device at
909 # a time. When new credentials are added to a device, they are verified
910 # against the registry credentials. For details, see the description of the
911 # `DeviceRegistry.credentials` field.
912 { # A server-stored device credential used for authentication.
913 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
914 # credential will be ignored for new client authentication requests after
915 # this timestamp; however, it will not be automatically deleted.
916 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
917 # When adding a new device credential, either via device creation or via
918 # modifications, this public key credential may be required to be signed by
919 # one of the registry level certificates. More specifically, if the
920 # registry contains at least one certificate, any new device credential
921 # must be signed by one of the registry certificates. As a result,
922 # when the registry contains certificates, only X.509 certificates are
923 # accepted as device credentials. However, if the registry does
924 # not contain a certificate, self-signed certificates and public keys will
925 # be accepted. New device credentials must be different from every
926 # registry-level certificate.
927 &quot;key&quot;: &quot;A String&quot;, # The key data.
928 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
929 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700931 ],
932 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
933 # publish to Cloud Pub/Sub. This field is the timestamp of
934 # &#x27;last_error_status&#x27;.
935 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
936 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
937 # information for the device.
938 #
939 # Keys must conform to the regular expression a-zA-Z+ and
940 # be less than 128 bytes in length.
941 #
942 # Values are free-form strings. Each value must be less than or equal to 32
943 # KB in size.
944 #
945 # The total size of all keys and values must be less than 256 KB, and the
946 # maximum number of key-value pairs is 500.
947 &quot;a_key&quot;: &quot;A String&quot;,
948 },
949 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
950 #
951 # The logging verbosity for device activity. If unspecified,
952 # DeviceRegistry.log_level will be used.
953 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
954 # within a device registry.
955 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
956 # was received from the device. This field is only for configurations
957 # sent through MQTT.
958 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
959 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
960 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
961 # gateway.
962 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
963 # specified in `last_accessed_gateway`.
964 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
965 },
966 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
967 # more compact way to identify devices, and it is globally unique.
968 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
969 # Can be used to temporarily prevent the device from connecting if, for
970 # example, the sensor is generating bad data and needs maintenance.
971 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
972 # applies only to devices connecting through MQTT. MQTT clients usually only
973 # send `PINGREQ` messages if the connection is idle, and no other messages
974 # have been sent. Timestamps are periodically collected and written to
975 # storage; they may be stale by a few minutes.
976 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
977 # periodically collected and written to storage; they may be stale by a few
978 # minutes.
979 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
980 # the device.
981}
982
983 updateMask: string, Required. Only updates the `device` fields indicated by this mask.
984The field mask must not be empty, and it must not contain fields that
985are immutable or only set by the server.
986Mutable top-level fields: `credentials`, `blocked`, and `metadata`
987 x__xgafv: string, V1 error format.
988 Allowed values
989 1 - v1 error format
990 2 - v2 error format
991
992Returns:
993 An object of the form:
994
995 { # The device resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &quot;lastErrorStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output only] The error message of the most recent error, such as a failure
997 # to publish to Cloud Pub/Sub. &#x27;last_error_time&#x27; is the timestamp of this
998 # field. If no errors have occurred, this field has an empty message
999 # and the status code 0 == OK. Otherwise, this field is expected to have a
1000 # status code other than OK.
1001 # different programming environments, including REST APIs and RPC APIs. It is
1002 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1003 # three pieces of data: error code, error message, and error details.
1004 #
1005 # You can find out more about this error model and how to work with it in the
1006 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1008 # message types for APIs to use.
1009 {
1010 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1011 },
1012 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001013 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1014 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1015 # user-facing error message should be localized and sent in the
1016 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 },
1018 &quot;lastStateTime&quot;: &quot;A String&quot;, # [Output only] The last time a state event was received. Timestamps are
1019 # periodically collected and written to storage; they may be stale by a few
1020 # minutes.
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;config&quot;: { # The device configuration. Eventually delivered to devices. # The most recent device configuration, which is eventually sent from
1022 # Cloud IoT Core to the device. If not present on creation, the
1023 # configuration will be initialized with an empty payload and version value
1024 # of `1`. To update this field after creation, use the
1025 # `DeviceManager.ModifyCloudToDeviceConfig` method.
1026 &quot;version&quot;: &quot;A String&quot;, # [Output only] The version of this update. The version number is assigned by
1027 # the server, and is always greater than 0 after device creation. The
1028 # version must be 0 on the `CreateDevice` request if a `config` is
1029 # specified; the response of `CreateDevice` will always have a value of 1.
1030 &quot;cloudUpdateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this configuration version was updated in
1031 # Cloud IoT Core. This timestamp is set by the server.
1032 &quot;deviceAckTime&quot;: &quot;A String&quot;, # [Output only] The time at which Cloud IoT Core received the
1033 # acknowledgment from the device, indicating that the device has received
1034 # this configuration version. If this field is not present, the device has
1035 # not yet acknowledged that it received this version. Note that when
1036 # the config was sent to the device, many config versions may have been
1037 # available in Cloud IoT Core while the device was disconnected, and on
1038 # connection, only the latest version is sent to the device. Some
1039 # versions may never be sent to the device, and therefore are never
1040 # acknowledged. This timestamp is set by Cloud IoT Core.
1041 &quot;binaryData&quot;: &quot;A String&quot;, # The device configuration data.
1042 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001043 &quot;state&quot;: { # The device state, as reported by the device. # [Output only] The state most recently received from the device. If no state
1044 # has been reported, this field is not present.
1045 &quot;updateTime&quot;: &quot;A String&quot;, # [Output only] The time at which this state version was updated in Cloud
1046 # IoT Core.
1047 &quot;binaryData&quot;: &quot;A String&quot;, # The device state data.
1048 },
1049 &quot;name&quot;: &quot;A String&quot;, # The resource path name. For example,
1050 # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
1051 # `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
1052 # When `name` is populated as a response from the service, it always ends
1053 # in the device numeric ID.
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 &quot;credentials&quot;: [ # The credentials used to authenticate this device. To allow credential
1055 # rotation without interruption, multiple device credentials can be bound to
1056 # this device. No more than 3 credentials can be bound to a single device at
1057 # a time. When new credentials are added to a device, they are verified
1058 # against the registry credentials. For details, see the description of the
1059 # `DeviceRegistry.credentials` field.
1060 { # A server-stored device credential used for authentication.
1061 &quot;expirationTime&quot;: &quot;A String&quot;, # [Optional] The time at which this credential becomes invalid. This
1062 # credential will be ignored for new client authentication requests after
1063 # this timestamp; however, it will not be automatically deleted.
1064 &quot;publicKey&quot;: { # A public key format and data. # A public key used to verify the signature of JSON Web Tokens (JWTs).
1065 # When adding a new device credential, either via device creation or via
1066 # modifications, this public key credential may be required to be signed by
1067 # one of the registry level certificates. More specifically, if the
1068 # registry contains at least one certificate, any new device credential
1069 # must be signed by one of the registry certificates. As a result,
1070 # when the registry contains certificates, only X.509 certificates are
1071 # accepted as device credentials. However, if the registry does
1072 # not contain a certificate, self-signed certificates and public keys will
1073 # be accepted. New device credentials must be different from every
1074 # registry-level certificate.
1075 &quot;key&quot;: &quot;A String&quot;, # The key data.
1076 &quot;format&quot;: &quot;A String&quot;, # The format of the key.
1077 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 },
1079 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &quot;lastErrorTime&quot;: &quot;A String&quot;, # [Output only] The time the most recent error occurred, such as a failure to
1081 # publish to Cloud Pub/Sub. This field is the timestamp of
1082 # &#x27;last_error_status&#x27;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 &quot;metadata&quot;: { # The metadata key-value pairs assigned to the device. This metadata is not
1084 # interpreted or indexed by Cloud IoT Core. It can be used to add contextual
1085 # information for the device.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001086 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # Keys must conform to the regular expression a-zA-Z+ and
1088 # be less than 128 bytes in length.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001089 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001090 # Values are free-form strings. Each value must be less than or equal to 32
1091 # KB in size.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001092 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 # The total size of all keys and values must be less than 256 KB, and the
1094 # maximum number of key-value pairs is 500.
1095 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001097 &quot;logLevel&quot;: &quot;A String&quot;, # **Beta Feature**
1098 #
1099 # The logging verbosity for device activity. If unspecified,
1100 # DeviceRegistry.log_level will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;id&quot;: &quot;A String&quot;, # The user-defined device identifier. The device ID must be unique
1102 # within a device registry.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001103 &quot;lastConfigAckTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version acknowledgment
1104 # was received from the device. This field is only for configurations
1105 # sent through MQTT.
1106 &quot;gatewayConfig&quot;: { # Gateway-related configuration and state. # Gateway-related configuration and state.
1107 &quot;lastAccessedGatewayId&quot;: &quot;A String&quot;, # [Output only] The ID of the gateway the device accessed most recently.
1108 &quot;gatewayAuthMethod&quot;: &quot;A String&quot;, # Indicates how to authorize and/or authenticate devices to access the
1109 # gateway.
1110 &quot;lastAccessedGatewayTime&quot;: &quot;A String&quot;, # [Output only] The most recent time at which the device accessed the gateway
1111 # specified in `last_accessed_gateway`.
1112 &quot;gatewayType&quot;: &quot;A String&quot;, # Indicates whether the device is a gateway.
1113 },
1114 &quot;numId&quot;: &quot;A String&quot;, # [Output only] A server-defined unique numeric ID for the device. This is a
1115 # more compact way to identify devices, and it is globally unique.
1116 &quot;blocked&quot;: True or False, # If a device is blocked, connections or requests from this device will fail.
1117 # Can be used to temporarily prevent the device from connecting if, for
1118 # example, the sensor is generating bad data and needs maintenance.
1119 &quot;lastHeartbeatTime&quot;: &quot;A String&quot;, # [Output only] The last time an MQTT `PINGREQ` was received. This field
1120 # applies only to devices connecting through MQTT. MQTT clients usually only
1121 # send `PINGREQ` messages if the connection is idle, and no other messages
1122 # have been sent. Timestamps are periodically collected and written to
1123 # storage; they may be stale by a few minutes.
1124 &quot;lastEventTime&quot;: &quot;A String&quot;, # [Output only] The last time a telemetry event was received. Timestamps are
1125 # periodically collected and written to storage; they may be stale by a few
1126 # minutes.
1127 &quot;lastConfigSendTime&quot;: &quot;A String&quot;, # [Output only] The last time a cloud-to-device config version was sent to
1128 # the device.
1129 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130</div>
1131
1132<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001133 <code class="details" id="sendCommandToDevice">sendCommandToDevice(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 <pre>Sends a command to the specified device. In order for a device to be able
1135to receive commands, it must:
11361) be connected to Cloud IoT Core using the MQTT protocol, and
11372) be subscribed to the group of MQTT topics specified by
1138 /devices/{device-id}/commands/#. This subscription will receive commands
1139 at the top-level topic /devices/{device-id}/commands as well as commands
1140 for subfolders, like /devices/{device-id}/commands/subfolder.
1141 Note that subscribing to specific subfolders is not supported.
1142If the command could not be delivered to the device, this method will
1143return an error; in particular, if the device is not subscribed, this
1144method will return FAILED_PRECONDITION. Otherwise, this method will
1145return OK. If the subscription is QoS 1, at least once delivery will be
1146guaranteed; for QoS 0, no acknowledgment will be expected from the device.
1147
1148Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001149 name: string, Required. The name of the device. For example,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001150`projects/p0/locations/us-central1/registries/registry0/devices/device0` or
1151`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001152 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 The object takes the form of:
1154
1155{ # Request for `SendCommandToDevice`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &quot;subfolder&quot;: &quot;A String&quot;, # Optional subfolder for the command. If empty, the command will be delivered
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 # to the /devices/{device-id}/commands topic, otherwise it will be delivered
1158 # to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
1159 # subfolders are allowed. This field must not have more than 256 characters,
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 # and must not contain any MQTT wildcards (&quot;+&quot; or &quot;#&quot;) or null characters.
1161 &quot;binaryData&quot;: &quot;A String&quot;, # Required. The command data to send to the device.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 }
1163
1164 x__xgafv: string, V1 error format.
1165 Allowed values
1166 1 - v1 error format
1167 2 - v2 error format
1168
1169Returns:
1170 An object of the form:
1171
1172 { # Response for `SendCommandToDevice`.
1173 }</pre>
1174</div>
1175
1176</body></html>