File: androidenterprise_v1.devices.html

package info (click to toggle)
python-googleapi 1.7.11-4
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 110,952 kB
  • sloc: python: 7,784; javascript: 249; makefile: 59; sh: 53; xml: 5
file content (816 lines) | stat: -rw-r--r-- 70,611 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="androidenterprise_v1.html">Google Play EMM API</a> . <a href="androidenterprise_v1.devices.html">devices</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#forceReportUpload">forceReportUpload(enterpriseId, userId, deviceId)</a></code></p>
<p class="firstline">Uploads a report containing any changes in app states on the device since the last report was generated. You can call this method up to 3 times every 24 hours for a given device.</p>
<p class="toc_element">
  <code><a href="#get">get(enterpriseId, userId, deviceId)</a></code></p>
<p class="firstline">Retrieves the details of a device.</p>
<p class="toc_element">
  <code><a href="#getState">getState(enterpriseId, userId, deviceId)</a></code></p>
<p class="firstline">Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.</p>
<p class="toc_element">
  <code><a href="#list">list(enterpriseId, userId)</a></code></p>
<p class="firstline">Retrieves the IDs of all of a user's devices.</p>
<p class="toc_element">
  <code><a href="#patch">patch(enterpriseId, userId, deviceId, body, updateMask=None)</a></code></p>
<p class="firstline">Updates the device policy. This method supports patch semantics.</p>
<p class="toc_element">
  <code><a href="#setState">setState(enterpriseId, userId, deviceId, body)</a></code></p>
<p class="firstline">Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.</p>
<p class="toc_element">
  <code><a href="#update">update(enterpriseId, userId, deviceId, body, updateMask=None)</a></code></p>
<p class="firstline">Updates the device policy</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="forceReportUpload">forceReportUpload(enterpriseId, userId, deviceId)</code>
  <pre>Uploads a report containing any changes in app states on the device since the last report was generated. You can call this method up to 3 times every 24 hours for a given device.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)
</pre>
</div>

<div class="method">
    <code class="details" id="get">get(enterpriseId, userId, deviceId)</code>
  <pre>Retrieves the details of a device.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)

Returns:
  An object of the form:

    { # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
    "policy": { # The device policy for a given managed device. # The policy enforced on the device.
      "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
      "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
        "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
        "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
      },
      "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
      "productPolicy": [ # The list of product policies.
        { # The policy for a product.
          "autoInstallPolicy": { # The auto-install policy for the product.
            "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
            "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
              { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
                "chargingStateConstraint": "A String", # Charging state constraint.
                "deviceIdleStateConstraint": "A String", # Device idle state constraint.
                "networkTypeConstraint": "A String", # Network type constraint.
              },
            ],
            "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
            "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
          },
          "tracks": [ # Deprecated. Use trackIds instead.
            "A String",
          ],
          "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
            "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
            "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
              "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
              "variableSet": [ # The variable set that is attributed to the user.
                { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                  "userValue": "A String", # The value of the placeholder, specific to the user.
                  "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                  "placeholder": "A String", # The placeholder string; defined by EMM.
                },
              ],
              "mcmId": "A String", # The ID of the managed configurations settings.
            },
            "managedProperty": [ # The set of managed properties for this configuration.
              { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
                "key": "A String", # The unique key that identifies the property.
                "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
                "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                  "A String",
                ],
                "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
                "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                  { # A bundle of managed properties.
                    "managedProperty": [ # The list of managed properties.
                      # Object with schema name: ManagedProperty
                    ],
                  },
                ],
                "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                  "managedProperty": [ # The list of managed properties.
                    # Object with schema name: ManagedProperty
                  ],
                },
                "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
              },
            ],
            "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
          },
          "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
            "A String",
          ],
          "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
        },
      ],
      "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
    },
    "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
      "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
        { # List of states set by the app.
          "packageName": "A String", # The package name of the app. This field will always be present.
          "keyedAppState": [ # List of keyed app states. This field will always be present.
            { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
              "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
              "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
              "severity": "A String", # Severity of the app state. This field will always be present.
              "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
              "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
            },
          ],
        },
      ],
      "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
    },
    "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
    "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
        #
        # Possible values include:
        # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
        # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
        # - "containerApp", no longer used (deprecated).
        # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
    "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
  }</pre>
