/
classes.rb
2934 lines (2441 loc) · 120 KB
/
classes.rb
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.
#
# 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.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module AndroidenterpriseV1
# This represents an enterprise admin who can manage the enterprise in the
# managed Google Play store.
class Administrator
include Google::Apis::Core::Hashable
# The admin's email address.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@email = args[:email] if args.key?(:email)
end
end
# A token authorizing an admin to access an iframe.
class AdministratorWebToken
include Google::Apis::Core::Hashable
# An opaque token to be passed to the Play front-end to generate an iframe.
# Corresponds to the JSON property `token`
# @return [String]
attr_accessor :token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@token = args[:token] if args.key?(:token)
end
end
# 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.
class AdministratorWebTokenSpec
include Google::Apis::Core::Hashable
# Options for displaying the Managed Configuration page.
# Corresponds to the JSON property `managedConfigurations`
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpecManagedConfigurations]
attr_accessor :managed_configurations
# 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. Use whitespaces to
# separate multiple parent URIs.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# Deprecated. Use PlaySearch.approveApps.
# Corresponds to the JSON property `permission`
# @return [Array<String>]
attr_accessor :permission
# Options for displaying the managed Play Search apps page.
# Corresponds to the JSON property `playSearch`
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpecPlaySearch]
attr_accessor :play_search
# Options for displaying the Private Apps page.
# Corresponds to the JSON property `privateApps`
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpecPrivateApps]
attr_accessor :private_apps
# Options for displaying the Organize apps page.
# Corresponds to the JSON property `storeBuilder`
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpecStoreBuilder]
attr_accessor :store_builder
# Options for displaying the Web Apps page.
# Corresponds to the JSON property `webApps`
# @return [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpecWebApps]
attr_accessor :web_apps
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@managed_configurations = args[:managed_configurations] if args.key?(:managed_configurations)
@parent = args[:parent] if args.key?(:parent)
@permission = args[:permission] if args.key?(:permission)
@play_search = args[:play_search] if args.key?(:play_search)
@private_apps = args[:private_apps] if args.key?(:private_apps)
@store_builder = args[:store_builder] if args.key?(:store_builder)
@web_apps = args[:web_apps] if args.key?(:web_apps)
end
end
#
class AdministratorWebTokenSpecManagedConfigurations
include Google::Apis::Core::Hashable
# Whether the Managed Configuration page is displayed. Default is true.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
#
class AdministratorWebTokenSpecPlaySearch
include Google::Apis::Core::Hashable
# Allow access to the iframe in approve mode. Default is false.
# Corresponds to the JSON property `approveApps`
# @return [Boolean]
attr_accessor :approve_apps
alias_method :approve_apps?, :approve_apps
# Whether the managed Play Search apps page is displayed. Default is true.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@approve_apps = args[:approve_apps] if args.key?(:approve_apps)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
#
class AdministratorWebTokenSpecPrivateApps
include Google::Apis::Core::Hashable
# Whether the Private Apps page is displayed. Default is true.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
#
class AdministratorWebTokenSpecStoreBuilder
include Google::Apis::Core::Hashable
# Whether the Organize apps page is displayed. Default is true.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
#
class AdministratorWebTokenSpecWebApps
include Google::Apis::Core::Hashable
# Whether the Web Apps page is displayed. Default is true.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
# Represents the list of app restrictions available to be pre-configured for the
# product.
class AppRestrictionsSchema
include Google::Apis::Core::Hashable
# Deprecated.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The set of restrictions that make up this schema.
# Corresponds to the JSON property `restrictions`
# @return [Array<Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction>]
attr_accessor :restrictions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@restrictions = args[:restrictions] if args.key?(:restrictions)
end
end
# 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.
class AppRestrictionsSchemaChangeEvent
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `productId`
# @return [String]
attr_accessor :product_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@product_id = args[:product_id] if args.key?(:product_id)
end
end
# A restriction in the App Restriction Schema represents a piece of
# configuration that may be pre-applied.
class AppRestrictionsSchemaRestriction
include Google::Apis::Core::Hashable
# A typed value for the restriction.
# Corresponds to the JSON property `defaultValue`
# @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue]
attr_accessor :default_value
# A longer description of the restriction, giving more detail of what it affects.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# For choice or multiselect restrictions, the list of possible entries' human-
# readable names.
# Corresponds to the JSON property `entry`
# @return [Array<String>]
attr_accessor :entry
# 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.
# Corresponds to the JSON property `entryValue`
# @return [Array<String>]
attr_accessor :entry_value
# The unique key that the product uses to identify the restriction, e.g. "com.
# google.android.gm.fieldname".
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# 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.
# Corresponds to the JSON property `nestedRestriction`
# @return [Array<Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction>]
attr_accessor :nested_restriction
# The type of the restriction.
# Corresponds to the JSON property `restrictionType`
# @return [String]
attr_accessor :restriction_type
# The name of the restriction.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@default_value = args[:default_value] if args.key?(:default_value)
@description = args[:description] if args.key?(:description)
@entry = args[:entry] if args.key?(:entry)
@entry_value = args[:entry_value] if args.key?(:entry_value)
@key = args[:key] if args.key?(:key)
@nested_restriction = args[:nested_restriction] if args.key?(:nested_restriction)
@restriction_type = args[:restriction_type] if args.key?(:restriction_type)
@title = args[:title] if args.key?(:title)
end
end
# A typed value for the restriction.
class AppRestrictionsSchemaRestrictionRestrictionValue
include Google::Apis::Core::Hashable
# The type of the value being provided.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The boolean value - this will only be present if type is bool.
# Corresponds to the JSON property `valueBool`
# @return [Boolean]
attr_accessor :value_bool
alias_method :value_bool?, :value_bool
# The integer value - this will only be present if type is integer.
# Corresponds to the JSON property `valueInteger`
# @return [Fixnum]
attr_accessor :value_integer
# The list of string values - this will only be present if type is multiselect.
# Corresponds to the JSON property `valueMultiselect`
# @return [Array<String>]
attr_accessor :value_multiselect
# The string value - this will be present for types string, choice and hidden.
# Corresponds to the JSON property `valueString`
# @return [String]
attr_accessor :value_string
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@type = args[:type] if args.key?(:type)
@value_bool = args[:value_bool] if args.key?(:value_bool)
@value_integer = args[:value_integer] if args.key?(:value_integer)
@value_multiselect = args[:value_multiselect] if args.key?(:value_multiselect)
@value_string = args[:value_string] if args.key?(:value_string)
end
end
# List of states set by the app.
class AppState
include Google::Apis::Core::Hashable
# List of keyed app states. This field will always be present.
# Corresponds to the JSON property `keyedAppState`
# @return [Array<Google::Apis::AndroidenterpriseV1::KeyedAppState>]
attr_accessor :keyed_app_state
# The package name of the app. This field will always be present.
# Corresponds to the JSON property `packageName`
# @return [String]
attr_accessor :package_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@keyed_app_state = args[:keyed_app_state] if args.key?(:keyed_app_state)
@package_name = args[:package_name] if args.key?(:package_name)
end
end
# 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.
class AppUpdateEvent
include Google::Apis::Core::Hashable
# The id of the product (e.g. "app:com.google.android.gm") that was updated.
# This field will always be present.
# Corresponds to the JSON property `productId`
# @return [String]
attr_accessor :product_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@product_id = args[:product_id] if args.key?(:product_id)
end
end
# This represents a single version of the app.
class AppVersion
include Google::Apis::Core::Hashable
# True if this version is a production APK.
# Corresponds to the JSON property `isProduction`
# @return [Boolean]
attr_accessor :is_production
alias_method :is_production?, :is_production
# Deprecated, use trackId instead.
# Corresponds to the JSON property `track`
# @return [String]
attr_accessor :track
# Track ids that the app version is published in. Replaces the track field (
# deprecated), but doesn't include the production track (see isProduction
# instead).
# Corresponds to the JSON property `trackId`
# @return [Array<String>]
attr_accessor :track_id
# Unique increasing identifier for the app version.
# Corresponds to the JSON property `versionCode`
# @return [Fixnum]
attr_accessor :version_code
# 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").
# Corresponds to the JSON property `versionString`
# @return [String]
attr_accessor :version_string
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@is_production = args[:is_production] if args.key?(:is_production)
@track = args[:track] if args.key?(:track)
@track_id = args[:track_id] if args.key?(:track_id)
@version_code = args[:version_code] if args.key?(:version_code)
@version_string = args[:version_string] if args.key?(:version_string)
end
end
# Information on an approval URL.
class ApprovalUrlInfo
include Google::Apis::Core::Hashable
# A URL that displays a product's permissions and that can also be used to
# approve the product with the Products.approve call.
# Corresponds to the JSON property `approvalUrl`
# @return [String]
attr_accessor :approval_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@approval_url = args[:approval_url] if args.key?(:approval_url)
end
end
# An AuthenticationToken is used by the EMM's device policy client on a device
# to provision the given EMM-managed user on that device.
class AuthenticationToken
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `token`
# @return [String]
attr_accessor :token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@token = args[:token] if args.key?(:token)
end
end
# The auto-install constraint. Defines a set of restrictions for installation.
# At least one of the fields must be set.
class AutoInstallConstraint
include Google::Apis::Core::Hashable
# Charging state constraint.
# Corresponds to the JSON property `chargingStateConstraint`
# @return [String]
attr_accessor :charging_state_constraint
# Device idle state constraint.
# Corresponds to the JSON property `deviceIdleStateConstraint`
# @return [String]
attr_accessor :device_idle_state_constraint
# Network type constraint.
# Corresponds to the JSON property `networkTypeConstraint`
# @return [String]
attr_accessor :network_type_constraint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@charging_state_constraint = args[:charging_state_constraint] if args.key?(:charging_state_constraint)
@device_idle_state_constraint = args[:device_idle_state_constraint] if args.key?(:device_idle_state_constraint)
@network_type_constraint = args[:network_type_constraint] if args.key?(:network_type_constraint)
end
end
#
class AutoInstallPolicy
include Google::Apis::Core::Hashable
# The constraints for auto-installing the app. You can specify a maximum of one
# constraint.
# Corresponds to the JSON property `autoInstallConstraint`
# @return [Array<Google::Apis::AndroidenterpriseV1::AutoInstallConstraint>]
attr_accessor :auto_install_constraint
# The auto-install mode. If unset defaults to "doNotAutoInstall".
# Corresponds to the JSON property `autoInstallMode`
# @return [String]
attr_accessor :auto_install_mode
# The priority of the install, as an unsigned integer. A lower number means
# higher priority.
# Corresponds to the JSON property `autoInstallPriority`
# @return [Fixnum]
attr_accessor :auto_install_priority
# 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. You can set a minimum version
# code for at most 20 apps per device.
# Corresponds to the JSON property `minimumVersionCode`
# @return [Fixnum]
attr_accessor :minimum_version_code
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auto_install_constraint = args[:auto_install_constraint] if args.key?(:auto_install_constraint)
@auto_install_mode = args[:auto_install_mode] if args.key?(:auto_install_mode)
@auto_install_priority = args[:auto_install_priority] if args.key?(:auto_install_priority)
@minimum_version_code = args[:minimum_version_code] if args.key?(:minimum_version_code)
end
end
# 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.
class ConfigurationVariables
include Google::Apis::Core::Hashable
# The ID of the managed configurations settings.
# Corresponds to the JSON property `mcmId`
# @return [String]
attr_accessor :mcm_id
# The variable set that is attributed to the user.
# Corresponds to the JSON property `variableSet`
# @return [Array<Google::Apis::AndroidenterpriseV1::VariableSet>]
attr_accessor :variable_set
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@mcm_id = args[:mcm_id] if args.key?(:mcm_id)
@variable_set = args[:variable_set] if args.key?(:variable_set)
end
end
# A Devices resource represents a mobile device managed by the EMM and belonging
# to a specific enterprise user.
class Device
include Google::Apis::Core::Hashable
# The Google Play Services Android ID for the device encoded as a lowercase hex
# string. For example, "123456789abcdef0".
# Corresponds to the JSON property `androidId`
# @return [String]
attr_accessor :android_id
# 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.
# Corresponds to the JSON property `managementType`
# @return [String]
attr_accessor :management_type
# The device policy for a given managed device.
# Corresponds to the JSON property `policy`
# @return [Google::Apis::AndroidenterpriseV1::Policy]
attr_accessor :policy
# Device report updated with the latest app states for managed apps on the
# device.
# Corresponds to the JSON property `report`
# @return [Google::Apis::AndroidenterpriseV1::DeviceReport]
attr_accessor :report
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@android_id = args[:android_id] if args.key?(:android_id)
@management_type = args[:management_type] if args.key?(:management_type)
@policy = args[:policy] if args.key?(:policy)
@report = args[:report] if args.key?(:report)
end
end
# Device report updated with the latest app states for managed apps on the
# device.
class DeviceReport
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `appState`
# @return [Array<Google::Apis::AndroidenterpriseV1::AppState>]
attr_accessor :app_state
# The timestamp of the last report update in milliseconds since epoch. This
# field will always be present.
# Corresponds to the JSON property `lastUpdatedTimestampMillis`
# @return [Fixnum]
attr_accessor :last_updated_timestamp_millis
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@app_state = args[:app_state] if args.key?(:app_state)
@last_updated_timestamp_millis = args[:last_updated_timestamp_millis] if args.key?(:last_updated_timestamp_millis)
end
end
# An event generated when an updated device report is available.
class DeviceReportUpdateEvent
include Google::Apis::Core::Hashable
# The Android ID of the device. This field will always be present.
# Corresponds to the JSON property `deviceId`
# @return [String]
attr_accessor :device_id
# Device report updated with the latest app states for managed apps on the
# device.
# Corresponds to the JSON property `report`
# @return [Google::Apis::AndroidenterpriseV1::DeviceReport]
attr_accessor :report
# The ID of the user. This field will always be present.
# Corresponds to the JSON property `userId`
# @return [String]
attr_accessor :user_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@device_id = args[:device_id] if args.key?(:device_id)
@report = args[:report] if args.key?(:report)
@user_id = args[:user_id] if args.key?(:user_id)
end
end
# The state of a user's device, as accessed by the getState and setState methods
# on device resources.
class DeviceState
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `accountState`
# @return [String]
attr_accessor :account_state
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_state = args[:account_state] if args.key?(:account_state)
end
end
#
class ListDevicesResponse
include Google::Apis::Core::Hashable
# A managed device.
# Corresponds to the JSON property `device`
# @return [Array<Google::Apis::AndroidenterpriseV1::Device>]
attr_accessor :device
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@device = args[:device] if args.key?(:device)
end
end
# 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.
class Enterprise
include Google::Apis::Core::Hashable
# Admins of the enterprise. This is only supported for enterprises created via
# the EMM-initiated flow.
# Corresponds to the JSON property `administrator`
# @return [Array<Google::Apis::AndroidenterpriseV1::Administrator>]
attr_accessor :administrator
# The unique ID for the enterprise.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The name of the enterprise, for example, "Example, Inc".
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The enterprise's primary domain, such as "example.com".
# Corresponds to the JSON property `primaryDomain`
# @return [String]
attr_accessor :primary_domain
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@administrator = args[:administrator] if args.key?(:administrator)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@primary_domain = args[:primary_domain] if args.key?(:primary_domain)
end
end
# A service account that can be used to authenticate as the enterprise to API
# calls that require such authentication.
class EnterpriseAccount
include Google::Apis::Core::Hashable
# The email address of the service account.
# Corresponds to the JSON property `accountEmail`
# @return [String]
attr_accessor :account_email
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_email = args[:account_email] if args.key?(:account_email)
end
end
#
class ListEnterprisesResponse
include Google::Apis::Core::Hashable
# An enterprise.
# Corresponds to the JSON property `enterprise`
# @return [Array<Google::Apis::AndroidenterpriseV1::Enterprise>]
attr_accessor :enterprise
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enterprise = args[:enterprise] if args.key?(:enterprise)
end
end
#
class SendTestPushNotificationResponse
include Google::Apis::Core::Hashable
# The message ID of the test push notification that was sent.
# Corresponds to the JSON property `messageId`
# @return [String]
attr_accessor :message_id
# The name of the Cloud Pub/Sub topic to which notifications for this enterprise'
# s enrolled account will be sent.
# Corresponds to the JSON property `topicName`
# @return [String]
attr_accessor :topic_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@message_id = args[:message_id] if args.key?(:message_id)
@topic_name = args[:topic_name] if args.key?(:topic_name)
end
end
# 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.
class Entitlement
include Google::Apis::Core::Hashable
# The ID of the product that the entitlement is for. For example, "app:com.
# google.android.gm".
# Corresponds to the JSON property `productId`
# @return [String]
attr_accessor :product_id
# 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.
# Corresponds to the JSON property `reason`
# @return [String]
attr_accessor :reason
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@product_id = args[:product_id] if args.key?(:product_id)
@reason = args[:reason] if args.key?(:reason)
end
end
#
class ListEntitlementsResponse
include Google::Apis::Core::Hashable
# 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.
# Corresponds to the JSON property `entitlement`
# @return [Array<Google::Apis::AndroidenterpriseV1::Entitlement>]
attr_accessor :entitlement
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entitlement = args[:entitlement] if args.key?(:entitlement)
end
end
# 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.
class GroupLicense
include Google::Apis::Core::Hashable
# 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).
# Corresponds to the JSON property `acquisitionKind`
# @return [String]
attr_accessor :acquisition_kind
# 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.
# Corresponds to the JSON property `approval`
# @return [String]
attr_accessor :approval
# The total number of provisioned licenses for this product. Returned by read
# operations, but ignored in write operations.
# Corresponds to the JSON property `numProvisioned`
# @return [Fixnum]
attr_accessor :num_provisioned
# 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").