google-api-client 0.9.8 → 0.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +63 -110
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
  12. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
  13. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  16. data/generated/google/apis/admin_directory_v1.rb +1 -1
  17. data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
  18. data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
  19. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  20. data/generated/google/apis/admin_reports_v1.rb +3 -3
  21. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  22. data/generated/google/apis/adsense_v1_4.rb +1 -1
  23. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  24. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  26. data/generated/google/apis/analytics_v3.rb +1 -1
  27. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  28. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  29. data/generated/google/apis/analytics_v3/service.rb +217 -0
  30. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  31. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  32. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  33. data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
  34. data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
  35. data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
  36. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  37. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
  38. data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
  39. data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
  40. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  41. data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
  42. data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
  43. data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
  44. data/generated/google/apis/appsactivity_v1.rb +1 -1
  45. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  46. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  47. data/generated/google/apis/appstate_v1.rb +1 -1
  48. data/generated/google/apis/bigquery_v2.rb +1 -1
  49. data/generated/google/apis/bigquery_v2/classes.rb +277 -20
  50. data/generated/google/apis/bigquery_v2/representations.rb +86 -0
  51. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  52. data/generated/google/apis/books_v1.rb +2 -2
  53. data/generated/google/apis/books_v1/classes.rb +79 -1
  54. data/generated/google/apis/books_v1/representations.rb +34 -0
  55. data/generated/google/apis/books_v1/service.rb +7 -3
  56. data/generated/google/apis/calendar_v3.rb +1 -1
  57. data/generated/google/apis/civicinfo_v2.rb +3 -2
  58. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  59. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  60. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  61. data/generated/google/apis/classroom_v1.rb +1 -1
  62. data/generated/google/apis/classroom_v1/classes.rb +183 -37
  63. data/generated/google/apis/classroom_v1/representations.rb +74 -9
  64. data/generated/google/apis/classroom_v1/service.rb +403 -38
  65. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  66. data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
  67. data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
  68. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  69. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  70. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  71. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  72. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  73. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
  74. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
  75. data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
  76. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  77. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
  78. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
  79. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
  80. data/generated/google/apis/compute_beta.rb +1 -1
  81. data/generated/google/apis/compute_beta/classes.rb +2299 -434
  82. data/generated/google/apis/compute_beta/representations.rb +752 -33
  83. data/generated/google/apis/compute_beta/service.rb +6067 -3153
  84. data/generated/google/apis/compute_v1.rb +1 -1
  85. data/generated/google/apis/compute_v1/classes.rb +1681 -207
  86. data/generated/google/apis/compute_v1/representations.rb +552 -0
  87. data/generated/google/apis/compute_v1/service.rb +2797 -1171
  88. data/generated/google/apis/content_v2.rb +1 -1
  89. data/generated/google/apis/content_v2/classes.rb +757 -1
  90. data/generated/google/apis/content_v2/representations.rb +337 -0
  91. data/generated/google/apis/content_v2/service.rb +244 -0
  92. data/generated/google/apis/dataflow_v1b3.rb +38 -0
  93. data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
  94. data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
  95. data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
  96. data/generated/google/apis/dataproc_v1.rb +2 -2
  97. data/generated/google/apis/dataproc_v1/classes.rb +213 -68
  98. data/generated/google/apis/dataproc_v1/representations.rb +38 -0
  99. data/generated/google/apis/dataproc_v1/service.rb +78 -48
  100. data/generated/google/apis/datastore_v1.rb +38 -0
  101. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  102. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  103. data/generated/google/apis/datastore_v1/service.rb +259 -0
  104. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  105. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  106. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  107. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  108. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  109. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  110. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  111. data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
  112. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  113. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  114. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  115. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  116. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  117. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  118. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  119. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  120. data/generated/google/apis/dns_v1.rb +1 -1
  121. data/generated/google/apis/dns_v1/classes.rb +1 -1
  122. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  123. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  124. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  125. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  126. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  127. data/generated/google/apis/drive_v2.rb +1 -1
  128. data/generated/google/apis/drive_v2/classes.rb +27 -3
  129. data/generated/google/apis/drive_v2/representations.rb +4 -0
  130. data/generated/google/apis/drive_v2/service.rb +16 -3
  131. data/generated/google/apis/drive_v3.rb +1 -1
  132. data/generated/google/apis/drive_v3/classes.rb +50 -16
  133. data/generated/google/apis/drive_v3/representations.rb +4 -0
  134. data/generated/google/apis/drive_v3/service.rb +12 -2
  135. data/generated/google/apis/fitness_v1.rb +8 -2
  136. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  137. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  138. data/generated/google/apis/fitness_v1/service.rb +17 -18
  139. data/generated/google/apis/fusiontables_v2.rb +1 -1
  140. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  141. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  142. data/generated/google/apis/games_management_v1management.rb +1 -1
  143. data/generated/google/apis/games_v1.rb +1 -1
  144. data/generated/google/apis/genomics_v1.rb +2 -4
  145. data/generated/google/apis/genomics_v1/classes.rb +143 -34
  146. data/generated/google/apis/genomics_v1/representations.rb +48 -11
  147. data/generated/google/apis/genomics_v1/service.rb +35 -37
  148. data/generated/google/apis/gmail_v1.rb +10 -1
  149. data/generated/google/apis/gmail_v1/classes.rb +542 -4
  150. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  151. data/generated/google/apis/gmail_v1/service.rb +898 -1
  152. data/generated/google/apis/groupssettings_v1.rb +1 -1
  153. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  154. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  155. data/generated/google/apis/iam_v1.rb +2 -2
  156. data/generated/google/apis/iam_v1/classes.rb +181 -206
  157. data/generated/google/apis/iam_v1/representations.rb +36 -45
  158. data/generated/google/apis/iam_v1/service.rb +101 -67
  159. data/generated/google/apis/identitytoolkit_v3.rb +4 -1
  160. data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
  161. data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
  162. data/generated/google/apis/language_v1beta1.rb +36 -0
  163. data/generated/google/apis/language_v1beta1/classes.rb +599 -0
  164. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  165. data/generated/google/apis/language_v1beta1/service.rb +152 -0
  166. data/generated/google/apis/logging_v2beta1.rb +6 -6
  167. data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
  168. data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
  169. data/generated/google/apis/logging_v2beta1/service.rb +290 -209
  170. data/generated/google/apis/mirror_v1.rb +2 -2
  171. data/generated/google/apis/mirror_v1/service.rb +1 -1
  172. data/generated/google/apis/monitoring_v3.rb +45 -0
  173. data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
  174. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  175. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  176. data/generated/google/apis/oauth2_v2.rb +1 -1
  177. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  178. data/generated/google/apis/plus_domains_v1.rb +1 -1
  179. data/generated/google/apis/plus_v1.rb +1 -1
  180. data/generated/google/apis/pubsub_v1.rb +1 -1
  181. data/generated/google/apis/pubsub_v1/classes.rb +10 -9
  182. data/generated/google/apis/pubsub_v1/service.rb +128 -27
  183. data/generated/google/apis/qpx_express_v1.rb +1 -1
  184. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  185. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  186. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  187. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  188. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  189. data/generated/google/apis/script_v1.rb +1 -1
  190. data/generated/google/apis/script_v1/classes.rb +6 -0
  191. data/generated/google/apis/script_v1/representations.rb +1 -0
  192. data/generated/google/apis/sheets_v4.rb +1 -1
  193. data/generated/google/apis/sheets_v4/classes.rb +910 -89
  194. data/generated/google/apis/sheets_v4/representations.rb +194 -10
  195. data/generated/google/apis/sheets_v4/service.rb +216 -49
  196. data/generated/google/apis/slides_v1.rb +49 -0
  197. data/generated/google/apis/slides_v1/classes.rb +3926 -0
  198. data/generated/google/apis/slides_v1/representations.rb +1722 -0
  199. data/generated/google/apis/slides_v1/service.rb +202 -0
  200. data/generated/google/apis/speech_v1beta1.rb +34 -0
  201. data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
  202. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  203. data/generated/google/apis/speech_v1beta1/service.rb +271 -0
  204. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  205. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
  206. data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
  207. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  208. data/generated/google/apis/storage_v1.rb +1 -1
  209. data/generated/google/apis/storage_v1/classes.rb +43 -18
  210. data/generated/google/apis/storage_v1/representations.rb +4 -1
  211. data/generated/google/apis/storage_v1/service.rb +5 -2
  212. data/generated/google/apis/translate_v2.rb +2 -2
  213. data/generated/google/apis/translate_v2/service.rb +1 -1
  214. data/generated/google/apis/vision_v1.rb +1 -1
  215. data/generated/google/apis/vision_v1/classes.rb +12 -11
  216. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  217. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  218. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  219. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  220. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  221. data/generated/google/apis/youtube_v3.rb +1 -1
  222. data/generated/google/apis/youtube_v3/classes.rb +183 -21
  223. data/generated/google/apis/youtube_v3/representations.rb +85 -4
  224. data/generated/google/apis/youtube_v3/service.rb +41 -5
  225. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  226. data/google-api-client.gemspec +2 -1
  227. data/lib/google/apis/core/api_command.rb +4 -0
  228. data/lib/google/apis/core/base_service.rb +10 -4
  229. data/lib/google/apis/core/download.rb +7 -2
  230. data/lib/google/apis/core/http_command.rb +5 -1
  231. data/lib/google/apis/core/upload.rb +7 -1
  232. data/lib/google/apis/errors.rb +2 -2
  233. data/lib/google/apis/generator/annotator.rb +6 -0
  234. data/lib/google/apis/version.rb +1 -1
  235. data/samples/cli/lib/samples/bigquery.rb +101 -0
  236. data/samples/cli/lib/samples/sheets.rb +61 -0
  237. data/sync.rb +71 -0
  238. metadata +55 -13