</div>

<div class="method">
    <code class="details" id="getState">getState(enterpriseId, userId, deviceId)</code>
  <pre>Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)

Returns:
  An object of the form:

    { # The state of a user's device, as accessed by the getState and setState methods on device resources.
    "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState".
    "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state.
  }</pre>
</div>

<div class="method">
    <code class="details" id="list">list(enterpriseId, userId)</code>
  <pre>Retrieves the IDs of all of a user's devices.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)

Returns:
  An object of the form:

    { # The device resources for the user.
    "device": [ # A managed device.
      { # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
        "policy": { # The device policy for a given managed device. # The policy enforced on the device.
          "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
          "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
            "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
            "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
          },
          "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
          "productPolicy": [ # The list of product policies.
            { # The policy for a product.
              "autoInstallPolicy": { # The auto-install policy for the product.
                "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
                "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
                  { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
                    "chargingStateConstraint": "A String", # Charging state constraint.
                    "deviceIdleStateConstraint": "A String", # Device idle state constraint.
                    "networkTypeConstraint": "A String", # Network type constraint.
                  },
                ],
                "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
                "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
              },
              "tracks": [ # Deprecated. Use trackIds instead.
                "A String",
              ],
              "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
                "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
                "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
                  "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
                  "variableSet": [ # The variable set that is attributed to the user.
                    { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                      "userValue": "A String", # The value of the placeholder, specific to the user.
                      "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                      "placeholder": "A String", # The placeholder string; defined by EMM.
                    },
                  ],
                  "mcmId": "A String", # The ID of the managed configurations settings.
                },
                "managedProperty": [ # The set of managed properties for this configuration.
                  { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
                    "key": "A String", # The unique key that identifies the property.
                    "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
                    "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                      "A String",
                    ],
                    "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
                    "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                      { # A bundle of managed properties.
                        "managedProperty": [ # The list of managed properties.
                          # Object with schema name: ManagedProperty
                        ],
                      },
                    ],
                    "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                      "managedProperty": [ # The list of managed properties.
                        # Object with schema name: ManagedProperty
                      ],
                    },
                    "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
                  },
                ],
                "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
              },
              "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
                "A String",
              ],
              "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
            },
          ],
          "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
        },
        "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
          "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
            { # List of states set by the app.
              "packageName": "A String", # The package name of the app. This field will always be present.
              "keyedAppState": [ # List of keyed app states. This field will always be present.
                { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
                  "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
                  "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
                  "severity": "A String", # Severity of the app state. This field will always be present.
                  "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
                  "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
                },
              ],
            },
          ],
          "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
        },
        "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
        "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
            #
            # Possible values include:
            # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
            # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
            # - "containerApp", no longer used (deprecated).
            # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
        "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
      },
    ],
    "kind": "androidenterprise#devicesListResponse", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#devicesListResponse".
  }</pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(enterpriseId, userId, deviceId, body, updateMask=None)</code>
  <pre>Updates the device policy. This method supports patch semantics.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
  "policy": { # The device policy for a given managed device. # The policy enforced on the device.
    "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
    "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
      "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
      "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
    },
    "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
    "productPolicy": [ # The list of product policies.
      { # The policy for a product.
        "autoInstallPolicy": { # The auto-install policy for the product.
          "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
          "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
            { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
              "chargingStateConstraint": "A String", # Charging state constraint.
              "deviceIdleStateConstraint": "A String", # Device idle state constraint.
              "networkTypeConstraint": "A String", # Network type constraint.
            },
          ],
          "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
          "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
        },
        "tracks": [ # Deprecated. Use trackIds instead.
          "A String",
        ],
        "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
          "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
          "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
            "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
            "variableSet": [ # The variable set that is attributed to the user.
              { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                "userValue": "A String", # The value of the placeholder, specific to the user.
                "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                "placeholder": "A String", # The placeholder string; defined by EMM.
              },
            ],
            "mcmId": "A String", # The ID of the managed configurations settings.
          },
          "managedProperty": [ # The set of managed properties for this configuration.
            { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
              "key": "A String", # The unique key that identifies the property.
              "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
              "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                "A String",
              ],
              "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
              "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                { # A bundle of managed properties.
                  "managedProperty": [ # The list of managed properties.
                    # Object with schema name: ManagedProperty
                  ],
                },
              ],
              "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                "managedProperty": [ # The list of managed properties.
                  # Object with schema name: ManagedProperty
                ],
              },
              "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
            },
          ],
          "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
        },
        "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
          "A String",
        ],
        "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
      },
    ],
    "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
  },
  "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
    "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
      { # List of states set by the app.
        "packageName": "A String", # The package name of the app. This field will always be present.
        "keyedAppState": [ # List of keyed app states. This field will always be present.
          { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
            "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
            "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
            "severity": "A String", # Severity of the app state. This field will always be present.
            "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
            "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
          },
        ],
      },
    ],
    "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
  },
  "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
  "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
      # 
      # Possible values include:
      # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
      # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
      # - "containerApp", no longer used (deprecated).
      # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
  "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
}

  updateMask: string, Mask that identifies which fields to update. If not set, all modifiable fields will be modified.

