google-api-client 0.8.7 → 0.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,431 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module AndroidenterpriseV1
24
+
25
+ class AppRestrictionsSchema
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+ end
28
+
29
+ class AppRestrictionsSchemaRestriction
30
+ class Representation < Google::Apis::Core::JsonRepresentation; end
31
+ end
32
+
33
+ class AppRestrictionsSchemaRestrictionRestrictionValue
34
+ class Representation < Google::Apis::Core::JsonRepresentation; end
35
+ end
36
+
37
+ class AppVersion
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+ end
40
+
41
+ class ApprovalUrlInfo
42
+ class Representation < Google::Apis::Core::JsonRepresentation; end
43
+ end
44
+
45
+ class Collection
46
+ class Representation < Google::Apis::Core::JsonRepresentation; end
47
+ end
48
+
49
+ class ListCollectionViewersResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+ end
52
+
53
+ class ListCollectionsResponse
54
+ class Representation < Google::Apis::Core::JsonRepresentation; end
55
+ end
56
+
57
+ class Device
58
+ class Representation < Google::Apis::Core::JsonRepresentation; end
59
+ end
60
+
61
+ class DeviceState
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+ end
64
+
65
+ class ListDevicesResponse
66
+ class Representation < Google::Apis::Core::JsonRepresentation; end
67
+ end
68
+
69
+ class Enterprise
70
+ class Representation < Google::Apis::Core::JsonRepresentation; end
71
+ end
72
+
73
+ class EnterpriseAccount
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class ListEnterprisesResponse
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class Entitlement
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class ListEntitlementsResponse
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+ end
88
+
89
+ class GroupLicense
90
+ class Representation < Google::Apis::Core::JsonRepresentation; end
91
+ end
92
+
93
+ class ListGroupLicenseUsersResponse
94
+ class Representation < Google::Apis::Core::JsonRepresentation; end
95
+ end
96
+
97
+ class ListGroupLicensesResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+ end
100
+
101
+ class Install
102
+ class Representation < Google::Apis::Core::JsonRepresentation; end
103
+ end
104
+
105
+ class ListInstallsResponse
106
+ class Representation < Google::Apis::Core::JsonRepresentation; end
107
+ end
108
+
109
+ class Permission
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+ end
112
+
113
+ class Product
114
+ class Representation < Google::Apis::Core::JsonRepresentation; end
115
+ end
116
+
117
+ class ProductPermission
118
+ class Representation < Google::Apis::Core::JsonRepresentation; end
119
+ end
120
+
121
+ class ProductPermissions
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+ end
124
+
125
+ class ApproveProductRequest
126
+ class Representation < Google::Apis::Core::JsonRepresentation; end
127
+ end
128
+
129
+ class GenerateProductApprovalUrlResponse
130
+ class Representation < Google::Apis::Core::JsonRepresentation; end
131
+ end
132
+
133
+ class User
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+ end
136
+
137
+ class UserToken
138
+ class Representation < Google::Apis::Core::JsonRepresentation; end
139
+ end
140
+
141
+ class ListUsersResponse
142
+ class Representation < Google::Apis::Core::JsonRepresentation; end
143
+ end
144
+
145
+ class AppRestrictionsSchema
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ collection :restrictions, as: 'restrictions', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestriction::Representation
149
+
150
+ end
151
+ end
152
+
153
+ class AppRestrictionsSchemaRestriction
154
+ # @private
155
+ class Representation < Google::Apis::Core::JsonRepresentation
156
+ property :default_value, as: 'defaultValue', class: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue, decorator: Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue::Representation
157
+
158
+ property :description, as: 'description'
159
+ collection :entry, as: 'entry'
160
+ collection :entry_value, as: 'entryValue'
161
+ property :key, as: 'key'
162
+ property :restriction_type, as: 'restrictionType'
163
+ property :title, as: 'title'
164
+ end
165
+ end
166
+
167
+ class AppRestrictionsSchemaRestrictionRestrictionValue
168
+ # @private
169
+ class Representation < Google::Apis::Core::JsonRepresentation
170
+ property :type, as: 'type'
171
+ property :value_bool, as: 'valueBool'
172
+ property :value_integer, as: 'valueInteger'
173
+ collection :value_multiselect, as: 'valueMultiselect'
174
+ property :value_string, as: 'valueString'
175
+ end
176
+ end
177
+
178
+ class AppVersion
179
+ # @private
180
+ class Representation < Google::Apis::Core::JsonRepresentation
181
+ property :version_code, as: 'versionCode'
182
+ property :version_string, as: 'versionString'
183
+ end
184
+ end
185
+
186
+ class ApprovalUrlInfo
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :approval_url, as: 'approvalUrl'
190
+ property :kind, as: 'kind'
191
+ end
192
+ end
193
+
194
+ class Collection
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ property :collection_id, as: 'collectionId'
198
+ property :kind, as: 'kind'
199
+ property :name, as: 'name'
200
+ collection :product_id, as: 'productId'
201
+ property :visibility, as: 'visibility'
202
+ end
203
+ end
204
+
205
+ class ListCollectionViewersResponse
206
+ # @private
207
+ class Representation < Google::Apis::Core::JsonRepresentation
208
+ property :kind, as: 'kind'
209
+ collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
210
+
211
+ end
212
+ end
213
+
214
+ class ListCollectionsResponse
215
+ # @private
216
+ class Representation < Google::Apis::Core::JsonRepresentation
217
+ collection :collection, as: 'collection', class: Google::Apis::AndroidenterpriseV1::Collection, decorator: Google::Apis::AndroidenterpriseV1::Collection::Representation
218
+
219
+ property :kind, as: 'kind'
220
+ end
221
+ end
222
+
223
+ class Device
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :android_id, as: 'androidId'
227
+ property :kind, as: 'kind'
228
+ property :management_type, as: 'managementType'
229
+ end
230
+ end
231
+
232
+ class DeviceState
233
+ # @private
234
+ class Representation < Google::Apis::Core::JsonRepresentation
235
+ property :account_state, as: 'accountState'
236
+ property :kind, as: 'kind'
237
+ end
238
+ end
239
+
240
+ class ListDevicesResponse
241
+ # @private
242
+ class Representation < Google::Apis::Core::JsonRepresentation
243
+ collection :device, as: 'device', class: Google::Apis::AndroidenterpriseV1::Device, decorator: Google::Apis::AndroidenterpriseV1::Device::Representation
244
+
245
+ property :kind, as: 'kind'
246
+ end
247
+ end
248
+
249
+ class Enterprise
250
+ # @private
251
+ class Representation < Google::Apis::Core::JsonRepresentation
252
+ property :id, as: 'id'
253
+ property :kind, as: 'kind'
254
+ property :name, as: 'name'
255
+ property :primary_domain, as: 'primaryDomain'
256
+ end
257
+ end
258
+
259
+ class EnterpriseAccount
260
+ # @private
261
+ class Representation < Google::Apis::Core::JsonRepresentation
262
+ property :account_email, as: 'accountEmail'
263
+ property :kind, as: 'kind'
264
+ end
265
+ end
266
+
267
+ class ListEnterprisesResponse
268
+ # @private
269
+ class Representation < Google::Apis::Core::JsonRepresentation
270
+ collection :enterprise, as: 'enterprise', class: Google::Apis::AndroidenterpriseV1::Enterprise, decorator: Google::Apis::AndroidenterpriseV1::Enterprise::Representation
271
+
272
+ property :kind, as: 'kind'
273
+ end
274
+ end
275
+
276
+ class Entitlement
277
+ # @private
278
+ class Representation < Google::Apis::Core::JsonRepresentation
279
+ property :kind, as: 'kind'
280
+ property :product_id, as: 'productId'
281
+ property :reason, as: 'reason'
282
+ end
283
+ end
284
+
285
+ class ListEntitlementsResponse
286
+ # @private
287
+ class Representation < Google::Apis::Core::JsonRepresentation
288
+ collection :entitlement, as: 'entitlement', class: Google::Apis::AndroidenterpriseV1::Entitlement, decorator: Google::Apis::AndroidenterpriseV1::Entitlement::Representation
289
+
290
+ property :kind, as: 'kind'
291
+ end
292
+ end
293
+
294
+ class GroupLicense
295
+ # @private
296
+ class Representation < Google::Apis::Core::JsonRepresentation
297
+ property :acquisition_kind, as: 'acquisitionKind'
298
+ property :approval, as: 'approval'
299
+ property :kind, as: 'kind'
300
+ property :num_provisioned, as: 'numProvisioned'
301
+ property :num_purchased, as: 'numPurchased'
302
+ property :product_id, as: 'productId'
303
+ end
304
+ end
305
+
306
+ class ListGroupLicenseUsersResponse
307
+ # @private
308
+ class Representation < Google::Apis::Core::JsonRepresentation
309
+ property :kind, as: 'kind'
310
+ collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
311
+
312
+ end
313
+ end
314
+
315
+ class ListGroupLicensesResponse
316
+ # @private
317
+ class Representation < Google::Apis::Core::JsonRepresentation
318
+ collection :group_license, as: 'groupLicense', class: Google::Apis::AndroidenterpriseV1::GroupLicense, decorator: Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
319
+
320
+ property :kind, as: 'kind'
321
+ end
322
+ end
323
+
324
+ class Install
325
+ # @private
326
+ class Representation < Google::Apis::Core::JsonRepresentation
327
+ property :install_state, as: 'installState'
328
+ property :kind, as: 'kind'
329
+ property :product_id, as: 'productId'
330
+ property :version_code, as: 'versionCode'
331
+ end
332
+ end
333
+
334
+ class ListInstallsResponse
335
+ # @private
336
+ class Representation < Google::Apis::Core::JsonRepresentation
337
+ collection :install, as: 'install', class: Google::Apis::AndroidenterpriseV1::Install, decorator: Google::Apis::AndroidenterpriseV1::Install::Representation
338
+
339
+ property :kind, as: 'kind'
340
+ end
341
+ end
342
+
343
+ class Permission
344
+ # @private
345
+ class Representation < Google::Apis::Core::JsonRepresentation
346
+ property :description, as: 'description'
347
+ property :kind, as: 'kind'
348
+ property :name, as: 'name'
349
+ property :permission_id, as: 'permissionId'
350
+ end
351
+ end
352
+
353
+ class Product
354
+ # @private
355
+ class Representation < Google::Apis::Core::JsonRepresentation
356
+ collection :app_version, as: 'appVersion', class: Google::Apis::AndroidenterpriseV1::AppVersion, decorator: Google::Apis::AndroidenterpriseV1::AppVersion::Representation
357
+
358
+ property :author_name, as: 'authorName'
359
+ property :details_url, as: 'detailsUrl'
360
+ property :distribution_channel, as: 'distributionChannel'
361
+ property :icon_url, as: 'iconUrl'
362
+ property :kind, as: 'kind'
363
+ property :product_id, as: 'productId'
364
+ property :requires_container_app, as: 'requiresContainerApp'
365
+ property :title, as: 'title'
366
+ property :work_details_url, as: 'workDetailsUrl'
367
+ end
368
+ end
369
+
370
+ class ProductPermission
371
+ # @private
372
+ class Representation < Google::Apis::Core::JsonRepresentation
373
+ property :permission_id, as: 'permissionId'
374
+ property :state, as: 'state'
375
+ end
376
+ end
377
+
378
+ class ProductPermissions
379
+ # @private
380
+ class Representation < Google::Apis::Core::JsonRepresentation
381
+ property :kind, as: 'kind'
382
+ collection :permission, as: 'permission', class: Google::Apis::AndroidenterpriseV1::ProductPermission, decorator: Google::Apis::AndroidenterpriseV1::ProductPermission::Representation
383
+
384
+ property :product_id, as: 'productId'
385
+ end
386
+ end
387
+
388
+ class ApproveProductRequest
389
+ # @private
390
+ class Representation < Google::Apis::Core::JsonRepresentation
391
+ property :approval_url_info, as: 'approvalUrlInfo', class: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo, decorator: Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo::Representation
392
+
393
+ end
394
+ end
395
+
396
+ class GenerateProductApprovalUrlResponse
397
+ # @private
398
+ class Representation < Google::Apis::Core::JsonRepresentation
399
+ property :url, as: 'url'
400
+ end
401
+ end
402
+
403
+ class User
404
+ # @private
405
+ class Representation < Google::Apis::Core::JsonRepresentation
406
+ property :id, as: 'id'
407
+ property :kind, as: 'kind'
408
+ property :primary_email, as: 'primaryEmail'
409
+ end
410
+ end
411
+
412
+ class UserToken
413
+ # @private
414
+ class Representation < Google::Apis::Core::JsonRepresentation
415
+ property :kind, as: 'kind'
416
+ property :token, as: 'token'
417
+ property :user_id, as: 'userId'
418
+ end
419
+ end
420
+
421
+ class ListUsersResponse
422
+ # @private
423
+ class Representation < Google::Apis::Core::JsonRepresentation
424
+ property :kind, as: 'kind'
425
+ collection :user, as: 'user', class: Google::Apis::AndroidenterpriseV1::User, decorator: Google::Apis::AndroidenterpriseV1::User::Representation
426
+
427
+ end
428
+ end
429
+ end
430
+ end
431
+ end
@@ -0,0 +1,1979 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module AndroidenterpriseV1
23
+ # Google Play EMM API
24
+ #
25
+ # Allows MDMs/EMMs and enterprises to manage the deployment of apps to Android
26
+ # for Work users.
27
+ #
28
+ # @example
29
+ # require 'google/apis/androidenterprise_v1'
30
+ #
31
+ # Androidenterprise = Google::Apis::AndroidenterpriseV1 # Alias the module
32
+ # service = Androidenterprise::AndroidEnterpriseService.new
33
+ #
34
+ class AndroidEnterpriseService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'androidenterprise/v1/')
53
+ end
54
+
55
+ # Deletes a collection.
56
+ # @param [String] enterprise_id
57
+ # The ID of the enterprise.
58
+ # @param [String] collection_id
59
+ # The ID of the collection.
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # Overrides userIp if both are provided.
66
+ # @param [String] user_ip
67
+ # IP address of the site where the request originates. Use this if you want to
68
+ # enforce per-user limits.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [NilClass] No result returned for this method
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [void]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def delete_collection(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
82
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}'
83
+ command = make_simple_command(:delete, path, options)
84
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
85
+ command.params['collectionId'] = collection_id unless collection_id.nil?
86
+ command.query['fields'] = fields unless fields.nil?
87
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
88
+ command.query['userIp'] = user_ip unless user_ip.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Retrieves the details of a collection.
93
+ # @param [String] enterprise_id
94
+ # The ID of the enterprise.
95
+ # @param [String] collection_id
96
+ # The ID of the collection.
97
+ # @param [String] fields
98
+ # Selector specifying which fields to include in a partial response.
99
+ # @param [String] quota_user
100
+ # Available to use for quota purposes for server-side applications. Can be any
101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
102
+ # Overrides userIp if both are provided.
103
+ # @param [String] user_ip
104
+ # IP address of the site where the request originates. Use this if you want to
105
+ # enforce per-user limits.
106
+ # @param [Google::Apis::RequestOptions] options
107
+ # Request-specific options
108
+ #
109
+ # @yield [result, err] Result & error if block supplied
110
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Collection] parsed result object
111
+ # @yieldparam err [StandardError] error object if request failed
112
+ #
113
+ # @return [Google::Apis::AndroidenterpriseV1::Collection]
114
+ #
115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
118
+ def get_collection(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
119
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}'
120
+ command = make_simple_command(:get, path, options)
121
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
122
+ command.response_class = Google::Apis::AndroidenterpriseV1::Collection
123
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
124
+ command.params['collectionId'] = collection_id unless collection_id.nil?
125
+ command.query['fields'] = fields unless fields.nil?
126
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
127
+ command.query['userIp'] = user_ip unless user_ip.nil?
128
+ execute_or_queue_command(command, &block)
129
+ end
130
+
131
+ # Creates a new collection.
132
+ # @param [String] enterprise_id
133
+ # The ID of the enterprise.
134
+ # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_object
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # Overrides userIp if both are provided.
141
+ # @param [String] user_ip
142
+ # IP address of the site where the request originates. Use this if you want to
143
+ # enforce per-user limits.
144
+ # @param [Google::Apis::RequestOptions] options
145
+ # Request-specific options
146
+ #
147
+ # @yield [result, err] Result & error if block supplied
148
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Collection] parsed result object
149
+ # @yieldparam err [StandardError] error object if request failed
150
+ #
151
+ # @return [Google::Apis::AndroidenterpriseV1::Collection]
152
+ #
153
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
154
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
155
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
156
+ def insert_collection(enterprise_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
157
+ path = 'enterprises/{enterpriseId}/collections'
158
+ command = make_simple_command(:post, path, options)
159
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
160
+ command.request_object = collection_object
161
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
162
+ command.response_class = Google::Apis::AndroidenterpriseV1::Collection
163
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
164
+ command.query['fields'] = fields unless fields.nil?
165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
166
+ command.query['userIp'] = user_ip unless user_ip.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Retrieves the IDs of all the collections for an enterprise.
171
+ # @param [String] enterprise_id
172
+ # The ID of the enterprise.
173
+ # @param [String] fields
174
+ # Selector specifying which fields to include in a partial response.
175
+ # @param [String] quota_user
176
+ # Available to use for quota purposes for server-side applications. Can be any
177
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
178
+ # Overrides userIp if both are provided.
179
+ # @param [String] user_ip
180
+ # IP address of the site where the request originates. Use this if you want to
181
+ # enforce per-user limits.
182
+ # @param [Google::Apis::RequestOptions] options
183
+ # Request-specific options
184
+ #
185
+ # @yield [result, err] Result & error if block supplied
186
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListCollectionsResponse] parsed result object
187
+ # @yieldparam err [StandardError] error object if request failed
188
+ #
189
+ # @return [Google::Apis::AndroidenterpriseV1::ListCollectionsResponse]
190
+ #
191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
194
+ def list_collections(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
195
+ path = 'enterprises/{enterpriseId}/collections'
196
+ command = make_simple_command(:get, path, options)
197
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListCollectionsResponse::Representation
198
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListCollectionsResponse
199
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
200
+ command.query['fields'] = fields unless fields.nil?
201
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
202
+ command.query['userIp'] = user_ip unless user_ip.nil?
203
+ execute_or_queue_command(command, &block)
204
+ end
205
+
206
+ # Updates a collection. This method supports patch semantics.
207
+ # @param [String] enterprise_id
208
+ # The ID of the enterprise.
209
+ # @param [String] collection_id
210
+ # The ID of the collection.
211
+ # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_object
212
+ # @param [String] fields
213
+ # Selector specifying which fields to include in a partial response.
214
+ # @param [String] quota_user
215
+ # Available to use for quota purposes for server-side applications. Can be any
216
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
217
+ # Overrides userIp if both are provided.
218
+ # @param [String] user_ip
219
+ # IP address of the site where the request originates. Use this if you want to
220
+ # enforce per-user limits.
221
+ # @param [Google::Apis::RequestOptions] options
222
+ # Request-specific options
223
+ #
224
+ # @yield [result, err] Result & error if block supplied
225
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Collection] parsed result object
226
+ # @yieldparam err [StandardError] error object if request failed
227
+ #
228
+ # @return [Google::Apis::AndroidenterpriseV1::Collection]
229
+ #
230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
233
+ def patch_collection(enterprise_id, collection_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
234
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}'
235
+ command = make_simple_command(:patch, path, options)
236
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
237
+ command.request_object = collection_object
238
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
239
+ command.response_class = Google::Apis::AndroidenterpriseV1::Collection
240
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
241
+ command.params['collectionId'] = collection_id unless collection_id.nil?
242
+ command.query['fields'] = fields unless fields.nil?
243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
244
+ command.query['userIp'] = user_ip unless user_ip.nil?
245
+ execute_or_queue_command(command, &block)
246
+ end
247
+
248
+ # Updates a collection.
249
+ # @param [String] enterprise_id
250
+ # The ID of the enterprise.
251
+ # @param [String] collection_id
252
+ # The ID of the collection.
253
+ # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_object
254
+ # @param [String] fields
255
+ # Selector specifying which fields to include in a partial response.
256
+ # @param [String] quota_user
257
+ # Available to use for quota purposes for server-side applications. Can be any
258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
259
+ # Overrides userIp if both are provided.
260
+ # @param [String] user_ip
261
+ # IP address of the site where the request originates. Use this if you want to
262
+ # enforce per-user limits.
263
+ # @param [Google::Apis::RequestOptions] options
264
+ # Request-specific options
265
+ #
266
+ # @yield [result, err] Result & error if block supplied
267
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Collection] parsed result object
268
+ # @yieldparam err [StandardError] error object if request failed
269
+ #
270
+ # @return [Google::Apis::AndroidenterpriseV1::Collection]
271
+ #
272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
275
+ def update_collection(enterprise_id, collection_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
276
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}'
277
+ command = make_simple_command(:put, path, options)
278
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
279
+ command.request_object = collection_object
280
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation
281
+ command.response_class = Google::Apis::AndroidenterpriseV1::Collection
282
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
283
+ command.params['collectionId'] = collection_id unless collection_id.nil?
284
+ command.query['fields'] = fields unless fields.nil?
285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
286
+ command.query['userIp'] = user_ip unless user_ip.nil?
287
+ execute_or_queue_command(command, &block)
288
+ end
289
+
290
+ # Removes the user from the list of those specifically allowed to see the
291
+ # collection. If the collection's visibility is set to viewersOnly then only
292
+ # such users will see the collection.
293
+ # @param [String] enterprise_id
294
+ # The ID of the enterprise.
295
+ # @param [String] collection_id
296
+ # The ID of the collection.
297
+ # @param [String] user_id
298
+ # The ID of the user.
299
+ # @param [String] fields
300
+ # Selector specifying which fields to include in a partial response.
301
+ # @param [String] quota_user
302
+ # Available to use for quota purposes for server-side applications. Can be any
303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
304
+ # Overrides userIp if both are provided.
305
+ # @param [String] user_ip
306
+ # IP address of the site where the request originates. Use this if you want to
307
+ # enforce per-user limits.
308
+ # @param [Google::Apis::RequestOptions] options
309
+ # Request-specific options
310
+ #
311
+ # @yield [result, err] Result & error if block supplied
312
+ # @yieldparam result [NilClass] No result returned for this method
313
+ # @yieldparam err [StandardError] error object if request failed
314
+ #
315
+ # @return [void]
316
+ #
317
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
320
+ def delete_collection_viewer(enterprise_id, collection_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
321
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}'
322
+ command = make_simple_command(:delete, path, options)
323
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
324
+ command.params['collectionId'] = collection_id unless collection_id.nil?
325
+ command.params['userId'] = user_id unless user_id.nil?
326
+ command.query['fields'] = fields unless fields.nil?
327
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
328
+ command.query['userIp'] = user_ip unless user_ip.nil?
329
+ execute_or_queue_command(command, &block)
330
+ end
331
+
332
+ # Retrieves the ID of the user if they have been specifically allowed to see the
333
+ # collection. If the collection's visibility is set to viewersOnly then only
334
+ # these users will see the collection.
335
+ # @param [String] enterprise_id
336
+ # The ID of the enterprise.
337
+ # @param [String] collection_id
338
+ # The ID of the collection.
339
+ # @param [String] user_id
340
+ # The ID of the user.
341
+ # @param [String] fields
342
+ # Selector specifying which fields to include in a partial response.
343
+ # @param [String] quota_user
344
+ # Available to use for quota purposes for server-side applications. Can be any
345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
346
+ # Overrides userIp if both are provided.
347
+ # @param [String] user_ip
348
+ # IP address of the site where the request originates. Use this if you want to
349
+ # enforce per-user limits.
350
+ # @param [Google::Apis::RequestOptions] options
351
+ # Request-specific options
352
+ #
353
+ # @yield [result, err] Result & error if block supplied
354
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
355
+ # @yieldparam err [StandardError] error object if request failed
356
+ #
357
+ # @return [Google::Apis::AndroidenterpriseV1::User]
358
+ #
359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
362
+ def get_collection_viewer(enterprise_id, collection_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
363
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}'
364
+ command = make_simple_command(:get, path, options)
365
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
366
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
367
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
368
+ command.params['collectionId'] = collection_id unless collection_id.nil?
369
+ command.params['userId'] = user_id unless user_id.nil?
370
+ command.query['fields'] = fields unless fields.nil?
371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
372
+ command.query['userIp'] = user_ip unless user_ip.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Retrieves the IDs of the users who have been specifically allowed to see the
377
+ # collection. If the collection's visibility is set to viewersOnly then only
378
+ # these users will see the collection.
379
+ # @param [String] enterprise_id
380
+ # The ID of the enterprise.
381
+ # @param [String] collection_id
382
+ # The ID of the collection.
383
+ # @param [String] fields
384
+ # Selector specifying which fields to include in a partial response.
385
+ # @param [String] quota_user
386
+ # Available to use for quota purposes for server-side applications. Can be any
387
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
388
+ # Overrides userIp if both are provided.
389
+ # @param [String] user_ip
390
+ # IP address of the site where the request originates. Use this if you want to
391
+ # enforce per-user limits.
392
+ # @param [Google::Apis::RequestOptions] options
393
+ # Request-specific options
394
+ #
395
+ # @yield [result, err] Result & error if block supplied
396
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse] parsed result object
397
+ # @yieldparam err [StandardError] error object if request failed
398
+ #
399
+ # @return [Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse]
400
+ #
401
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
402
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
403
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
404
+ def list_collection_viewers(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
405
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}/users'
406
+ command = make_simple_command(:get, path, options)
407
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse::Representation
408
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse
409
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
410
+ command.params['collectionId'] = collection_id unless collection_id.nil?
411
+ command.query['fields'] = fields unless fields.nil?
412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
413
+ command.query['userIp'] = user_ip unless user_ip.nil?
414
+ execute_or_queue_command(command, &block)
415
+ end
416
+
417
+ # Adds the user to the list of those specifically allowed to see the collection.
418
+ # If the collection's visibility is set to viewersOnly then only such users will
419
+ # see the collection. This method supports patch semantics.
420
+ # @param [String] enterprise_id
421
+ # The ID of the enterprise.
422
+ # @param [String] collection_id
423
+ # The ID of the collection.
424
+ # @param [String] user_id
425
+ # The ID of the user.
426
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # Overrides userIp if both are provided.
433
+ # @param [String] user_ip
434
+ # IP address of the site where the request originates. Use this if you want to
435
+ # enforce per-user limits.
436
+ # @param [Google::Apis::RequestOptions] options
437
+ # Request-specific options
438
+ #
439
+ # @yield [result, err] Result & error if block supplied
440
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
441
+ # @yieldparam err [StandardError] error object if request failed
442
+ #
443
+ # @return [Google::Apis::AndroidenterpriseV1::User]
444
+ #
445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
448
+ def patch_collection_viewer(enterprise_id, collection_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
449
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}'
450
+ command = make_simple_command(:patch, path, options)
451
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
452
+ command.request_object = user_object
453
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
454
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
455
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
456
+ command.params['collectionId'] = collection_id unless collection_id.nil?
457
+ command.params['userId'] = user_id unless user_id.nil?
458
+ command.query['fields'] = fields unless fields.nil?
459
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
460
+ command.query['userIp'] = user_ip unless user_ip.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ # Adds the user to the list of those specifically allowed to see the collection.
465
+ # If the collection's visibility is set to viewersOnly then only such users will
466
+ # see the collection.
467
+ # @param [String] enterprise_id
468
+ # The ID of the enterprise.
469
+ # @param [String] collection_id
470
+ # The ID of the collection.
471
+ # @param [String] user_id
472
+ # The ID of the user.
473
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
474
+ # @param [String] fields
475
+ # Selector specifying which fields to include in a partial response.
476
+ # @param [String] quota_user
477
+ # Available to use for quota purposes for server-side applications. Can be any
478
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
479
+ # Overrides userIp if both are provided.
480
+ # @param [String] user_ip
481
+ # IP address of the site where the request originates. Use this if you want to
482
+ # enforce per-user limits.
483
+ # @param [Google::Apis::RequestOptions] options
484
+ # Request-specific options
485
+ #
486
+ # @yield [result, err] Result & error if block supplied
487
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
488
+ # @yieldparam err [StandardError] error object if request failed
489
+ #
490
+ # @return [Google::Apis::AndroidenterpriseV1::User]
491
+ #
492
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
493
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
494
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
495
+ def update_collection_viewer(enterprise_id, collection_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
496
+ path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}'
497
+ command = make_simple_command(:put, path, options)
498
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
499
+ command.request_object = user_object
500
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
501
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
502
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
503
+ command.params['collectionId'] = collection_id unless collection_id.nil?
504
+ command.params['userId'] = user_id unless user_id.nil?
505
+ command.query['fields'] = fields unless fields.nil?
506
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
507
+ command.query['userIp'] = user_ip unless user_ip.nil?
508
+ execute_or_queue_command(command, &block)
509
+ end
510
+
511
+ # Retrieves the details of a device.
512
+ # @param [String] enterprise_id
513
+ # The ID of the enterprise.
514
+ # @param [String] user_id
515
+ # The ID of the user.
516
+ # @param [String] device_id
517
+ # The ID of the device.
518
+ # @param [String] fields
519
+ # Selector specifying which fields to include in a partial response.
520
+ # @param [String] quota_user
521
+ # Available to use for quota purposes for server-side applications. Can be any
522
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
523
+ # Overrides userIp if both are provided.
524
+ # @param [String] user_ip
525
+ # IP address of the site where the request originates. Use this if you want to
526
+ # enforce per-user limits.
527
+ # @param [Google::Apis::RequestOptions] options
528
+ # Request-specific options
529
+ #
530
+ # @yield [result, err] Result & error if block supplied
531
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Device] parsed result object
532
+ # @yieldparam err [StandardError] error object if request failed
533
+ #
534
+ # @return [Google::Apis::AndroidenterpriseV1::Device]
535
+ #
536
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
537
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
538
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
539
+ def get_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
540
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}'
541
+ command = make_simple_command(:get, path, options)
542
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
543
+ command.response_class = Google::Apis::AndroidenterpriseV1::Device
544
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
545
+ command.params['userId'] = user_id unless user_id.nil?
546
+ command.params['deviceId'] = device_id unless device_id.nil?
547
+ command.query['fields'] = fields unless fields.nil?
548
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
549
+ command.query['userIp'] = user_ip unless user_ip.nil?
550
+ execute_or_queue_command(command, &block)
551
+ end
552
+
553
+ # Retrieves whether a device is enabled or disabled for access by the user to
554
+ # Google services. The device state takes effect only if enforcing EMM policies
555
+ # on Android devices is enabled in the Google Admin Console. Otherwise, the
556
+ # device state is ignored and all devices are allowed access to Google services.
557
+ # @param [String] enterprise_id
558
+ # The ID of the enterprise.
559
+ # @param [String] user_id
560
+ # The ID of the user.
561
+ # @param [String] device_id
562
+ # The ID of the device.
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # Overrides userIp if both are provided.
569
+ # @param [String] user_ip
570
+ # IP address of the site where the request originates. Use this if you want to
571
+ # enforce per-user limits.
572
+ # @param [Google::Apis::RequestOptions] options
573
+ # Request-specific options
574
+ #
575
+ # @yield [result, err] Result & error if block supplied
576
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
577
+ # @yieldparam err [StandardError] error object if request failed
578
+ #
579
+ # @return [Google::Apis::AndroidenterpriseV1::DeviceState]
580
+ #
581
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
582
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
583
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
584
+ def get_state_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
585
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state'
586
+ command = make_simple_command(:get, path, options)
587
+ command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
588
+ command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
589
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
590
+ command.params['userId'] = user_id unless user_id.nil?
591
+ command.params['deviceId'] = device_id unless device_id.nil?
592
+ command.query['fields'] = fields unless fields.nil?
593
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
594
+ command.query['userIp'] = user_ip unless user_ip.nil?
595
+ execute_or_queue_command(command, &block)
596
+ end
597
+
598
+ # Retrieves the IDs of all of a user's devices.
599
+ # @param [String] enterprise_id
600
+ # The ID of the enterprise.
601
+ # @param [String] user_id
602
+ # The ID of the user.
603
+ # @param [String] fields
604
+ # Selector specifying which fields to include in a partial response.
605
+ # @param [String] quota_user
606
+ # Available to use for quota purposes for server-side applications. Can be any
607
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
608
+ # Overrides userIp if both are provided.
609
+ # @param [String] user_ip
610
+ # IP address of the site where the request originates. Use this if you want to
611
+ # enforce per-user limits.
612
+ # @param [Google::Apis::RequestOptions] options
613
+ # Request-specific options
614
+ #
615
+ # @yield [result, err] Result & error if block supplied
616
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListDevicesResponse] parsed result object
617
+ # @yieldparam err [StandardError] error object if request failed
618
+ #
619
+ # @return [Google::Apis::AndroidenterpriseV1::ListDevicesResponse]
620
+ #
621
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
622
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
623
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
624
+ def list_devices(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
625
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices'
626
+ command = make_simple_command(:get, path, options)
627
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListDevicesResponse::Representation
628
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListDevicesResponse
629
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
630
+ command.params['userId'] = user_id unless user_id.nil?
631
+ command.query['fields'] = fields unless fields.nil?
632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
633
+ command.query['userIp'] = user_ip unless user_ip.nil?
634
+ execute_or_queue_command(command, &block)
635
+ end
636
+
637
+ # Sets whether a device is enabled or disabled for access by the user to Google
638
+ # services. The device state takes effect only if enforcing EMM policies on
639
+ # Android devices is enabled in the Google Admin Console. Otherwise, the device
640
+ # state is ignored and all devices are allowed access to Google services.
641
+ # @param [String] enterprise_id
642
+ # The ID of the enterprise.
643
+ # @param [String] user_id
644
+ # The ID of the user.
645
+ # @param [String] device_id
646
+ # The ID of the device.
647
+ # @param [Google::Apis::AndroidenterpriseV1::DeviceState] device_state_object
648
+ # @param [String] fields
649
+ # Selector specifying which fields to include in a partial response.
650
+ # @param [String] quota_user
651
+ # Available to use for quota purposes for server-side applications. Can be any
652
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
653
+ # Overrides userIp if both are provided.
654
+ # @param [String] user_ip
655
+ # IP address of the site where the request originates. Use this if you want to
656
+ # enforce per-user limits.
657
+ # @param [Google::Apis::RequestOptions] options
658
+ # Request-specific options
659
+ #
660
+ # @yield [result, err] Result & error if block supplied
661
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
662
+ # @yieldparam err [StandardError] error object if request failed
663
+ #
664
+ # @return [Google::Apis::AndroidenterpriseV1::DeviceState]
665
+ #
666
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
667
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
668
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
669
+ def set_state_device(enterprise_id, user_id, device_id, device_state_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
670
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state'
671
+ command = make_simple_command(:put, path, options)
672
+ command.request_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
673
+ command.request_object = device_state_object
674
+ command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
675
+ command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
676
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
677
+ command.params['userId'] = user_id unless user_id.nil?
678
+ command.params['deviceId'] = device_id unless device_id.nil?
679
+ command.query['fields'] = fields unless fields.nil?
680
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
681
+ command.query['userIp'] = user_ip unless user_ip.nil?
682
+ execute_or_queue_command(command, &block)
683
+ end
684
+
685
+ # Deletes the binding between the MDM and enterprise. This is now deprecated;
686
+ # use this to unenroll customers that were previously enrolled with the 'insert'
687
+ # call, then enroll them again with the 'enroll' call.
688
+ # @param [String] enterprise_id
689
+ # The ID of the enterprise.
690
+ # @param [String] fields
691
+ # Selector specifying which fields to include in a partial response.
692
+ # @param [String] quota_user
693
+ # Available to use for quota purposes for server-side applications. Can be any
694
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
695
+ # Overrides userIp if both are provided.
696
+ # @param [String] user_ip
697
+ # IP address of the site where the request originates. Use this if you want to
698
+ # enforce per-user limits.
699
+ # @param [Google::Apis::RequestOptions] options
700
+ # Request-specific options
701
+ #
702
+ # @yield [result, err] Result & error if block supplied
703
+ # @yieldparam result [NilClass] No result returned for this method
704
+ # @yieldparam err [StandardError] error object if request failed
705
+ #
706
+ # @return [void]
707
+ #
708
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
709
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
710
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
711
+ def delete_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
712
+ path = 'enterprises/{enterpriseId}'
713
+ command = make_simple_command(:delete, path, options)
714
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ command.query['userIp'] = user_ip unless user_ip.nil?
718
+ execute_or_queue_command(command, &block)
719
+ end
720
+
721
+ # Enrolls an enterprise with the calling MDM.
722
+ # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object
723
+ # @param [String] token
724
+ # The token provided by the enterprise to register the MDM.
725
+ # @param [String] fields
726
+ # Selector specifying which fields to include in a partial response.
727
+ # @param [String] quota_user
728
+ # Available to use for quota purposes for server-side applications. Can be any
729
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
730
+ # Overrides userIp if both are provided.
731
+ # @param [String] user_ip
732
+ # IP address of the site where the request originates. Use this if you want to
733
+ # enforce per-user limits.
734
+ # @param [Google::Apis::RequestOptions] options
735
+ # Request-specific options
736
+ #
737
+ # @yield [result, err] Result & error if block supplied
738
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
739
+ # @yieldparam err [StandardError] error object if request failed
740
+ #
741
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
742
+ #
743
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
744
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
745
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
746
+ def enroll_enterprise(enterprise_object = nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
747
+ path = 'enterprises/enroll'
748
+ command = make_simple_command(:post, path, options)
749
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
750
+ command.request_object = enterprise_object
751
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
752
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
753
+ command.query['token'] = token unless token.nil?
754
+ command.query['fields'] = fields unless fields.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ command.query['userIp'] = user_ip unless user_ip.nil?
757
+ execute_or_queue_command(command, &block)
758
+ end
759
+
760
+ # Retrieves the name and domain of an enterprise.
761
+ # @param [String] enterprise_id
762
+ # The ID of the enterprise.
763
+ # @param [String] fields
764
+ # Selector specifying which fields to include in a partial response.
765
+ # @param [String] quota_user
766
+ # Available to use for quota purposes for server-side applications. Can be any
767
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
768
+ # Overrides userIp if both are provided.
769
+ # @param [String] user_ip
770
+ # IP address of the site where the request originates. Use this if you want to
771
+ # enforce per-user limits.
772
+ # @param [Google::Apis::RequestOptions] options
773
+ # Request-specific options
774
+ #
775
+ # @yield [result, err] Result & error if block supplied
776
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
777
+ # @yieldparam err [StandardError] error object if request failed
778
+ #
779
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
780
+ #
781
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
782
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
783
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
784
+ def get_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
785
+ path = 'enterprises/{enterpriseId}'
786
+ command = make_simple_command(:get, path, options)
787
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
788
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
789
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
790
+ command.query['fields'] = fields unless fields.nil?
791
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
792
+ command.query['userIp'] = user_ip unless user_ip.nil?
793
+ execute_or_queue_command(command, &block)
794
+ end
795
+
796
+ # Establishes the binding between the MDM and an enterprise. This is now
797
+ # deprecated; use enroll instead.
798
+ # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object
799
+ # @param [String] token
800
+ # The token provided by the enterprise to register the MDM.
801
+ # @param [String] fields
802
+ # Selector specifying which fields to include in a partial response.
803
+ # @param [String] quota_user
804
+ # Available to use for quota purposes for server-side applications. Can be any
805
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
806
+ # Overrides userIp if both are provided.
807
+ # @param [String] user_ip
808
+ # IP address of the site where the request originates. Use this if you want to
809
+ # enforce per-user limits.
810
+ # @param [Google::Apis::RequestOptions] options
811
+ # Request-specific options
812
+ #
813
+ # @yield [result, err] Result & error if block supplied
814
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
815
+ # @yieldparam err [StandardError] error object if request failed
816
+ #
817
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
818
+ #
819
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
820
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
821
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
822
+ def insert_enterprise(enterprise_object = nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
823
+ path = 'enterprises'
824
+ command = make_simple_command(:post, path, options)
825
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
826
+ command.request_object = enterprise_object
827
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
828
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
829
+ command.query['token'] = token unless token.nil?
830
+ command.query['fields'] = fields unless fields.nil?
831
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
832
+ command.query['userIp'] = user_ip unless user_ip.nil?
833
+ execute_or_queue_command(command, &block)
834
+ end
835
+
836
+ # Looks up an enterprise by domain name.
837
+ # @param [String] domain
838
+ # The exact primary domain name of the enterprise to look up.
839
+ # @param [String] fields
840
+ # Selector specifying which fields to include in a partial response.
841
+ # @param [String] quota_user
842
+ # Available to use for quota purposes for server-side applications. Can be any
843
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
844
+ # Overrides userIp if both are provided.
845
+ # @param [String] user_ip
846
+ # IP address of the site where the request originates. Use this if you want to
847
+ # enforce per-user limits.
848
+ # @param [Google::Apis::RequestOptions] options
849
+ # Request-specific options
850
+ #
851
+ # @yield [result, err] Result & error if block supplied
852
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse] parsed result object
853
+ # @yieldparam err [StandardError] error object if request failed
854
+ #
855
+ # @return [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse]
856
+ #
857
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
858
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
859
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
860
+ def list_enterprises(domain: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
861
+ path = 'enterprises'
862
+ command = make_simple_command(:get, path, options)
863
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse::Representation
864
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse
865
+ command.query['domain'] = domain unless domain.nil?
866
+ command.query['fields'] = fields unless fields.nil?
867
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
868
+ command.query['userIp'] = user_ip unless user_ip.nil?
869
+ execute_or_queue_command(command, &block)
870
+ end
871
+
872
+ # Set the account that will be used to authenticate to the API as the enterprise.
873
+ # @param [String] enterprise_id
874
+ # The ID of the enterprise.
875
+ # @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_account_object
876
+ # @param [String] fields
877
+ # Selector specifying which fields to include in a partial response.
878
+ # @param [String] quota_user
879
+ # Available to use for quota purposes for server-side applications. Can be any
880
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
881
+ # Overrides userIp if both are provided.
882
+ # @param [String] user_ip
883
+ # IP address of the site where the request originates. Use this if you want to
884
+ # enforce per-user limits.
885
+ # @param [Google::Apis::RequestOptions] options
886
+ # Request-specific options
887
+ #
888
+ # @yield [result, err] Result & error if block supplied
889
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] parsed result object
890
+ # @yieldparam err [StandardError] error object if request failed
891
+ #
892
+ # @return [Google::Apis::AndroidenterpriseV1::EnterpriseAccount]
893
+ #
894
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
895
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
896
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
897
+ def set_account_enterprise(enterprise_id, enterprise_account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
898
+ path = 'enterprises/{enterpriseId}/account'
899
+ command = make_simple_command(:put, path, options)
900
+ command.request_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
901
+ command.request_object = enterprise_account_object
902
+ command.response_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
903
+ command.response_class = Google::Apis::AndroidenterpriseV1::EnterpriseAccount
904
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
905
+ command.query['fields'] = fields unless fields.nil?
906
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
907
+ command.query['userIp'] = user_ip unless user_ip.nil?
908
+ execute_or_queue_command(command, &block)
909
+ end
910
+
911
+ # Unenrolls an enterprise from the calling MDM.
912
+ # @param [String] enterprise_id
913
+ # The ID of the enterprise.
914
+ # @param [String] fields
915
+ # Selector specifying which fields to include in a partial response.
916
+ # @param [String] quota_user
917
+ # Available to use for quota purposes for server-side applications. Can be any
918
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
919
+ # Overrides userIp if both are provided.
920
+ # @param [String] user_ip
921
+ # IP address of the site where the request originates. Use this if you want to
922
+ # enforce per-user limits.
923
+ # @param [Google::Apis::RequestOptions] options
924
+ # Request-specific options
925
+ #
926
+ # @yield [result, err] Result & error if block supplied
927
+ # @yieldparam result [NilClass] No result returned for this method
928
+ # @yieldparam err [StandardError] error object if request failed
929
+ #
930
+ # @return [void]
931
+ #
932
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
933
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
934
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
935
+ def unenroll_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
936
+ path = 'enterprises/{enterpriseId}/unenroll'
937
+ command = make_simple_command(:post, path, options)
938
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
939
+ command.query['fields'] = fields unless fields.nil?
940
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
941
+ command.query['userIp'] = user_ip unless user_ip.nil?
942
+ execute_or_queue_command(command, &block)
943
+ end
944
+
945
+ # Removes an entitlement to an app for a user and uninstalls it.
946
+ # @param [String] enterprise_id
947
+ # The ID of the enterprise.
948
+ # @param [String] user_id
949
+ # The ID of the user.
950
+ # @param [String] entitlement_id
951
+ # The ID of the entitlement, e.g. "app:com.google.android.gm".
952
+ # @param [String] fields
953
+ # Selector specifying which fields to include in a partial response.
954
+ # @param [String] quota_user
955
+ # Available to use for quota purposes for server-side applications. Can be any
956
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
957
+ # Overrides userIp if both are provided.
958
+ # @param [String] user_ip
959
+ # IP address of the site where the request originates. Use this if you want to
960
+ # enforce per-user limits.
961
+ # @param [Google::Apis::RequestOptions] options
962
+ # Request-specific options
963
+ #
964
+ # @yield [result, err] Result & error if block supplied
965
+ # @yieldparam result [NilClass] No result returned for this method
966
+ # @yieldparam err [StandardError] error object if request failed
967
+ #
968
+ # @return [void]
969
+ #
970
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
971
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
972
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
973
+ def delete_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
974
+ path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}'
975
+ command = make_simple_command(:delete, path, options)
976
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
977
+ command.params['userId'] = user_id unless user_id.nil?
978
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
979
+ command.query['fields'] = fields unless fields.nil?
980
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
981
+ command.query['userIp'] = user_ip unless user_ip.nil?
982
+ execute_or_queue_command(command, &block)
983
+ end
984
+
985
+ # Retrieves details of an entitlement.
986
+ # @param [String] enterprise_id
987
+ # The ID of the enterprise.
988
+ # @param [String] user_id
989
+ # The ID of the user.
990
+ # @param [String] entitlement_id
991
+ # The ID of the entitlement, e.g. "app:com.google.android.gm".
992
+ # @param [String] fields
993
+ # Selector specifying which fields to include in a partial response.
994
+ # @param [String] quota_user
995
+ # Available to use for quota purposes for server-side applications. Can be any
996
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
997
+ # Overrides userIp if both are provided.
998
+ # @param [String] user_ip
999
+ # IP address of the site where the request originates. Use this if you want to
1000
+ # enforce per-user limits.
1001
+ # @param [Google::Apis::RequestOptions] options
1002
+ # Request-specific options
1003
+ #
1004
+ # @yield [result, err] Result & error if block supplied
1005
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
1006
+ # @yieldparam err [StandardError] error object if request failed
1007
+ #
1008
+ # @return [Google::Apis::AndroidenterpriseV1::Entitlement]
1009
+ #
1010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1013
+ def get_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1014
+ path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}'
1015
+ command = make_simple_command(:get, path, options)
1016
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
1017
+ command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
1018
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1019
+ command.params['userId'] = user_id unless user_id.nil?
1020
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
1021
+ command.query['fields'] = fields unless fields.nil?
1022
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1023
+ command.query['userIp'] = user_ip unless user_ip.nil?
1024
+ execute_or_queue_command(command, &block)
1025
+ end
1026
+
1027
+ # List of all entitlements for the specified user. Only the ID is set.
1028
+ # @param [String] enterprise_id
1029
+ # The ID of the enterprise.
1030
+ # @param [String] user_id
1031
+ # The ID of the user.
1032
+ # @param [String] fields
1033
+ # Selector specifying which fields to include in a partial response.
1034
+ # @param [String] quota_user
1035
+ # Available to use for quota purposes for server-side applications. Can be any
1036
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1037
+ # Overrides userIp if both are provided.
1038
+ # @param [String] user_ip
1039
+ # IP address of the site where the request originates. Use this if you want to
1040
+ # enforce per-user limits.
1041
+ # @param [Google::Apis::RequestOptions] options
1042
+ # Request-specific options
1043
+ #
1044
+ # @yield [result, err] Result & error if block supplied
1045
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse] parsed result object
1046
+ # @yieldparam err [StandardError] error object if request failed
1047
+ #
1048
+ # @return [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse]
1049
+ #
1050
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1051
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1052
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1053
+ def list_entitlements(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1054
+ path = 'enterprises/{enterpriseId}/users/{userId}/entitlements'
1055
+ command = make_simple_command(:get, path, options)
1056
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse::Representation
1057
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse
1058
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1059
+ command.params['userId'] = user_id unless user_id.nil?
1060
+ command.query['fields'] = fields unless fields.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ command.query['userIp'] = user_ip unless user_ip.nil?
1063
+ execute_or_queue_command(command, &block)
1064
+ end
1065
+
1066
+ # Adds or updates an entitlement to an app for a user. This method supports
1067
+ # patch semantics.
1068
+ # @param [String] enterprise_id
1069
+ # The ID of the enterprise.
1070
+ # @param [String] user_id
1071
+ # The ID of the user.
1072
+ # @param [String] entitlement_id
1073
+ # The ID of the entitlement, e.g. "app:com.google.android.gm".
1074
+ # @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object
1075
+ # @param [Boolean] install
1076
+ # Set to true to also install the product on all the user's devices where
1077
+ # possible. Failure to install on one or more devices will not prevent this
1078
+ # operation from returning successfully, as long as the entitlement was
1079
+ # successfully assigned to the user.
1080
+ # @param [String] fields
1081
+ # Selector specifying which fields to include in a partial response.
1082
+ # @param [String] quota_user
1083
+ # Available to use for quota purposes for server-side applications. Can be any
1084
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1085
+ # Overrides userIp if both are provided.
1086
+ # @param [String] user_ip
1087
+ # IP address of the site where the request originates. Use this if you want to
1088
+ # enforce per-user limits.
1089
+ # @param [Google::Apis::RequestOptions] options
1090
+ # Request-specific options
1091
+ #
1092
+ # @yield [result, err] Result & error if block supplied
1093
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
1094
+ # @yieldparam err [StandardError] error object if request failed
1095
+ #
1096
+ # @return [Google::Apis::AndroidenterpriseV1::Entitlement]
1097
+ #
1098
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1099
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1100
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1101
+ def patch_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1102
+ path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}'
1103
+ command = make_simple_command(:patch, path, options)
1104
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
1105
+ command.request_object = entitlement_object
1106
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
1107
+ command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
1108
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1109
+ command.params['userId'] = user_id unless user_id.nil?
1110
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
1111
+ command.query['install'] = install unless install.nil?
1112
+ command.query['fields'] = fields unless fields.nil?
1113
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1114
+ command.query['userIp'] = user_ip unless user_ip.nil?
1115
+ execute_or_queue_command(command, &block)
1116
+ end
1117
+
1118
+ # Adds or updates an entitlement to an app for a user.
1119
+ # @param [String] enterprise_id
1120
+ # The ID of the enterprise.
1121
+ # @param [String] user_id
1122
+ # The ID of the user.
1123
+ # @param [String] entitlement_id
1124
+ # The ID of the entitlement, e.g. "app:com.google.android.gm".
1125
+ # @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object
1126
+ # @param [Boolean] install
1127
+ # Set to true to also install the product on all the user's devices where
1128
+ # possible. Failure to install on one or more devices will not prevent this
1129
+ # operation from returning successfully, as long as the entitlement was
1130
+ # successfully assigned to the user.
1131
+ # @param [String] fields
1132
+ # Selector specifying which fields to include in a partial response.
1133
+ # @param [String] quota_user
1134
+ # Available to use for quota purposes for server-side applications. Can be any
1135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1136
+ # Overrides userIp if both are provided.
1137
+ # @param [String] user_ip
1138
+ # IP address of the site where the request originates. Use this if you want to
1139
+ # enforce per-user limits.
1140
+ # @param [Google::Apis::RequestOptions] options
1141
+ # Request-specific options
1142
+ #
1143
+ # @yield [result, err] Result & error if block supplied
1144
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
1145
+ # @yieldparam err [StandardError] error object if request failed
1146
+ #
1147
+ # @return [Google::Apis::AndroidenterpriseV1::Entitlement]
1148
+ #
1149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1152
+ def update_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1153
+ path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}'
1154
+ command = make_simple_command(:put, path, options)
1155
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
1156
+ command.request_object = entitlement_object
1157
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
1158
+ command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
1159
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1160
+ command.params['userId'] = user_id unless user_id.nil?
1161
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
1162
+ command.query['install'] = install unless install.nil?
1163
+ command.query['fields'] = fields unless fields.nil?
1164
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1165
+ command.query['userIp'] = user_ip unless user_ip.nil?
1166
+ execute_or_queue_command(command, &block)
1167
+ end
1168
+
1169
+ # Retrieves details of an enterprise's group license for a product.
1170
+ # @param [String] enterprise_id
1171
+ # The ID of the enterprise.
1172
+ # @param [String] group_license_id
1173
+ # The ID of the product the group license is for, e.g. "app:com.google.android.
1174
+ # gm".
1175
+ # @param [String] fields
1176
+ # Selector specifying which fields to include in a partial response.
1177
+ # @param [String] quota_user
1178
+ # Available to use for quota purposes for server-side applications. Can be any
1179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1180
+ # Overrides userIp if both are provided.
1181
+ # @param [String] user_ip
1182
+ # IP address of the site where the request originates. Use this if you want to
1183
+ # enforce per-user limits.
1184
+ # @param [Google::Apis::RequestOptions] options
1185
+ # Request-specific options
1186
+ #
1187
+ # @yield [result, err] Result & error if block supplied
1188
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::GroupLicense] parsed result object
1189
+ # @yieldparam err [StandardError] error object if request failed
1190
+ #
1191
+ # @return [Google::Apis::AndroidenterpriseV1::GroupLicense]
1192
+ #
1193
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1194
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1195
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1196
+ def get_group_license(enterprise_id, group_license_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1197
+ path = 'enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}'
1198
+ command = make_simple_command(:get, path, options)
1199
+ command.response_representation = Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
1200
+ command.response_class = Google::Apis::AndroidenterpriseV1::GroupLicense
1201
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1202
+ command.params['groupLicenseId'] = group_license_id unless group_license_id.nil?
1203
+ command.query['fields'] = fields unless fields.nil?
1204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1205
+ command.query['userIp'] = user_ip unless user_ip.nil?
1206
+ execute_or_queue_command(command, &block)
1207
+ end
1208
+
1209
+ # Retrieves IDs of all products for which the enterprise has a group license.
1210
+ # @param [String] enterprise_id
1211
+ # The ID of the enterprise.
1212
+ # @param [String] fields
1213
+ # Selector specifying which fields to include in a partial response.
1214
+ # @param [String] quota_user
1215
+ # Available to use for quota purposes for server-side applications. Can be any
1216
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1217
+ # Overrides userIp if both are provided.
1218
+ # @param [String] user_ip
1219
+ # IP address of the site where the request originates. Use this if you want to
1220
+ # enforce per-user limits.
1221
+ # @param [Google::Apis::RequestOptions] options
1222
+ # Request-specific options
1223
+ #
1224
+ # @yield [result, err] Result & error if block supplied
1225
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse] parsed result object
1226
+ # @yieldparam err [StandardError] error object if request failed
1227
+ #
1228
+ # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse]
1229
+ #
1230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1233
+ def list_group_licenses(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1234
+ path = 'enterprises/{enterpriseId}/groupLicenses'
1235
+ command = make_simple_command(:get, path, options)
1236
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse::Representation
1237
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse
1238
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1239
+ command.query['fields'] = fields unless fields.nil?
1240
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1241
+ command.query['userIp'] = user_ip unless user_ip.nil?
1242
+ execute_or_queue_command(command, &block)
1243
+ end
1244
+
1245
+ # Retrieves the IDs of the users who have been granted entitlements under the
1246
+ # license.
1247
+ # @param [String] enterprise_id
1248
+ # The ID of the enterprise.
1249
+ # @param [String] group_license_id
1250
+ # The ID of the product the group license is for, e.g. "app:com.google.android.
1251
+ # gm".
1252
+ # @param [String] fields
1253
+ # Selector specifying which fields to include in a partial response.
1254
+ # @param [String] quota_user
1255
+ # Available to use for quota purposes for server-side applications. Can be any
1256
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1257
+ # Overrides userIp if both are provided.
1258
+ # @param [String] user_ip
1259
+ # IP address of the site where the request originates. Use this if you want to
1260
+ # enforce per-user limits.
1261
+ # @param [Google::Apis::RequestOptions] options
1262
+ # Request-specific options
1263
+ #
1264
+ # @yield [result, err] Result & error if block supplied
1265
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse] parsed result object
1266
+ # @yieldparam err [StandardError] error object if request failed
1267
+ #
1268
+ # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse]
1269
+ #
1270
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1271
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1272
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1273
+ def list_group_license_users(enterprise_id, group_license_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1274
+ path = 'enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users'
1275
+ command = make_simple_command(:get, path, options)
1276
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse::Representation
1277
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse
1278
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1279
+ command.params['groupLicenseId'] = group_license_id unless group_license_id.nil?
1280
+ command.query['fields'] = fields unless fields.nil?
1281
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1282
+ command.query['userIp'] = user_ip unless user_ip.nil?
1283
+ execute_or_queue_command(command, &block)
1284
+ end
1285
+
1286
+ # Requests to remove an app from a device. A call to get or list will still show
1287
+ # the app as installed on the device until it is actually removed.
1288
+ # @param [String] enterprise_id
1289
+ # The ID of the enterprise.
1290
+ # @param [String] user_id
1291
+ # The ID of the user.
1292
+ # @param [String] device_id
1293
+ # The Android ID of the device.
1294
+ # @param [String] install_id
1295
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1296
+ # gm".
1297
+ # @param [String] fields
1298
+ # Selector specifying which fields to include in a partial response.
1299
+ # @param [String] quota_user
1300
+ # Available to use for quota purposes for server-side applications. Can be any
1301
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1302
+ # Overrides userIp if both are provided.
1303
+ # @param [String] user_ip
1304
+ # IP address of the site where the request originates. Use this if you want to
1305
+ # enforce per-user limits.
1306
+ # @param [Google::Apis::RequestOptions] options
1307
+ # Request-specific options
1308
+ #
1309
+ # @yield [result, err] Result & error if block supplied
1310
+ # @yieldparam result [NilClass] No result returned for this method
1311
+ # @yieldparam err [StandardError] error object if request failed
1312
+ #
1313
+ # @return [void]
1314
+ #
1315
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1316
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1317
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1318
+ def delete_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1319
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}'
1320
+ command = make_simple_command(:delete, path, options)
1321
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1322
+ command.params['userId'] = user_id unless user_id.nil?
1323
+ command.params['deviceId'] = device_id unless device_id.nil?
1324
+ command.params['installId'] = install_id unless install_id.nil?
1325
+ command.query['fields'] = fields unless fields.nil?
1326
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1327
+ command.query['userIp'] = user_ip unless user_ip.nil?
1328
+ execute_or_queue_command(command, &block)
1329
+ end
1330
+
1331
+ # Retrieves details of an installation of an app on a device.
1332
+ # @param [String] enterprise_id
1333
+ # The ID of the enterprise.
1334
+ # @param [String] user_id
1335
+ # The ID of the user.
1336
+ # @param [String] device_id
1337
+ # The Android ID of the device.
1338
+ # @param [String] install_id
1339
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1340
+ # gm".
1341
+ # @param [String] fields
1342
+ # Selector specifying which fields to include in a partial response.
1343
+ # @param [String] quota_user
1344
+ # Available to use for quota purposes for server-side applications. Can be any
1345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1346
+ # Overrides userIp if both are provided.
1347
+ # @param [String] user_ip
1348
+ # IP address of the site where the request originates. Use this if you want to
1349
+ # enforce per-user limits.
1350
+ # @param [Google::Apis::RequestOptions] options
1351
+ # Request-specific options
1352
+ #
1353
+ # @yield [result, err] Result & error if block supplied
1354
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
1355
+ # @yieldparam err [StandardError] error object if request failed
1356
+ #
1357
+ # @return [Google::Apis::AndroidenterpriseV1::Install]
1358
+ #
1359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1362
+ def get_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1363
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}'
1364
+ command = make_simple_command(:get, path, options)
1365
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1366
+ command.response_class = Google::Apis::AndroidenterpriseV1::Install
1367
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1368
+ command.params['userId'] = user_id unless user_id.nil?
1369
+ command.params['deviceId'] = device_id unless device_id.nil?
1370
+ command.params['installId'] = install_id unless install_id.nil?
1371
+ command.query['fields'] = fields unless fields.nil?
1372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1373
+ command.query['userIp'] = user_ip unless user_ip.nil?
1374
+ execute_or_queue_command(command, &block)
1375
+ end
1376
+
1377
+ # Retrieves the details of all apps installed on the specified device.
1378
+ # @param [String] enterprise_id
1379
+ # The ID of the enterprise.
1380
+ # @param [String] user_id
1381
+ # The ID of the user.
1382
+ # @param [String] device_id
1383
+ # The Android ID of the device.
1384
+ # @param [String] fields
1385
+ # Selector specifying which fields to include in a partial response.
1386
+ # @param [String] quota_user
1387
+ # Available to use for quota purposes for server-side applications. Can be any
1388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1389
+ # Overrides userIp if both are provided.
1390
+ # @param [String] user_ip
1391
+ # IP address of the site where the request originates. Use this if you want to
1392
+ # enforce per-user limits.
1393
+ # @param [Google::Apis::RequestOptions] options
1394
+ # Request-specific options
1395
+ #
1396
+ # @yield [result, err] Result & error if block supplied
1397
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListInstallsResponse] parsed result object
1398
+ # @yieldparam err [StandardError] error object if request failed
1399
+ #
1400
+ # @return [Google::Apis::AndroidenterpriseV1::ListInstallsResponse]
1401
+ #
1402
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1403
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1404
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1405
+ def list_installs(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1406
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs'
1407
+ command = make_simple_command(:get, path, options)
1408
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListInstallsResponse::Representation
1409
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListInstallsResponse
1410
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1411
+ command.params['userId'] = user_id unless user_id.nil?
1412
+ command.params['deviceId'] = device_id unless device_id.nil?
1413
+ command.query['fields'] = fields unless fields.nil?
1414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1415
+ command.query['userIp'] = user_ip unless user_ip.nil?
1416
+ execute_or_queue_command(command, &block)
1417
+ end
1418
+
1419
+ # Requests to install the latest version of an app to a device. If the app is
1420
+ # already installed then it is updated to the latest version if necessary. This
1421
+ # method supports patch semantics.
1422
+ # @param [String] enterprise_id
1423
+ # The ID of the enterprise.
1424
+ # @param [String] user_id
1425
+ # The ID of the user.
1426
+ # @param [String] device_id
1427
+ # The Android ID of the device.
1428
+ # @param [String] install_id
1429
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1430
+ # gm".
1431
+ # @param [Google::Apis::AndroidenterpriseV1::Install] install_object
1432
+ # @param [String] fields
1433
+ # Selector specifying which fields to include in a partial response.
1434
+ # @param [String] quota_user
1435
+ # Available to use for quota purposes for server-side applications. Can be any
1436
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1437
+ # Overrides userIp if both are provided.
1438
+ # @param [String] user_ip
1439
+ # IP address of the site where the request originates. Use this if you want to
1440
+ # enforce per-user limits.
1441
+ # @param [Google::Apis::RequestOptions] options
1442
+ # Request-specific options
1443
+ #
1444
+ # @yield [result, err] Result & error if block supplied
1445
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
1446
+ # @yieldparam err [StandardError] error object if request failed
1447
+ #
1448
+ # @return [Google::Apis::AndroidenterpriseV1::Install]
1449
+ #
1450
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1451
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1452
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1453
+ def patch_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1454
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}'
1455
+ command = make_simple_command(:patch, path, options)
1456
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1457
+ command.request_object = install_object
1458
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1459
+ command.response_class = Google::Apis::AndroidenterpriseV1::Install
1460
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1461
+ command.params['userId'] = user_id unless user_id.nil?
1462
+ command.params['deviceId'] = device_id unless device_id.nil?
1463
+ command.params['installId'] = install_id unless install_id.nil?
1464
+ command.query['fields'] = fields unless fields.nil?
1465
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1466
+ command.query['userIp'] = user_ip unless user_ip.nil?
1467
+ execute_or_queue_command(command, &block)
1468
+ end
1469
+
1470
+ # Requests to install the latest version of an app to a device. If the app is
1471
+ # already installed then it is updated to the latest version if necessary.
1472
+ # @param [String] enterprise_id
1473
+ # The ID of the enterprise.
1474
+ # @param [String] user_id
1475
+ # The ID of the user.
1476
+ # @param [String] device_id
1477
+ # The Android ID of the device.
1478
+ # @param [String] install_id
1479
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1480
+ # gm".
1481
+ # @param [Google::Apis::AndroidenterpriseV1::Install] install_object
1482
+ # @param [String] fields
1483
+ # Selector specifying which fields to include in a partial response.
1484
+ # @param [String] quota_user
1485
+ # Available to use for quota purposes for server-side applications. Can be any
1486
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1487
+ # Overrides userIp if both are provided.
1488
+ # @param [String] user_ip
1489
+ # IP address of the site where the request originates. Use this if you want to
1490
+ # enforce per-user limits.
1491
+ # @param [Google::Apis::RequestOptions] options
1492
+ # Request-specific options
1493
+ #
1494
+ # @yield [result, err] Result & error if block supplied
1495
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
1496
+ # @yieldparam err [StandardError] error object if request failed
1497
+ #
1498
+ # @return [Google::Apis::AndroidenterpriseV1::Install]
1499
+ #
1500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1503
+ def update_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1504
+ path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}'
1505
+ command = make_simple_command(:put, path, options)
1506
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1507
+ command.request_object = install_object
1508
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1509
+ command.response_class = Google::Apis::AndroidenterpriseV1::Install
1510
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1511
+ command.params['userId'] = user_id unless user_id.nil?
1512
+ command.params['deviceId'] = device_id unless device_id.nil?
1513
+ command.params['installId'] = install_id unless install_id.nil?
1514
+ command.query['fields'] = fields unless fields.nil?
1515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1516
+ command.query['userIp'] = user_ip unless user_ip.nil?
1517
+ execute_or_queue_command(command, &block)
1518
+ end
1519
+
1520
+ # Retrieves details of an Android app permission for display to an enterprise
1521
+ # admin.
1522
+ # @param [String] permission_id
1523
+ # The ID of the permission.
1524
+ # @param [String] language
1525
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
1526
+ # @param [String] fields
1527
+ # Selector specifying which fields to include in a partial response.
1528
+ # @param [String] quota_user
1529
+ # Available to use for quota purposes for server-side applications. Can be any
1530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1531
+ # Overrides userIp if both are provided.
1532
+ # @param [String] user_ip
1533
+ # IP address of the site where the request originates. Use this if you want to
1534
+ # enforce per-user limits.
1535
+ # @param [Google::Apis::RequestOptions] options
1536
+ # Request-specific options
1537
+ #
1538
+ # @yield [result, err] Result & error if block supplied
1539
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Permission] parsed result object
1540
+ # @yieldparam err [StandardError] error object if request failed
1541
+ #
1542
+ # @return [Google::Apis::AndroidenterpriseV1::Permission]
1543
+ #
1544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1547
+ def get_permission(permission_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1548
+ path = 'permissions/{permissionId}'
1549
+ command = make_simple_command(:get, path, options)
1550
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation
1551
+ command.response_class = Google::Apis::AndroidenterpriseV1::Permission
1552
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1553
+ command.query['language'] = language unless language.nil?
1554
+ command.query['fields'] = fields unless fields.nil?
1555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1556
+ command.query['userIp'] = user_ip unless user_ip.nil?
1557
+ execute_or_queue_command(command, &block)
1558
+ end
1559
+
1560
+ # Approves the specified product (and the relevant app permissions, if any).
1561
+ # @param [String] enterprise_id
1562
+ # The ID of the enterprise.
1563
+ # @param [String] product_id
1564
+ # The ID of the product.
1565
+ # @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_request_object
1566
+ # @param [String] fields
1567
+ # Selector specifying which fields to include in a partial response.
1568
+ # @param [String] quota_user
1569
+ # Available to use for quota purposes for server-side applications. Can be any
1570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1571
+ # Overrides userIp if both are provided.
1572
+ # @param [String] user_ip
1573
+ # IP address of the site where the request originates. Use this if you want to
1574
+ # enforce per-user limits.
1575
+ # @param [Google::Apis::RequestOptions] options
1576
+ # Request-specific options
1577
+ #
1578
+ # @yield [result, err] Result & error if block supplied
1579
+ # @yieldparam result [NilClass] No result returned for this method
1580
+ # @yieldparam err [StandardError] error object if request failed
1581
+ #
1582
+ # @return [void]
1583
+ #
1584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1587
+ def approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1588
+ path = 'enterprises/{enterpriseId}/products/{productId}/approve'
1589
+ command = make_simple_command(:post, path, options)
1590
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation
1591
+ command.request_object = approve_product_request_object
1592
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1593
+ command.params['productId'] = product_id unless product_id.nil?
1594
+ command.query['fields'] = fields unless fields.nil?
1595
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1596
+ command.query['userIp'] = user_ip unless user_ip.nil?
1597
+ execute_or_queue_command(command, &block)
1598
+ end
1599
+
1600
+ # Generates a URL that can be used to display an iframe to view the product's
1601
+ # permissions (if any) and approve the product. This URL can be used to approve
1602
+ # the product for a limited time (currently 1 hour) using the Products.approve
1603
+ # call.
1604
+ # @param [String] enterprise_id
1605
+ # The ID of the enterprise.
1606
+ # @param [String] product_id
1607
+ # The ID of the product.
1608
+ # @param [String] language_code
1609
+ # The language code that will be used for permission names and descriptions in
1610
+ # the returned iframe.
1611
+ # @param [String] fields
1612
+ # Selector specifying which fields to include in a partial response.
1613
+ # @param [String] quota_user
1614
+ # Available to use for quota purposes for server-side applications. Can be any
1615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1616
+ # Overrides userIp if both are provided.
1617
+ # @param [String] user_ip
1618
+ # IP address of the site where the request originates. Use this if you want to
1619
+ # enforce per-user limits.
1620
+ # @param [Google::Apis::RequestOptions] options
1621
+ # Request-specific options
1622
+ #
1623
+ # @yield [result, err] Result & error if block supplied
1624
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object
1625
+ # @yieldparam err [StandardError] error object if request failed
1626
+ #
1627
+ # @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse]
1628
+ #
1629
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1630
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1631
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1632
+ def generate_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1633
+ path = 'enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl'
1634
+ command = make_simple_command(:post, path, options)
1635
+ command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation
1636
+ command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse
1637
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1638
+ command.params['productId'] = product_id unless product_id.nil?
1639
+ command.query['languageCode'] = language_code unless language_code.nil?
1640
+ command.query['fields'] = fields unless fields.nil?
1641
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1642
+ command.query['userIp'] = user_ip unless user_ip.nil?
1643
+ execute_or_queue_command(command, &block)
1644
+ end
1645
+
1646
+ # Retrieves details of a product for display to an enterprise admin.
1647
+ # @param [String] enterprise_id
1648
+ # The ID of the enterprise.
1649
+ # @param [String] product_id
1650
+ # The ID of the product, e.g. "app:com.google.android.gm".
1651
+ # @param [String] language
1652
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
1653
+ # @param [String] fields
1654
+ # Selector specifying which fields to include in a partial response.
1655
+ # @param [String] quota_user
1656
+ # Available to use for quota purposes for server-side applications. Can be any
1657
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1658
+ # Overrides userIp if both are provided.
1659
+ # @param [String] user_ip
1660
+ # IP address of the site where the request originates. Use this if you want to
1661
+ # enforce per-user limits.
1662
+ # @param [Google::Apis::RequestOptions] options
1663
+ # Request-specific options
1664
+ #
1665
+ # @yield [result, err] Result & error if block supplied
1666
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Product] parsed result object
1667
+ # @yieldparam err [StandardError] error object if request failed
1668
+ #
1669
+ # @return [Google::Apis::AndroidenterpriseV1::Product]
1670
+ #
1671
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1672
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1673
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1674
+ def get_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1675
+ path = 'enterprises/{enterpriseId}/products/{productId}'
1676
+ command = make_simple_command(:get, path, options)
1677
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation
1678
+ command.response_class = Google::Apis::AndroidenterpriseV1::Product
1679
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1680
+ command.params['productId'] = product_id unless product_id.nil?
1681
+ command.query['language'] = language unless language.nil?
1682
+ command.query['fields'] = fields unless fields.nil?
1683
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1684
+ command.query['userIp'] = user_ip unless user_ip.nil?
1685
+ execute_or_queue_command(command, &block)
1686
+ end
1687
+
1688
+ # Retrieves the schema defining app restrictions configurable for this product.
1689
+ # All products have a schema, but this may be empty if no app restrictions are
1690
+ # defined.
1691
+ # @param [String] enterprise_id
1692
+ # The ID of the enterprise.
1693
+ # @param [String] product_id
1694
+ # The ID of the product.
1695
+ # @param [String] language
1696
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
1697
+ # @param [String] fields
1698
+ # Selector specifying which fields to include in a partial response.
1699
+ # @param [String] quota_user
1700
+ # Available to use for quota purposes for server-side applications. Can be any
1701
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1702
+ # Overrides userIp if both are provided.
1703
+ # @param [String] user_ip
1704
+ # IP address of the site where the request originates. Use this if you want to
1705
+ # enforce per-user limits.
1706
+ # @param [Google::Apis::RequestOptions] options
1707
+ # Request-specific options
1708
+ #
1709
+ # @yield [result, err] Result & error if block supplied
1710
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object
1711
+ # @yieldparam err [StandardError] error object if request failed
1712
+ #
1713
+ # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema]
1714
+ #
1715
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1716
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1717
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1718
+ def get_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1719
+ path = 'enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema'
1720
+ command = make_simple_command(:get, path, options)
1721
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation
1722
+ command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema
1723
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1724
+ command.params['productId'] = product_id unless product_id.nil?
1725
+ command.query['language'] = language unless language.nil?
1726
+ command.query['fields'] = fields unless fields.nil?
1727
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1728
+ command.query['userIp'] = user_ip unless user_ip.nil?
1729
+ execute_or_queue_command(command, &block)
1730
+ end
1731
+
1732
+ # Retrieves the Android app permissions required by this app.
1733
+ # @param [String] enterprise_id
1734
+ # The ID of the enterprise.
1735
+ # @param [String] product_id
1736
+ # The ID of the product.
1737
+ # @param [String] fields
1738
+ # Selector specifying which fields to include in a partial response.
1739
+ # @param [String] quota_user
1740
+ # Available to use for quota purposes for server-side applications. Can be any
1741
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1742
+ # Overrides userIp if both are provided.
1743
+ # @param [String] user_ip
1744
+ # IP address of the site where the request originates. Use this if you want to
1745
+ # enforce per-user limits.
1746
+ # @param [Google::Apis::RequestOptions] options
1747
+ # Request-specific options
1748
+ #
1749
+ # @yield [result, err] Result & error if block supplied
1750
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
1751
+ # @yieldparam err [StandardError] error object if request failed
1752
+ #
1753
+ # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
1754
+ #
1755
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1756
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1757
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1758
+ def get_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1759
+ path = 'enterprises/{enterpriseId}/products/{productId}/permissions'
1760
+ command = make_simple_command(:get, path, options)
1761
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1762
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
1763
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1764
+ command.params['productId'] = product_id unless product_id.nil?
1765
+ command.query['fields'] = fields unless fields.nil?
1766
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1767
+ command.query['userIp'] = user_ip unless user_ip.nil?
1768
+ execute_or_queue_command(command, &block)
1769
+ end
1770
+
1771
+ # Updates the set of Android app permissions for this app that have been
1772
+ # accepted by the enterprise.
1773
+ # @param [String] enterprise_id
1774
+ # The ID of the enterprise.
1775
+ # @param [String] product_id
1776
+ # The ID of the product.
1777
+ # @param [Google::Apis::AndroidenterpriseV1::ProductPermissions] product_permissions_object
1778
+ # @param [String] fields
1779
+ # Selector specifying which fields to include in a partial response.
1780
+ # @param [String] quota_user
1781
+ # Available to use for quota purposes for server-side applications. Can be any
1782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1783
+ # Overrides userIp if both are provided.
1784
+ # @param [String] user_ip
1785
+ # IP address of the site where the request originates. Use this if you want to
1786
+ # enforce per-user limits.
1787
+ # @param [Google::Apis::RequestOptions] options
1788
+ # Request-specific options
1789
+ #
1790
+ # @yield [result, err] Result & error if block supplied
1791
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
1792
+ # @yieldparam err [StandardError] error object if request failed
1793
+ #
1794
+ # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
1795
+ #
1796
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1797
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1798
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1799
+ def update_product_permissions(enterprise_id, product_id, product_permissions_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1800
+ path = 'enterprises/{enterpriseId}/products/{productId}/permissions'
1801
+ command = make_simple_command(:put, path, options)
1802
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1803
+ command.request_object = product_permissions_object
1804
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1805
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
1806
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1807
+ command.params['productId'] = product_id unless product_id.nil?
1808
+ command.query['fields'] = fields unless fields.nil?
1809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1810
+ command.query['userIp'] = user_ip unless user_ip.nil?
1811
+ execute_or_queue_command(command, &block)
1812
+ end
1813
+
1814
+ # Generates a token (activation code) to allow this user to configure their work
1815
+ # account in the Android Setup Wizard. Revokes any previously generated token.
1816
+ # @param [String] enterprise_id
1817
+ # The ID of the enterprise.
1818
+ # @param [String] user_id
1819
+ # The ID of the user.
1820
+ # @param [String] fields
1821
+ # Selector specifying which fields to include in a partial response.
1822
+ # @param [String] quota_user
1823
+ # Available to use for quota purposes for server-side applications. Can be any
1824
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1825
+ # Overrides userIp if both are provided.
1826
+ # @param [String] user_ip
1827
+ # IP address of the site where the request originates. Use this if you want to
1828
+ # enforce per-user limits.
1829
+ # @param [Google::Apis::RequestOptions] options
1830
+ # Request-specific options
1831
+ #
1832
+ # @yield [result, err] Result & error if block supplied
1833
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::UserToken] parsed result object
1834
+ # @yieldparam err [StandardError] error object if request failed
1835
+ #
1836
+ # @return [Google::Apis::AndroidenterpriseV1::UserToken]
1837
+ #
1838
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1839
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1840
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1841
+ def generate_user_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1842
+ path = 'enterprises/{enterpriseId}/users/{userId}/token'
1843
+ command = make_simple_command(:post, path, options)
1844
+ command.response_representation = Google::Apis::AndroidenterpriseV1::UserToken::Representation
1845
+ command.response_class = Google::Apis::AndroidenterpriseV1::UserToken
1846
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1847
+ command.params['userId'] = user_id unless user_id.nil?
1848
+ command.query['fields'] = fields unless fields.nil?
1849
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1850
+ command.query['userIp'] = user_ip unless user_ip.nil?
1851
+ execute_or_queue_command(command, &block)
1852
+ end
1853
+
1854
+ # Retrieves a user's details.
1855
+ # @param [String] enterprise_id
1856
+ # The ID of the enterprise.
1857
+ # @param [String] user_id
1858
+ # The ID of the user.
1859
+ # @param [String] fields
1860
+ # Selector specifying which fields to include in a partial response.
1861
+ # @param [String] quota_user
1862
+ # Available to use for quota purposes for server-side applications. Can be any
1863
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1864
+ # Overrides userIp if both are provided.
1865
+ # @param [String] user_ip
1866
+ # IP address of the site where the request originates. Use this if you want to
1867
+ # enforce per-user limits.
1868
+ # @param [Google::Apis::RequestOptions] options
1869
+ # Request-specific options
1870
+ #
1871
+ # @yield [result, err] Result & error if block supplied
1872
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
1873
+ # @yieldparam err [StandardError] error object if request failed
1874
+ #
1875
+ # @return [Google::Apis::AndroidenterpriseV1::User]
1876
+ #
1877
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1878
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1879
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1880
+ def get_user(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1881
+ path = 'enterprises/{enterpriseId}/users/{userId}'
1882
+ command = make_simple_command(:get, path, options)
1883
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
1884
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
1885
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1886
+ command.params['userId'] = user_id unless user_id.nil?
1887
+ command.query['fields'] = fields unless fields.nil?
1888
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1889
+ command.query['userIp'] = user_ip unless user_ip.nil?
1890
+ execute_or_queue_command(command, &block)
1891
+ end
1892
+
1893
+ # Looks up a user by email address.
1894
+ # @param [String] enterprise_id
1895
+ # The ID of the enterprise.
1896
+ # @param [String] email
1897
+ # The exact primary email address of the user to look up.
1898
+ # @param [String] fields
1899
+ # Selector specifying which fields to include in a partial response.
1900
+ # @param [String] quota_user
1901
+ # Available to use for quota purposes for server-side applications. Can be any
1902
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1903
+ # Overrides userIp if both are provided.
1904
+ # @param [String] user_ip
1905
+ # IP address of the site where the request originates. Use this if you want to
1906
+ # enforce per-user limits.
1907
+ # @param [Google::Apis::RequestOptions] options
1908
+ # Request-specific options
1909
+ #
1910
+ # @yield [result, err] Result & error if block supplied
1911
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListUsersResponse] parsed result object
1912
+ # @yieldparam err [StandardError] error object if request failed
1913
+ #
1914
+ # @return [Google::Apis::AndroidenterpriseV1::ListUsersResponse]
1915
+ #
1916
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1917
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1918
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1919
+ def list_users(enterprise_id, email: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1920
+ path = 'enterprises/{enterpriseId}/users'
1921
+ command = make_simple_command(:get, path, options)
1922
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListUsersResponse::Representation
1923
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListUsersResponse
1924
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1925
+ command.query['email'] = email unless email.nil?
1926
+ command.query['fields'] = fields unless fields.nil?
1927
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1928
+ command.query['userIp'] = user_ip unless user_ip.nil?
1929
+ execute_or_queue_command(command, &block)
1930
+ end
1931
+
1932
+ # Revokes a previously generated token (activation code) for the user.
1933
+ # @param [String] enterprise_id
1934
+ # The ID of the enterprise.
1935
+ # @param [String] user_id
1936
+ # The ID of the user.
1937
+ # @param [String] fields
1938
+ # Selector specifying which fields to include in a partial response.
1939
+ # @param [String] quota_user
1940
+ # Available to use for quota purposes for server-side applications. Can be any
1941
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1942
+ # Overrides userIp if both are provided.
1943
+ # @param [String] user_ip
1944
+ # IP address of the site where the request originates. Use this if you want to
1945
+ # enforce per-user limits.
1946
+ # @param [Google::Apis::RequestOptions] options
1947
+ # Request-specific options
1948
+ #
1949
+ # @yield [result, err] Result & error if block supplied
1950
+ # @yieldparam result [NilClass] No result returned for this method
1951
+ # @yieldparam err [StandardError] error object if request failed
1952
+ #
1953
+ # @return [void]
1954
+ #
1955
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1956
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1957
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1958
+ def revoke_user_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1959
+ path = 'enterprises/{enterpriseId}/users/{userId}/token'
1960
+ command = make_simple_command(:delete, path, options)
1961
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1962
+ command.params['userId'] = user_id unless user_id.nil?
1963
+ command.query['fields'] = fields unless fields.nil?
1964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1965
+ command.query['userIp'] = user_ip unless user_ip.nil?
1966
+ execute_or_queue_command(command, &block)
1967
+ end
1968
+
1969
+ protected
1970
+
1971
+ def apply_command_defaults(command)
1972
+ command.query['key'] = key unless key.nil?
1973
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1974
+ command.query['userIp'] = user_ip unless user_ip.nil?
1975
+ end
1976
+ end
1977
+ end
1978
+ end
1979
+ end