@@ -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,123 @@ 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
+
748
+ # Returns a unique token to access an embeddable UI. To generate a web UI, pass
749
+ # the generated token into the Play for Work javascript API. Each token may only
750
+ # be used to start one UI session. See the javascript API documentation for
751
+ # further information.
752
+ # @param [String] enterprise_id
753
+ # The ID of the enterprise.
754
+ # @param [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec] administrator_web_token_spec_object
755
+ # @param [String] fields
756
+ # Selector specifying which fields to include in a partial response.
757
+ # @param [String] quota_user
758
+ # Available to use for quota purposes for server-side applications. Can be any
759
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
760
+ # Overrides userIp if both are provided.
761
+ # @param [String] user_ip
762
+ # IP address of the site where the request originates. Use this if you want to
763
+ # enforce per-user limits.
764
+ # @param [Google::Apis::RequestOptions] options
765
+ # Request-specific options
766
+ #
767
+ # @yield [result, err] Result & error if block supplied
768
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AdministratorWebToken] parsed result object
769
+ # @yieldparam err [StandardError] error object if request failed
770
+ #
771
+ # @return [Google::Apis::AndroidenterpriseV1::AdministratorWebToken]
772
+ #
773
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
774
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
775
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
776
+ def create_enterprise_web_token(enterprise_id, administrator_web_token_spec_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
777
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/createWebToken', options)
778
+ command.request_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec::Representation
779
+ command.request_object = administrator_web_token_spec_object
780
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebToken::Representation
781
+ command.response_class = Google::Apis::AndroidenterpriseV1::AdministratorWebToken
782
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
783
+ command.query['fields'] = fields unless fields.nil?
784
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
785
+ command.query['userIp'] = user_ip unless user_ip.nil?
786
+ execute_or_queue_command(command, &block)
787
+ end
788
+
670
789
  # Deletes the binding between the EMM and enterprise. This is now deprecated;
671
790
  # use this to unenroll customers that were previously enrolled with the 'insert'
672
791
  # call, then enroll them again with the 'enroll' call.
@@ -740,6 +859,47 @@ module Google
740
859
  execute_or_queue_command(command, &block)
741
860
  end
742
861
 
862
+ # Generates a sign-up URL.
863
+ # @param [String] callback_url
864
+ # The callback URL to which the Admin will be redirected after successfully
865
+ # creating an enterprise. Before redirecting there the system will add a single
866
+ # query parameter to this URL named "enterpriseToken" which will contain an
867
+ # opaque token to be used for the CompleteSignup request.
868
+ # Beware that this means that the URL will be parsed, the parameter added and
869
+ # then a new URL formatted, i.e. there may be some minor formatting changes and,
870
+ # more importantly, the URL must be well-formed so that it can be parsed.
871
+ # @param [String] fields
872
+ # Selector specifying which fields to include in a partial response.
873
+ # @param [String] quota_user
874
+ # Available to use for quota purposes for server-side applications. Can be any
875
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
876
+ # Overrides userIp if both are provided.
877
+ # @param [String] user_ip
878
+ # IP address of the site where the request originates. Use this if you want to
879
+ # enforce per-user limits.
880
+ # @param [Google::Apis::RequestOptions] options
881
+ # Request-specific options
882
+ #
883
+ # @yield [result, err] Result & error if block supplied
884
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::SignupInfo] parsed result object
885
+ # @yieldparam err [StandardError] error object if request failed
886
+ #
887
+ # @return [Google::Apis::AndroidenterpriseV1::SignupInfo]
888
+ #
889
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
890
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
891
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
892
+ def generate_enterprise_signup_url(callback_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
893
+ command = make_simple_command(:post, 'enterprises/signupUrl', options)
894
+ command.response_representation = Google::Apis::AndroidenterpriseV1::SignupInfo::Representation
895
+ command.response_class = Google::Apis::AndroidenterpriseV1::SignupInfo
896
+ command.query['callbackUrl'] = callback_url unless callback_url.nil?
897
+ command.query['fields'] = fields unless fields.nil?
898
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
899
+ command.query['userIp'] = user_ip unless user_ip.nil?
900
+ execute_or_queue_command(command, &block)
901
+ end
902
+
743
903
  # Retrieves the name and domain of an enterprise.
744
904
  # @param [String] enterprise_id
745
905
  # The ID of the enterprise.
@@ -775,7 +935,56 @@ module Google
775
935
  execute_or_queue_command(command, &block)
776
936
  end
777
937
 
778
- # Returns the store layout resource.
938
+ # Returns a service account and credentials. The service account can be bound to
939
+ # the enterprise by calling setAccount. The service account is unique to this
940
+ # enterprise and EMM, and will be deleted if the enterprise is unbound. The
941
+ # credentials contain private key data and are not stored server-side.
942
+ # This method can only be called after calling Enterprises.Enroll or Enterprises.
943
+ # CompleteSignup, and before Enterprises.SetAccount; at other times it will
944
+ # return an error.
945
+ # Subsequent calls after the first will generate a new, unique set of
946
+ # credentials, and invalidate the previously generated credentials.
947
+ # Once the service account is bound to the enterprise, it can be managed using
948
+ # the serviceAccountKeys resource.
949
+ # @param [String] enterprise_id
950
+ # The ID of the enterprise.
951
+ # @param [String] key_type
952
+ # The type of credential to return with the service account. Required.
953
+ # @param [String] fields
954
+ # Selector specifying which fields to include in a partial response.
955
+ # @param [String] quota_user
956
+ # Available to use for quota purposes for server-side applications. Can be any
957
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
958
+ # Overrides userIp if both are provided.
959
+ # @param [String] user_ip
960
+ # IP address of the site where the request originates. Use this if you want to
961
+ # enforce per-user limits.
962
+ # @param [Google::Apis::RequestOptions] options
963
+ # Request-specific options
964
+ #
965
+ # @yield [result, err] Result & error if block supplied
966
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccount] parsed result object
967
+ # @yieldparam err [StandardError] error object if request failed
968
+ #
969
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccount]
970
+ #
971
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
972
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
973
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
974
+ def get_enterprise_service_account(enterprise_id, key_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
975
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/serviceAccount', options)
976
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccount::Representation
977
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccount
978
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
979
+ command.query['keyType'] = key_type unless key_type.nil?
980
+ command.query['fields'] = fields unless fields.nil?
981
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
982
+ command.query['userIp'] = user_ip unless user_ip.nil?
983
+ execute_or_queue_command(command, &block)
984
+ end
985
+
986
+ # Returns the store layout for the enterprise. If the store layout has not been
987
+ # set, or if the store layout has no homepageId set, returns a NOT_FOUND error.
779
988
  # @param [String] enterprise_id
780
989
  # The ID of the enterprise.
781
990
  # @param [String] fields
@@ -849,7 +1058,11 @@ module Google
849
1058
  execute_or_queue_command(command, &block)
850
1059
  end
851
1060
 
852
- # Looks up an enterprise by domain name.
1061
+ # Looks up an enterprise by domain name. This is only supported for enterprises
1062
+ # created via the Google-initiated creation flow. Lookup of the id is not needed
1063
+ # for enterprises created via the EMM-initiated flow since the EMM learns the
1064
+ # enterprise ID in the callback specified in the Enterprises.generateSignupUrl
1065
+ # call.
853
1066
  # @param [String] domain
854
1067
  # The exact primary domain name of the enterprise to look up.
855
1068
  # @param [String] fields
@@ -884,6 +1097,61 @@ module Google
884
1097
  execute_or_queue_command(command, &block)
885
1098
  end
886
1099
 
1100
+ # Pulls and returns a notification set for the enterprises associated with the
1101
+ # service account authenticated for the request. The notification set may be
1102
+ # empty if no notification are pending.
1103
+ # A notification set returned needs to be acknowledged within 20 seconds by
1104
+ # calling Enterprises​.AcknowledgeNotificationSet, unless the notification set
1105
+ # is empty.
1106
+ # Notifications that are not acknowledged within the 20 seconds will eventually
1107
+ # be included again in the response to another PullNotificationSet request, and
1108
+ # those that are never acknowledged will ultimately be deleted according to the
1109
+ # Google Cloud Platform Pub/Sub system policy.
1110
+ # Multiple requests might be performed concurrently to retrieve notifications,
1111
+ # in which case the pending notifications (if any) will be split among each
1112
+ # caller, if any are pending.
1113
+ # If no notifications are present, an empty notification list is returned.
1114
+ # Subsequent requests may return more notifications once they become available.
1115
+ # @param [String] request_mode
1116
+ # The request mode for pulling notifications.
1117
+ # Specifying waitForNotifications will cause the request to block and wait until
1118
+ # one or more notifications are present, or return an empty notification list if
1119
+ # no notifications are present after some time.
1120
+ # Speciying returnImmediately will cause the request to immediately return the
1121
+ # pending notifications, or an empty list if no notifications are present.
1122
+ # If omitted, defaults to waitForNotifications.
1123
+ # @param [String] fields
1124
+ # Selector specifying which fields to include in a partial response.
1125
+ # @param [String] quota_user
1126
+ # Available to use for quota purposes for server-side applications. Can be any
1127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1128
+ # Overrides userIp if both are provided.
1129
+ # @param [String] user_ip
1130
+ # IP address of the site where the request originates. Use this if you want to
1131
+ # enforce per-user limits.
1132
+ # @param [Google::Apis::RequestOptions] options
1133
+ # Request-specific options
1134
+ #
1135
+ # @yield [result, err] Result & error if block supplied
1136
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::NotificationSet] parsed result object
1137
+ # @yieldparam err [StandardError] error object if request failed
1138
+ #
1139
+ # @return [Google::Apis::AndroidenterpriseV1::NotificationSet]
1140
+ #
1141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1144
+ def pull_enterprise_notification_set(request_mode: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1145
+ command = make_simple_command(:post, 'enterprises/pullNotificationSet', options)
1146
+ command.response_representation = Google::Apis::AndroidenterpriseV1::NotificationSet::Representation
1147
+ command.response_class = Google::Apis::AndroidenterpriseV1::NotificationSet
1148
+ command.query['requestMode'] = request_mode unless request_mode.nil?
1149
+ command.query['fields'] = fields unless fields.nil?
1150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1151
+ command.query['userIp'] = user_ip unless user_ip.nil?
1152
+ execute_or_queue_command(command, &block)
1153
+ end
1154
+
887
1155
  # Sends a test push notification to validate the EMM integration with the Google
888
1156
  # Cloud Pub/Sub service for this enterprise.
889
1157
  # @param [String] enterprise_id
@@ -958,7 +1226,13 @@ module Google
958
1226
  execute_or_queue_command(command, &block)
959
1227
  end
960
1228
 
961
- # Sets the store layout resource.
1229
+ # Sets the store layout for the enterprise. By default, storeLayoutType is set
1230
+ # to "basic" and the basic store layout is enabled. The basic layout only
1231
+ # contains apps approved by the administrator, and that have been added to the
1232
+ # available product set for a user (using the setAvailableProductSet call).
1233
+ # Apps on the page are sorted in order of their product ID value. If you create
1234
+ # a custom store layout (by setting storeLayoutType = "custom"), the basic store
1235
+ # layout is disabled.
962
1236
  # @param [String] enterprise_id
963
1237
  # The ID of the enterprise.
964
1238
  # @param [Google::Apis::AndroidenterpriseV1::StoreLayout] store_layout_object
@@ -1591,12 +1865,16 @@ module Google
1591
1865
  execute_or_queue_command(command, &block)
1592
1866
  end
1593
1867
 
1594
- # Retrieves details of an Android app permission for display to an enterprise
1595
- # admin.
1596
- # @param [String] permission_id
1597
- # The ID of the permission.
1598
- # @param [String] language
1599
- # The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
1868
+ # Removes a per-device managed configuration for an app for the specified device.
1869
+ # @param [String] enterprise_id
1870
+ # The ID of the enterprise.
1871
+ # @param [String] user_id
1872
+ # The ID of the user.
1873
+ # @param [String] device_id
1874
+ # The Android ID of the device.
1875
+ # @param [String] managed_configuration_for_device_id
1876
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1877
+ # android.gm".
1600
1878
  # @param [String] fields
1601
1879
  # Selector specifying which fields to include in a partial response.
1602
1880
  # @param [String] quota_user
@@ -1610,36 +1888,36 @@ module Google
1610
1888
  # Request-specific options
1611
1889
  #
1612
1890
  # @yield [result, err] Result & error if block supplied
1613
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::Permission] parsed result object
1891
+ # @yieldparam result [NilClass] No result returned for this method
1614
1892
  # @yieldparam err [StandardError] error object if request failed