When set in a query parameter, this field should be specified as updateMask=<field1>,<field2>,...

Returns:
  An object of the form:

    { # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
    "policy": { # The device policy for a given managed device. # The policy enforced on the device.
      "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
      "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
        "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
        "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
      },
      "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
      "productPolicy": [ # The list of product policies.
        { # The policy for a product.
          "autoInstallPolicy": { # The auto-install policy for the product.
            "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
            "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
              { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
                "chargingStateConstraint": "A String", # Charging state constraint.
                "deviceIdleStateConstraint": "A String", # Device idle state constraint.
                "networkTypeConstraint": "A String", # Network type constraint.
              },
            ],
            "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
            "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
          },
          "tracks": [ # Deprecated. Use trackIds instead.
            "A String",
          ],
          "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
            "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
            "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
              "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
              "variableSet": [ # The variable set that is attributed to the user.
                { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                  "userValue": "A String", # The value of the placeholder, specific to the user.
                  "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                  "placeholder": "A String", # The placeholder string; defined by EMM.
                },
              ],
              "mcmId": "A String", # The ID of the managed configurations settings.
            },
            "managedProperty": [ # The set of managed properties for this configuration.
              { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
                "key": "A String", # The unique key that identifies the property.
                "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
                "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                  "A String",
                ],
                "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
                "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                  { # A bundle of managed properties.
                    "managedProperty": [ # The list of managed properties.
                      # Object with schema name: ManagedProperty
                    ],
                  },
                ],
                "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                  "managedProperty": [ # The list of managed properties.
                    # Object with schema name: ManagedProperty
                  ],
                },
                "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
              },
            ],
            "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
          },
          "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
            "A String",
          ],
          "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
        },
      ],
      "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
    },
    "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
      "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
        { # List of states set by the app.
          "packageName": "A String", # The package name of the app. This field will always be present.
          "keyedAppState": [ # List of keyed app states. This field will always be present.
            { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
              "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
              "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
              "severity": "A String", # Severity of the app state. This field will always be present.
              "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
              "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
            },
          ],
        },
      ],
      "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
    },
    "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
    "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
        #
        # Possible values include:
        # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
        # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
        # - "containerApp", no longer used (deprecated).
        # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
    "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
  }</pre>
</div>

<div class="method">
    <code class="details" id="setState">setState(enterpriseId, userId, deviceId, body)</code>
  <pre>Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # The state of a user's device, as accessed by the getState and setState methods on device resources.
  "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState".
  "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state.
}


Returns:
  An object of the form:

    { # The state of a user's device, as accessed by the getState and setState methods on device resources.
    "kind": "androidenterprise#deviceState", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState".
    "accountState": "A String", # The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state.
  }</pre>
</div>

<div class="method">
    <code class="details" id="update">update(enterpriseId, userId, deviceId, body, updateMask=None)</code>
  <pre>Updates the device policy

