/
v1.ts
9509 lines (8912 loc) · 343 KB
/
v1.ts
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
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {AxiosPromise} from 'axios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';
import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common';
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace androidenterprise_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
/**
* Google Play EMM API
*
* Manages the deployment of apps to Android for Work users.
*
* @example
* const {google} = require('googleapis');
* const androidenterprise = google.androidenterprise('v1');
*
* @namespace androidenterprise
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Androidenterprise
*/
export class Androidenterprise {
_options: GlobalOptions;
google?: GoogleConfigurable;
root = this;
devices: Resource$Devices;
enterprises: Resource$Enterprises;
entitlements: Resource$Entitlements;
grouplicenses: Resource$Grouplicenses;
grouplicenseusers: Resource$Grouplicenseusers;
installs: Resource$Installs;
managedconfigurationsfordevice: Resource$Managedconfigurationsfordevice;
managedconfigurationsforuser: Resource$Managedconfigurationsforuser;
managedconfigurationssettings: Resource$Managedconfigurationssettings;
permissions: Resource$Permissions;
products: Resource$Products;
serviceaccountkeys: Resource$Serviceaccountkeys;
storelayoutclusters: Resource$Storelayoutclusters;
storelayoutpages: Resource$Storelayoutpages;
users: Resource$Users;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.devices = new Resource$Devices(this);
this.enterprises = new Resource$Enterprises(this);
this.entitlements = new Resource$Entitlements(this);
this.grouplicenses = new Resource$Grouplicenses(this);
this.grouplicenseusers = new Resource$Grouplicenseusers(this);
this.installs = new Resource$Installs(this);
this.managedconfigurationsfordevice =
new Resource$Managedconfigurationsfordevice(this);
this.managedconfigurationsforuser =
new Resource$Managedconfigurationsforuser(this);
this.managedconfigurationssettings =
new Resource$Managedconfigurationssettings(this);
this.permissions = new Resource$Permissions(this);
this.products = new Resource$Products(this);
this.serviceaccountkeys = new Resource$Serviceaccountkeys(this);
this.storelayoutclusters = new Resource$Storelayoutclusters(this);
this.storelayoutpages = new Resource$Storelayoutpages(this);
this.users = new Resource$Users(this);
}
getRoot() {
return this.root;
}
}
/**
* This represents an enterprise admin who can manage the enterprise in the
* managed Google Play store.
*/
export interface Schema$Administrator {
/**
* The admin's email address.
*/
email?: string;
}
/**
* A token authorizing an admin to access an iframe.
*/
export interface Schema$AdministratorWebToken {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#administratorWebToken".
*/
kind?: string;
/**
* An opaque token to be passed to the Play front-end to generate an iframe.
*/
token?: string;
}
/**
* Specification for a token used to generate iframes. The token specifies
* what data the admin is allowed to modify and the URI the iframe is allowed
* to communiate with.
*/
export interface Schema$AdministratorWebTokenSpec {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#administratorWebTokenSpec".
*/
kind?: string;
/**
* The URI of the parent frame hosting the iframe. To prevent XSS, the
* iframe may not be hosted at other URIs. This URI must be https.
*/
parent?: string;
/**
* The list of permissions the admin is granted within the iframe. The admin
* will only be allowed to view an iframe if they have all of the
* permissions associated with it. The only valid value is
* "approveApps" that will allow the admin to access the iframe in
* "approve" mode.
*/
permission?: string[];
}
/**
* Deprecated and unused.
*/
export interface Schema$AndroidDevicePolicyConfig {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#androidDevicePolicyConfig".
*/
kind?: string;
/**
* Deprecated and unused.
*/
state?: string;
}
/**
* Represents the list of app restrictions available to be pre-configured for
* the product.
*/
export interface Schema$AppRestrictionsSchema {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#appRestrictionsSchema".
*/
kind?: string;
/**
* The set of restrictions that make up this schema.
*/
restrictions?: Schema$AppRestrictionsSchemaRestriction[];
}
/**
* An event generated when a new app version is uploaded to Google Play and
* its app restrictions schema changed. To fetch the app restrictions schema
* for an app, use Products.getAppRestrictionsSchema on the EMM API.
*/
export interface Schema$AppRestrictionsSchemaChangeEvent {
/**
* The id of the product (e.g. "app:com.google.android.gm") for
* which the app restriction schema changed. This field will always be
* present.
*/
productId?: string;
}
/**
* A restriction in the App Restriction Schema represents a piece of
* configuration that may be pre-applied.
*/
export interface Schema$AppRestrictionsSchemaRestriction {
/**
* The default value of the restriction. bundle and bundleArray restrictions
* never have a default value.
*/
defaultValue?: Schema$AppRestrictionsSchemaRestrictionRestrictionValue;
/**
* A longer description of the restriction, giving more detail of what it
* affects.
*/
description?: string;
/**
* For choice or multiselect restrictions, the list of possible entries'
* human-readable names.
*/
entry?: string[];
/**
* For choice or multiselect restrictions, the list of possible entries'
* machine-readable values. These values should be used in the
* configuration, either as a single string value for a choice restriction
* or in a stringArray for a multiselect restriction.
*/
entryValue?: string[];
/**
* The unique key that the product uses to identify the restriction, e.g.
* "com.google.android.gm.fieldname".
*/
key?: string;
/**
* For bundle or bundleArray restrictions, the list of nested restrictions.
* A bundle restriction is always nested within a bundleArray restriction,
* and a bundleArray restriction is at most two levels deep.
*/
nestedRestriction?: Schema$AppRestrictionsSchemaRestriction[];
/**
* The type of the restriction.
*/
restrictionType?: string;
/**
* The name of the restriction.
*/
title?: string;
}
/**
* A typed value for the restriction.
*/
export interface Schema$AppRestrictionsSchemaRestrictionRestrictionValue {
/**
* The type of the value being provided.
*/
type?: string;
/**
* The boolean value - this will only be present if type is bool.
*/
valueBool?: boolean;
/**
* The integer value - this will only be present if type is integer.
*/
valueInteger?: number;
/**
* The list of string values - this will only be present if type is
* multiselect.
*/
valueMultiselect?: string[];
/**
* The string value - this will be present for types string, choice and
* hidden.
*/
valueString?: string;
}
/**
* Information on an approval URL.
*/
export interface Schema$ApprovalUrlInfo {
/**
* A URL that displays a product's permissions and that can also be used
* to approve the product with the Products.approve call.
*/
approvalUrl?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#approvalUrlInfo".
*/
kind?: string;
}
/**
* An event generated when a new version of an app is uploaded to Google Play.
* Notifications are sent for new public versions only: alpha, beta, or canary
* versions do not generate this event. To fetch up-to-date version history
* for an app, use Products.Get on the EMM API.
*/
export interface Schema$AppUpdateEvent {
/**
* The id of the product (e.g. "app:com.google.android.gm") that
* was updated. This field will always be present.
*/
productId?: string;
}
/**
* This represents a single version of the app.
*/
export interface Schema$AppVersion {
/**
* The track that this app was published in. For example if track is
* "alpha", this is an alpha version of the app.
*/
track?: string;
/**
* Unique increasing identifier for the app version.
*/
versionCode?: number;
/**
* The string used in the Play store by the app developer to identify the
* version. The string is not necessarily unique or localized (for example,
* the string could be "1.4").
*/
versionString?: string;
}
/**
* An AuthenticationToken is used by the EMM's device policy client on a
* device to provision the given EMM-managed user on that device.
*/
export interface Schema$AuthenticationToken {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#authenticationToken".
*/
kind?: string;
/**
* The authentication token to be passed to the device policy client on the
* device where it can be used to provision the account for which this token
* was generated.
*/
token?: string;
}
/**
* 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.
*/
export interface Schema$ConfigurationVariables {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#configurationVariables".
*/
kind?: string;
/**
* The ID of the managed configurations settings.
*/
mcmId?: string;
/**
* The variable set that is attributed to the user.
*/
variableSet?: Schema$VariableSet[];
}
/**
* A Devices resource represents a mobile device managed by the EMM and
* belonging to a specific enterprise user.
*/
export interface Schema$Device {
/**
* The Google Play Services Android ID for the device encoded as a lowercase
* hex string. For example, "123456789abcdef0".
*/
androidId?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#device".
*/
kind?: 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.
*/
managementType?: string;
/**
* The policy enforced on the device.
*/
policy?: Schema$Policy;
}
/**
* The device resources for the user.
*/
export interface Schema$DevicesListResponse {
/**
* A managed device.
*/
device?: Schema$Device[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#devicesListResponse".
*/
kind?: string;
}
/**
* The state of a user's device, as accessed by the getState and setState
* methods on device resources.
*/
export interface Schema$DeviceState {
/**
* 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.
*/
accountState?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#deviceState".
*/
kind?: string;
}
/**
* An Enterprises resource represents the binding between an EMM and a
* specific organization. That binding can be instantiated in one of two
* different ways using this API as follows: - For Google managed domain
* customers, the process involves using Enterprises.enroll and
* Enterprises.setAccount (in conjunction with artifacts obtained from the
* Admin console and the Google API Console) and submitted to the EMM through
* a more-or-less manual process. - For managed Google Play Accounts
* customers, the process involves using Enterprises.generateSignupUrl and
* Enterprises.completeSignup in conjunction with the managed Google Play
* sign-up UI (Google-provided mechanism) to create the binding without manual
* steps. As an EMM, you can support either or both approaches in your EMM
* console. See Create an Enterprise for details.
*/
export interface Schema$Enterprise {
/**
* Admins of the enterprise. This is only supported for enterprises created
* via the EMM-initiated flow.
*/
administrator?: Schema$Administrator[];
/**
* The unique ID for the enterprise.
*/
id?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#enterprise".
*/
kind?: string;
/**
* The name of the enterprise, for example, "Example, Inc".
*/
name?: string;
/**
* The enterprise's primary domain, such as "example.com".
*/
primaryDomain?: string;
}
/**
* A service account that can be used to authenticate as the enterprise to API
* calls that require such authentication.
*/
export interface Schema$EnterpriseAccount {
/**
* The email address of the service account.
*/
accountEmail?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#enterpriseAccount".
*/
kind?: string;
}
/**
* The matching enterprise resources.
*/
export interface Schema$EnterprisesListResponse {
/**
* An enterprise.
*/
enterprise?: Schema$Enterprise[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#enterprisesListResponse".
*/
kind?: string;
}
export interface Schema$EnterprisesSendTestPushNotificationResponse {
/**
* The message ID of the test push notification that was sent.
*/
messageId?: string;
/**
* The name of the Cloud Pub/Sub topic to which notifications for this
* enterprise's enrolled account will be sent.
*/
topicName?: string;
}
/**
* The presence of an Entitlements resource indicates that a user has the
* right to use a particular app. Entitlements are user specific, not device
* specific. This allows a user with an entitlement to an app to install the
* app on all their devices. It's also possible for a user to hold an
* entitlement to an app without installing the app on any device. The API
* can be used to create an entitlement. As an option, you can also use the
* API to trigger the installation of an app on all a user's managed
* devices at the same time the entitlement is created. If the app is free,
* creating the entitlement also creates a group license for that app. For
* paid apps, creating the entitlement consumes one license, and that license
* remains consumed until the entitlement is removed. If the enterprise
* hasn't purchased enough licenses, then no entitlement is created and
* the installation fails. An entitlement is also not created for an app if
* the app requires permissions that the enterprise hasn't accepted. If
* an entitlement is deleted, the app may be uninstalled from a user's
* device. As a best practice, uninstall the app by calling Installs.delete()
* before deleting the entitlement. Entitlements for apps that a user pays
* for on an unmanaged profile have "userPurchase" as the
* entitlement reason. These entitlements cannot be removed via the API.
*/
export interface Schema$Entitlement {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#entitlement".
*/
kind?: string;
/**
* The ID of the product that the entitlement is for. For example,
* "app:com.google.android.gm".
*/
productId?: string;
/**
* The reason for the entitlement. For example, "free" for free
* apps. This property is temporary: it will be replaced by the acquisition
* kind field of group licenses.
*/
reason?: string;
}
/**
* The entitlement resources for the user.
*/
export interface Schema$EntitlementsListResponse {
/**
* An entitlement of a user to a product (e.g. an app). For example, a free
* app that they have installed, or a paid app that they have been allocated
* a license to.
*/
entitlement?: Schema$Entitlement[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#entitlementsListResponse".
*/
kind?: string;
}
/**
* Group license objects allow you to keep track of licenses (called
* entitlements) for both free and paid apps. For a free app, a group license
* is created when an enterprise admin first approves the product in Google
* Play or when the first entitlement for the product is created for a user
* via the API. For a paid app, a group license object is only created when an
* enterprise admin purchases the product in Google Play for the first time.
* Use the API to query group licenses. A Grouplicenses resource includes the
* total number of licenses purchased (paid apps only) and the total number of
* licenses currently in use. In other words, the total number of Entitlements
* that exist for the product. Only one group license object is created per
* product and group license objects are never deleted. If a product is
* unapproved, its group license remains. This allows enterprise admins to
* keep track of any remaining entitlements for the product.
*/
export interface Schema$GroupLicense {
/**
* How this group license was acquired. "bulkPurchase" means that
* this Grouplicenses resource was created because the enterprise purchased
* licenses for this product; otherwise, the value is "free" (for
* free products).
*/
acquisitionKind?: string;
/**
* Whether the product to which this group license relates is currently
* approved by the enterprise. Products are approved when a group license is
* first created, but this approval may be revoked by an enterprise admin
* via Google Play. Unapproved products will not be visible to end users in
* collections, and new entitlements to them should not normally be created.
*/
approval?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#groupLicense".
*/
kind?: string;
/**
* The total number of provisioned licenses for this product. Returned by
* read operations, but ignored in write operations.
*/
numProvisioned?: number;
/**
* The number of purchased licenses (possibly in multiple purchases). If
* this field is omitted, then there is no limit on the number of licenses
* that can be provisioned (for example, if the acquisition kind is
* "free").
*/
numPurchased?: number;
/**
* The permission approval status of the product. This field is only set if
* the product is approved. Possible states are: -
* "currentApproved", the current set of permissions is approved,
* but additional permissions will require the administrator to reapprove
* the product (If the product was approved without specifying the approved
* permissions setting, then this is the default behavior.), -
* "needsReapproval", the product has unapproved permissions. No
* additional product licenses can be assigned until the product is
* reapproved, - "allCurrentAndFutureApproved", the current
* permissions are approved and any future permission updates will be
* automatically approved without administrator review.
*/
permissions?: string;
/**
* The ID of the product that the license is for. For example,
* "app:com.google.android.gm".
*/
productId?: string;
}
/**
* The grouplicense resources for the enterprise.
*/
export interface Schema$GroupLicensesListResponse {
/**
* A group license for a product approved for use in the enterprise.
*/
groupLicense?: Schema$GroupLicense[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#groupLicensesListResponse".
*/
kind?: string;
}
/**
* The user resources for the group license.
*/
export interface Schema$GroupLicenseUsersListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#groupLicenseUsersListResponse".
*/
kind?: string;
/**
* A user of an enterprise.
*/
user?: Schema$User[];
}
/**
* The existence of an Installs resource indicates that an app is installed on
* a particular device (or that an install is pending). The API can be used
* to create an install resource using the update method. This triggers the
* actual install of the app on the device. If the user does not already have
* an entitlement for the app, then an attempt is made to create one. If this
* fails (for example, because the app is not free and there is no available
* license), then the creation of the install fails. The API can also be used
* to update an installed app. If the update method is used on an existing
* install, then the app will be updated to the latest available version. Note
* that it is not possible to force the installation of a specific version of
* an app: the version code is read-only. If a user installs an app
* themselves (as permitted by the enterprise), then again an install resource
* and possibly an entitlement resource are automatically created. The API
* can also be used to delete an install resource, which triggers the removal
* of the app from the device. Note that deleting an install does not
* automatically remove the corresponding entitlement, even if there are no
* remaining installs. The install resource will also be deleted if the user
* uninstalls the app themselves.
*/
export interface Schema$Install {
/**
* Install state. The state "installPending" means that an install
* request has recently been made and download to the device is in progress.
* The state "installed" means that the app has been installed.
* This field is read-only.
*/
installState?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#install".
*/
kind?: string;
/**
* The ID of the product that the install is for. For example,
* "app:com.google.android.gm".
*/
productId?: string;
/**
* The version of the installed product. Guaranteed to be set only if the
* install state is "installed".
*/
versionCode?: number;
}
/**
* An event generated when an app installation failed on a device
*/
export interface Schema$InstallFailureEvent {
/**
* The Android ID of the device. This field will always be present.
*/
deviceId?: string;
/**
* Additional details on the failure if applicable.
*/
failureDetails?: string;
/**
* The reason for the installation failure. This field will always be
* present.
*/
failureReason?: string;
/**
* The id of the product (e.g. "app:com.google.android.gm") for
* which the install failure event occured. This field will always be
* present.
*/
productId?: string;
/**
* The ID of the user. This field will always be present.
*/
userId?: string;
}
/**
* The install resources for the device.
*/
export interface Schema$InstallsListResponse {
/**
* An installation of an app for a user on a specific device. The existence
* of an install implies that the user must have an entitlement to the app.
*/
install?: Schema$Install[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#installsListResponse".
*/
kind?: string;
}
/**
* A localized string with its locale.
*/
export interface Schema$LocalizedText {
/**
* The BCP47 tag for a locale. (e.g. "en-US", "de").
*/
locale?: string;
/**
* The text localized in the associated locale.
*/
text?: string;
}
/**
* Maintenance window for managed Google Play Accounts. This allows Play store
* to update the apps on the foreground in the designated window.
*/
export interface Schema$MaintenanceWindow {
/**
* Duration of the maintenance window, in milliseconds. The duration must be
* between 30 minutes and 24 hours (inclusive).
*/
durationMs?: string;
/**
* Start time of the maintenance window, in milliseconds after midnight on
* the device. Windows can span midnight.
*/
startTimeAfterMidnightMs?: string;
}
/**
* 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.
*/
export interface Schema$ManagedConfiguration {
/**
* Contains the ID of the managed configuration profile and the set of
* configuration variables (if any) defined for the user.
*/
configurationVariables?: Schema$ConfigurationVariables;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#managedConfiguration".
*/
kind?: string;
/**
* The set of managed properties for this configuration.
*/
managedProperty?: Schema$ManagedProperty[];
/**
* The ID of the product that the managed configuration is for, e.g.
* "app:com.google.android.gm".
*/
productId?: string;
}
/**
* The managed configuration resources for the device.
*/
export interface Schema$ManagedConfigurationsForDeviceListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#managedConfigurationsForDeviceListResponse".
*/
kind?: string;
/**
* A managed configuration for an app on a specific device.
*/
managedConfigurationForDevice?: Schema$ManagedConfiguration[];
}
/**
* The managed configuration resources for the user.
*/
export interface Schema$ManagedConfigurationsForUserListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#managedConfigurationsForUserListResponse".
*/
kind?: string;
/**
* A managed configuration for an app for a specific user.
*/
managedConfigurationForUser?: Schema$ManagedConfiguration[];
}
/**
* A managed configurations settings resource contains the set of managed
* properties that have been configured for an Android app to be applied to a
* set of users. The app's developer would have defined configurable
* properties in the managed configurations schema.
*/
export interface Schema$ManagedConfigurationsSettings {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#managedConfigurationsSettings".
*/
kind?: string;
/**
* The last updated time of the managed configuration settings in
* milliseconds since 1970-01-01T00:00:00Z.
*/
lastUpdatedTimestampMillis?: string;
/**
* The set of managed properties for this configuration.
*/
managedProperty?: Schema$ManagedProperty[];
/**
* The ID of the managed configurations settings.
*/
mcmId?: string;
/**
* The name of the managed configurations settings.
*/
name?: string;
}
/**
* The managed configurations settings for a product.
*/
export interface Schema$ManagedConfigurationsSettingsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidenterprise#managedConfigurationsSettingsListResponse".
*/
kind?: string;
/**
* A managed configurations settings for an app that may be assigned to a
* group of users in an enterprise.
*/
managedConfigurationsSettings?: Schema$ManagedConfigurationsSettings[];
}
/**
* 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.
*/
export interface Schema$ManagedProperty {
/**
* The unique key that identifies the property.
*/
key?: string;
/**
* The boolean value - this will only be present if type of the property is
* bool.
*/
valueBool?: boolean;
/**
* The bundle of managed properties - this will only be present if type of
* the property is bundle.
*/
valueBundle?: Schema$ManagedPropertyBundle;
/**
* The list of bundles of properties - this will only be present if type of
* the property is bundle_array.
*/
valueBundleArray?: Schema$ManagedPropertyBundle[];
/**
* The integer value - this will only be present if type of the property is
* integer.
*/
valueInteger?: number;
/**
* The string value - this will only be present if type of the property is
* string, choice or hidden.
*/
valueString?: string;
/**
* The list of string values - this will only be present if type of the
* property is multiselect.
*/
valueStringArray?: string[];
}
/**
* A bundle of managed properties.
*/
export interface Schema$ManagedPropertyBundle {
/**
* The list of managed properties.
*/
managedProperty?: Schema$ManagedProperty[];
}
/**
* An event generated when a new device is ready to be managed.
*/
export interface Schema$NewDeviceEvent {
/**
* The Android ID of the device. This field will always be present.
*/
deviceId?: string;
/**
* Policy app on the device.
*/
dpcPackageName?: string;
/**
* Identifies the extent to which the device is controlled by an Android EMM
* in various deployment configurations. Possible values include: -
* "managedDevice", a device where the DPC is set as device owner,
* - "managedProfile", a device where the DPC is set as profile
* owner.
*/
managementType?: string;
/**
* The ID of the user. This field will always be present.
*/
userId?: string;
}
/**
* An event generated when new permissions are added to an app.
*/
export interface Schema$NewPermissionsEvent {
/**
* The set of permissions that the enterprise admin has already approved for
* this application. Use Permissions.Get on the EMM API to retrieve details
* about these permissions.
*/
approvedPermissions?: string[];
/**
* The id of the product (e.g. "app:com.google.android.gm") for
* which new permissions were added. This field will always be present.
*/
productId?: string;
/**
* The set of permissions that the app is currently requesting. Use
* Permissions.Get on the EMM API to retrieve details about these
* permissions.
*/
requestedPermissions?: string[];
}
/**
* A notification of one event relating to an enterprise.
*/
export interface Schema$Notification {
/**
* Notifications about new app restrictions schema changes.
*/
appRestrictionsSchemaChangeEvent?: Schema$AppRestrictionsSchemaChangeEvent;
/**
* Notifications about app updates.
*/
appUpdateEvent?: Schema$AppUpdateEvent;
/**
* The ID of the enterprise for which the notification is sent. This will
* always be present.
*/
enterpriseId?: string;
/**
* Notifications about an app installation failure.
*/
installFailureEvent?: Schema$InstallFailureEvent;
/**
* Notifications about new devices.
*/
newDeviceEvent?: Schema$NewDeviceEvent;
/**
* Notifications about new app permissions.
*/
newPermissionsEvent?: Schema$NewPermissionsEvent;
/**
* Type of the notification.
*/
notificationType?: string;
/**
* Notifications about changes to a product's approval status.
*/
productApprovalEvent?: Schema$ProductApprovalEvent;
/**
* Notifications about product availability changes.
*/
productAvailabilityChangeEvent?: Schema$ProductAvailabilityChangeEvent;
/**