1615
1893
  #
1616
- # @return [Google::Apis::AndroidenterpriseV1::Permission]
1894
+ # @return [void]
1617
1895
  #
1618
1896
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1619
1897
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1620
1898
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1621
- def get_permission(permission_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1622
- command = make_simple_command(:get, 'permissions/{permissionId}', options)
1623
- command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation
1624
- command.response_class = Google::Apis::AndroidenterpriseV1::Permission
1625
- command.params['permissionId'] = permission_id unless permission_id.nil?
1626
- command.query['language'] = language unless language.nil?
1899
+ def delete_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1900
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
1901
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1902
+ command.params['userId'] = user_id unless user_id.nil?
1903
+ command.params['deviceId'] = device_id unless device_id.nil?
1904
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1627
1905
  command.query['fields'] = fields unless fields.nil?
1628
1906
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1629
1907
  command.query['userIp'] = user_ip unless user_ip.nil?
1630
1908
  execute_or_queue_command(command, &block)
1631
1909
  end
1632
1910
 
1633
- # Approves the specified product and the relevant app permissions, if any. The
1634
- # maximum number of products that you can approve per enterprise customer is 1,
1635
- # 000.
1636
- # To learn how to use Google Play for Work to design and create a store layout
1637
- # to display approved products to your users, see Store Layout Design.
1911
+ # Retrieves details of a per-device managed configuration.
1638
1912
  # @param [String] enterprise_id
1639
1913
  # The ID of the enterprise.
1640
- # @param [String] product_id
1641
- # The ID of the product.
1642
- # @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_request_object
1914
+ # @param [String] user_id
1915
+ # The ID of the user.
1916
+ # @param [String] device_id
1917
+ # The Android ID of the device.
1918
+ # @param [String] managed_configuration_for_device_id
1919
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1920
+ # android.gm".
1643
1921
  # @param [String] fields
1644
1922
  # Selector specifying which fields to include in a partial response.
1645
1923
  # @param [String] quota_user
@@ -1653,41 +1931,36 @@ module Google
1653
1931
  # Request-specific options
1654
1932
  #
1655
1933
  # @yield [result, err] Result & error if block supplied
1656
- # @yieldparam result [NilClass] No result returned for this method
1934
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1657
1935
  # @yieldparam err [StandardError] error object if request failed
1658
1936
  #
1659
- # @return [void]
1937
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1660
1938
  #
1661
1939
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1662
1940
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1663
1941
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1664
- def approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1665
- command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/approve', options)
1666
- command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation
1667
- command.request_object = approve_product_request_object
1942
+ def get_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1943
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
1944
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1945
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1668
1946
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1669
- command.params['productId'] = product_id unless product_id.nil?
1947
+ command.params['userId'] = user_id unless user_id.nil?
1948
+ command.params['deviceId'] = device_id unless device_id.nil?
1949
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1670
1950
  command.query['fields'] = fields unless fields.nil?
1671
1951
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1672
1952
  command.query['userIp'] = user_ip unless user_ip.nil?
1673
1953
  execute_or_queue_command(command, &block)
1674
1954
  end
1675
1955
 
1676
- # Generates a URL that can be rendered in an iframe to display the permissions (
1677
- # if any) of a product. An enterprise admin must view these permissions and
1678
- # accept them on behalf of their organization in order to approve that product.
1679
- # Admins should accept the displayed permissions by interacting with a separate
1680
- # UI element in the EMM console, which in turn should trigger the use of this
1681
- # URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to
1682
- # approve the product. This URL can only be used to display permissions for up
1683
- # to 1 day.
1956
+ # Lists all the per-device managed configurations for the specified device. Only
1957
+ # the ID is set.
1684
1958
  # @param [String] enterprise_id
1685
1959
  # The ID of the enterprise.
1686
- # @param [String] product_id
1687
- # The ID of the product.
1688
- # @param [String] language_code
1689
- # The BCP 47 language code used for permission names and descriptions in the
1690
- # returned iframe, for instance "en-US".
1960
+ # @param [String] user_id
1961
+ # The ID of the user.
1962
+ # @param [String] device_id
1963
+ # The Android ID of the device.
1691
1964
  # @param [String] fields
1692
1965
  # Selector specifying which fields to include in a partial response.
1693
1966
  # @param [String] quota_user
@@ -1701,34 +1974,39 @@ module Google
1701
1974
  # Request-specific options
1702
1975
  #
1703
1976
  # @yield [result, err] Result & error if block supplied
1704
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object
1977
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse] parsed result object
1705
1978
  # @yieldparam err [StandardError] error object if request failed
1706
1979
  #
1707
- # @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse]
1980
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse]
1708
1981
  #
