google-api-client 0.9.9 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile +8 -0
  4. data/api_names.yaml +62 -55
  5. data/generated/google/apis/adsense_v1_4.rb +1 -1
  6. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  7. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  8. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  9. data/generated/google/apis/androidenterprise_v1/classes.rb +534 -39
  10. data/generated/google/apis/androidenterprise_v1/representations.rb +222 -0
  11. data/generated/google/apis/androidenterprise_v1/service.rb +595 -10
  12. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  13. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  14. data/generated/google/apis/appengine_v1beta5/classes.rb +66 -6
  15. data/generated/google/apis/appengine_v1beta5/representations.rb +29 -0
  16. data/generated/google/apis/appengine_v1beta5/service.rb +15 -1
  17. data/generated/google/apis/appstate_v1.rb +1 -1
  18. data/generated/google/apis/bigquery_v2.rb +1 -1
  19. data/generated/google/apis/bigquery_v2/classes.rb +12 -4
  20. data/generated/google/apis/bigquery_v2/representations.rb +1 -0
  21. data/generated/google/apis/books_v1.rb +2 -2
  22. data/generated/google/apis/books_v1/classes.rb +77 -0
  23. data/generated/google/apis/books_v1/representations.rb +34 -0
  24. data/generated/google/apis/books_v1/service.rb +2 -2
  25. data/generated/google/apis/calendar_v3.rb +1 -1
  26. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  27. data/generated/google/apis/cloudbuild_v1/classes.rb +110 -0
  28. data/generated/google/apis/cloudbuild_v1/representations.rb +60 -0
  29. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  30. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  31. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +157 -3
  32. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
  33. data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
  34. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  35. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
  36. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
  37. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
  38. data/generated/google/apis/compute_beta.rb +1 -1
  39. data/generated/google/apis/compute_beta/classes.rb +678 -17
  40. data/generated/google/apis/compute_beta/representations.rb +235 -0
  41. data/generated/google/apis/compute_beta/service.rb +1280 -600
  42. data/generated/google/apis/compute_v1.rb +1 -1
  43. data/generated/google/apis/compute_v1/classes.rb +34 -13
  44. data/generated/google/apis/compute_v1/representations.rb +14 -0
  45. data/generated/google/apis/compute_v1/service.rb +42 -0
  46. data/generated/google/apis/content_v2.rb +1 -1
  47. data/generated/google/apis/content_v2/classes.rb +14 -0
  48. data/generated/google/apis/content_v2/representations.rb +2 -0
  49. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  50. data/generated/google/apis/datastore_v1beta3/classes.rb +1237 -0
  51. data/generated/google/apis/datastore_v1beta3/representations.rb +567 -0
  52. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  53. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  54. data/generated/google/apis/deploymentmanager_v2/classes.rb +6 -0
  55. data/generated/google/apis/deploymentmanager_v2/representations.rb +2 -0
  56. data/generated/google/apis/deploymentmanager_v2/service.rb +40 -50
  57. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  58. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  59. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  60. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  61. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  62. data/generated/google/apis/drive_v2.rb +1 -1
  63. data/generated/google/apis/drive_v3.rb +1 -1
  64. data/generated/google/apis/fitness_v1.rb +2 -2
  65. data/generated/google/apis/fitness_v1/classes.rb +48 -5
  66. data/generated/google/apis/fitness_v1/representations.rb +18 -0
  67. data/generated/google/apis/fitness_v1/service.rb +15 -16
  68. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  69. data/generated/google/apis/games_management_v1management.rb +1 -1
  70. data/generated/google/apis/games_v1.rb +1 -1
  71. data/generated/google/apis/genomics_v1.rb +2 -4
  72. data/generated/google/apis/genomics_v1/classes.rb +35 -7
  73. data/generated/google/apis/genomics_v1/representations.rb +7 -3
  74. data/generated/google/apis/genomics_v1/service.rb +1 -3
  75. data/generated/google/apis/gmail_v1.rb +7 -1
  76. data/generated/google/apis/gmail_v1/classes.rb +543 -0
  77. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  78. data/generated/google/apis/gmail_v1/service.rb +898 -1
  79. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  80. data/generated/google/apis/mirror_v1.rb +2 -2
  81. data/generated/google/apis/mirror_v1/service.rb +1 -1
  82. data/generated/google/apis/monitoring_v3.rb +1 -1
  83. data/generated/google/apis/monitoring_v3/classes.rb +7 -6
  84. data/generated/google/apis/oauth2_v2.rb +1 -1
  85. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  86. data/generated/google/apis/plus_domains_v1.rb +1 -1
  87. data/generated/google/apis/plus_v1.rb +1 -1
  88. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  89. data/generated/google/apis/sheets_v4.rb +1 -1
  90. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  91. data/generated/google/apis/sqladmin_v1beta4/classes.rb +14 -8
  92. data/generated/google/apis/storage_v1.rb +1 -1
  93. data/generated/google/apis/storage_v1/classes.rb +17 -9
  94. data/generated/google/apis/translate_v2.rb +2 -2
  95. data/generated/google/apis/translate_v2/service.rb +1 -1
  96. data/generated/google/apis/vision_v1.rb +1 -1
  97. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  98. data/generated/google/apis/youtube_v3.rb +1 -1
  99. data/generated/google/apis/youtube_v3/classes.rb +8 -2
  100. data/generated/google/apis/youtube_v3/representations.rb +1 -0
  101. data/lib/google/apis/core/base_service.rb +3 -2
  102. data/lib/google/apis/core/upload.rb +7 -1
  103. data/lib/google/apis/version.rb +1 -1
  104. data/sync.rb +71 -0
  105. metadata +11 -2
@@ -22,12 +22,24 @@ module Google
22
22
  module Apis
23
23
  module AndroidenterpriseV1
24
24
 
25
+ class Administrator
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
25
31
  class AppRestrictionsSchema