Args:
  enterpriseId: string, The ID of the enterprise. (required)
  userId: string, The ID of the user. (required)
  deviceId: string, The ID of the device. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
  "policy": { # The device policy for a given managed device. # The policy enforced on the device.
    "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
    "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
      "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
      "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
    },
    "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
    "productPolicy": [ # The list of product policies.
      { # The policy for a product.
        "autoInstallPolicy": { # The auto-install policy for the product.
          "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
          "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
            { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
              "chargingStateConstraint": "A String", # Charging state constraint.
              "deviceIdleStateConstraint": "A String", # Device idle state constraint.
              "networkTypeConstraint": "A String", # Network type constraint.
            },
          ],
          "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
          "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
        },
        "tracks": [ # Deprecated. Use trackIds instead.
          "A String",
        ],
        "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
          "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
          "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
            "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
            "variableSet": [ # The variable set that is attributed to the user.
              { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                "userValue": "A String", # The value of the placeholder, specific to the user.
                "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                "placeholder": "A String", # The placeholder string; defined by EMM.
              },
            ],
            "mcmId": "A String", # The ID of the managed configurations settings.
          },
          "managedProperty": [ # The set of managed properties for this configuration.
            { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
              "key": "A String", # The unique key that identifies the property.
              "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
              "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                "A String",
              ],
              "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
              "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                { # A bundle of managed properties.
                  "managedProperty": [ # The list of managed properties.
                    # Object with schema name: ManagedProperty
                  ],
                },
              ],
              "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                "managedProperty": [ # The list of managed properties.
                  # Object with schema name: ManagedProperty
                ],
              },
              "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
            },
          ],
          "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
        },
        "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
          "A String",
        ],
        "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
      },
    ],
    "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
  },
  "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
    "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
      { # List of states set by the app.
        "packageName": "A String", # The package name of the app. This field will always be present.
        "keyedAppState": [ # List of keyed app states. This field will always be present.
          { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
            "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
            "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
            "severity": "A String", # Severity of the app state. This field will always be present.
            "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
            "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
          },
        ],
      },
    ],
    "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
  },
  "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
  "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
      # 
      # Possible values include:
      # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
      # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
      # - "containerApp", no longer used (deprecated).
      # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
  "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
}

  updateMask: string, Mask that identifies which fields to update. If not set, all modifiable fields will be modified.

When set in a query parameter, this field should be specified as updateMask=<field1>,<field2>,...