1709
1982
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1710
1983
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1711
1984
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1712
- def generate_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1713
- command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl', options)
1714
- command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation
1715
- command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse
1985
+ def list_managedconfigurationsfordevices(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1986
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice', options)
1987
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse::Representation
1988
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse
1716
1989
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1717
- command.params['productId'] = product_id unless product_id.nil?
1718
- command.query['languageCode'] = language_code unless language_code.nil?
1990
+ command.params['userId'] = user_id unless user_id.nil?
1991
+ command.params['deviceId'] = device_id unless device_id.nil?
1719
1992
  command.query['fields'] = fields unless fields.nil?
1720
1993
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1721
1994
  command.query['userIp'] = user_ip unless user_ip.nil?
1722
1995
  execute_or_queue_command(command, &block)
1723
1996
  end
1724
1997
 
1725
- # Retrieves details of a product for display to an enterprise admin.
1998
+ # Adds or updates a per-device managed configuration for an app for the
1999
+ # specified device. This method supports patch semantics.
1726
2000
  # @param [String] enterprise_id
1727
2001
  # The ID of the enterprise.
1728
- # @param [String] product_id
1729
- # The ID of the product, e.g. "app:com.google.android.gm".
1730
- # @param [String] language
1731
- # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
2002
+ # @param [String] user_id
2003
+ # The ID of the user.
2004
+ # @param [String] device_id
2005
+ # The Android ID of the device.
2006
+ # @param [String] managed_configuration_for_device_id
2007
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2008
+ # android.gm".
2009
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
1732
2010
  # @param [String] fields
1733
2011
  # Selector specifying which fields to include in a partial response.
1734
2012
  # @param [String] quota_user
@@ -1742,34 +2020,475 @@ module Google
1742
2020
  # Request-specific options
1743
2021
  #
1744
2022
  # @yield [result, err] Result & error if block supplied
1745
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::Product] parsed result object
2023
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1746
2024
  # @yieldparam err [StandardError] error object if request failed
1747
2025
  #
1748
- # @return [Google::Apis::AndroidenterpriseV1::Product]
2026
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1749
2027
  #