26
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
33
 
28
34
  include Google::Apis::Core::JsonObjectSupport
29
35
  end
30
36
 
37
+ class AppRestrictionsSchemaChangeEvent
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
31
43
  class AppRestrictionsSchemaRestriction
32
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
45
 
@@ -40,6 +52,12 @@ module Google
40
52
  include Google::Apis::Core::JsonObjectSupport
41
53
  end
42
54
 
55
+ class AppUpdateEvent
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
43
61
  class AppVersion
44
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
63
 
@@ -52,6 +70,12 @@ module Google
52
70
  include Google::Apis::Core::JsonObjectSupport
53
71
  end
54
72
 
73
+ class AuthenticationToken
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
55
79
  class Collection
56
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
57
81
 
@@ -148,6 +172,12 @@ module Google
148
172
  include Google::Apis::Core::JsonObjectSupport
149
173
  end
150
174
 
175
+ class InstallFailureEvent
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
151
181
  class ListInstallsResponse
152
182
  class Representation < Google::Apis::Core::JsonRepresentation; end
153
183
 
@@ -160,6 +190,24 @@ module Google
160
190
  include Google::Apis::Core::JsonObjectSupport
161
191
  end
162
192
 
193
+ class NewPermissionsEvent
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
199
+ class Notification
200
+ class Representation < Google::Apis::Core::JsonRepresentation; end
201
+
202
+ include Google::Apis::Core::JsonObjectSupport
203
+ end
204
+
205
+ class NotificationSet
206
+ class Representation < Google::Apis::Core::JsonRepresentation; end
207
+
208
+ include Google::Apis::Core::JsonObjectSupport
209
+ end
210
+
163
211
  class PageInfo
164
212
  class Representation < Google::Apis::Core::JsonRepresentation; end
165
213
 
@@ -178,6 +226,18 @@ module Google
178
226
  include Google::Apis::Core::JsonObjectSupport
179
227
  end
180
228
 
229
+ class ProductApprovalEvent
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
235
+ class ProductAvailabilityChangeEvent
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
181
241
  class ProductPermission
182
242
  class Representation < Google::Apis::Core::JsonRepresentation; end
183
243
 
@@ -214,6 +274,30 @@ module Google
214
274
  include Google::Apis::Core::JsonObjectSupport
215
275
  end
216
276
 
277
+ class ServiceAccount
278
+ class Representation < Google::Apis::Core::JsonRepresentation; end
279
+
280
+ include Google::Apis::Core::JsonObjectSupport
281
+ end
282
+
283
+ class ServiceAccountKey
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
289
+ class ServiceAccountKeysListResponse
290
+ class Representation < Google::Apis::Core::JsonRepresentation; end
291
+
292
+ include Google::Apis::Core::JsonObjectSupport
293
+ end
294
+
295
+ class SignupInfo
296
+ class Representation < Google::Apis::Core::JsonRepresentation; end
297
+
298
+ include Google::Apis::Core::JsonObjectSupport
299
+ end
300
+
217
301
  class StoreCluster
218
302
  class Representation < Google::Apis::Core::JsonRepresentation; end
219
303
 
@@ -268,6 +352,13 @@ module Google
268
352
  include Google::Apis::Core::JsonObjectSupport
269
353
  end
270
354
 
355
+ class Administrator
356
+ # @private
357
+ class Representation < Google::Apis::Core::JsonRepresentation
358
+ property :email, as: 'email'
359
+ end
360
+ end
361
+
271
362
  class AppRestrictionsSchema
272
363
  # @private
273
364
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -277,6 +368,13 @@ module Google
277
368
  end
278
369
  end
279
370
 
371
+ class AppRestrictionsSchemaChangeEvent
372
+ # @private
373
+ class Representation < Google::Apis::Core::JsonRepresentation
374
+ property :product_id, as: 'productId'
375
+ end
376
+ end
377
+
280
378
  class AppRestrictionsSchemaRestriction
281
379
  # @private
282
380
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -302,6 +400,13 @@ module Google
302
400
  end
303
401
  end
304
402
 
403
+ class AppUpdateEvent
404
+ # @private
405
+ class Representation < Google::Apis::Core::JsonRepresentation
406
+ property :product_id, as: 'productId'
407
+ end
408
+ end
409
+
305
410
  class AppVersion
306
411
  # @private
307
412
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -318,6 +423,14 @@ module Google
318
423
  end
319
424
  end
320
425
 
426
+ class AuthenticationToken
427
+ # @private
428
+ class Representation < Google::Apis::Core::JsonRepresentation
429
+ property :kind, as: 'kind'
430
+ property :token, as: 'token'
431
+ end
432
+ end
433
+
321
434
  class Collection
322
435
  # @private
323
436
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -376,6 +489,8 @@ module Google
376
489
  class Enterprise
377
490
  # @private
378
491
  class Representation < Google::Apis::Core::JsonRepresentation
492
+ collection :administrator, as: 'administrator', class: Google::Apis::AndroidenterpriseV1::Administrator, decorator: Google::Apis::AndroidenterpriseV1::Administrator::Representation
493
+
379
494
  property :id, as: 'id'
380
495
  property :kind, as: 'kind'
381
496
  property :name, as: 'name'
@@ -466,6 +581,17 @@ module Google
466
581
  end
467
582
  end
468
583
 
584
+ class InstallFailureEvent
585
+ # @private
586
+ class Representation < Google::Apis::Core::JsonRepresentation
587
+ property :device_id, as: 'deviceId'
588
+ property :failure_details, as: 'failureDetails'
589
+ property :failure_reason, as: 'failureReason'
590
+ property :product_id, as: 'productId'
591
+ property :user_id, as: 'userId'
592
+ end
593
+ end
594
+
469
595
  class ListInstallsResponse
470
596
  # @private
471
597
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -483,6 +609,45 @@ module Google
483
609
  end