Returns:
  An object of the form:

    { # A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
    "policy": { # The device policy for a given managed device. # The policy enforced on the device.
      "autoUpdatePolicy": "A String", # The auto-update policy for apps installed on the device. "choiceToTheUser" allows the device's user to configure the app update policy. "always" enables auto updates. "never" disables auto updates. "wifiOnly" enables auto updates only when the device is connected to wifi.
      "maintenanceWindow": { # Maintenance window for managed Google Play Accounts. This allows Play store to update the apps on the foreground in the designated window. # The maintenance window defining when apps running in the foreground should be updated.
        "startTimeAfterMidnightMs": "A String", # Start time of the maintenance window, in milliseconds after midnight on the device. Windows can span midnight.
        "durationMs": "A String", # Duration of the maintenance window, in milliseconds. The duration must be between 30 minutes and 24 hours (inclusive).
      },
      "deviceReportPolicy": "A String", # Whether the device reports app states to the EMM. The default value is "deviceReportDisabled".
      "productPolicy": [ # The list of product policies.
        { # The policy for a product.
          "autoInstallPolicy": { # The auto-install policy for the product.
            "autoInstallMode": "A String", # The auto-install mode. If unset defaults to "doNotAutoInstall".
            "autoInstallConstraint": [ # The constraints for auto-installing the app. You can specify a maximum of one constraint.
              { # The auto-install constraint. Defines a set of restrictions for installation. At least one of the fields must be set.
                "chargingStateConstraint": "A String", # Charging state constraint.
                "deviceIdleStateConstraint": "A String", # Device idle state constraint.
                "networkTypeConstraint": "A String", # Network type constraint.
              },
            ],
            "autoInstallPriority": 42, # The priority of the install, as an unsigned integer. A lower number means higher priority.
            "minimumVersionCode": 42, # The minimum version of the app. If a lower version of the app is installed, then the app will be auto-updated according to the auto-install constraints, instead of waiting for the regular auto-update.
          },
          "tracks": [ # Deprecated. Use trackIds instead.
            "A String",
          ],
          "managedConfiguration": { # A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user. # The managed configuration for the product.
            "kind": "androidenterprise#managedConfiguration", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#managedConfiguration".
            "configurationVariables": { # A configuration variables resource contains the managed configuration settings ID to be applied to a single user, as well as the variable set that is attributed to the user. The variable set will be used to replace placeholders in the managed configuration settings. # Contains the ID of the managed configuration profile and the set of configuration variables (if any) defined for the user.
              "kind": "androidenterprise#configurationVariables", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#configurationVariables".
              "variableSet": [ # The variable set that is attributed to the user.
                { # A variable set is a key-value pair of EMM-provided placeholders and its corresponding value, which is attributed to a user. For example, $FIRSTNAME could be a placeholder, and its value could be Alice. Placeholders should start with a '$' sign and should be alphanumeric only.
                  "userValue": "A String", # The value of the placeholder, specific to the user.
                  "kind": "androidenterprise#variableSet", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#variableSet".
                  "placeholder": "A String", # The placeholder string; defined by EMM.
                },
              ],
              "mcmId": "A String", # The ID of the managed configurations settings.
            },
            "managedProperty": [ # The set of managed properties for this configuration.
              { # A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.
                "key": "A String", # The unique key that identifies the property.
                "valueInteger": 42, # The integer value - this will only be present if type of the property is integer.
                "valueStringArray": [ # The list of string values - this will only be present if type of the property is multiselect.
                  "A String",
                ],
                "valueBool": True or False, # The boolean value - this will only be present if type of the property is bool.
                "valueBundleArray": [ # The list of bundles of properties - this will only be present if type of the property is bundle_array.
                  { # A bundle of managed properties.
                    "managedProperty": [ # The list of managed properties.
                      # Object with schema name: ManagedProperty
                    ],
                  },
                ],
                "valueBundle": { # A bundle of managed properties. # The bundle of managed properties - this will only be present if type of the property is bundle.
                  "managedProperty": [ # The list of managed properties.
                    # Object with schema name: ManagedProperty
                  ],
                },
                "valueString": "A String", # The string value - this will only be present if type of the property is string, choice or hidden.
              },
            ],
            "productId": "A String", # The ID of the product that the managed configuration is for, e.g. "app:com.google.android.gm".
          },
          "trackIds": [ # Grants the device visibility to the specified product release track(s), identified by trackIds. The list of release tracks of a product can be obtained by calling Products.Get.
            "A String",
          ],
          "productId": "A String", # The ID of the product. For example, "app:com.google.android.gm".
        },
      ],
      "productAvailabilityPolicy": "A String", # The availability granted to the device for the specified products. "all" gives the device access to all products, regardless of approval status. "all" does not enable automatic visibility of "alpha" or "beta" tracks. "whitelist" grants the device access the products specified in productPolicy[]. Only products that are approved or products that were previously approved (products with revoked approval) by the enterprise can be whitelisted. If no value is provided, the availability set at the user level is applied by default.
    },
    "report": { # Device report updated with the latest app states for managed apps on the device. # The device report updated with the latest app states.
      "appState": [ # List of app states set by managed apps on the device. App states are defined by the app's developers. This field will always be present.
        { # List of states set by the app.
          "packageName": "A String", # The package name of the app. This field will always be present.
          "keyedAppState": [ # List of keyed app states. This field will always be present.
            { # Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.
              "message": "A String", # Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it.
              "data": "A String", # Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it.
              "severity": "A String", # Severity of the app state. This field will always be present.
              "key": "A String", # Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present.
              "stateTimestampMillis": "A String", # Timestamp of when the app set the state in milliseconds since epoch. This field will always be present.
            },
          ],
        },
      ],
      "lastUpdatedTimestampMillis": "A String", # The timestamp of the last report update in milliseconds since epoch. This field will always be present.
    },
    "kind": "androidenterprise#device", # Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device".
    "managementType": "A String", # Identifies the extent to which the device is controlled by a managed Google Play EMM in various deployment configurations.
        #
        # Possible values include:
        # - "managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner.
        # - "managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC.
        # - "containerApp", no longer used (deprecated).
        # - "unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
    "androidId": "A String", # The Google Play Services Android ID for the device encoded as a lowercase hex string. For example, "123456789abcdef0".
  }</pre>
</div>

</body></html>