1750
2028
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1751
2029
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1752
2030
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1753
- def get_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1754
- command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}', options)
1755
- command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation
1756
- command.response_class = Google::Apis::AndroidenterpriseV1::Product
2031
+ def patch_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, managed_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2032
+ command = make_simple_command(:patch, 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
2033
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2034
+ command.request_object = managed_configuration_object
2035
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2036
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1757
2037
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1758
- command.params['productId'] = product_id unless product_id.nil?
1759
- command.query['language'] = language unless language.nil?
2038
+ command.params['userId'] = user_id unless user_id.nil?
2039
+ command.params['deviceId'] = device_id unless device_id.nil?
2040
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1760
2041
  command.query['fields'] = fields unless fields.nil?
1761
2042
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1762
2043
  command.query['userIp'] = user_ip unless user_ip.nil?
1763
2044
  execute_or_queue_command(command, &block)
1764
2045
  end
1765
2046
 
1766
- # Retrieves the schema defining app restrictions configurable for this product.
1767
- # All products have a schema, but this may be empty if no app restrictions are
1768
- # defined.
2047
+ # Adds or updates a per-device managed configuration for an app for the
2048
+ # specified device.
1769
2049
  # @param [String] enterprise_id
1770
2050
  # The ID of the enterprise.
1771
- # @param [String] product_id
1772
- # The ID of the product.
2051
+ # @param [String] user_id
2052
+ # The ID of the user.
2053
+ # @param [String] device_id
2054
+ # The Android ID of the device.
2055
+ # @param [String] managed_configuration_for_device_id
2056
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2057
+ # android.gm".
2058
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
2059
+ # @param [String] fields
2060
+ # Selector specifying which fields to include in a partial response.
2061
+ # @param [String] quota_user
2062
+ # Available to use for quota purposes for server-side applications. Can be any
2063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2064
+ # Overrides userIp if both are provided.
2065
+ # @param [String] user_ip
2066
+ # IP address of the site where the request originates. Use this if you want to
2067
+ # enforce per-user limits.
2068
+ # @param [Google::Apis::RequestOptions] options
2069
+ # Request-specific options
2070
+ #
2071
+ # @yield [result, err] Result & error if block supplied
2072
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
2073
+ # @yieldparam err [StandardError] error object if request failed
2074
+ #
2075
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
2076
+ #
2077
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2078
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2079
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2080
+ def update_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, managed_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2081
+ command = make_simple_command(:put, 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
2082
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2083
+ command.request_object = managed_configuration_object
2084
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2085
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
2086
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2087
+ command.params['userId'] = user_id unless user_id.nil?
2088
+ command.params['deviceId'] = device_id unless device_id.nil?
2089
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
2090
+ command.query['fields'] = fields unless fields.nil?
2091
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2092
+ command.query['userIp'] = user_ip unless user_ip.nil?
2093
+ execute_or_queue_command(command, &block)
2094
+ end
2095
+
2096
+ # Removes a per-user managed configuration for an app for the specified user.
2097
+ # @param [String] enterprise_id
2098
+ # The ID of the enterprise.
2099
+ # @param [String] user_id
2100
+ # The ID of the user.
2101
+ # @param [String] managed_configuration_for_user_id
2102
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2103
+ # android.gm".
2104
+ # @param [String] fields
2105
+ # Selector specifying which fields to include in a partial response.
2106
+ # @param [String] quota_user
2107
+ # Available to use for quota purposes for server-side applications. Can be any
2108
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2109
+ # Overrides userIp if both are provided.
2110
+ # @param [String] user_ip
2111
+ # IP address of the site where the request originates. Use this if you want to
2112
+ # enforce per-user limits.
2113
+ # @param [Google::Apis::RequestOptions] options
2114
+ # Request-specific options
2115
+ #
2116
+ # @yield [result, err] Result & error if block supplied
2117
+ # @yieldparam result [NilClass] No result returned for this method
2118
+ # @yieldparam err [StandardError] error object if request failed
2119
+ #
2120
+ # @return [void]
2121
+ #
2122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2125
+ def delete_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2126
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2127
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2128
+ command.params['userId'] = user_id unless user_id.nil?
2129
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
2130
+ command.query['fields'] = fields unless fields.nil?
2131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2132
+ command.query['userIp'] = user_ip unless user_ip.nil?
2133
+ execute_or_queue_command(command, &block)
2134
+ end
2135
+
2136
+ # Retrieves details of a per-user managed configuration for an app for the
2137
+ # specified user.
2138
+ # @param [String] enterprise_id
2139
+ # The ID of the enterprise.
2140
+ # @param [String] user_id
2141
+ # The ID of the user.
2142
+ # @param [String] managed_configuration_for_user_id
2143
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2144
+ # android.gm".
2145
+ # @param [String] fields
2146
+ # Selector specifying which fields to include in a partial response.
2147
+ # @param [String] quota_user
2148
+ # Available to use for quota purposes for server-side applications. Can be any
2149
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2150
+ # Overrides userIp if both are provided.
2151
+ # @param [String] user_ip
2152
+ # IP address of the site where the request originates. Use this if you want to
2153
+ # enforce per-user limits.
2154
+ # @param [Google::Apis::RequestOptions] options
2155
+ # Request-specific options
2156
+ #
2157
+ # @yield [result, err] Result & error if block supplied
2158
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
2159
+ # @yieldparam err [StandardError] error object if request failed
2160
+ #
2161
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
2162
+ #
2163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2166
+ def get_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2167
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2168
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2169
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
2170
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2171
+ command.params['userId'] = user_id unless user_id.nil?
2172
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
2173
+ command.query['fields'] = fields unless fields.nil?
2174
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2175
+ command.query['userIp'] = user_ip unless user_ip.nil?
2176
+ execute_or_queue_command(command, &block)
2177
+ end
2178
+
2179
+ # Lists all the per-user managed configurations for the specified user. Only the
2180
+ # ID is set.
2181
+ # @param [String] enterprise_id
2182
+ # The ID of the enterprise.
2183
+ # @param [String] user_id
2184
+ # The ID of the user.
2185
+ # @param [String] fields
2186
+ # Selector specifying which fields to include in a partial response.
2187
+ # @param [String] quota_user
2188
+ # Available to use for quota purposes for server-side applications. Can be any
2189
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2190
+ # Overrides userIp if both are provided.
2191
+ # @param [String] user_ip
2192
+ # IP address of the site where the request originates. Use this if you want to
2193
+ # enforce per-user limits.
2194
+ # @param [Google::Apis::RequestOptions] options
2195
+ # Request-specific options
2196
+ #
2197
+ # @yield [result, err] Result & error if block supplied
2198
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse] parsed result object
2199
+ # @yieldparam err [StandardError] error object if request failed
2200
+ #
2201
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse]
2202
+ #
2203
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2204
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2205
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2206
+ def list_managedconfigurationsforusers(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2207
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser', options)
2208
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse::Representation
2209
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse
2210
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2211
+ command.params['userId'] = user_id unless user_id.nil?
2212
+ command.query['fields'] = fields unless fields.nil?
2213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2214
+ command.query['userIp'] = user_ip unless user_ip.nil?
2215
+ execute_or_queue_command(command, &block)
2216
+ end
2217
+
2218
+ # Adds or updates a per-user managed configuration for an app for the specified
2219
+ # user. This method supports patch semantics.
2220
+ # @param [String] enterprise_id
2221
+ # The ID of the enterprise.
2222
+ # @param [String] user_id
2223
+ # The ID of the user.
2224
+ # @param [String] managed_configuration_for_user_id
2225
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2226
+ # android.gm".
2227
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
2228
+ # @param [String] fields
2229
+ # Selector specifying which fields to include in a partial response.
2230
+ # @param [String] quota_user
2231
+ # Available to use for quota purposes for server-side applications. Can be any
2232
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2233
+ # Overrides userIp if both are provided.
2234
+ # @param [String] user_ip
2235
+ # IP address of the site where the request originates. Use this if you want to
2236
+ # enforce per-user limits.
2237
+ # @param [Google::Apis::RequestOptions] options
2238
+ # Request-specific options
2239
+ #
2240
+ # @yield [result, err] Result & error if block supplied
2241
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
2242
+ # @yieldparam err [StandardError] error object if request failed
2243
+ #
2244
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
2245
+ #
2246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2249
+ def patch_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, managed_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2250
+ command = make_simple_command(:patch, 'enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2251
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2252
+ command.request_object = managed_configuration_object
2253
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2254
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
2255
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2256
+ command.params['userId'] = user_id unless user_id.nil?
2257
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
2258
+ command.query['fields'] = fields unless fields.nil?
2259
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2260
+ command.query['userIp'] = user_ip unless user_ip.nil?
2261
+ execute_or_queue_command(command, &block)
2262
+ end
2263
+
2264
+ # Adds or updates a per-user managed configuration for an app for the specified
2265
+ # user.
2266
+ # @param [String] enterprise_id
2267
+ # The ID of the enterprise.
2268
+ # @param [String] user_id
2269
+ # The ID of the user.
2270
+ # @param [String] managed_configuration_for_user_id
2271
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
2272
+ # android.gm".
2273
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
2274
+ # @param [String] fields
2275
+ # Selector specifying which fields to include in a partial response.
2276
+ # @param [String] quota_user
2277
+ # Available to use for quota purposes for server-side applications. Can be any
2278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2279
+ # Overrides userIp if both are provided.
2280
+ # @param [String] user_ip
2281
+ # IP address of the site where the request originates. Use this if you want to
2282
+ # enforce per-user limits.
2283
+ # @param [Google::Apis::RequestOptions] options
2284
+ # Request-specific options
2285
+ #
2286
+ # @yield [result, err] Result & error if block supplied
2287
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
2288
+ # @yieldparam err [StandardError] error object if request failed
2289
+ #
2290
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
2291
+ #
2292
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2293
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2294
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2295
+ def update_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, managed_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2296
+ command = make_simple_command(:put, 'enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
2297
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2298
+ command.request_object = managed_configuration_object
2299
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
2300
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
2301
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2302
+ command.params['userId'] = user_id unless user_id.nil?
2303
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
2304
+ command.query['fields'] = fields unless fields.nil?
2305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2306
+ command.query['userIp'] = user_ip unless user_ip.nil?
2307
+ execute_or_queue_command(command, &block)
2308
+ end
2309
+
2310
+ # Retrieves details of an Android app permission for display to an enterprise
2311
+ # admin.
2312
+ # @param [String] permission_id
2313
+ # The ID of the permission.
2314
+ # @param [String] language
2315
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
2316
+ # @param [String] fields
2317
+ # Selector specifying which fields to include in a partial response.
2318
+ # @param [String] quota_user
2319
+ # Available to use for quota purposes for server-side applications. Can be any
2320
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2321
+ # Overrides userIp if both are provided.
2322
+ # @param [String] user_ip
2323
+ # IP address of the site where the request originates. Use this if you want to
2324
+ # enforce per-user limits.
2325
+ # @param [Google::Apis::RequestOptions] options
2326
+ # Request-specific options
2327
+ #
2328
+ # @yield [result, err] Result & error if block supplied
2329
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Permission] parsed result object
2330
+ # @yieldparam err [StandardError] error object if request failed
2331
+ #
2332
+ # @return [Google::Apis::AndroidenterpriseV1::Permission]
2333
+ #
2334
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2335
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2336
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2337
+ def get_permission(permission_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2338
+ command = make_simple_command(:get, 'permissions/{permissionId}', options)
2339
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation
2340
+ command.response_class = Google::Apis::AndroidenterpriseV1::Permission
2341
+ command.params['permissionId'] = permission_id unless permission_id.nil?
2342
+ command.query['language'] = language unless language.nil?
2343
+ command.query['fields'] = fields unless fields.nil?
2344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2345
+ command.query['userIp'] = user_ip unless user_ip.nil?
2346
+ execute_or_queue_command(command, &block)
2347
+ end
2348
+
2349
+ # Approves the specified product and the relevant app permissions, if any. The
2350
+ # maximum number of products that you can approve per enterprise customer is 1,
2351
+ # 000.
2352
+ # To learn how to use Google Play for Work to design and create a store layout
2353
+ # to display approved products to your users, see Store Layout Design.
2354
+ # @param [String] enterprise_id
2355
+ # The ID of the enterprise.
2356
+ # @param [String] product_id
2357
+ # The ID of the product.
2358
+ # @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_request_object
2359
+ # @param [String] fields
2360
+ # Selector specifying which fields to include in a partial response.
2361
+ # @param [String] quota_user
2362
+ # Available to use for quota purposes for server-side applications. Can be any
2363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2364
+ # Overrides userIp if both are provided.
2365
+ # @param [String] user_ip
2366
+ # IP address of the site where the request originates. Use this if you want to
2367
+ # enforce per-user limits.
2368
+ # @param [Google::Apis::RequestOptions] options
2369
+ # Request-specific options
2370
+ #
2371
+ # @yield [result, err] Result & error if block supplied
2372
+ # @yieldparam result [NilClass] No result returned for this method
2373
+ # @yieldparam err [StandardError] error object if request failed
2374
+ #
2375
+ # @return [void]
2376
+ #
2377
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2378
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2379
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2380
+ def approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2381
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/approve', options)
2382
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation
2383
+ command.request_object = approve_product_request_object
2384
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2385
+ command.params['productId'] = product_id unless product_id.nil?
2386
+ command.query['fields'] = fields unless fields.nil?
2387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2388
+ command.query['userIp'] = user_ip unless user_ip.nil?
2389
+ execute_or_queue_command(command, &block)
2390
+ end
2391
+
2392
+ # Generates a URL that can be rendered in an iframe to display the permissions (
2393
+ # if any) of a product. An enterprise admin must view these permissions and
2394
+ # accept them on behalf of their organization in order to approve that product.
2395
+ # Admins should accept the displayed permissions by interacting with a separate
2396
+ # UI element in the EMM console, which in turn should trigger the use of this
2397
+ # URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to
2398
+ # approve the product. This URL can only be used to display permissions for up
2399
+ # to 1 day.
2400
+ # @param [String] enterprise_id
2401
+ # The ID of the enterprise.
2402
+ # @param [String] product_id
2403
+ # The ID of the product.
2404
+ # @param [String] language_code
2405
+ # The BCP 47 language code used for permission names and descriptions in the
2406
+ # returned iframe, for instance "en-US".
2407
+ # @param [String] fields
2408
+ # Selector specifying which fields to include in a partial response.
2409
+ # @param [String] quota_user
2410
+ # Available to use for quota purposes for server-side applications. Can be any
2411
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2412
+ # Overrides userIp if both are provided.
2413
+ # @param [String] user_ip
2414
+ # IP address of the site where the request originates. Use this if you want to
2415
+ # enforce per-user limits.
2416
+ # @param [Google::Apis::RequestOptions] options
2417
+ # Request-specific options
2418
+ #
2419
+ # @yield [result, err] Result & error if block supplied
2420
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object
2421
+ # @yieldparam err [StandardError] error object if request failed
2422
+ #
2423
+ # @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse]
2424
+ #
2425
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2426
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2427
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2428
+ def generate_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2429
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl', options)
2430
+ command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation
2431
+ command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse
2432
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2433
+ command.params['productId'] = product_id unless product_id.nil?
2434
+ command.query['languageCode'] = language_code unless language_code.nil?
2435
+ command.query['fields'] = fields unless fields.nil?
2436
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2437
+ command.query['userIp'] = user_ip unless user_ip.nil?
2438
+ execute_or_queue_command(command, &block)
2439
+ end
2440
+
2441
+ # Retrieves details of a product for display to an enterprise admin.
2442
+ # @param [String] enterprise_id
2443
+ # The ID of the enterprise.
2444
+ # @param [String] product_id
2445
+ # The ID of the product, e.g. "app:com.google.android.gm".
2446
+ # @param [String] language
2447
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
2448
+ # @param [String] fields
2449
+ # Selector specifying which fields to include in a partial response.
2450
+ # @param [String] quota_user
2451
+ # Available to use for quota purposes for server-side applications. Can be any
2452
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2453
+ # Overrides userIp if both are provided.
2454
+ # @param [String] user_ip
2455
+ # IP address of the site where the request originates. Use this if you want to
2456
+ # enforce per-user limits.
2457
+ # @param [Google::Apis::RequestOptions] options
2458
+ # Request-specific options
2459
+ #
2460
+ # @yield [result, err] Result & error if block supplied
2461
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Product] parsed result object
2462
+ # @yieldparam err [StandardError] error object if request failed
2463
+ #
2464
+ # @return [Google::Apis::AndroidenterpriseV1::Product]
2465
+ #
2466
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2467
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2468
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2469
+ def get_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2470
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}', options)
2471
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation
2472
+ command.response_class = Google::Apis::AndroidenterpriseV1::Product
2473
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2474
+ command.params['productId'] = product_id unless product_id.nil?
2475
+ command.query['language'] = language unless language.nil?
2476
+ command.query['fields'] = fields unless fields.nil?
2477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2478
+ command.query['userIp'] = user_ip unless user_ip.nil?
2479
+ execute_or_queue_command(command, &block)
2480
+ end
2481
+
2482
+ # Retrieves the schema that defines the configurable properties for this product.
2483
+ # All products have a schema, but this schema may be empty if no managed
2484
+ # configurations have been defined. This schema can be used to populate a UI
2485
+ # that allows an administrator to configure the product. To apply a managed
2486
+ # configuration based on the schema obtained using this API, see Managed
2487
+ # Configurations through Play.
2488
+ # @param [String] enterprise_id
2489
+ # The ID of the enterprise.
2490
+ # @param [String] product_id
2491
+ # The ID of the product.
1773
2492
  # @param [String] language
1774
2493
  # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
1775
2494
  # @param [String] fields
@@ -1785,32 +2504,215 @@ module Google
1785
2504
  # Request-specific options
1786
2505
  #
1787
2506
  # @yield [result, err] Result & error if block supplied
1788
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object
2507
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object
2508
+ # @yieldparam err [StandardError] error object if request failed
2509
+ #
2510
+ # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema]
2511
+ #
2512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2515
+ def get_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2516
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema', options)
2517
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation
2518
+ command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema
2519
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2520
+ command.params['productId'] = product_id unless product_id.nil?
2521
+ command.query['language'] = language unless language.nil?
2522
+ command.query['fields'] = fields unless fields.nil?
2523
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2524
+ command.query['userIp'] = user_ip unless user_ip.nil?
2525
+ execute_or_queue_command(command, &block)
2526
+ end
2527
+
2528
+ # Retrieves the Android app permissions required by this app.
2529
+ # @param [String] enterprise_id
2530
+ # The ID of the enterprise.
2531
+ # @param [String] product_id
2532
+ # The ID of the product.
2533
+ # @param [String] fields
2534
+ # Selector specifying which fields to include in a partial response.
2535
+ # @param [String] quota_user
2536
+ # Available to use for quota purposes for server-side applications. Can be any
2537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2538
+ # Overrides userIp if both are provided.
2539
+ # @param [String] user_ip
2540
+ # IP address of the site where the request originates. Use this if you want to
2541
+ # enforce per-user limits.
2542
+ # @param [Google::Apis::RequestOptions] options
2543
+ # Request-specific options
2544
+ #
2545
+ # @yield [result, err] Result & error if block supplied
2546
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
2547
+ # @yieldparam err [StandardError] error object if request failed
2548
+ #
2549
+ # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
2550
+ #
2551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2554
+ def get_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2555
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}/permissions', options)
2556
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
2557
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
2558
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2559
+ command.params['productId'] = product_id unless product_id.nil?
2560
+ command.query['fields'] = fields unless fields.nil?
2561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2562
+ command.query['userIp'] = user_ip unless user_ip.nil?
2563
+ execute_or_queue_command(command, &block)
2564
+ end
2565
+
2566
+ # Finds approved products that match a query, or all approved products if there
2567
+ # is no query.
2568
+ # @param [String] enterprise_id
2569
+ # The ID of the enterprise.
2570
+ # @param [Boolean] approved
2571
+ # Specifies whether to search among all products (false) or among only products
2572
+ # that have been approved (true). Only "true" is supported, and should be
2573
+ # specified.
2574
+ # @param [String] language
2575
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results
2576
+ # are returned in the language best matching the preferred language.
2577
+ # @param [Fixnum] max_results
2578
+ # Specifies the maximum number of products that can be returned per request. If
2579
+ # not specified, uses a default value of 100, which is also the maximum
2580
+ # retrievable within a single response.
2581
+ # @param [String] query
2582
+ # The search query as typed in the Google Play Store search box. If omitted, all
2583
+ # approved apps will be returned (using the pagination parameters), including
2584
+ # apps that are not available in the store (e.g. unpublished apps).
2585
+ # @param [String] token
2586
+ # A pagination token is contained in a request’s response when there are more
2587
+ # products. The token can be used in a subsequent request to obtain more
2588
+ # products, and so forth. This parameter cannot be used in the initial request.
2589
+ # @param [String] fields
2590
+ # Selector specifying which fields to include in a partial response.
2591
+ # @param [String] quota_user
2592
+ # Available to use for quota purposes for server-side applications. Can be any
2593
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2594
+ # Overrides userIp if both are provided.
2595
+ # @param [String] user_ip
2596
+ # IP address of the site where the request originates. Use this if you want to
2597
+ # enforce per-user limits.
2598
+ # @param [Google::Apis::RequestOptions] options
2599
+ # Request-specific options
2600
+ #
2601
+ # @yield [result, err] Result & error if block supplied
2602
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductsListResponse] parsed result object
2603
+ # @yieldparam err [StandardError] error object if request failed
2604
+ #
2605
+ # @return [Google::Apis::AndroidenterpriseV1::ProductsListResponse]
2606
+ #
2607
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2608
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2609
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2610
+ def list_products(enterprise_id, approved: nil, language: nil, max_results: nil, query: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2611
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/products', options)
2612
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductsListResponse::Representation
2613
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductsListResponse
2614
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2615
+ command.query['approved'] = approved unless approved.nil?
2616
+ command.query['language'] = language unless language.nil?
2617
+ command.query['maxResults'] = max_results unless max_results.nil?
2618
+ command.query['query'] = query unless query.nil?
2619
+ command.query['token'] = token unless token.nil?
2620
+ command.query['fields'] = fields unless fields.nil?
2621
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2622
+ command.query['userIp'] = user_ip unless user_ip.nil?
2623
+ execute_or_queue_command(command, &block)
2624
+ end
2625
+
2626
+ # Unapproves the specified product (and the relevant app permissions, if any)
2627
+ # @param [String] enterprise_id
2628
+ # The ID of the enterprise.
2629
+ # @param [String] product_id
2630
+ # The ID of the product.
2631
+ # @param [String] fields
2632
+ # Selector specifying which fields to include in a partial response.
2633
+ # @param [String] quota_user
2634
+ # Available to use for quota purposes for server-side applications. Can be any
2635
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2636
+ # Overrides userIp if both are provided.
2637
+ # @param [String] user_ip
2638
+ # IP address of the site where the request originates. Use this if you want to
2639
+ # enforce per-user limits.
2640
+ # @param [Google::Apis::RequestOptions] options
2641
+ # Request-specific options
2642
+ #
2643
+ # @yield [result, err] Result & error if block supplied
2644
+ # @yieldparam result [NilClass] No result returned for this method
2645
+ # @yieldparam err [StandardError] error object if request failed
2646
+ #
2647
+ # @return [void]
2648
+ #
2649
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2650
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2651
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2652
+ def unapprove_product(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2653
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/products/{productId}/unapprove', options)
2654
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2655
+ command.params['productId'] = product_id unless product_id.nil?
2656
+ command.query['fields'] = fields unless fields.nil?
2657
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2658
+ command.query['userIp'] = user_ip unless user_ip.nil?
2659
+ execute_or_queue_command(command, &block)
2660
+ end
2661
+
2662
+ # This method has been deprecated. To programmatically approve applications, you
2663
+ # must use the iframe mechanism via the generateApprovalUrl and approve
2664
+ # methods of the Products resource. For more information, see the Play EMM API
2665
+ # usage requirements.
2666
+ # The updatePermissions method (deprecated) updates the set of Android app
2667
+ # permissions for this app that have been accepted by the enterprise.
2668
+ # @param [String] enterprise_id
2669
+ # The ID of the enterprise.
2670
+ # @param [String] product_id
2671
+ # The ID of the product.
2672
+ # @param [Google::Apis::AndroidenterpriseV1::ProductPermissions] product_permissions_object
2673
+ # @param [String] fields
2674
+ # Selector specifying which fields to include in a partial response.
2675
+ # @param [String] quota_user
2676
+ # Available to use for quota purposes for server-side applications. Can be any
2677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2678
+ # Overrides userIp if both are provided.
2679
+ # @param [String] user_ip
2680
+ # IP address of the site where the request originates. Use this if you want to
2681
+ # enforce per-user limits.
2682
+ # @param [Google::Apis::RequestOptions] options
2683
+ # Request-specific options
2684
+ #
2685
+ # @yield [result, err] Result & error if block supplied
2686
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
1789
2687
  # @yieldparam err [StandardError] error object if request failed
1790
2688
  #
1791
- # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema]
2689
+ # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
1792
2690
  #
1793
2691
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1794
2692
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1795
2693
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1796
- def get_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1797
- command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema', options)
1798
- command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation
1799
- command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema
2694
+ def update_product_permissions(enterprise_id, product_id, product_permissions_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2695
+ command = make_simple_command(:put, 'enterprises/{enterpriseId}/products/{productId}/permissions', options)
2696
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
2697
+ command.request_object = product_permissions_object
2698
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
2699
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
1800
2700
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1801
2701
  command.params['productId'] = product_id unless product_id.nil?
1802
- command.query['language'] = language unless language.nil?
1803
2702
  command.query['fields'] = fields unless fields.nil?
1804
2703
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1805
2704
  command.query['userIp'] = user_ip unless user_ip.nil?
1806
2705
  execute_or_queue_command(command, &block)
1807
2706
  end
1808
2707
 
1809
- # Retrieves the Android app permissions required by this app.
2708
+ # Removes and invalidates the specified credentials for the service account
2709
+ # associated with this enterprise. The calling service account must have been
2710
+ # retrieved by calling Enterprises.GetServiceAccount and must have been set as
2711
+ # the enterprise service account by calling Enterprises.SetAccount.
1810
2712
  # @param [String] enterprise_id
1811
2713
  # The ID of the enterprise.
1812
- # @param [String] product_id
1813
- # The ID of the product.
2714
+ # @param [String] key_id
2715
+ # The ID of the key.
1814
2716
  # @param [String] fields
1815
2717
  # Selector specifying which fields to include in a partial response.
1816
2718
  # @param [String] quota_user
@@ -1824,47 +2726,32 @@ module Google
1824
2726
  # Request-specific options
1825
2727
  #
1826
2728
  # @yield [result, err] Result & error if block supplied
1827
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
2729
+ # @yieldparam result [NilClass] No result returned for this method
1828
2730
  # @yieldparam err [StandardError] error object if request failed
1829
2731
  #
1830
- # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
2732
+ # @return [void]
1831
2733
  #
1832
2734
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1833
2735
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1834
2736
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1835
- def get_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1836
- command = make_simple_command(:get, 'enterprises/{enterpriseId}/products/{productId}/permissions', options)
1837
- command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1838
- command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
2737
+ def delete_serviceaccountkey(enterprise_id, key_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2738
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/serviceAccountKeys/{keyId}', options)
1839
2739
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1840
- command.params['productId'] = product_id unless product_id.nil?
2740
+ command.params['keyId'] = key_id unless key_id.nil?
1841
2741
  command.query['fields'] = fields unless fields.nil?
1842
2742
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1843
2743
  command.query['userIp'] = user_ip unless user_ip.nil?
1844
2744
  execute_or_queue_command(command, &block)
1845
2745
  end
1846
2746
 
1847
- # Finds approved products that match a query.
2747
+ # Generates new credentials for the service account associated with this
2748
+ # enterprise. The calling service account must have been retrieved by calling
2749
+ # Enterprises.GetServiceAccount and must have been set as the enterprise service
2750
+ # account by calling Enterprises.SetAccount.
2751
+ # Only the type of the key should be populated in the resource to be inserted.
1848
2752
  # @param [String] enterprise_id
1849
2753
  # The ID of the enterprise.
1850
- # @param [Boolean] approved
1851
- # Specifies whether to search among all products (false) or among only products
1852
- # that have been approved (true). Only "true" is supported, and should be
1853
- # specified.
1854
- # @param [String] language
1855
- # The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results
1856
- # are returned in the language best matching the preferred language.
1857
- # @param [Fixnum] max_results
1858
- # Specifies the maximum number of products that can be returned per request. If
1859
- # not specified, uses a default value of 100, which is also the maximum
1860
- # retrievable within a single response.
1861
- # @param [String] query
1862
- # The search query as typed in the Google Play Store search box. If omitted, all
1863
- # approved apps will be returned (using the pagination parameters).
1864
- # @param [String] token
1865
- # A pagination token is contained in a request’s response when there are more
1866
- # products. The token can be used in a subsequent request to obtain more
1867
- # products, and so forth. This parameter cannot be used in the initial request.
2754
+ # @param [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] service_account_key_object
1868
2755
  # @param [String] fields
1869
2756
  # Selector specifying which fields to include in a partial response.
1870
2757
  # @param [String] quota_user
@@ -1878,41 +2765,34 @@ module Google
1878
2765
  # Request-specific options
1879
2766
  #
1880
2767
  # @yield [result, err] Result & error if block supplied
1881
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductsListResponse] parsed result object
2768
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] parsed result object
1882
2769
  # @yieldparam err [StandardError] error object if request failed
1883
2770
  #
1884
- # @return [Google::Apis::AndroidenterpriseV1::ProductsListResponse]
2771
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKey]
1885
2772
  #
1886
2773
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1887
2774
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1888
2775
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1889
- def list_products(enterprise_id, approved: nil, language: nil, max_results: nil, query: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1890
- command = make_simple_command(:get, 'enterprises/{enterpriseId}/products', options)
1891
- command.response_representation = Google::Apis::AndroidenterpriseV1::ProductsListResponse::Representation
1892
- command.response_class = Google::Apis::AndroidenterpriseV1::ProductsListResponse
2776
+ def insert_serviceaccountkey(enterprise_id, service_account_key_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2777
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/serviceAccountKeys', options)
2778
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
2779
+ command.request_object = service_account_key_object
2780
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
2781
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKey
1893
2782
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1894
- command.query['approved'] = approved unless approved.nil?
1895
- command.query['language'] = language unless language.nil?
1896
- command.query['maxResults'] = max_results unless max_results.nil?
1897
- command.query['query'] = query unless query.nil?
1898
- command.query['token'] = token unless token.nil?
1899
2783
  command.query['fields'] = fields unless fields.nil?
1900
2784
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1901
2785
  command.query['userIp'] = user_ip unless user_ip.nil?
1902
2786
  execute_or_queue_command(command, &block)
1903
2787
  end
1904
2788
 
1905
- # This method has been deprecated. To programmatically approve applications, you
1906
- # must use the iframe mechanism via the generateApprovalUrl and approve
1907
- # methods of the Products resource. For more information, see the Play EMM API
1908
- # usage requirements.
1909
- # The updatePermissions method (deprecated) updates the set of Android app
1910
- # permissions for this app that have been accepted by the enterprise.
2789
+ # Lists all active credentials for the service account associated with this
2790
+ # enterprise. Only the ID and key type are returned. The calling service account
2791
+ # must have been retrieved by calling Enterprises.GetServiceAccount and must
2792
+ # have been set as the enterprise service account by calling Enterprises.
2793
+ # SetAccount.
1911
2794
  # @param [String] enterprise_id
1912
2795
  # The ID of the enterprise.
1913
- # @param [String] product_id
1914
- # The ID of the product.
1915
- # @param [Google::Apis::AndroidenterpriseV1::ProductPermissions] product_permissions_object
1916
2796
  # @param [String] fields
1917
2797
  # Selector specifying which fields to include in a partial response.
1918
2798
  # @param [String] quota_user
@@ -1926,22 +2806,19 @@ module Google
1926
2806
  # Request-specific options
1927
2807
  #
1928
2808
  # @yield [result, err] Result & error if block supplied
1929
- # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
2809
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse] parsed result object
1930
2810
  # @yieldparam err [StandardError] error object if request failed
1931
2811
  #
1932
- # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
2812
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse]
1933
2813
  #
1934
2814
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1935
2815
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1936
2816
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1937
- def update_product_permissions(enterprise_id, product_id, product_permissions_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1938
- command = make_simple_command(:put, 'enterprises/{enterpriseId}/products/{productId}/permissions', options)
1939
- command.request_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1940
- command.request_object = product_permissions_object
1941
- command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1942
- command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
2817
+ def list_serviceaccountkeys(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2818
+ command = make_simple_command(:get, 'enterprises/{enterpriseId}/serviceAccountKeys', options)
2819
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse::Representation
2820
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse
1943
2821
  command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1944
- command.params['productId'] = product_id unless product_id.nil?
1945
2822
  command.query['fields'] = fields unless fields.nil?
1946
2823
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1947
2824
  command.query['userIp'] = user_ip unless user_ip.nil?
@@ -2424,6 +3301,83 @@ module Google
2424
3301
  execute_or_queue_command(command, &block)
2425
3302
  end
2426
3303
 
3304
+ # Deleted an EMM-managed user.
3305
+ # @param [String] enterprise_id
3306
+ # The ID of the enterprise.
3307
+ # @param [String] user_id
3308
+ # The ID of the user.
3309
+ # @param [String] fields
3310
+ # Selector specifying which fields to include in a partial response.
3311
+ # @param [String] quota_user
3312
+ # Available to use for quota purposes for server-side applications. Can be any
3313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3314
+ # Overrides userIp if both are provided.
3315
+ # @param [String] user_ip
3316
+ # IP address of the site where the request originates. Use this if you want to
3317
+ # enforce per-user limits.
3318
+ # @param [Google::Apis::RequestOptions] options
3319
+ # Request-specific options
3320
+ #
3321
+ # @yield [result, err] Result & error if block supplied
3322
+ # @yieldparam result [NilClass] No result returned for this method
3323
+ # @yieldparam err [StandardError] error object if request failed
3324
+ #
3325
+ # @return [void]
3326
+ #
3327
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3328
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3329
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3330
+ def delete_user(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3331
+ command = make_simple_command(:delete, 'enterprises/{enterpriseId}/users/{userId}', options)
3332
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3333
+ command.params['userId'] = user_id unless user_id.nil?
3334
+ command.query['fields'] = fields unless fields.nil?
3335
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3336
+ command.query['userIp'] = user_ip unless user_ip.nil?
3337
+ execute_or_queue_command(command, &block)
3338
+ end
3339
+
3340
+ # Generates an authentication token which the device policy client can use to
3341
+ # provision the given EMM-managed user account on a device. The generated token
3342
+ # is single-use and expires after a few minutes.
3343
+ # This call only works with EMM-managed accounts.
3344
+ # @param [String] enterprise_id
3345
+ # The ID of the enterprise.
3346
+ # @param [String] user_id
3347
+ # The ID of the user.
3348
+ # @param [String] fields
3349
+ # Selector specifying which fields to include in a partial response.
3350
+ # @param [String] quota_user
3351
+ # Available to use for quota purposes for server-side applications. Can be any
3352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3353
+ # Overrides userIp if both are provided.
3354
+ # @param [String] user_ip
3355
+ # IP address of the site where the request originates. Use this if you want to
3356
+ # enforce per-user limits.
3357
+ # @param [Google::Apis::RequestOptions] options
3358
+ # Request-specific options
3359
+ #
3360
+ # @yield [result, err] Result & error if block supplied
3361
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AuthenticationToken] parsed result object
3362
+ # @yieldparam err [StandardError] error object if request failed
3363
+ #
3364
+ # @return [Google::Apis::AndroidenterpriseV1::AuthenticationToken]
3365
+ #
3366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3369
+ def generate_user_authentication_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3370
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/users/{userId}/authenticationToken', options)
3371
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AuthenticationToken::Representation
3372
+ command.response_class = Google::Apis::AndroidenterpriseV1::AuthenticationToken
3373
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3374
+ command.params['userId'] = user_id unless user_id.nil?
3375
+ command.query['fields'] = fields unless fields.nil?
3376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3377
+ command.query['userIp'] = user_ip unless user_ip.nil?
3378
+ execute_or_queue_command(command, &block)
3379
+ end
3380
+
2427
3381
  # Generates a token (activation code) to allow this user to configure their work
2428
3382
  # account in the Android Setup Wizard. Revokes any previously generated token.
2429
3383
  # This call only works with Google managed accounts.
@@ -2540,7 +3494,52 @@ module Google
2540
3494
  execute_or_queue_command(command, &block)
2541
3495
  end
2542
3496
 
2543
- # Looks up a user by their primary email address.
3497
+ # Creates a new EMM-managed user.
3498
+ # The Users resource passed in the body of the request should include an
3499
+ # accountIdentifier and an accountType.
3500
+ # If a corresponding user already exists with the same account identifier, the
3501
+ # user will be updated with the resource. In this case only the displayName
3502
+ # field can be changed.
3503
+ # @param [String] enterprise_id
3504
+ # The ID of the enterprise.
3505
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3506
+ # @param [String] fields
3507
+ # Selector specifying which fields to include in a partial response.
3508
+ # @param [String] quota_user
3509
+ # Available to use for quota purposes for server-side applications. Can be any
3510
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3511
+ # Overrides userIp if both are provided.
3512
+ # @param [String] user_ip
3513
+ # IP address of the site where the request originates. Use this if you want to
3514
+ # enforce per-user limits.
3515
+ # @param [Google::Apis::RequestOptions] options
3516
+ # Request-specific options
3517
+ #
3518
+ # @yield [result, err] Result & error if block supplied
3519
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3520
+ # @yieldparam err [StandardError] error object if request failed
3521
+ #
3522
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3523
+ #
3524
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3525
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3526
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3527
+ def insert_user(enterprise_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3528
+ command = make_simple_command(:post, 'enterprises/{enterpriseId}/users', options)
3529
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3530
+ command.request_object = user_object
3531
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3532
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3533
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3534
+ command.query['fields'] = fields unless fields.nil?
3535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3536
+ command.query['userIp'] = user_ip unless user_ip.nil?
3537
+ execute_or_queue_command(command, &block)
3538
+ end
3539
+
3540
+ # Looks up a user by primary email address. This is only supported for Google-
3541
+ # managed users. Lookup of the id is not needed for EMM-managed users because
3542
+ # the id is already returned in the result of the Users.insert call.
2544
3543
  # @param [String] enterprise_id
2545
3544
  # The ID of the enterprise.
2546
3545
  # @param [String] email
@@ -2578,6 +3577,51 @@ module Google
2578
3577
  execute_or_queue_command(command, &block)
2579
3578
  end
2580
3579
 
3580
+ # Updates the details of an EMM-managed user.
3581
+ # Can be used with EMM-managed users only (not Google managed users). Pass the
3582
+ # new details in the Users resource in the request body. Only the displayName
3583
+ # field can be changed. Other fields must either be unset or have the currently
3584
+ # active value. This method supports patch semantics.
3585
+ # @param [String] enterprise_id
3586
+ # The ID of the enterprise.
3587
+ # @param [String] user_id
3588
+ # The ID of the user.
3589
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3590
+ # @param [String] fields
3591
+ # Selector specifying which fields to include in a partial response.
3592
+ # @param [String] quota_user
3593
+ # Available to use for quota purposes for server-side applications. Can be any
3594
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3595
+ # Overrides userIp if both are provided.
3596
+ # @param [String] user_ip
3597
+ # IP address of the site where the request originates. Use this if you want to
3598
+ # enforce per-user limits.
3599
+ # @param [Google::Apis::RequestOptions] options
3600
+ # Request-specific options
3601
+ #
3602
+ # @yield [result, err] Result & error if block supplied
3603
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3604
+ # @yieldparam err [StandardError] error object if request failed
3605
+ #
3606
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3607
+ #
3608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3611
+ def patch_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3612
+ command = make_simple_command(:patch, 'enterprises/{enterpriseId}/users/{userId}', options)
3613
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3614
+ command.request_object = user_object
3615
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3616
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3617
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3618
+ command.params['userId'] = user_id unless user_id.nil?
3619
+ command.query['fields'] = fields unless fields.nil?
3620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3621
+ command.query['userIp'] = user_ip unless user_ip.nil?
3622
+ execute_or_queue_command(command, &block)
3623
+ end
3624
+
2581
3625
  # Revokes a previously generated token (activation code) for the user.
2582
3626
  # @param [String] enterprise_id
2583
3627
  # The ID of the enterprise.
@@ -2654,6 +3698,51 @@ module Google
2654
3698
  command.query['userIp'] = user_ip unless user_ip.nil?
2655
3699
  execute_or_queue_command(command, &block)
2656
3700
  end
3701
+
3702
+ # Updates the details of an EMM-managed user.
3703
+ # Can be used with EMM-managed users only (not Google managed users). Pass the
3704
+ # new details in the Users resource in the request body. Only the displayName
3705
+ # field can be changed. Other fields must either be unset or have the currently
3706
+ # active value.
3707
+ # @param [String] enterprise_id
3708
+ # The ID of the enterprise.
3709
+ # @param [String] user_id
3710
+ # The ID of the user.
3711
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
3712
+ # @param [String] fields
3713
+ # Selector specifying which fields to include in a partial response.
3714
+ # @param [String] quota_user
3715
+ # Available to use for quota purposes for server-side applications. Can be any
3716
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3717
+ # Overrides userIp if both are provided.
3718
+ # @param [String] user_ip
3719
+ # IP address of the site where the request originates. Use this if you want to
3720
+ # enforce per-user limits.
3721
+ # @param [Google::Apis::RequestOptions] options
3722
+ # Request-specific options
3723
+ #
3724
+ # @yield [result, err] Result & error if block supplied
3725
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
3726
+ # @yieldparam err [StandardError] error object if request failed
3727
+ #
3728
+ # @return [Google::Apis::AndroidenterpriseV1::User]
3729
+ #
3730
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3731
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3732
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3733
+ def update_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3734
+ command = make_simple_command(:put, 'enterprises/{enterpriseId}/users/{userId}', options)
3735
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3736
+ command.request_object = user_object
3737
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
3738
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
3739
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
3740
+ command.params['userId'] = user_id unless user_id.nil?
3741
+ command.query['fields'] = fields unless fields.nil?
3742
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3743
+ command.query['userIp'] = user_ip unless user_ip.nil?
3744
+ execute_or_queue_command(command, &block)
3745
+ end
2657
3746
 
2658
3747
  protected
2659
3748