484
610
  end
485
611
 
612
+ class NewPermissionsEvent
613
+ # @private
614
+ class Representation < Google::Apis::Core::JsonRepresentation
615
+ collection :approved_permissions, as: 'approvedPermissions'
616
+ property :product_id, as: 'productId'
617
+ collection :requested_permissions, as: 'requestedPermissions'
618
+ end
619
+ end
620
+
621
+ class Notification
622
+ # @private
623
+ class Representation < Google::Apis::Core::JsonRepresentation
624
+ property :app_restrictions_schema_change_event, as: 'appRestrictionsSchemaChangeEvent', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaChangeEvent, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaChangeEvent::Representation
625
+
626
+ property :app_update_event, as: 'appUpdateEvent', class: Google::Apis::AndroidenterpriseV1::AppUpdateEvent, decorator: Google::Apis::AndroidenterpriseV1::AppUpdateEvent::Representation
627
+
628
+ property :enterprise_id, as: 'enterpriseId'
629
+ property :install_failure_event, as: 'installFailureEvent', class: Google::Apis::AndroidenterpriseV1::InstallFailureEvent, decorator: Google::Apis::AndroidenterpriseV1::InstallFailureEvent::Representation
630
+
631
+ property :new_permissions_event, as: 'newPermissionsEvent', class: Google::Apis::AndroidenterpriseV1::NewPermissionsEvent, decorator: Google::Apis::AndroidenterpriseV1::NewPermissionsEvent::Representation
632
+
633
+ property :product_approval_event, as: 'productApprovalEvent', class: Google::Apis::AndroidenterpriseV1::ProductApprovalEvent, decorator: Google::Apis::AndroidenterpriseV1::ProductApprovalEvent::Representation
634
+
635
+ property :product_availability_change_event, as: 'productAvailabilityChangeEvent', class: Google::Apis::AndroidenterpriseV1::ProductAvailabilityChangeEvent, decorator: Google::Apis::AndroidenterpriseV1::ProductAvailabilityChangeEvent::Representation
636
+
637
+ property :timestamp_millis, as: 'timestampMillis'
638
+ end
639
+ end
640
+
641
+ class NotificationSet
642
+ # @private
643
+ class Representation < Google::Apis::Core::JsonRepresentation
644
+ property :kind, as: 'kind'
645
+ collection :notification, as: 'notification', class: Google::Apis::AndroidenterpriseV1::Notification, decorator: Google::Apis::AndroidenterpriseV1::Notification::Representation
646
+
647
+ property :notification_set_id, as: 'notificationSetId'
648
+ end
649
+ end
650
+
486
651
  class PageInfo
487
652
  # @private
488
653
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -521,6 +686,22 @@ module Google
521
686
  end
522
687
  end
523
688
 
689
+ class ProductApprovalEvent
690
+ # @private
691
+ class Representation < Google::Apis::Core::JsonRepresentation
692
+ property :approved, as: 'approved'
693
+ property :product_id, as: 'productId'
694
+ end
695
+ end
696
+
697
+ class ProductAvailabilityChangeEvent
698
+ # @private
699
+ class Representation < Google::Apis::Core::JsonRepresentation
700
+ property :availability_status, as: 'availabilityStatus'
701
+ property :product_id, as: 'productId'
702
+ end
703
+ end
704
+
524
705
  class ProductPermission
525
706
  # @private
526
707
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -575,6 +756,43 @@ module Google
575
756
  end
576
757
  end
577
758
 
759
+ class ServiceAccount
760
+ # @private
761
+ class Representation < Google::Apis::Core::JsonRepresentation
762
+ property :key, as: 'key', class: Google::Apis::AndroidenterpriseV1::ServiceAccountKey, decorator: Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
763
+
764
+ property :kind, as: 'kind'
765
+ property :name, as: 'name'
766
+ end
767
+ end
768
+
769
+ class ServiceAccountKey
770
+ # @private
771
+ class Representation < Google::Apis::Core::JsonRepresentation
772
+ property :data, as: 'data'
773
+ property :id, as: 'id'
774
+ property :kind, as: 'kind'
775
+ property :type, as: 'type'
776
+ end
777
+ end
778
+
779
+ class ServiceAccountKeysListResponse
780
+ # @private
781
+ class Representation < Google::Apis::Core::JsonRepresentation
782
+ collection :service_account_key, as: 'serviceAccountKey', class: Google::Apis::AndroidenterpriseV1::ServiceAccountKey, decorator: Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
783
+
784
+ end
785
+ end
786
+
787
+ class SignupInfo
788
+ # @private
789
+ class Representation < Google::Apis::Core::JsonRepresentation
790
+ property :completion_token, as: 'completionToken'
791
+ property :kind, as: 'kind'
792
+ property :url, as: 'url'
793
+ end
794
+ end
795
+
578
796
  class StoreCluster
579
797
  # @private
580
798
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -635,8 +853,12 @@ module Google
635
853
  class User
636
854
  # @private
637
855
  class Representation < Google::Apis::Core::JsonRepresentation
856
+ property :account_identifier, as: 'accountIdentifier'
857
+ property :account_type, as: 'accountType'
858
+ property :display_name, as: 'displayName'
638
859
  property :id, as: 'id'
639
860
  property :kind, as: 'kind'
861
+ property :management_type, as: 'managementType'
640
862
  property :primary_email, as: 'primaryEmail'
641
863
  end
642
864
  end
@@ -538,10 +538,11 @@ module Google
538
538
  execute_or_queue_command(command, &block)
539
539
  end
540
540
 
541
- # Retrieves whether a device is enabled or disabled for access by the user to
542
- # Google services. The device state takes effect only if enforcing EMM policies
543
- # on Android devices is enabled in the Google Admin Console. Otherwise, the
544
- # device state is ignored and all devices are allowed access to Google services.
541
+ # Retrieves whether a device's access to Google services is enabled or disabled.
542
+ # The device state takes effect only if enforcing EMM policies on Android
543
+ # devices is enabled in the Google Admin Console. Otherwise, the device state is
544
+ # ignored and all devices are allowed access to Google services. This is only
545
+ # supported for Google-managed users.
545
546
  # @param [String] enterprise_id
546
547
  # The ID of the enterprise.
547
548
  # @param [String] user_id
@@ -620,10 +621,11 @@ module Google
620
621
  execute_or_queue_command(command, &block)
621
622
  end
622
623
 
623
- # Sets whether a device is enabled or disabled for access by the user to Google
624
- # services. The device state takes effect only if enforcing EMM policies on
625
- # Android devices is enabled in the Google Admin Console. Otherwise, the device
626
- # state is ignored and all devices are allowed access to Google services.
624
+ # Sets whether a device's access to Google services is enabled or disabled. The
625
+ # device state takes effect only if enforcing EMM policies on Android devices is
626
+ # enabled in the Google Admin Console. Otherwise, the device state is ignored
627
+ # and all devices are allowed access to Google services. This is only supported
628
+ # for Google-managed users.
627
629
  # @param [String] enterprise_id
628
630
  # The ID of the enterprise.
629
631
  # @param [String] user_id
@@ -667,6 +669,82 @@ module Google
667
669
  execute_or_queue_command(command, &block)
668
670
  end
669
671
 
672
+ # Acknowledges notifications that were received from Enterprises.
673
+ # PullNotificationSet to prevent subsequent calls from returning the same
674
+ # notifications.
675
+ # @param [String] notification_set_id
676
+ # The notification set ID as returned by Enterprises.PullNotificationSet. This
677
+ # must be provided.
678
+ # @param [String] fields
679
+ # Selector specifying which fields to include in a partial response.
680
+ # @param [String] quota_user
681
+ # Available to use for quota purposes for server-side applications. Can be any
682
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
683
+ # Overrides userIp if both are provided.
684
+ # @param [String] user_ip
685
+ # IP address of the site where the request originates. Use this if you want to
686
+ # enforce per-user limits.
687
+ # @param [Google::Apis::RequestOptions] options
688
+ # Request-specific options
689
+ #
690
+ # @yield [result, err] Result & error if block supplied
691
+ # @yieldparam result [NilClass] No result returned for this method
692
+ # @yieldparam err [StandardError] error object if request failed
693
+ #
694
+ # @return [void]
695
+ #
696
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
697
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
698
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
699
+ def acknowledge_enterprise_notification_set(notification_set_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
700
+ command = make_simple_command(:post, 'enterprises/acknowledgeNotificationSet', options)
701
+ command.query['notificationSetId'] = notification_set_id unless notification_set_id.nil?
702
+ command.query['fields'] = fields unless fields.nil?
703
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
704
+ command.query['userIp'] = user_ip unless user_ip.nil?
705
+ execute_or_queue_command(command, &block)
706
+ end
707
+
708
+ # Completes the signup flow, by specifying the Completion token and Enterprise
709
+ # token. This request must not be called multiple times for a given Enterprise
710
+ # Token.
711
+ # @param [String] completion_token
712
+ # The Completion token initially returned by GenerateSignupUrl.
713
+ # @param [String] enterprise_token
714
+ # The Enterprise token appended to the Callback URL.
715
+ # @param [String] fields
716
+ # Selector specifying which fields to include in a partial response.
717
+ # @param [String] quota_user
718
+ # Available to use for quota purposes for server-side applications. Can be any
719
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
720
+ # Overrides userIp if both are provided.
721
+ # @param [String] user_ip
722
+ # IP address of the site where the request originates. Use this if you want to
723
+ # enforce per-user limits.
724
+ # @param [Google::Apis::RequestOptions] options
725
+ # Request-specific options
726
+ #
727
+ # @yield [result, err] Result & error if block supplied
728
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
729
+ # @yieldparam err [StandardError] error object if request failed
730
+ #
731
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
732
+ #
733
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
734
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
735
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
736
+ def complete_enterprise_signup(completion_token: nil, enterprise_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
737
+ command = make_simple_command(:post, 'enterprises/completeSignup', options)
738
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
739
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
740
+ command.query['completionToken'] = completion_token unless completion_token.nil?
741
+ command.query['enterpriseToken'] = enterprise_token unless enterprise_token.nil?
742
+ command.query['fields'] = fields unless fields.nil?
743
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
744
+ command.query['userIp'] = user_ip unless user_ip.nil?
745
+ execute_or_queue_command(command, &block)
746
+ end
747
+
670
748
  # Deletes the binding between the EMM and enterprise. This is now deprecated;
671
749
  # use this to unenroll customers that were previously enrolled with the 'insert'
672
750
  # call, then enroll them again with the 'enroll' call.
@@ -740,6 +818,47 @@ module Google
740
818
  execute_or_queue_command(command, &block)
741
819
  end
742
820
 
821
+ # Generates a sign-up URL.
822
+ # @param [String] callback_url
823
+ # The callback URL to which the Admin will be redirected after successfully
824
+ # creating an enterprise. Before redirecting there the system will add a single
825
+ # query parameter to this URL named "enterpriseToken" which will contain an
826
+ # opaque token to be used for the CompleteSignup request.
827
+ # Beware that this means that the URL will be parsed, the parameter added and
828
+ # then a new URL formatted, i.e. there may be some minor formatting changes and,
829
+ # more importantly, the URL must be well-formed so that it can be parsed.
830
+ # @param [String] fields
831
+ # Selector specifying which fields to include in a partial response.
832
+ # @param [String] quota_user
833
+ # Available to use for quota purposes for server-side applications. Can be any
834
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
835
+ # Overrides userIp if both are provided.
836
+ # @param [String] user_ip
837
+ # IP address of the site where the request originates. Use this if you want to
838
+ # enforce per-user limits.
839
+ # @param [Google::Apis::RequestOptions] options
840
+ # Request-specific options
841
+ #
842
+ # @yield [result, err] Result & error if block supplied
843
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::SignupInfo] parsed result object
844
+ # @yieldparam err [StandardError] error object if request failed
845
+ #
846
+ # @return [Google::Apis::AndroidenterpriseV1::SignupInfo]
847
+ #
848
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
849
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
850
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
851
+ def generate_enterprise_signup_url(callback_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
852
+ command = make_simple_command(:post, 'enterprises/signupUrl', options)
853
+ command.response_representation = Google::Apis::AndroidenterpriseV1::SignupInfo::Representation
854
+ command.response_class = Google::Apis::AndroidenterpriseV1::SignupInfo
855
+ command.query['callbackUrl'] = callback_url unless callback_url.nil?
856
+ command.query['fields'] = fields unless fields.nil?
857
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
858
+ command.query['userIp'] = user_ip unless user_ip.nil?
859
+ execute_or_queue_command(command, &block)
860
+ end
861
+
743
862
  # Retrieves the name and domain of an enterprise.
744
863
  # @param [String] enterprise_id
745
864
  # The ID of the enterprise.
@@ -775,6 +894,53 @@ module Google
775
894
  execute_or_queue_command(command, &block)
776
895
  end
777
896
 
897
+ # Returns a service account and credentials. The service account can be bound to
898
+ # the enterprise by calling setAccount. The service account is unique to this
899
+ # enterprise and EMM, and will be deleted if the enterprise is unbound. The
900
+ # credentials contain private key data and are not stored server-side.
901
+ # This method can only be called after calling Enterprises.Enroll or Enterprises.
902
+ # CompleteSignup, and before Enterprises.SetAccount; at other times it will
903
+ # return an error.
904
+ # Subsequent calls after the first will generate a new, unique set of
905
+ # credentials, and invalidate the previously generated credentials.
906
+ # Once the service account is bound to the enterprise, it can be managed using
907
+ # the serviceAccountKeys resource.
908
+ # @param [String] enterprise_id
909
+ # @param [String] key_type
910
+ # The type of credential to return with the service account. Required.
911
+ # @param [String] fields
912
+ # Selector specifying which fields to include in a partial response.
913
+ # @param [String] quota_user
914
+ # Available to use for quota purposes for server-side applications. Can be any
915
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
916
+ # Overrides userIp if both are provided.
917
+ # @param [String] user_ip
918
+ # IP address of the site where the request originates. Use this if you want to
919
+ # enforce per-user limits.
920
+ # @param [Google::Apis::RequestOptions] options
921
+ # Request-specific options
922
+ #
923
+ # @yield [result, err] Result & error if block supplied
924
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccount] parsed result object
925
+ # @yieldparam err [StandardError] error object if request failed
926
+ #
927
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccount]
928
+ #
929
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
930
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
931
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
932
+ def get_enterprise_service_account(enterprise_id, key_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
933
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/serviceAccount', options)
934
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccount::Representation
935
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccount
936
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
937
+ command.query['keyType'] = key_type unless key_type.nil?
938
+ command.query['fields'] = fields unless fields.nil?
939
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
940
+ command.query['userIp'] = user_ip unless user_ip.nil?
941
+ execute_or_queue_command(command, &block)
942
+ end
943
+
778
944
  # Returns the store layout resource.
779
945
  # @param [String] enterprise_id
780
946
  # The ID of the enterprise.
@@ -849,7 +1015,11 @@ module Google
849
1015
  execute_or_queue_command(command, &block)
850
1016
  end
851
1017
 
852
- # Looks up an enterprise by domain name.
1018
+ # Looks up an enterprise by domain name. This is only supported for enterprises
1019
+ # created via the Google-initiated creation flow. Lookup of the id is not needed
1020
+ # for enterprises created via the EMM-initiated flow since the EMM learns the
1021
+ # enterprise ID in the callback specified in the Enterprises.generateSignupUrl
1022
+ # call.
853
1023
  # @param [String] domain
854
1024
  # The exact primary domain name of the enterprise to look up.
855
1025
  # @param [String] fields
@@ -884,6 +1054,56 @@ module Google
884
1054
  execute_or_queue_command(command, &block)
885
1055
  end
886
1056
 
1057
+ # Pulls and returns a notification set for the enterprises associated with the
1058
+ # service account authenticated for the request. The notification set may be
1059
+ # empty if no notification are pending.
1060
+ # A notification set returned needs to be acknowledged within 20 seconds by
1061
+ # calling Enterprises.AcknowledgeNotificationSet, unless the notification set is
1062
+ # empty.
1063
+ # Notifications that are not acknowledged within the 20 seconds will eventually
1064
+ # be included again in the response to another PullNotificationSet request, and
1065
+ # those that are never acknowledged will ultimately be deleted according to the
1066
+ # Google Cloud Platform Pub/Sub system policy.
1067
+ # Multiple requests might be performed concurrently to retrieve notifications,
1068
+ # in which case the pending notifications (if any) will be split among each
1069
+ # caller, if any are pending.
1070
+ # @param [String] request_mode
1071
+ # The request mode for pulling notifications. If omitted, defaults to
1072
+ # WAIT_FOR_NOTIFCATIONS.
1073
+ # If this is set to WAIT_FOR_NOTIFCATIONS, the request will eventually timeout,
1074
+ # in which case it should be retried.
1075
+ # @param [String] fields
1076
+ # Selector specifying which fields to include in a partial response.
1077
+ # @param [String] quota_user
1078
+ # Available to use for quota purposes for server-side applications. Can be any
1079
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1080
+ # Overrides userIp if both are provided.
1081
+ # @param [String] user_ip
1082
+ # IP address of the site where the request originates. Use this if you want to
1083
+ # enforce per-user limits.
1084
+ # @param [Google::Apis::RequestOptions] options
1085
+ # Request-specific options
1086
+ #
1087
+ # @yield [result, err] Result & error if block supplied
1088
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::NotificationSet] parsed result object
1089
+ # @yieldparam err [StandardError] error object if request failed
1090
+ #
1091
+ # @return [Google::Apis::AndroidenterpriseV1::NotificationSet]
1092
+ #
1093
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1094
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1095
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1096
+ def pull_enterprise_notification_set(request_mode: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1097
+ command = make_simple_command(:post, 'enterprises/pullNotificationSet', options)
1098
+ command.response_representation = Google::Apis::AndroidenterpriseV1::NotificationSet::Representation
1099
+ command.response_class = Google::Apis::AndroidenterpriseV1::NotificationSet
1100
+ command.query['requestMode'] = request_mode unless request_mode.nil?
1101
+ command.query['fields'] = fields unless fields.nil?
1102
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1103
+ command.query['userIp'] = user_ip unless user_ip.nil?
1104
+ execute_or_queue_command(command, &block)
1105
+ end
1106
+
887
1107
  # Sends a test push notification to validate the EMM integration with the Google
888
1108
  # Cloud Pub/Sub service for this enterprise.
889
1109
  # @param [String] enterprise_id
@@ -1902,6 +2122,42 @@ module Google
1902
2122
  execute_or_queue_command(command, &block)
1903
2123
  end
1904
2124
 
2125
+ # Unapproves the specified product (and the relevant app permissions, if any)
2126
+ # @param [String] enterprise_id
2127
+ # The ID of the enterprise.
2128
+ # @param [String] product_id
2129
+ # The ID of the product.
2130
+ # @param [String] fields
2131
+ # Selector specifying which fields to include in a partial response.
2132
+ # @param [String] quota_user
2133
+ # Available to use for quota purposes for server-side applications. Can be any
2134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2135
+ # Overrides userIp if both are provided.
2136
+ # @param [String] user_ip
2137
+ # IP address of the site where the request originates. Use this if you want to
2138
+ # enforce per-user limits.
2139
+ # @param [Google::Apis::RequestOptions] options
2140
+ # Request-specific options
2141
+ #
2142
+ # @yield [result, err] Result & error if block supplied
2143
+ # @yieldparam result [NilClass] No result returned for this method
2144
+ # @yieldparam err [StandardError] error object if request failed
2145
+ #
2146
+ # @return [void]
2147
+ #
2148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2151
+ def unapprove_product(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2152
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/unapprove', options)
2153
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2154
+ command.params['productId'] = product_id unless product_id.nil?
2155
+ command.query['fields'] = fields unless fields.nil?
2156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2157
+ command.query['userIp'] = user_ip unless user_ip.nil?
2158
+ execute_or_queue_command(command, &block)
2159
+ end
2160
+
1905
2161
  # This method has been deprecated. To programmatically approve applications, you
1906
2162
  # must use the iframe mechanism via the generateApprovalUrl and approve
1907
2163
  # methods of the Products resource. For more information, see the Play EMM API
@@ -1948,6 +2204,126 @@ module Google
1948
2204
  execute_or_queue_command(command, &block)
1949
2205
  end
1950
2206
 
2207
+ # Removes and invalidates the specified credentials for the service account
2208
+ # associated with this enterprise. The calling service account must have been
2209
+ # retrieved by calling Enterprises.GetServiceAccount and must have been set as
2210
+ # the enterprise service account by calling Enterprises.SetAccount.
2211
+ # @param [String] enterprise_id
2212
+ # The ID of the enterprise.
2213
+ # @param [String] key_id
2214
+ # The ID of the key.
2215
+ # @param [String] fields
2216
+ # Selector specifying which fields to include in a partial response.
2217
+ # @param [String] quota_user
2218
+ # Available to use for quota purposes for server-side applications. Can be any
2219
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2220
+ # Overrides userIp if both are provided.
2221
+ # @param [String] user_ip
2222
+ # IP address of the site where the request originates. Use this if you want to
2223
+ # enforce per-user limits.
2224
+ # @param [Google::Apis::RequestOptions] options
2225
+ # Request-specific options
2226
+ #
2227
+ # @yield [result, err] Result & error if block supplied
2228
+ # @yieldparam result [NilClass] No result returned for this method
2229
+ # @yieldparam err [StandardError] error object if request failed
2230
+ #
2231
+ # @return [void]
2232
+ #
2233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2236
+ def delete_serviceaccountkey(enterprise_id, key_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2237
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/serviceAccountKeys/{keyId}', options)
2238
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2239
+ command.params['keyId'] = key_id unless key_id.nil?
2240
+ command.query['fields'] = fields unless fields.nil?
2241
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2242
+ command.query['userIp'] = user_ip unless user_ip.nil?
2243
+ execute_or_queue_command(command, &block)
2244
+ end
2245
+
2246
+ # Generates new credentials for the service account associated with this
2247
+ # enterprise. The calling service account must have been retrieved by calling
2248
+ # Enterprises.GetServiceAccount and must have been set as the enterprise service
2249
+ # account by calling Enterprises.SetAccount.
2250
+ # Only the type of the key should be populated in the resource to be inserted.
2251
+ # @param [String] enterprise_id
2252
+ # The ID of the enterprise.
2253
+ # @param [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] service_account_key_object
2254
+ # @param [String] fields
2255
+ # Selector specifying which fields to include in a partial response.
2256
+ # @param [String] quota_user
2257
+ # Available to use for quota purposes for server-side applications. Can be any
2258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2259
+ # Overrides userIp if both are provided.
2260
+ # @param [String] user_ip
2261
+ # IP address of the site where the request originates. Use this if you want to
2262
+ # enforce per-user limits.
2263
+ # @param [Google::Apis::RequestOptions] options
2264
+ # Request-specific options
2265
+ #
2266
+ # @yield [result, err] Result & error if block supplied
2267
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] parsed result object
2268
+ # @yieldparam err [StandardError] error object if request failed
2269
+ #
2270
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKey]
2271
+ #
2272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2275
+ def insert_serviceaccountkey(enterprise_id, service_account_key_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2276
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/serviceAccountKeys', options)
2277
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
2278
+ command.request_object = service_account_key_object
2279
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
2280
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKey
2281
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2282
+ command.query['fields'] = fields unless fields.nil?
2283
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2284
+ command.query['userIp'] = user_ip unless user_ip.nil?
2285
+ execute_or_queue_command(command, &block)
2286
+ end
2287
+
2288
+ # Lists all active credentials for the service account associated with this
2289
+ # enterprise. Only the ID and key type are returned. The calling service account
2290
+ # must have been retrieved by calling Enterprises.GetServiceAccount and must
2291
+ # have been set as the enterprise service account by calling Enterprises.
2292
+ # SetAccount.
2293
+ # @param [String] enterprise_id
2294
+ # The ID of the enterprise.
2295
+ # @param [String] fields
2296
+ # Selector specifying which fields to include in a partial response.
2297
+ # @param [String] quota_user
2298
+ # Available to use for quota purposes for server-side applications. Can be any
2299
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2300
+ # Overrides userIp if both are provided.
2301
+ # @param [String] user_ip
2302
+ # IP address of the site where the request originates. Use this if you want to
2303
+ # enforce per-user limits.
2304
+ # @param [Google::Apis::RequestOptions] options
2305
+ # Request-specific options
2306
+ #
2307
+ # @yield [result, err] Result & error if block supplied
2308
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse] parsed result object
2309
+ # @yieldparam err [StandardError] error object if request failed
2310
+ #
2311
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse]
2312
+ #
2313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2316
+ def list_serviceaccountkeys(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2317
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/serviceAccountKeys', options)
2318
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse::Representation
2319
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse
2320
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2321
+ command.query['fields'] = fields unless fields.nil?
2322
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2323
+ command.query['userIp'] = user_ip unless user_ip.nil?
2324
+ execute_or_queue_command(command, &block)
2325
+ end
2326
+
1951
2327
  # Deletes a cluster.
1952
2328
  # @param [String] enterprise_id
1953
2329
  # The ID of the enterprise.
@@ -2424,6 +2800,83 @@ module Google
2424
2800
  execute_or_queue_command(command, &block)
2425
2801
  end
2426
2802
 
2803
+ # Deleted an EMM-managed user.
2804
+ # @param [String] enterprise_id
2805
+ # The ID of the enterprise.
2806
+ # @param [String] user_id
2807
+ # The ID of the user.
2808
+ # @param [String] fields
2809
+ # Selector specifying which fields to include in a partial response.
2810
+ # @param [String] quota_user
2811
+ # Available to use for quota purposes for server-side applications. Can be any
2812
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2813
+ # Overrides userIp if both are provided.
2814
+ # @param [String] user_ip
2815
+ # IP address of the site where the request originates. Use this if you want to
2816
+ # enforce per-user limits.
2817
+ # @param [Google::Apis::RequestOptions] options
2818
+ # Request-specific options
2819
+ #
2820
+ # @yield [result, err] Result & error if block supplied
2821
+ # @yieldparam result [NilClass] No result returned for this method
2822
+ # @yieldparam err [StandardError] error object if request failed
2823
+ #
2824
+ # @return [void]
2825
+ #
2826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2829
+ def delete_user(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2830
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/users/{userId}', options)
2831
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2832
+ command.params['userId'] = user_id unless user_id.nil?
2833
+ command.query['fields'] = fields unless fields.nil?
2834
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2835
+ command.query['userIp'] = user_ip unless user_ip.nil?
2836
+ execute_or_queue_command(command, &block)
2837
+ end
2838
+
2839
+ # Generates an authentication token which the device policy client can use to
2840
+ # provision the given EMM-managed user account on a device. The generated token
2841
+ # is single-use and expires after a few minutes.
2842
+ # This call only works with EMM-managed accounts.
2843
+ # @param [String] enterprise_id
2844
+ # The ID of the enterprise.
2845
+ # @param [String] user_id
2846
+ # The ID of the user.
2847
+ # @param [String] fields
2848
+ # Selector specifying which fields to include in a partial response.
2849
+ # @param [String] quota_user
2850
+ # Available to use for quota purposes for server-side applications. Can be any
2851
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2852
+ # Overrides userIp if both are provided.
2853
+ # @param [String] user_ip
2854
+ # IP address of the site where the request originates. Use this if you want to
2855
+ # enforce per-user limits.
2856
+ # @param [Google::Apis::RequestOptions] options
2857
+ # Request-specific options
2858
+ #
2859
+ # @yield [result, err] Result & error if block supplied
2860
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AuthenticationToken] parsed result object
2861
+ # @yieldparam err [StandardError] error object if request failed
2862
+ #
2863
+ # @return [Google::Apis::AndroidenterpriseV1::AuthenticationToken]
2864
+ #
2865
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2866
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2867
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2868
+ def generate_user_authentication_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2869
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/users/{userId}/authenticationToken', options)
2870
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AuthenticationToken::Representation
2871
+ command.response_class = Google::Apis::AndroidenterpriseV1::AuthenticationToken
2872
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2873
+ command.params['userId'] = user_id unless user_id.nil?
2874
+ command.query['fields'] = fields unless fields.nil?
2875
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2876
+ command.query['userIp'] = user_ip unless user_ip.nil?
2877
+ execute_or_queue_command(command, &block)
2878
+ end
2879
+
2427
2880
  # Generates a token (activation code) to allow this user to configure their work
2428
2881
  # account in the Android Setup Wizard. Revokes any previously generated token.
2429
2882
  # This call only works with Google managed accounts.
@@ -2540,7 +2993,50 @@ module Google
2540
2993
  execute_or_queue_command(command, &block)
2541
2994
  end
2542
2995
 
2543
- # Looks up a user by their primary email address.
2996
+ # Creates a new EMM-managed user.
2997
+ # The required details of the user are passed in the Users resource in the body
2998
+ # of the request. Specifically, the accountIdentifier, accountType, and
2999
+ # displayName fields must be provided.
3000
+ # @param [String] enterprise_id
3001
+ # The ID of the enterprise.
3002
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3003
+ # @param [String] fields
3004
+ # Selector specifying which fields to include in a partial response.
3005
+ # @param [String] quota_user
3006
+ # Available to use for quota purposes for server-side applications. Can be any
3007
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3008
+ # Overrides userIp if both are provided.
3009
+ # @param [String] user_ip
3010
+ # IP address of the site where the request originates. Use this if you want to
3011
+ # enforce per-user limits.
3012
+ # @param [Google::Apis::RequestOptions] options
3013
+ # Request-specific options
3014
+ #
3015
+ # @yield [result, err] Result & error if block supplied
3016
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3017
+ # @yieldparam err [StandardError] error object if request failed
3018
+ #
3019
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3020
+ #
3021
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3022
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3023
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3024
+ def insert_user(enterprise_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3025
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/users', options)
3026
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3027
+ command.request_object = user_object
3028
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3029
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3030
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3031
+ command.query['fields'] = fields unless fields.nil?
3032
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3033
+ command.query['userIp'] = user_ip unless user_ip.nil?
3034
+ execute_or_queue_command(command, &block)
3035
+ end
3036
+
3037
+ # Looks up a user by their primary email address. This is only supported for
3038
+ # Google-managed users. Lookup of the id is not needed for EMM-managed users
3039
+ # because the id is already returned in the result of the Users.insert call.
2544
3040
  # @param [String] enterprise_id
2545
3041
  # The ID of the enterprise.
2546
3042
  # @param [String] email
@@ -2578,6 +3074,51 @@ module Google
2578
3074
  execute_or_queue_command(command, &block)
2579
3075
  end
2580
3076
 
3077
+ # Updates the details of an EMM-managed user.
3078
+ # This only works with EMM-managed users. Pass the new details in Users resource
3079
+ # in the request body. Only the displayName field can be changed. Other fields
3080
+ # must either be unset or have the currently active value. This method supports
3081
+ # patch semantics.
3082
+ # @param [String] enterprise_id
3083
+ # The ID of the enterprise.
3084
+ # @param [String] user_id
3085
+ # The ID of the user.
3086
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3087
+ # @param [String] fields
3088
+ # Selector specifying which fields to include in a partial response.
3089
+ # @param [String] quota_user
3090
+ # Available to use for quota purposes for server-side applications. Can be any
3091
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3092
+ # Overrides userIp if both are provided.
3093
+ # @param [String] user_ip
3094
+ # IP address of the site where the request originates. Use this if you want to
3095
+ # enforce per-user limits.
3096
+ # @param [Google::Apis::RequestOptions] options
3097
+ # Request-specific options
3098
+ #
3099
+ # @yield [result, err] Result & error if block supplied
3100
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3101
+ # @yieldparam err [StandardError] error object if request failed
3102
+ #
3103
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3104
+ #
3105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3108
+ def patch_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3109
+ command = make_simple_command(:patch, 'enterprises/{enterpriseId}/users/{userId}', options)
3110
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3111
+ command.request_object = user_object
3112
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3113
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3114
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3115
+ command.params['userId'] = user_id unless user_id.nil?
3116
+ command.query['fields'] = fields unless fields.nil?
3117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3118
+ command.query['userIp'] = user_ip unless user_ip.nil?
3119
+ execute_or_queue_command(command, &block)
3120
+ end
3121
+
2581
3122
  # Revokes a previously generated token (activation code) for the user.
2582
3123
  # @param [String] enterprise_id
2583
3124
  # The ID of the enterprise.
@@ -2654,6 +3195,50 @@ module Google
2654
3195
  command.query['userIp'] = user_ip unless user_ip.nil?
2655
3196
  execute_or_queue_command(command, &block)
2656
3197
  end
3198
+
3199
+ # Updates the details of an EMM-managed user.
3200
+ # This only works with EMM-managed users. Pass the new details in Users resource
3201
+ # in the request body. Only the displayName field can be changed. Other fields
3202
+ # must either be unset or have the currently active value.
3203
+ # @param [String] enterprise_id
3204
+ # The ID of the enterprise.
3205
+ # @param [String] user_id
3206
+ # The ID of the user.
3207
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3208
+ # @param [String] fields
3209
+ # Selector specifying which fields to include in a partial response.
3210
+ # @param [String] quota_user
3211
+ # Available to use for quota purposes for server-side applications. Can be any
3212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3213
+ # Overrides userIp if both are provided.
3214
+ # @param [String] user_ip
3215
+ # IP address of the site where the request originates. Use this if you want to
3216
+ # enforce per-user limits.
3217
+ # @param [Google::Apis::RequestOptions] options
3218
+ # Request-specific options
3219
+ #
3220
+ # @yield [result, err] Result & error if block supplied
3221
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3222
+ # @yieldparam err [StandardError] error object if request failed
3223
+ #
3224
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3225
+ #
3226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3229
+ def update_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3230
+ command = make_simple_command(:put, 'enterprises/{enterpriseId}/users/{userId}', options)
3231
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3232
+ command.request_object = user_object
3233
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3234
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3235
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3236
+ command.params['userId'] = user_id unless user_id.nil?
3237
+ command.query['fields'] = fields unless fields.nil?
3238
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3239
+ command.query['userIp'] = user_ip unless user_ip.nil?
3240
+ execute_or_queue_command(command, &block)
3241
+ end
2657
3242
 
2658
3243
  protected
2659
3244