google-api-client 0.8.3 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (497) 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 +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +52 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +35 -1
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  21. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  24. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  25. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  26. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  27. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  28. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  29. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  30. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  31. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  32. data/generated/google/apis/admin_directory_v1.rb +113 -0
  33. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  34. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  35. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  36. data/generated/google/apis/admin_reports_v1.rb +38 -0
  37. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  38. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  39. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  40. data/generated/google/apis/adsense_v1_4.rb +38 -0
  41. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  42. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  43. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  44. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  45. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  46. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  47. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  48. data/generated/google/apis/analytics_v3.rb +49 -0
  49. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  50. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  51. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  52. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  53. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  54. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  55. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  56. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  57. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  58. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  59. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  60. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  61. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  62. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  63. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  64. data/generated/google/apis/appsactivity_v1.rb +46 -0
  65. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  66. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  67. data/generated/google/apis/appstate_v1/service.rb +260 -0
  68. data/generated/google/apis/appstate_v1.rb +34 -0
  69. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  70. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  71. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  72. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  73. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  74. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  75. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  76. data/generated/google/apis/bigquery_v2.rb +52 -0
  77. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  78. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  79. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  80. data/generated/google/apis/blogger_v3.rb +37 -0
  81. data/generated/google/apis/books_v1/classes.rb +3956 -0
  82. data/generated/google/apis/books_v1/representations.rb +1538 -0
  83. data/generated/google/apis/books_v1/service.rb +2290 -0
  84. data/generated/google/apis/books_v1.rb +34 -0
  85. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  86. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  87. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  88. data/generated/google/apis/calendar_v3.rb +37 -0
  89. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  90. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  91. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  92. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  93. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  94. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  95. data/generated/google/apis/classroom_v1/service.rb +970 -0
  96. data/generated/google/apis/classroom_v1.rb +49 -0
  97. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  98. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  99. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  100. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  101. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  102. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  103. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  104. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  105. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  106. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  107. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  108. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  117. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  118. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  119. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  120. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  121. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  122. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  123. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  124. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  125. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  126. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  127. data/generated/google/apis/compute_beta/service.rb +10154 -0
  128. data/generated/google/apis/compute_beta.rb +49 -0
  129. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  130. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  131. data/generated/google/apis/compute_v1/service.rb +9252 -0
  132. data/generated/google/apis/compute_v1.rb +49 -0
  133. data/generated/google/apis/container_v1/classes.rb +463 -0
  134. data/generated/google/apis/container_v1/representations.rb +175 -0
  135. data/generated/google/apis/container_v1/service.rb +367 -0
  136. data/generated/google/apis/container_v1.rb +35 -0
  137. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  138. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  139. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  140. data/generated/google/apis/container_v1beta1.rb +35 -0
  141. data/generated/google/apis/content_v2/classes.rb +5986 -0
  142. data/generated/google/apis/content_v2/representations.rb +2288 -0
  143. data/generated/google/apis/content_v2/service.rb +2338 -0
  144. data/generated/google/apis/content_v2.rb +35 -0
  145. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  146. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  147. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  148. data/generated/google/apis/coordinate_v1.rb +37 -0
  149. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  150. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  151. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  152. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  153. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  154. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  155. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  156. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  157. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  158. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  159. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  160. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  165. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  166. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  167. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  168. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  169. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  170. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  171. data/generated/google/apis/discovery_v1/service.rb +142 -0
  172. data/generated/google/apis/discovery_v1.rb +32 -0
  173. data/generated/google/apis/dns_v1/classes.rb +406 -0
  174. data/generated/google/apis/dns_v1/representations.rb +151 -0
  175. data/generated/google/apis/dns_v1/service.rb +454 -0
  176. data/generated/google/apis/dns_v1.rb +44 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  181. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  182. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  183. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  184. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  185. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  186. data/generated/google/apis/drive_v2/representations.rb +795 -0
  187. data/generated/google/apis/drive_v2/service.rb +2696 -0
  188. data/generated/google/apis/drive_v2.rb +58 -0
  189. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  190. data/generated/google/apis/drive_v3/representations.rb +497 -0
  191. data/generated/google/apis/drive_v3/service.rb +1541 -0
  192. data/generated/google/apis/drive_v3.rb +55 -0
  193. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  194. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  195. data/generated/google/apis/fitness_v1/service.rb +675 -0
  196. data/generated/google/apis/fitness_v1.rb +49 -0
  197. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  198. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  199. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  200. data/generated/google/apis/fusiontables_v2.rb +37 -0
  201. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  202. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  203. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  204. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  205. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  206. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  207. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  208. data/generated/google/apis/games_management_v1management.rb +37 -0
  209. data/generated/google/apis/games_v1/classes.rb +4617 -0
  210. data/generated/google/apis/games_v1/representations.rb +1584 -0
  211. data/generated/google/apis/games_v1/service.rb +2290 -0
  212. data/generated/google/apis/games_v1.rb +40 -0
  213. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  214. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  215. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  216. data/generated/google/apis/gan_v1beta1.rb +31 -0
  217. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  218. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  219. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  220. data/generated/google/apis/genomics_v1.rb +49 -0
  221. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  222. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  223. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  224. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  225. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  226. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  227. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  228. data/generated/google/apis/gmail_v1.rb +52 -0
  229. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  230. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  231. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  232. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  233. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  234. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  235. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  236. data/generated/google/apis/groupssettings_v1.rb +34 -0
  237. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  238. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  239. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  240. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  241. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  242. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  243. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  244. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  245. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  246. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  247. data/generated/google/apis/licensing_v1/service.rb +369 -0
  248. data/generated/google/apis/licensing_v1.rb +34 -0
  249. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  250. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  251. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  252. data/generated/google/apis/logging_v1beta3.rb +47 -0
  253. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  254. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  255. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  256. data/generated/google/apis/manager_v1beta2.rb +53 -0
  257. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  258. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  259. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  260. data/generated/google/apis/mapsengine_v1.rb +38 -0
  261. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  262. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  263. data/generated/google/apis/mirror_v1/service.rb +977 -0
  264. data/generated/google/apis/mirror_v1.rb +37 -0
  265. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  266. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  267. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  268. data/generated/google/apis/oauth2_v2.rb +43 -0
  269. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  270. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  271. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  272. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  273. data/generated/google/apis/partners_v2/classes.rb +942 -0
  274. data/generated/google/apis/partners_v2/representations.rb +402 -0
  275. data/generated/google/apis/partners_v2/service.rb +400 -0
  276. data/generated/google/apis/partners_v2.rb +32 -0
  277. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  278. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  279. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  280. data/generated/google/apis/plus_domains_v1.rb +61 -0
  281. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  282. data/generated/google/apis/plus_v1/representations.rb +805 -0
  283. data/generated/google/apis/plus_v1/service.rb +470 -0
  284. data/generated/google/apis/plus_v1.rb +43 -0
  285. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  286. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  287. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  288. data/generated/google/apis/prediction_v1_6.rb +44 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  293. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  294. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  295. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  296. data/generated/google/apis/pubsub_v1.rb +37 -0
  297. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  298. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  299. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  300. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  301. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  302. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  303. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  304. data/generated/google/apis/qpx_express_v1.rb +31 -0
  305. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  306. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  307. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  308. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  313. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  314. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  315. data/generated/google/apis/reseller_v1/service.rb +623 -0
  316. data/generated/google/apis/reseller_v1.rb +37 -0
  317. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  318. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  319. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  320. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  321. data/generated/google/apis/script_v1/classes.rb +259 -0
  322. data/generated/google/apis/script_v1/representations.rb +106 -0
  323. data/generated/google/apis/script_v1/service.rb +98 -0
  324. data/generated/google/apis/script_v1.rb +61 -0
  325. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  326. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  327. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  328. data/generated/google/apis/site_verification_v1.rb +37 -0
  329. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  330. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  331. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  332. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  333. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  334. data/generated/google/apis/storage_v1/representations.rb +445 -0
  335. data/generated/google/apis/storage_v1/service.rb +1903 -0
  336. data/generated/google/apis/storage_v1.rb +46 -0
  337. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  338. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  339. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  340. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  341. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  342. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  343. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  344. data/generated/google/apis/tagmanager_v1.rb +52 -0
  345. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  346. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  347. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  348. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  349. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  350. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  351. data/generated/google/apis/tasks_v1/service.rb +643 -0
  352. data/generated/google/apis/tasks_v1.rb +37 -0
  353. data/generated/google/apis/translate_v2/classes.rb +168 -0
  354. data/generated/google/apis/translate_v2/representations.rb +109 -0
  355. data/generated/google/apis/translate_v2/service.rb +182 -0
  356. data/generated/google/apis/translate_v2.rb +31 -0
  357. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  358. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  359. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  360. data/generated/google/apis/urlshortener_v1.rb +34 -0
  361. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  362. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  363. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  364. data/generated/google/apis/webmasters_v3.rb +37 -0
  365. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  366. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  367. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  368. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  369. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  370. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  371. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  372. data/generated/google/apis/youtube_v3.rb +49 -0
  373. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  374. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  375. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  376. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +12 -11
  380. data/lib/google/api_client/auth/storage.rb +5 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis/core/api_command.rb +135 -0
  385. data/lib/google/apis/core/base_service.rb +317 -0
  386. data/lib/google/apis/core/batch.rb +239 -0
  387. data/lib/google/apis/core/download.rb +94 -0
  388. data/lib/google/apis/core/hashable.rb +44 -0
  389. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  390. data/lib/google/apis/core/http_command.rb +312 -0
  391. data/lib/google/apis/core/json_representation.rb +127 -0
  392. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  393. data/lib/google/apis/core/multipart.rb +187 -0
  394. data/lib/google/apis/core/upload.rb +288 -0
  395. data/lib/google/{api_client → apis}/errors.rb +39 -28
  396. data/lib/google/apis/generator/annotator.rb +295 -0
  397. data/lib/google/apis/generator/helpers.rb +74 -0
  398. data/lib/google/apis/generator/model.rb +143 -0
  399. data/lib/google/apis/generator/template.rb +124 -0
  400. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  401. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  402. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  403. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  404. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  405. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  406. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  407. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  408. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  409. data/lib/google/apis/generator.rb +70 -0
  410. data/lib/google/apis/options.rb +85 -0
  411. data/lib/google/apis/version.rb +39 -0
  412. data/lib/google/apis.rb +48 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper/load_path_spec.rb +33 -0
  460. data/spec/spec_helper.rb +131 -44
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client/auth/file_storage.rb +0 -59
  465. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  466. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  467. data/lib/google/api_client/batch.rb +0 -325
  468. data/lib/google/api_client/charset.rb +0 -33
  469. data/lib/google/api_client/discovery/api.rb +0 -300
  470. data/lib/google/api_client/discovery/media.rb +0 -77
  471. data/lib/google/api_client/discovery/method.rb +0 -363
  472. data/lib/google/api_client/discovery/resource.rb +0 -156
  473. data/lib/google/api_client/discovery/schema.rb +0 -119
  474. data/lib/google/api_client/environment.rb +0 -42
  475. data/lib/google/api_client/gzip.rb +0 -28
  476. data/lib/google/api_client/logging.rb +0 -32
  477. data/lib/google/api_client/media.rb +0 -259
  478. data/lib/google/api_client/railtie.rb +0 -18
  479. data/lib/google/api_client/request.rb +0 -350
  480. data/lib/google/api_client/result.rb +0 -255
  481. data/lib/google/api_client/service/batch.rb +0 -110
  482. data/lib/google/api_client/service/request.rb +0 -144
  483. data/lib/google/api_client/service/resource.rb +0 -40
  484. data/lib/google/api_client/service/result.rb +0 -162
  485. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  486. data/lib/google/api_client/service/stub_generator.rb +0 -61
  487. data/lib/google/api_client/service.rb +0 -233
  488. data/lib/google/api_client.rb +0 -750
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -662
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,3818 @@
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 AdminDirectoryV1
23
+ # Admin Directory API
24
+ #
25
+ # The Admin SDK Directory API lets you view and manage enterprise resources such
26
+ # as users and groups, administrative notifications, security features, and more.
27
+ #
28
+ # @example
29
+ # require 'google/apis/admin_directory_v1'
30
+ #
31
+ # Admin = Google::Apis::AdminDirectoryV1 # Alias the module
32
+ # service = Admin::DirectoryService.new
33
+ #
34
+ # @see https://developers.google.com/admin-sdk/directory/
35
+ class DirectoryService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ # Overrides userIp if both are provided.
45
+ attr_accessor :quota_user
46
+
47
+ # @return [String]
48
+ # IP address of the site where the request originates. Use this if you want to
49
+ # enforce per-user limits.
50
+ attr_accessor :user_ip
51
+
52
+ def initialize
53
+ super('https://www.googleapis.com/', 'admin/directory/v1/')
54
+ end
55
+
56
+ # Delete an ASP issued by a user.
57
+ # @param [String] user_key
58
+ # Identifies the user in the API request. The value can be the user's primary
59
+ # email address, alias email address, or unique user ID.
60
+ # @param [Fixnum] code_id
61
+ # The unique ID of the ASP to be deleted.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # Overrides userIp if both are provided.
68
+ # @param [String] user_ip
69
+ # IP address of the site where the request originates. Use this if you want to
70
+ # enforce per-user limits.
71
+ # @param [Google::Apis::RequestOptions] options
72
+ # Request-specific options
73
+ #
74
+ # @yield [result, err] Result & error if block supplied
75
+ # @yieldparam result [NilClass] No result returned for this method
76
+ # @yieldparam err [StandardError] error object if request failed
77
+ #
78
+ # @return [void]
79
+ #
80
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
81
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
82
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
83
+ def delete_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
84
+ command = make_simple_command(:delete, 'users/{userKey}/asps/{codeId}', options)
85
+ command.params['userKey'] = user_key unless user_key.nil?
86
+ command.params['codeId'] = code_id unless code_id.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ command.query['userIp'] = user_ip unless user_ip.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Get information about an ASP issued by a user.
94
+ # @param [String] user_key
95
+ # Identifies the user in the API request. The value can be the user's primary
96
+ # email address, alias email address, or unique user ID.
97
+ # @param [Fixnum] code_id
98
+ # The unique ID of the ASP.
99
+ # @param [String] fields
100
+ # Selector specifying which fields to include in a partial response.
101
+ # @param [String] quota_user
102
+ # Available to use for quota purposes for server-side applications. Can be any
103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
104
+ # Overrides userIp if both are provided.
105
+ # @param [String] user_ip
106
+ # IP address of the site where the request originates. Use this if you want to
107
+ # enforce per-user limits.
108
+ # @param [Google::Apis::RequestOptions] options
109
+ # Request-specific options
110
+ #
111
+ # @yield [result, err] Result & error if block supplied
112
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Asp] parsed result object
113
+ # @yieldparam err [StandardError] error object if request failed
114
+ #
115
+ # @return [Google::Apis::AdminDirectoryV1::Asp]
116
+ #
117
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
118
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
119
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
120
+ def get_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
121
+ command = make_simple_command(:get, 'users/{userKey}/asps/{codeId}', options)
122
+ command.response_representation = Google::Apis::AdminDirectoryV1::Asp::Representation
123
+ command.response_class = Google::Apis::AdminDirectoryV1::Asp
124
+ command.params['userKey'] = user_key unless user_key.nil?
125
+ command.params['codeId'] = code_id unless code_id.nil?
126
+ command.query['fields'] = fields unless fields.nil?
127
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
128
+ command.query['userIp'] = user_ip unless user_ip.nil?
129
+ execute_or_queue_command(command, &block)
130
+ end
131
+
132
+ # List the ASPs issued by a user.
133
+ # @param [String] user_key
134
+ # Identifies the user in the API request. The value can be the user's primary
135
+ # email address, alias email address, or unique user ID.
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # Overrides userIp if both are provided.
142
+ # @param [String] user_ip
143
+ # IP address of the site where the request originates. Use this if you want to
144
+ # enforce per-user limits.
145
+ # @param [Google::Apis::RequestOptions] options
146
+ # Request-specific options
147
+ #
148
+ # @yield [result, err] Result & error if block supplied
149
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Asps] parsed result object
150
+ # @yieldparam err [StandardError] error object if request failed
151
+ #
152
+ # @return [Google::Apis::AdminDirectoryV1::Asps]
153
+ #
154
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
155
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
156
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
157
+ def list_asps(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
158
+ command = make_simple_command(:get, 'users/{userKey}/asps', options)
159
+ command.response_representation = Google::Apis::AdminDirectoryV1::Asps::Representation
160
+ command.response_class = Google::Apis::AdminDirectoryV1::Asps
161
+ command.params['userKey'] = user_key unless user_key.nil?
162
+ command.query['fields'] = fields unless fields.nil?
163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
164
+ command.query['userIp'] = user_ip unless user_ip.nil?
165
+ execute_or_queue_command(command, &block)
166
+ end
167
+
168
+ # Stop watching resources through this channel
169
+ # @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
170
+ # @param [String] fields
171
+ # Selector specifying which fields to include in a partial response.
172
+ # @param [String] quota_user
173
+ # Available to use for quota purposes for server-side applications. Can be any
174
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
175
+ # Overrides userIp if both are provided.
176
+ # @param [String] user_ip
177
+ # IP address of the site where the request originates. Use this if you want to
178
+ # enforce per-user limits.
179
+ # @param [Google::Apis::RequestOptions] options
180
+ # Request-specific options
181
+ #
182
+ # @yield [result, err] Result & error if block supplied
183
+ # @yieldparam result [NilClass] No result returned for this method
184
+ # @yieldparam err [StandardError] error object if request failed
185
+ #
186
+ # @return [void]
187
+ #
188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
191
+ def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
192
+ command = make_simple_command(:post, '/admin/directory_v1/channels/stop', options)
193
+ command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
194
+ command.request_object = channel_object
195
+ command.query['fields'] = fields unless fields.nil?
196
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
197
+ command.query['userIp'] = user_ip unless user_ip.nil?
198
+ execute_or_queue_command(command, &block)
199
+ end
200
+
201
+ # Retrieve Chrome OS Device
202
+ # @param [String] customer_id
203
+ # Immutable id of the Google Apps account
204
+ # @param [String] device_id
205
+ # Immutable id of Chrome OS Device
206
+ # @param [String] projection
207
+ # Restrict information returned to a set of selected fields.
208
+ # @param [String] fields
209
+ # Selector specifying which fields to include in a partial response.
210
+ # @param [String] quota_user
211
+ # Available to use for quota purposes for server-side applications. Can be any
212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
213
+ # Overrides userIp if both are provided.
214
+ # @param [String] user_ip
215
+ # IP address of the site where the request originates. Use this if you want to
216
+ # enforce per-user limits.
217
+ # @param [Google::Apis::RequestOptions] options
218
+ # Request-specific options
219
+ #
220
+ # @yield [result, err] Result & error if block supplied
221
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
222
+ # @yieldparam err [StandardError] error object if request failed
223
+ #
224
+ # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
225
+ #
226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
229
+ def get_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
230
+ command = make_simple_command(:get, 'customer/{customerId}/devices/chromeos/{deviceId}', options)
231
+ command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
232
+ command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
233
+ command.params['customerId'] = customer_id unless customer_id.nil?
234
+ command.params['deviceId'] = device_id unless device_id.nil?
235
+ command.query['projection'] = projection unless projection.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ command.query['userIp'] = user_ip unless user_ip.nil?
239
+ execute_or_queue_command(command, &block)
240
+ end
241
+
242
+ # Retrieve all Chrome OS Devices of a customer (paginated)
243
+ # @param [String] customer_id
244
+ # Immutable id of the Google Apps account
245
+ # @param [Fixnum] max_results
246
+ # Maximum number of results to return. Default is 100
247
+ # @param [String] order_by
248
+ # Column to use for sorting results
249
+ # @param [String] page_token
250
+ # Token to specify next page in the list
251
+ # @param [String] projection
252
+ # Restrict information returned to a set of selected fields.
253
+ # @param [String] query
254
+ # Search string in the format given at http://support.google.com/chromeos/a/bin/
255
+ # answer.py?hl=en&answer=1698333
256
+ # @param [String] sort_order
257
+ # Whether to return results in ascending or descending order. Only of use when
258
+ # orderBy is also used
259
+ # @param [String] fields
260
+ # Selector specifying which fields to include in a partial response.
261
+ # @param [String] quota_user
262
+ # Available to use for quota purposes for server-side applications. Can be any
263
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
264
+ # Overrides userIp if both are provided.
265
+ # @param [String] user_ip
266
+ # IP address of the site where the request originates. Use this if you want to
267
+ # enforce per-user limits.
268
+ # @param [Google::Apis::RequestOptions] options
269
+ # Request-specific options
270
+ #
271
+ # @yield [result, err] Result & error if block supplied
272
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevices] parsed result object
273
+ # @yieldparam err [StandardError] error object if request failed
274
+ #
275
+ # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevices]
276
+ #
277
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
278
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
279
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
280
+ def list_chrome_os_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
281
+ command = make_simple_command(:get, 'customer/{customerId}/devices/chromeos', options)
282
+ command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevices::Representation
283
+ command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevices
284
+ command.params['customerId'] = customer_id unless customer_id.nil?
285
+ command.query['maxResults'] = max_results unless max_results.nil?
286
+ command.query['orderBy'] = order_by unless order_by.nil?
287
+ command.query['pageToken'] = page_token unless page_token.nil?
288
+ command.query['projection'] = projection unless projection.nil?
289
+ command.query['query'] = query unless query.nil?
290
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
291
+ command.query['fields'] = fields unless fields.nil?
292
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
293
+ command.query['userIp'] = user_ip unless user_ip.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # Update Chrome OS Device. This method supports patch semantics.
298
+ # @param [String] customer_id
299
+ # Immutable id of the Google Apps account
300
+ # @param [String] device_id
301
+ # Immutable id of Chrome OS Device
302
+ # @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object
303
+ # @param [String] projection
304
+ # Restrict information returned to a set of selected fields.
305
+ # @param [String] fields
306
+ # Selector specifying which fields to include in a partial response.
307
+ # @param [String] quota_user
308
+ # Available to use for quota purposes for server-side applications. Can be any
309
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
310
+ # Overrides userIp if both are provided.
311
+ # @param [String] user_ip
312
+ # IP address of the site where the request originates. Use this if you want to
313
+ # enforce per-user limits.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def patch_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
327
+ command = make_simple_command(:patch, 'customer/{customerId}/devices/chromeos/{deviceId}', options)
328
+ command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
329
+ command.request_object = chrome_os_device_object
330
+ command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
331
+ command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
332
+ command.params['customerId'] = customer_id unless customer_id.nil?
333
+ command.params['deviceId'] = device_id unless device_id.nil?
334
+ command.query['projection'] = projection unless projection.nil?
335
+ command.query['fields'] = fields unless fields.nil?
336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
337
+ command.query['userIp'] = user_ip unless user_ip.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Update Chrome OS Device
342
+ # @param [String] customer_id
343
+ # Immutable id of the Google Apps account
344
+ # @param [String] device_id
345
+ # Immutable id of Chrome OS Device
346
+ # @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object
347
+ # @param [String] projection
348
+ # Restrict information returned to a set of selected fields.
349
+ # @param [String] fields
350
+ # Selector specifying which fields to include in a partial response.
351
+ # @param [String] quota_user
352
+ # Available to use for quota purposes for server-side applications. Can be any
353
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
354
+ # Overrides userIp if both are provided.
355
+ # @param [String] user_ip
356
+ # IP address of the site where the request originates. Use this if you want to
357
+ # enforce per-user limits.
358
+ # @param [Google::Apis::RequestOptions] options
359
+ # Request-specific options
360
+ #
361
+ # @yield [result, err] Result & error if block supplied
362
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
363
+ # @yieldparam err [StandardError] error object if request failed
364
+ #
365
+ # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
366
+ #
367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
370
+ def update_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
371
+ command = make_simple_command(:put, 'customer/{customerId}/devices/chromeos/{deviceId}', options)
372
+ command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
373
+ command.request_object = chrome_os_device_object
374
+ command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
375
+ command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
376
+ command.params['customerId'] = customer_id unless customer_id.nil?
377
+ command.params['deviceId'] = device_id unless device_id.nil?
378
+ command.query['projection'] = projection unless projection.nil?
379
+ command.query['fields'] = fields unless fields.nil?
380
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
381
+ command.query['userIp'] = user_ip unless user_ip.nil?
382
+ execute_or_queue_command(command, &block)
383
+ end
384
+
385
+ # Retrives a customer.
386
+ # @param [String] customer_key
387
+ # Id of the customer to be retrieved
388
+ # @param [String] fields
389
+ # Selector specifying which fields to include in a partial response.
390
+ # @param [String] quota_user
391
+ # Available to use for quota purposes for server-side applications. Can be any
392
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
393
+ # Overrides userIp if both are provided.
394
+ # @param [String] user_ip
395
+ # IP address of the site where the request originates. Use this if you want to
396
+ # enforce per-user limits.
397
+ # @param [Google::Apis::RequestOptions] options
398
+ # Request-specific options
399
+ #
400
+ # @yield [result, err] Result & error if block supplied
401
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Customer] parsed result object
402
+ # @yieldparam err [StandardError] error object if request failed
403
+ #
404
+ # @return [Google::Apis::AdminDirectoryV1::Customer]
405
+ #
406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
409
+ def get_customer(customer_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
410
+ command = make_simple_command(:get, 'customers/{customerKey}', options)
411
+ command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
412
+ command.response_class = Google::Apis::AdminDirectoryV1::Customer
413
+ command.params['customerKey'] = customer_key unless customer_key.nil?
414
+ command.query['fields'] = fields unless fields.nil?
415
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
416
+ command.query['userIp'] = user_ip unless user_ip.nil?
417
+ execute_or_queue_command(command, &block)
418
+ end
419
+
420
+ # Updates a customer. This method supports patch semantics.
421
+ # @param [String] customer_key
422
+ # Id of the customer to be updated
423
+ # @param [Google::Apis::AdminDirectoryV1::Customer] customer_object
424
+ # @param [String] fields
425
+ # Selector specifying which fields to include in a partial response.
426
+ # @param [String] quota_user
427
+ # Available to use for quota purposes for server-side applications. Can be any
428
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
429
+ # Overrides userIp if both are provided.
430
+ # @param [String] user_ip
431
+ # IP address of the site where the request originates. Use this if you want to
432
+ # enforce per-user limits.
433
+ # @param [Google::Apis::RequestOptions] options
434
+ # Request-specific options
435
+ #
436
+ # @yield [result, err] Result & error if block supplied
437
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Customer] parsed result object
438
+ # @yieldparam err [StandardError] error object if request failed
439
+ #
440
+ # @return [Google::Apis::AdminDirectoryV1::Customer]
441
+ #
442
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
443
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
444
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
445
+ def patch_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
446
+ command = make_simple_command(:patch, 'customers/{customerKey}', options)
447
+ command.request_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
448
+ command.request_object = customer_object
449
+ command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
450
+ command.response_class = Google::Apis::AdminDirectoryV1::Customer
451
+ command.params['customerKey'] = customer_key unless customer_key.nil?
452
+ command.query['fields'] = fields unless fields.nil?
453
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
454
+ command.query['userIp'] = user_ip unless user_ip.nil?
455
+ execute_or_queue_command(command, &block)
456
+ end
457
+
458
+ # Updates a customer.
459
+ # @param [String] customer_key
460
+ # Id of the customer to be updated
461
+ # @param [Google::Apis::AdminDirectoryV1::Customer] customer_object
462
+ # @param [String] fields
463
+ # Selector specifying which fields to include in a partial response.
464
+ # @param [String] quota_user
465
+ # Available to use for quota purposes for server-side applications. Can be any
466
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
467
+ # Overrides userIp if both are provided.
468
+ # @param [String] user_ip
469
+ # IP address of the site where the request originates. Use this if you want to
470
+ # enforce per-user limits.
471
+ # @param [Google::Apis::RequestOptions] options
472
+ # Request-specific options
473
+ #
474
+ # @yield [result, err] Result & error if block supplied
475
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Customer] parsed result object
476
+ # @yieldparam err [StandardError] error object if request failed
477
+ #
478
+ # @return [Google::Apis::AdminDirectoryV1::Customer]
479
+ #
480
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
481
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
482
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
483
+ def update_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
484
+ command = make_simple_command(:put, 'customers/{customerKey}', options)
485
+ command.request_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
486
+ command.request_object = customer_object
487
+ command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
488
+ command.response_class = Google::Apis::AdminDirectoryV1::Customer
489
+ command.params['customerKey'] = customer_key unless customer_key.nil?
490
+ command.query['fields'] = fields unless fields.nil?
491
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
492
+ command.query['userIp'] = user_ip unless user_ip.nil?
493
+ execute_or_queue_command(command, &block)
494
+ end
495
+
496
+ # Deletes a Domain Alias of the customer.
497
+ # @param [String] customer
498
+ # Immutable id of the Google Apps account.
499
+ # @param [String] domain_alias_name
500
+ # Name of domain alias to be retrieved.
501
+ # @param [String] fields
502
+ # Selector specifying which fields to include in a partial response.
503
+ # @param [String] quota_user
504
+ # Available to use for quota purposes for server-side applications. Can be any
505
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
506
+ # Overrides userIp if both are provided.
507
+ # @param [String] user_ip
508
+ # IP address of the site where the request originates. Use this if you want to
509
+ # enforce per-user limits.
510
+ # @param [Google::Apis::RequestOptions] options
511
+ # Request-specific options
512
+ #
513
+ # @yield [result, err] Result & error if block supplied
514
+ # @yieldparam result [NilClass] No result returned for this method
515
+ # @yieldparam err [StandardError] error object if request failed
516
+ #
517
+ # @return [void]
518
+ #
519
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
522
+ def delete_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
523
+ command = make_simple_command(:delete, 'customer/{customer}/domainaliases/{domainAliasName}', options)
524
+ command.params['customer'] = customer unless customer.nil?
525
+ command.params['domainAliasName'] = domain_alias_name unless domain_alias_name.nil?
526
+ command.query['fields'] = fields unless fields.nil?
527
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
528
+ command.query['userIp'] = user_ip unless user_ip.nil?
529
+ execute_or_queue_command(command, &block)
530
+ end
531
+
532
+ # Retrieves a domain alias of the customer.
533
+ # @param [String] customer
534
+ # Immutable id of the Google Apps account.
535
+ # @param [String] domain_alias_name
536
+ # Name of domain alias to be retrieved.
537
+ # @param [String] fields
538
+ # Selector specifying which fields to include in a partial response.
539
+ # @param [String] quota_user
540
+ # Available to use for quota purposes for server-side applications. Can be any
541
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
542
+ # Overrides userIp if both are provided.
543
+ # @param [String] user_ip
544
+ # IP address of the site where the request originates. Use this if you want to
545
+ # enforce per-user limits.
546
+ # @param [Google::Apis::RequestOptions] options
547
+ # Request-specific options
548
+ #
549
+ # @yield [result, err] Result & error if block supplied
550
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::DomainAlias] parsed result object
551
+ # @yieldparam err [StandardError] error object if request failed
552
+ #
553
+ # @return [Google::Apis::AdminDirectoryV1::DomainAlias]
554
+ #
555
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
556
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
557
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
558
+ def get_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
559
+ command = make_simple_command(:get, 'customer/{customer}/domainaliases/{domainAliasName}', options)
560
+ command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
561
+ command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
562
+ command.params['customer'] = customer unless customer.nil?
563
+ command.params['domainAliasName'] = domain_alias_name unless domain_alias_name.nil?
564
+ command.query['fields'] = fields unless fields.nil?
565
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
566
+ command.query['userIp'] = user_ip unless user_ip.nil?
567
+ execute_or_queue_command(command, &block)
568
+ end
569
+
570
+ # Inserts a Domain alias of the customer.
571
+ # @param [String] customer
572
+ # Immutable id of the Google Apps account.
573
+ # @param [Google::Apis::AdminDirectoryV1::DomainAlias] domain_alias_object
574
+ # @param [String] fields
575
+ # Selector specifying which fields to include in a partial response.
576
+ # @param [String] quota_user
577
+ # Available to use for quota purposes for server-side applications. Can be any
578
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
579
+ # Overrides userIp if both are provided.
580
+ # @param [String] user_ip
581
+ # IP address of the site where the request originates. Use this if you want to
582
+ # enforce per-user limits.
583
+ # @param [Google::Apis::RequestOptions] options
584
+ # Request-specific options
585
+ #
586
+ # @yield [result, err] Result & error if block supplied
587
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::DomainAlias] parsed result object
588
+ # @yieldparam err [StandardError] error object if request failed
589
+ #
590
+ # @return [Google::Apis::AdminDirectoryV1::DomainAlias]
591
+ #
592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
595
+ def insert_domain_alias(customer, domain_alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
596
+ command = make_simple_command(:post, 'customer/{customer}/domainaliases', options)
597
+ command.request_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
598
+ command.request_object = domain_alias_object
599
+ command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
600
+ command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
601
+ command.params['customer'] = customer unless customer.nil?
602
+ command.query['fields'] = fields unless fields.nil?
603
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
604
+ command.query['userIp'] = user_ip unless user_ip.nil?
605
+ execute_or_queue_command(command, &block)
606
+ end
607
+
608
+ # Lists the domain aliases of the customer.
609
+ # @param [String] customer
610
+ # Immutable id of the Google Apps account.
611
+ # @param [String] parent_domain_name
612
+ # Name of the parent domain for which domain aliases are to be fetched.
613
+ # @param [String] fields
614
+ # Selector specifying which fields to include in a partial response.
615
+ # @param [String] quota_user
616
+ # Available to use for quota purposes for server-side applications. Can be any
617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
618
+ # Overrides userIp if both are provided.
619
+ # @param [String] user_ip
620
+ # IP address of the site where the request originates. Use this if you want to
621
+ # enforce per-user limits.
622
+ # @param [Google::Apis::RequestOptions] options
623
+ # Request-specific options
624
+ #
625
+ # @yield [result, err] Result & error if block supplied
626
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::DomainAliases] parsed result object
627
+ # @yieldparam err [StandardError] error object if request failed
628
+ #
629
+ # @return [Google::Apis::AdminDirectoryV1::DomainAliases]
630
+ #
631
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
632
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
633
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
634
+ def list_domain_aliases(customer, parent_domain_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
635
+ command = make_simple_command(:get, 'customer/{customer}/domainaliases', options)
636
+ command.response_representation = Google::Apis::AdminDirectoryV1::DomainAliases::Representation
637
+ command.response_class = Google::Apis::AdminDirectoryV1::DomainAliases
638
+ command.params['customer'] = customer unless customer.nil?
639
+ command.query['parentDomainName'] = parent_domain_name unless parent_domain_name.nil?
640
+ command.query['fields'] = fields unless fields.nil?
641
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
642
+ command.query['userIp'] = user_ip unless user_ip.nil?
643
+ execute_or_queue_command(command, &block)
644
+ end
645
+
646
+ # Deletes a domain of the customer.
647
+ # @param [String] customer
648
+ # Immutable id of the Google Apps account.
649
+ # @param [String] domain_name
650
+ # Name of domain to be deleted
651
+ # @param [String] fields
652
+ # Selector specifying which fields to include in a partial response.
653
+ # @param [String] quota_user
654
+ # Available to use for quota purposes for server-side applications. Can be any
655
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
656
+ # Overrides userIp if both are provided.
657
+ # @param [String] user_ip
658
+ # IP address of the site where the request originates. Use this if you want to
659
+ # enforce per-user limits.
660
+ # @param [Google::Apis::RequestOptions] options
661
+ # Request-specific options
662
+ #
663
+ # @yield [result, err] Result & error if block supplied
664
+ # @yieldparam result [NilClass] No result returned for this method
665
+ # @yieldparam err [StandardError] error object if request failed
666
+ #
667
+ # @return [void]
668
+ #
669
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
670
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
671
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
672
+ def delete_domain(customer, domain_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
673
+ command = make_simple_command(:delete, 'customer/{customer}/domains/{domainName}', options)
674
+ command.params['customer'] = customer unless customer.nil?
675
+ command.params['domainName'] = domain_name unless domain_name.nil?
676
+ command.query['fields'] = fields unless fields.nil?
677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
678
+ command.query['userIp'] = user_ip unless user_ip.nil?
679
+ execute_or_queue_command(command, &block)
680
+ end
681
+
682
+ # Retrives a domain of the customer.
683
+ # @param [String] customer
684
+ # Immutable id of the Google Apps account.
685
+ # @param [String] domain_name
686
+ # Name of domain to be retrieved
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
689
+ # @param [String] quota_user
690
+ # Available to use for quota purposes for server-side applications. Can be any
691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
692
+ # Overrides userIp if both are provided.
693
+ # @param [String] user_ip
694
+ # IP address of the site where the request originates. Use this if you want to
695
+ # enforce per-user limits.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Domains] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::AdminDirectoryV1::Domains]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def get_domain(customer, domain_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
709
+ command = make_simple_command(:get, 'customer/{customer}/domains/{domainName}', options)
710
+ command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
711
+ command.response_class = Google::Apis::AdminDirectoryV1::Domains
712
+ command.params['customer'] = customer unless customer.nil?
713
+ command.params['domainName'] = domain_name unless domain_name.nil?
714
+ command.query['fields'] = fields unless fields.nil?
715
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
716
+ command.query['userIp'] = user_ip unless user_ip.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Inserts a domain of the customer.
721
+ # @param [String] customer
722
+ # Immutable id of the Google Apps account.
723
+ # @param [Google::Apis::AdminDirectoryV1::Domains] domains_object
724
+ # @param [String] fields
725
+ # Selector specifying which fields to include in a partial response.
726
+ # @param [String] quota_user
727
+ # Available to use for quota purposes for server-side applications. Can be any
728
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
729
+ # Overrides userIp if both are provided.
730
+ # @param [String] user_ip
731
+ # IP address of the site where the request originates. Use this if you want to
732
+ # enforce per-user limits.
733
+ # @param [Google::Apis::RequestOptions] options
734
+ # Request-specific options
735
+ #
736
+ # @yield [result, err] Result & error if block supplied
737
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Domains] parsed result object
738
+ # @yieldparam err [StandardError] error object if request failed
739
+ #
740
+ # @return [Google::Apis::AdminDirectoryV1::Domains]
741
+ #
742
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
743
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
744
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
745
+ def insert_domain(customer, domains_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
746
+ command = make_simple_command(:post, 'customer/{customer}/domains', options)
747
+ command.request_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
748
+ command.request_object = domains_object
749
+ command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
750
+ command.response_class = Google::Apis::AdminDirectoryV1::Domains
751
+ command.params['customer'] = customer unless customer.nil?
752
+ command.query['fields'] = fields unless fields.nil?
753
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
754
+ command.query['userIp'] = user_ip unless user_ip.nil?
755
+ execute_or_queue_command(command, &block)
756
+ end
757
+
758
+ # Lists the domains of the customer.
759
+ # @param [String] customer
760
+ # Immutable id of the Google Apps account.
761
+ # @param [String] fields
762
+ # Selector specifying which fields to include in a partial response.
763
+ # @param [String] quota_user
764
+ # Available to use for quota purposes for server-side applications. Can be any
765
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
766
+ # Overrides userIp if both are provided.
767
+ # @param [String] user_ip
768
+ # IP address of the site where the request originates. Use this if you want to
769
+ # enforce per-user limits.
770
+ # @param [Google::Apis::RequestOptions] options
771
+ # Request-specific options
772
+ #
773
+ # @yield [result, err] Result & error if block supplied
774
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Domains2] parsed result object
775
+ # @yieldparam err [StandardError] error object if request failed
776
+ #
777
+ # @return [Google::Apis::AdminDirectoryV1::Domains2]
778
+ #
779
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
780
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
781
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
782
+ def list_domains(customer, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
783
+ command = make_simple_command(:get, 'customer/{customer}/domains', options)
784
+ command.response_representation = Google::Apis::AdminDirectoryV1::Domains2::Representation
785
+ command.response_class = Google::Apis::AdminDirectoryV1::Domains2
786
+ command.params['customer'] = customer unless customer.nil?
787
+ command.query['fields'] = fields unless fields.nil?
788
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
789
+ command.query['userIp'] = user_ip unless user_ip.nil?
790
+ execute_or_queue_command(command, &block)
791
+ end
792
+
793
+ # Delete Group
794
+ # @param [String] group_key
795
+ # Email or immutable Id of the group
796
+ # @param [String] fields
797
+ # Selector specifying which fields to include in a partial response.
798
+ # @param [String] quota_user
799
+ # Available to use for quota purposes for server-side applications. Can be any
800
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
801
+ # Overrides userIp if both are provided.
802
+ # @param [String] user_ip
803
+ # IP address of the site where the request originates. Use this if you want to
804
+ # enforce per-user limits.
805
+ # @param [Google::Apis::RequestOptions] options
806
+ # Request-specific options
807
+ #
808
+ # @yield [result, err] Result & error if block supplied
809
+ # @yieldparam result [NilClass] No result returned for this method
810
+ # @yieldparam err [StandardError] error object if request failed
811
+ #
812
+ # @return [void]
813
+ #
814
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
815
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
816
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
817
+ def delete_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
818
+ command = make_simple_command(:delete, 'groups/{groupKey}', options)
819
+ command.params['groupKey'] = group_key unless group_key.nil?
820
+ command.query['fields'] = fields unless fields.nil?
821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
822
+ command.query['userIp'] = user_ip unless user_ip.nil?
823
+ execute_or_queue_command(command, &block)
824
+ end
825
+
826
+ # Retrieve Group
827
+ # @param [String] group_key
828
+ # Email or immutable Id of the group
829
+ # @param [String] fields
830
+ # Selector specifying which fields to include in a partial response.
831
+ # @param [String] quota_user
832
+ # Available to use for quota purposes for server-side applications. Can be any
833
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
834
+ # Overrides userIp if both are provided.
835
+ # @param [String] user_ip
836
+ # IP address of the site where the request originates. Use this if you want to
837
+ # enforce per-user limits.
838
+ # @param [Google::Apis::RequestOptions] options
839
+ # Request-specific options
840
+ #
841
+ # @yield [result, err] Result & error if block supplied
842
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
843
+ # @yieldparam err [StandardError] error object if request failed
844
+ #
845
+ # @return [Google::Apis::AdminDirectoryV1::Group]
846
+ #
847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
850
+ def get_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
851
+ command = make_simple_command(:get, 'groups/{groupKey}', options)
852
+ command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
853
+ command.response_class = Google::Apis::AdminDirectoryV1::Group
854
+ command.params['groupKey'] = group_key unless group_key.nil?
855
+ command.query['fields'] = fields unless fields.nil?
856
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
857
+ command.query['userIp'] = user_ip unless user_ip.nil?
858
+ execute_or_queue_command(command, &block)
859
+ end
860
+
861
+ # Create Group
862
+ # @param [Google::Apis::AdminDirectoryV1::Group] group_object
863
+ # @param [String] fields
864
+ # Selector specifying which fields to include in a partial response.
865
+ # @param [String] quota_user
866
+ # Available to use for quota purposes for server-side applications. Can be any
867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
868
+ # Overrides userIp if both are provided.
869
+ # @param [String] user_ip
870
+ # IP address of the site where the request originates. Use this if you want to
871
+ # enforce per-user limits.
872
+ # @param [Google::Apis::RequestOptions] options
873
+ # Request-specific options
874
+ #
875
+ # @yield [result, err] Result & error if block supplied
876
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
877
+ # @yieldparam err [StandardError] error object if request failed
878
+ #
879
+ # @return [Google::Apis::AdminDirectoryV1::Group]
880
+ #
881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
884
+ def insert_group(group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
885
+ command = make_simple_command(:post, 'groups', options)
886
+ command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
887
+ command.request_object = group_object
888
+ command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
889
+ command.response_class = Google::Apis::AdminDirectoryV1::Group
890
+ command.query['fields'] = fields unless fields.nil?
891
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
892
+ command.query['userIp'] = user_ip unless user_ip.nil?
893
+ execute_or_queue_command(command, &block)
894
+ end
895
+
896
+ # Retrieve all groups in a domain (paginated)
897
+ # @param [String] customer
898
+ # Immutable id of the Google Apps account. In case of multi-domain, to fetch all
899
+ # groups for a customer, fill this field instead of domain.
900
+ # @param [String] domain
901
+ # Name of the domain. Fill this field to get groups from only this domain. To
902
+ # return all groups in a multi-domain fill customer field instead.
903
+ # @param [Fixnum] max_results
904
+ # Maximum number of results to return. Default is 200
905
+ # @param [String] page_token
906
+ # Token to specify next page in the list
907
+ # @param [String] user_key
908
+ # Email or immutable Id of the user if only those groups are to be listed, the
909
+ # given user is a member of. If Id, it should match with id of user object
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
912
+ # @param [String] quota_user
913
+ # Available to use for quota purposes for server-side applications. Can be any
914
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
915
+ # Overrides userIp if both are provided.
916
+ # @param [String] user_ip
917
+ # IP address of the site where the request originates. Use this if you want to
918
+ # enforce per-user limits.
919
+ # @param [Google::Apis::RequestOptions] options
920
+ # Request-specific options
921
+ #
922
+ # @yield [result, err] Result & error if block supplied
923
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Groups] parsed result object
924
+ # @yieldparam err [StandardError] error object if request failed
925
+ #
926
+ # @return [Google::Apis::AdminDirectoryV1::Groups]
927
+ #
928
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
929
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
930
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
931
+ def list_groups(customer: nil, domain: nil, max_results: nil, page_token: nil, user_key: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
932
+ command = make_simple_command(:get, 'groups', options)
933
+ command.response_representation = Google::Apis::AdminDirectoryV1::Groups::Representation
934
+ command.response_class = Google::Apis::AdminDirectoryV1::Groups
935
+ command.query['customer'] = customer unless customer.nil?
936
+ command.query['domain'] = domain unless domain.nil?
937
+ command.query['maxResults'] = max_results unless max_results.nil?
938
+ command.query['pageToken'] = page_token unless page_token.nil?
939
+ command.query['userKey'] = user_key unless user_key.nil?
940
+ command.query['fields'] = fields unless fields.nil?
941
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
942
+ command.query['userIp'] = user_ip unless user_ip.nil?
943
+ execute_or_queue_command(command, &block)
944
+ end
945
+
946
+ # Update Group. This method supports patch semantics.
947
+ # @param [String] group_key
948
+ # Email or immutable Id of the group. If Id, it should match with id of group
949
+ # object
950
+ # @param [Google::Apis::AdminDirectoryV1::Group] group_object
951
+ # @param [String] fields
952
+ # Selector specifying which fields to include in a partial response.
953
+ # @param [String] quota_user
954
+ # Available to use for quota purposes for server-side applications. Can be any
955
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
956
+ # Overrides userIp if both are provided.
957
+ # @param [String] user_ip
958
+ # IP address of the site where the request originates. Use this if you want to
959
+ # enforce per-user limits.
960
+ # @param [Google::Apis::RequestOptions] options
961
+ # Request-specific options
962
+ #
963
+ # @yield [result, err] Result & error if block supplied
964
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
965
+ # @yieldparam err [StandardError] error object if request failed
966
+ #
967
+ # @return [Google::Apis::AdminDirectoryV1::Group]
968
+ #
969
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
970
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
971
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
972
+ def patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
973
+ command = make_simple_command(:patch, 'groups/{groupKey}', options)
974
+ command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
975
+ command.request_object = group_object
976
+ command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
977
+ command.response_class = Google::Apis::AdminDirectoryV1::Group
978
+ command.params['groupKey'] = group_key unless group_key.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
+ # Update Group
986
+ # @param [String] group_key
987
+ # Email or immutable Id of the group. If Id, it should match with id of group
988
+ # object
989
+ # @param [Google::Apis::AdminDirectoryV1::Group] group_object
990
+ # @param [String] fields
991
+ # Selector specifying which fields to include in a partial response.
992
+ # @param [String] quota_user
993
+ # Available to use for quota purposes for server-side applications. Can be any
994
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
995
+ # Overrides userIp if both are provided.
996
+ # @param [String] user_ip
997
+ # IP address of the site where the request originates. Use this if you want to
998
+ # enforce per-user limits.
999
+ # @param [Google::Apis::RequestOptions] options
1000
+ # Request-specific options
1001
+ #
1002
+ # @yield [result, err] Result & error if block supplied
1003
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
1004
+ # @yieldparam err [StandardError] error object if request failed
1005
+ #
1006
+ # @return [Google::Apis::AdminDirectoryV1::Group]
1007
+ #
1008
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1009
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1010
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1011
+ def update_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1012
+ command = make_simple_command(:put, 'groups/{groupKey}', options)
1013
+ command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
1014
+ command.request_object = group_object
1015
+ command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
1016
+ command.response_class = Google::Apis::AdminDirectoryV1::Group
1017
+ command.params['groupKey'] = group_key unless group_key.nil?
1018
+ command.query['fields'] = fields unless fields.nil?
1019
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1020
+ command.query['userIp'] = user_ip unless user_ip.nil?
1021
+ execute_or_queue_command(command, &block)
1022
+ end
1023
+
1024
+ # Remove a alias for the group
1025
+ # @param [String] group_key
1026
+ # Email or immutable Id of the group
1027
+ # @param [String] group_alias
1028
+ # The alias to be removed
1029
+ # @param [String] fields
1030
+ # Selector specifying which fields to include in a partial response.
1031
+ # @param [String] quota_user
1032
+ # Available to use for quota purposes for server-side applications. Can be any
1033
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1034
+ # Overrides userIp if both are provided.
1035
+ # @param [String] user_ip
1036
+ # IP address of the site where the request originates. Use this if you want to
1037
+ # enforce per-user limits.
1038
+ # @param [Google::Apis::RequestOptions] options
1039
+ # Request-specific options
1040
+ #
1041
+ # @yield [result, err] Result & error if block supplied
1042
+ # @yieldparam result [NilClass] No result returned for this method
1043
+ # @yieldparam err [StandardError] error object if request failed
1044
+ #
1045
+ # @return [void]
1046
+ #
1047
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1048
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1049
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1050
+ def delete_group_alias(group_key, group_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1051
+ command = make_simple_command(:delete, 'groups/{groupKey}/aliases/{alias}', options)
1052
+ command.params['groupKey'] = group_key unless group_key.nil?
1053
+ command.params['alias'] = group_alias unless group_alias.nil?
1054
+ command.query['fields'] = fields unless fields.nil?
1055
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1056
+ command.query['userIp'] = user_ip unless user_ip.nil?
1057
+ execute_or_queue_command(command, &block)
1058
+ end
1059
+
1060
+ # Add a alias for the group
1061
+ # @param [String] group_key
1062
+ # Email or immutable Id of the group
1063
+ # @param [Google::Apis::AdminDirectoryV1::Alias] alias_object
1064
+ # @param [String] fields
1065
+ # Selector specifying which fields to include in a partial response.
1066
+ # @param [String] quota_user
1067
+ # Available to use for quota purposes for server-side applications. Can be any
1068
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1069
+ # Overrides userIp if both are provided.
1070
+ # @param [String] user_ip
1071
+ # IP address of the site where the request originates. Use this if you want to
1072
+ # enforce per-user limits.
1073
+ # @param [Google::Apis::RequestOptions] options
1074
+ # Request-specific options
1075
+ #
1076
+ # @yield [result, err] Result & error if block supplied
1077
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Alias] parsed result object
1078
+ # @yieldparam err [StandardError] error object if request failed
1079
+ #
1080
+ # @return [Google::Apis::AdminDirectoryV1::Alias]
1081
+ #
1082
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1083
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1084
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1085
+ def insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1086
+ command = make_simple_command(:post, 'groups/{groupKey}/aliases', options)
1087
+ command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
1088
+ command.request_object = alias_object
1089
+ command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
1090
+ command.response_class = Google::Apis::AdminDirectoryV1::Alias
1091
+ command.params['groupKey'] = group_key unless group_key.nil?
1092
+ command.query['fields'] = fields unless fields.nil?
1093
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1094
+ command.query['userIp'] = user_ip unless user_ip.nil?
1095
+ execute_or_queue_command(command, &block)
1096
+ end
1097
+
1098
+ # List all aliases for a group
1099
+ # @param [String] group_key
1100
+ # Email or immutable Id of the group
1101
+ # @param [String] fields
1102
+ # Selector specifying which fields to include in a partial response.
1103
+ # @param [String] quota_user
1104
+ # Available to use for quota purposes for server-side applications. Can be any
1105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1106
+ # Overrides userIp if both are provided.
1107
+ # @param [String] user_ip
1108
+ # IP address of the site where the request originates. Use this if you want to
1109
+ # enforce per-user limits.
1110
+ # @param [Google::Apis::RequestOptions] options
1111
+ # Request-specific options
1112
+ #
1113
+ # @yield [result, err] Result & error if block supplied
1114
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Aliases] parsed result object
1115
+ # @yieldparam err [StandardError] error object if request failed
1116
+ #
1117
+ # @return [Google::Apis::AdminDirectoryV1::Aliases]
1118
+ #
1119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1122
+ def list_group_aliases(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1123
+ command = make_simple_command(:get, 'groups/{groupKey}/aliases', options)
1124
+ command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
1125
+ command.response_class = Google::Apis::AdminDirectoryV1::Aliases
1126
+ command.params['groupKey'] = group_key unless group_key.nil?
1127
+ command.query['fields'] = fields unless fields.nil?
1128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1129
+ command.query['userIp'] = user_ip unless user_ip.nil?
1130
+ execute_or_queue_command(command, &block)
1131
+ end
1132
+
1133
+ # Remove membership.
1134
+ # @param [String] group_key
1135
+ # Email or immutable Id of the group
1136
+ # @param [String] member_key
1137
+ # Email or immutable Id of the member
1138
+ # @param [String] fields
1139
+ # Selector specifying which fields to include in a partial response.
1140
+ # @param [String] quota_user
1141
+ # Available to use for quota purposes for server-side applications. Can be any
1142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1143
+ # Overrides userIp if both are provided.
1144
+ # @param [String] user_ip
1145
+ # IP address of the site where the request originates. Use this if you want to
1146
+ # enforce per-user limits.
1147
+ # @param [Google::Apis::RequestOptions] options
1148
+ # Request-specific options
1149
+ #
1150
+ # @yield [result, err] Result & error if block supplied
1151
+ # @yieldparam result [NilClass] No result returned for this method
1152
+ # @yieldparam err [StandardError] error object if request failed
1153
+ #
1154
+ # @return [void]
1155
+ #
1156
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1157
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1158
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1159
+ def delete_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1160
+ command = make_simple_command(:delete, 'groups/{groupKey}/members/{memberKey}', options)
1161
+ command.params['groupKey'] = group_key unless group_key.nil?
1162
+ command.params['memberKey'] = member_key unless member_key.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
+ # Retrieve Group Member
1170
+ # @param [String] group_key
1171
+ # Email or immutable Id of the group
1172
+ # @param [String] member_key
1173
+ # Email or immutable Id of the member
1174
+ # @param [String] fields
1175
+ # Selector specifying which fields to include in a partial response.
1176
+ # @param [String] quota_user
1177
+ # Available to use for quota purposes for server-side applications. Can be any
1178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1179
+ # Overrides userIp if both are provided.
1180
+ # @param [String] user_ip
1181
+ # IP address of the site where the request originates. Use this if you want to
1182
+ # enforce per-user limits.
1183
+ # @param [Google::Apis::RequestOptions] options
1184
+ # Request-specific options
1185
+ #
1186
+ # @yield [result, err] Result & error if block supplied
1187
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
1188
+ # @yieldparam err [StandardError] error object if request failed
1189
+ #
1190
+ # @return [Google::Apis::AdminDirectoryV1::Member]
1191
+ #
1192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1195
+ def get_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1196
+ command = make_simple_command(:get, 'groups/{groupKey}/members/{memberKey}', options)
1197
+ command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1198
+ command.response_class = Google::Apis::AdminDirectoryV1::Member
1199
+ command.params['groupKey'] = group_key unless group_key.nil?
1200
+ command.params['memberKey'] = member_key unless member_key.nil?
1201
+ command.query['fields'] = fields unless fields.nil?
1202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1203
+ command.query['userIp'] = user_ip unless user_ip.nil?
1204
+ execute_or_queue_command(command, &block)
1205
+ end
1206
+
1207
+ # Add user to the specified group.
1208
+ # @param [String] group_key
1209
+ # Email or immutable Id of the group
1210
+ # @param [Google::Apis::AdminDirectoryV1::Member] member_object
1211
+ # @param [String] fields
1212
+ # Selector specifying which fields to include in a partial response.
1213
+ # @param [String] quota_user
1214
+ # Available to use for quota purposes for server-side applications. Can be any
1215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1216
+ # Overrides userIp if both are provided.
1217
+ # @param [String] user_ip
1218
+ # IP address of the site where the request originates. Use this if you want to
1219
+ # enforce per-user limits.
1220
+ # @param [Google::Apis::RequestOptions] options
1221
+ # Request-specific options
1222
+ #
1223
+ # @yield [result, err] Result & error if block supplied
1224
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
1225
+ # @yieldparam err [StandardError] error object if request failed
1226
+ #
1227
+ # @return [Google::Apis::AdminDirectoryV1::Member]
1228
+ #
1229
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1230
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1231
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1232
+ def insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1233
+ command = make_simple_command(:post, 'groups/{groupKey}/members', options)
1234
+ command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1235
+ command.request_object = member_object
1236
+ command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1237
+ command.response_class = Google::Apis::AdminDirectoryV1::Member
1238
+ command.params['groupKey'] = group_key unless group_key.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
+ # Retrieve all members in a group (paginated)
1246
+ # @param [String] group_key
1247
+ # Email or immutable Id of the group
1248
+ # @param [Fixnum] max_results
1249
+ # Maximum number of results to return. Default is 200
1250
+ # @param [String] page_token
1251
+ # Token to specify next page in the list
1252
+ # @param [String] roles
1253
+ # Comma separated role values to filter list results on.
1254
+ # @param [String] fields
1255
+ # Selector specifying which fields to include in a partial response.
1256
+ # @param [String] quota_user
1257
+ # Available to use for quota purposes for server-side applications. Can be any
1258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1259
+ # Overrides userIp if both are provided.
1260
+ # @param [String] user_ip
1261
+ # IP address of the site where the request originates. Use this if you want to
1262
+ # enforce per-user limits.
1263
+ # @param [Google::Apis::RequestOptions] options
1264
+ # Request-specific options
1265
+ #
1266
+ # @yield [result, err] Result & error if block supplied
1267
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Members] parsed result object
1268
+ # @yieldparam err [StandardError] error object if request failed
1269
+ #
1270
+ # @return [Google::Apis::AdminDirectoryV1::Members]
1271
+ #
1272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1275
+ def list_members(group_key, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1276
+ command = make_simple_command(:get, 'groups/{groupKey}/members', options)
1277
+ command.response_representation = Google::Apis::AdminDirectoryV1::Members::Representation
1278
+ command.response_class = Google::Apis::AdminDirectoryV1::Members
1279
+ command.params['groupKey'] = group_key unless group_key.nil?
1280
+ command.query['maxResults'] = max_results unless max_results.nil?
1281
+ command.query['pageToken'] = page_token unless page_token.nil?
1282
+ command.query['roles'] = roles unless roles.nil?
1283
+ command.query['fields'] = fields unless fields.nil?
1284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1285
+ command.query['userIp'] = user_ip unless user_ip.nil?
1286
+ execute_or_queue_command(command, &block)
1287
+ end
1288
+
1289
+ # Update membership of a user in the specified group. This method supports patch
1290
+ # semantics.
1291
+ # @param [String] group_key
1292
+ # Email or immutable Id of the group. If Id, it should match with id of group
1293
+ # object
1294
+ # @param [String] member_key
1295
+ # Email or immutable Id of the user. If Id, it should match with id of member
1296
+ # object
1297
+ # @param [Google::Apis::AdminDirectoryV1::Member] member_object
1298
+ # @param [String] fields
1299
+ # Selector specifying which fields to include in a partial response.
1300
+ # @param [String] quota_user
1301
+ # Available to use for quota purposes for server-side applications. Can be any
1302
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1303
+ # Overrides userIp if both are provided.
1304
+ # @param [String] user_ip
1305
+ # IP address of the site where the request originates. Use this if you want to
1306
+ # enforce per-user limits.
1307
+ # @param [Google::Apis::RequestOptions] options
1308
+ # Request-specific options
1309
+ #
1310
+ # @yield [result, err] Result & error if block supplied
1311
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
1312
+ # @yieldparam err [StandardError] error object if request failed
1313
+ #
1314
+ # @return [Google::Apis::AdminDirectoryV1::Member]
1315
+ #
1316
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1317
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1318
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1319
+ def patch_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1320
+ command = make_simple_command(:patch, 'groups/{groupKey}/members/{memberKey}', options)
1321
+ command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1322
+ command.request_object = member_object
1323
+ command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1324
+ command.response_class = Google::Apis::AdminDirectoryV1::Member
1325
+ command.params['groupKey'] = group_key unless group_key.nil?
1326
+ command.params['memberKey'] = member_key unless member_key.nil?
1327
+ command.query['fields'] = fields unless fields.nil?
1328
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1329
+ command.query['userIp'] = user_ip unless user_ip.nil?
1330
+ execute_or_queue_command(command, &block)
1331
+ end
1332
+
1333
+ # Update membership of a user in the specified group.
1334
+ # @param [String] group_key
1335
+ # Email or immutable Id of the group. If Id, it should match with id of group
1336
+ # object
1337
+ # @param [String] member_key
1338
+ # Email or immutable Id of the user. If Id, it should match with id of member
1339
+ # object
1340
+ # @param [Google::Apis::AdminDirectoryV1::Member] member_object
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::AdminDirectoryV1::Member] parsed result object
1355
+ # @yieldparam err [StandardError] error object if request failed
1356
+ #
1357
+ # @return [Google::Apis::AdminDirectoryV1::Member]
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 update_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1363
+ command = make_simple_command(:put, 'groups/{groupKey}/members/{memberKey}', options)
1364
+ command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1365
+ command.request_object = member_object
1366
+ command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
1367
+ command.response_class = Google::Apis::AdminDirectoryV1::Member
1368
+ command.params['groupKey'] = group_key unless group_key.nil?
1369
+ command.params['memberKey'] = member_key unless member_key.nil?
1370
+ command.query['fields'] = fields unless fields.nil?
1371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1372
+ command.query['userIp'] = user_ip unless user_ip.nil?
1373
+ execute_or_queue_command(command, &block)
1374
+ end
1375
+
1376
+ # Take action on Mobile Device
1377
+ # @param [String] customer_id
1378
+ # Immutable id of the Google Apps account
1379
+ # @param [String] resource_id
1380
+ # Immutable id of Mobile Device
1381
+ # @param [Google::Apis::AdminDirectoryV1::MobileDeviceAction] mobile_device_action_object
1382
+ # @param [String] fields
1383
+ # Selector specifying which fields to include in a partial response.
1384
+ # @param [String] quota_user
1385
+ # Available to use for quota purposes for server-side applications. Can be any
1386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1387
+ # Overrides userIp if both are provided.
1388
+ # @param [String] user_ip
1389
+ # IP address of the site where the request originates. Use this if you want to
1390
+ # enforce per-user limits.
1391
+ # @param [Google::Apis::RequestOptions] options
1392
+ # Request-specific options
1393
+ #
1394
+ # @yield [result, err] Result & error if block supplied
1395
+ # @yieldparam result [NilClass] No result returned for this method
1396
+ # @yieldparam err [StandardError] error object if request failed
1397
+ #
1398
+ # @return [void]
1399
+ #
1400
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1401
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1402
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1403
+ def action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1404
+ command = make_simple_command(:post, 'customer/{customerId}/devices/mobile/{resourceId}/action', options)
1405
+ command.request_representation = Google::Apis::AdminDirectoryV1::MobileDeviceAction::Representation
1406
+ command.request_object = mobile_device_action_object
1407
+ command.params['customerId'] = customer_id unless customer_id.nil?
1408
+ command.params['resourceId'] = resource_id unless resource_id.nil?
1409
+ command.query['fields'] = fields unless fields.nil?
1410
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1411
+ command.query['userIp'] = user_ip unless user_ip.nil?
1412
+ execute_or_queue_command(command, &block)
1413
+ end
1414
+
1415
+ # Delete Mobile Device
1416
+ # @param [String] customer_id
1417
+ # Immutable id of the Google Apps account
1418
+ # @param [String] resource_id
1419
+ # Immutable id of Mobile Device
1420
+ # @param [String] fields
1421
+ # Selector specifying which fields to include in a partial response.
1422
+ # @param [String] quota_user
1423
+ # Available to use for quota purposes for server-side applications. Can be any
1424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1425
+ # Overrides userIp if both are provided.
1426
+ # @param [String] user_ip
1427
+ # IP address of the site where the request originates. Use this if you want to
1428
+ # enforce per-user limits.
1429
+ # @param [Google::Apis::RequestOptions] options
1430
+ # Request-specific options
1431
+ #
1432
+ # @yield [result, err] Result & error if block supplied
1433
+ # @yieldparam result [NilClass] No result returned for this method
1434
+ # @yieldparam err [StandardError] error object if request failed
1435
+ #
1436
+ # @return [void]
1437
+ #
1438
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1439
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1440
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1441
+ def delete_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1442
+ command = make_simple_command(:delete, 'customer/{customerId}/devices/mobile/{resourceId}', options)
1443
+ command.params['customerId'] = customer_id unless customer_id.nil?
1444
+ command.params['resourceId'] = resource_id unless resource_id.nil?
1445
+ command.query['fields'] = fields unless fields.nil?
1446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1447
+ command.query['userIp'] = user_ip unless user_ip.nil?
1448
+ execute_or_queue_command(command, &block)
1449
+ end
1450
+
1451
+ # Retrieve Mobile Device
1452
+ # @param [String] customer_id
1453
+ # Immutable id of the Google Apps account
1454
+ # @param [String] resource_id
1455
+ # Immutable id of Mobile Device
1456
+ # @param [String] projection
1457
+ # Restrict information returned to a set of selected fields.
1458
+ # @param [String] fields
1459
+ # Selector specifying which fields to include in a partial response.
1460
+ # @param [String] quota_user
1461
+ # Available to use for quota purposes for server-side applications. Can be any
1462
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1463
+ # Overrides userIp if both are provided.
1464
+ # @param [String] user_ip
1465
+ # IP address of the site where the request originates. Use this if you want to
1466
+ # enforce per-user limits.
1467
+ # @param [Google::Apis::RequestOptions] options
1468
+ # Request-specific options
1469
+ #
1470
+ # @yield [result, err] Result & error if block supplied
1471
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::MobileDevice] parsed result object
1472
+ # @yieldparam err [StandardError] error object if request failed
1473
+ #
1474
+ # @return [Google::Apis::AdminDirectoryV1::MobileDevice]
1475
+ #
1476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1479
+ def get_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1480
+ command = make_simple_command(:get, 'customer/{customerId}/devices/mobile/{resourceId}', options)
1481
+ command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevice::Representation
1482
+ command.response_class = Google::Apis::AdminDirectoryV1::MobileDevice
1483
+ command.params['customerId'] = customer_id unless customer_id.nil?
1484
+ command.params['resourceId'] = resource_id unless resource_id.nil?
1485
+ command.query['projection'] = projection unless projection.nil?
1486
+ command.query['fields'] = fields unless fields.nil?
1487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1488
+ command.query['userIp'] = user_ip unless user_ip.nil?
1489
+ execute_or_queue_command(command, &block)
1490
+ end
1491
+
1492
+ # Retrieve all Mobile Devices of a customer (paginated)
1493
+ # @param [String] customer_id
1494
+ # Immutable id of the Google Apps account
1495
+ # @param [Fixnum] max_results
1496
+ # Maximum number of results to return. Default is 100
1497
+ # @param [String] order_by
1498
+ # Column to use for sorting results
1499
+ # @param [String] page_token
1500
+ # Token to specify next page in the list
1501
+ # @param [String] projection
1502
+ # Restrict information returned to a set of selected fields.
1503
+ # @param [String] query
1504
+ # Search string in the format given at http://support.google.com/a/bin/answer.py?
1505
+ # hl=en&answer=1408863#search
1506
+ # @param [String] sort_order
1507
+ # Whether to return results in ascending or descending order. Only of use when
1508
+ # orderBy is also used
1509
+ # @param [String] fields
1510
+ # Selector specifying which fields to include in a partial response.
1511
+ # @param [String] quota_user
1512
+ # Available to use for quota purposes for server-side applications. Can be any
1513
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1514
+ # Overrides userIp if both are provided.
1515
+ # @param [String] user_ip
1516
+ # IP address of the site where the request originates. Use this if you want to
1517
+ # enforce per-user limits.
1518
+ # @param [Google::Apis::RequestOptions] options
1519
+ # Request-specific options
1520
+ #
1521
+ # @yield [result, err] Result & error if block supplied
1522
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::MobileDevices] parsed result object
1523
+ # @yieldparam err [StandardError] error object if request failed
1524
+ #
1525
+ # @return [Google::Apis::AdminDirectoryV1::MobileDevices]
1526
+ #
1527
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1528
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1529
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1530
+ def list_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1531
+ command = make_simple_command(:get, 'customer/{customerId}/devices/mobile', options)
1532
+ command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevices::Representation
1533
+ command.response_class = Google::Apis::AdminDirectoryV1::MobileDevices
1534
+ command.params['customerId'] = customer_id unless customer_id.nil?
1535
+ command.query['maxResults'] = max_results unless max_results.nil?
1536
+ command.query['orderBy'] = order_by unless order_by.nil?
1537
+ command.query['pageToken'] = page_token unless page_token.nil?
1538
+ command.query['projection'] = projection unless projection.nil?
1539
+ command.query['query'] = query unless query.nil?
1540
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
1541
+ command.query['fields'] = fields unless fields.nil?
1542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1543
+ command.query['userIp'] = user_ip unless user_ip.nil?
1544
+ execute_or_queue_command(command, &block)
1545
+ end
1546
+
1547
+ # Deletes a notification
1548
+ # @param [String] customer
1549
+ # The unique ID for the customer's Google account. The customerId is also
1550
+ # returned as part of the Users resource.
1551
+ # @param [String] notification_id
1552
+ # The unique ID of the notification.
1553
+ # @param [String] fields
1554
+ # Selector specifying which fields to include in a partial response.
1555
+ # @param [String] quota_user
1556
+ # Available to use for quota purposes for server-side applications. Can be any
1557
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1558
+ # Overrides userIp if both are provided.
1559
+ # @param [String] user_ip
1560
+ # IP address of the site where the request originates. Use this if you want to
1561
+ # enforce per-user limits.
1562
+ # @param [Google::Apis::RequestOptions] options
1563
+ # Request-specific options
1564
+ #
1565
+ # @yield [result, err] Result & error if block supplied
1566
+ # @yieldparam result [NilClass] No result returned for this method
1567
+ # @yieldparam err [StandardError] error object if request failed
1568
+ #
1569
+ # @return [void]
1570
+ #
1571
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1572
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1573
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1574
+ def delete_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1575
+ command = make_simple_command(:delete, 'customer/{customer}/notifications/{notificationId}', options)
1576
+ command.params['customer'] = customer unless customer.nil?
1577
+ command.params['notificationId'] = notification_id unless notification_id.nil?
1578
+ command.query['fields'] = fields unless fields.nil?
1579
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1580
+ command.query['userIp'] = user_ip unless user_ip.nil?
1581
+ execute_or_queue_command(command, &block)
1582
+ end
1583
+
1584
+ # Retrieves a notification.
1585
+ # @param [String] customer
1586
+ # The unique ID for the customer's Google account. The customerId is also
1587
+ # returned as part of the Users resource.
1588
+ # @param [String] notification_id
1589
+ # The unique ID of the notification.
1590
+ # @param [String] fields
1591
+ # Selector specifying which fields to include in a partial response.
1592
+ # @param [String] quota_user
1593
+ # Available to use for quota purposes for server-side applications. Can be any
1594
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1595
+ # Overrides userIp if both are provided.
1596
+ # @param [String] user_ip
1597
+ # IP address of the site where the request originates. Use this if you want to
1598
+ # enforce per-user limits.
1599
+ # @param [Google::Apis::RequestOptions] options
1600
+ # Request-specific options
1601
+ #
1602
+ # @yield [result, err] Result & error if block supplied
1603
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
1604
+ # @yieldparam err [StandardError] error object if request failed
1605
+ #
1606
+ # @return [Google::Apis::AdminDirectoryV1::Notification]
1607
+ #
1608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1611
+ def get_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1612
+ command = make_simple_command(:get, 'customer/{customer}/notifications/{notificationId}', options)
1613
+ command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
1614
+ command.response_class = Google::Apis::AdminDirectoryV1::Notification
1615
+ command.params['customer'] = customer unless customer.nil?
1616
+ command.params['notificationId'] = notification_id unless notification_id.nil?
1617
+ command.query['fields'] = fields unless fields.nil?
1618
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1619
+ command.query['userIp'] = user_ip unless user_ip.nil?
1620
+ execute_or_queue_command(command, &block)
1621
+ end
1622
+
1623
+ # Retrieves a list of notifications.
1624
+ # @param [String] customer
1625
+ # The unique ID for the customer's Google account.
1626
+ # @param [String] language
1627
+ # The ISO 639-1 code of the language notifications are returned in. The default
1628
+ # is English (en).
1629
+ # @param [Fixnum] max_results
1630
+ # Maximum number of notifications to return per page. The default is 100.
1631
+ # @param [String] page_token
1632
+ # The token to specify the page of results to retrieve.
1633
+ # @param [String] fields
1634
+ # Selector specifying which fields to include in a partial response.
1635
+ # @param [String] quota_user
1636
+ # Available to use for quota purposes for server-side applications. Can be any
1637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1638
+ # Overrides userIp if both are provided.
1639
+ # @param [String] user_ip
1640
+ # IP address of the site where the request originates. Use this if you want to
1641
+ # enforce per-user limits.
1642
+ # @param [Google::Apis::RequestOptions] options
1643
+ # Request-specific options
1644
+ #
1645
+ # @yield [result, err] Result & error if block supplied
1646
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Notifications] parsed result object
1647
+ # @yieldparam err [StandardError] error object if request failed
1648
+ #
1649
+ # @return [Google::Apis::AdminDirectoryV1::Notifications]
1650
+ #
1651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1654
+ def list_notifications(customer, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1655
+ command = make_simple_command(:get, 'customer/{customer}/notifications', options)
1656
+ command.response_representation = Google::Apis::AdminDirectoryV1::Notifications::Representation
1657
+ command.response_class = Google::Apis::AdminDirectoryV1::Notifications
1658
+ command.params['customer'] = customer unless customer.nil?
1659
+ command.query['language'] = language unless language.nil?
1660
+ command.query['maxResults'] = max_results unless max_results.nil?
1661
+ command.query['pageToken'] = page_token unless page_token.nil?
1662
+ command.query['fields'] = fields unless fields.nil?
1663
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1664
+ command.query['userIp'] = user_ip unless user_ip.nil?
1665
+ execute_or_queue_command(command, &block)
1666
+ end
1667
+
1668
+ # Updates a notification. This method supports patch semantics.
1669
+ # @param [String] customer
1670
+ # The unique ID for the customer's Google account.
1671
+ # @param [String] notification_id
1672
+ # The unique ID of the notification.
1673
+ # @param [Google::Apis::AdminDirectoryV1::Notification] notification_object
1674
+ # @param [String] fields
1675
+ # Selector specifying which fields to include in a partial response.
1676
+ # @param [String] quota_user
1677
+ # Available to use for quota purposes for server-side applications. Can be any
1678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1679
+ # Overrides userIp if both are provided.
1680
+ # @param [String] user_ip
1681
+ # IP address of the site where the request originates. Use this if you want to
1682
+ # enforce per-user limits.
1683
+ # @param [Google::Apis::RequestOptions] options
1684
+ # Request-specific options
1685
+ #
1686
+ # @yield [result, err] Result & error if block supplied
1687
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
1688
+ # @yieldparam err [StandardError] error object if request failed
1689
+ #
1690
+ # @return [Google::Apis::AdminDirectoryV1::Notification]
1691
+ #
1692
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1693
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1694
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1695
+ def patch_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1696
+ command = make_simple_command(:patch, 'customer/{customer}/notifications/{notificationId}', options)
1697
+ command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
1698
+ command.request_object = notification_object
1699
+ command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
1700
+ command.response_class = Google::Apis::AdminDirectoryV1::Notification
1701
+ command.params['customer'] = customer unless customer.nil?
1702
+ command.params['notificationId'] = notification_id unless notification_id.nil?
1703
+ command.query['fields'] = fields unless fields.nil?
1704
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1705
+ command.query['userIp'] = user_ip unless user_ip.nil?
1706
+ execute_or_queue_command(command, &block)
1707
+ end
1708
+
1709
+ # Updates a notification.
1710
+ # @param [String] customer
1711
+ # The unique ID for the customer's Google account.
1712
+ # @param [String] notification_id
1713
+ # The unique ID of the notification.
1714
+ # @param [Google::Apis::AdminDirectoryV1::Notification] notification_object
1715
+ # @param [String] fields
1716
+ # Selector specifying which fields to include in a partial response.
1717
+ # @param [String] quota_user
1718
+ # Available to use for quota purposes for server-side applications. Can be any
1719
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1720
+ # Overrides userIp if both are provided.
1721
+ # @param [String] user_ip
1722
+ # IP address of the site where the request originates. Use this if you want to
1723
+ # enforce per-user limits.
1724
+ # @param [Google::Apis::RequestOptions] options
1725
+ # Request-specific options
1726
+ #
1727
+ # @yield [result, err] Result & error if block supplied
1728
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
1729
+ # @yieldparam err [StandardError] error object if request failed
1730
+ #
1731
+ # @return [Google::Apis::AdminDirectoryV1::Notification]
1732
+ #
1733
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1734
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1735
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1736
+ def update_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1737
+ command = make_simple_command(:put, 'customer/{customer}/notifications/{notificationId}', options)
1738
+ command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
1739
+ command.request_object = notification_object
1740
+ command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
1741
+ command.response_class = Google::Apis::AdminDirectoryV1::Notification
1742
+ command.params['customer'] = customer unless customer.nil?
1743
+ command.params['notificationId'] = notification_id unless notification_id.nil?
1744
+ command.query['fields'] = fields unless fields.nil?
1745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1746
+ command.query['userIp'] = user_ip unless user_ip.nil?
1747
+ execute_or_queue_command(command, &block)
1748
+ end
1749
+
1750
+ # Remove Organization Unit
1751
+ # @param [String] customer_id
1752
+ # Immutable id of the Google Apps account
1753
+ # @param [Array<String>, String] org_unit_path
1754
+ # Full path of the organization unit or its Id
1755
+ # @param [String] fields
1756
+ # Selector specifying which fields to include in a partial response.
1757
+ # @param [String] quota_user
1758
+ # Available to use for quota purposes for server-side applications. Can be any
1759
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1760
+ # Overrides userIp if both are provided.
1761
+ # @param [String] user_ip
1762
+ # IP address of the site where the request originates. Use this if you want to
1763
+ # enforce per-user limits.
1764
+ # @param [Google::Apis::RequestOptions] options
1765
+ # Request-specific options
1766
+ #
1767
+ # @yield [result, err] Result & error if block supplied
1768
+ # @yieldparam result [NilClass] No result returned for this method
1769
+ # @yieldparam err [StandardError] error object if request failed
1770
+ #
1771
+ # @return [void]
1772
+ #
1773
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1774
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1775
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1776
+ def delete_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1777
+ command = make_simple_command(:delete, 'customer/{customerId}/orgunits{/orgUnitPath*}', options)
1778
+ command.params['customerId'] = customer_id unless customer_id.nil?
1779
+ command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
1780
+ command.query['fields'] = fields unless fields.nil?
1781
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1782
+ command.query['userIp'] = user_ip unless user_ip.nil?
1783
+ execute_or_queue_command(command, &block)
1784
+ end
1785
+
1786
+ # Retrieve Organization Unit
1787
+ # @param [String] customer_id
1788
+ # Immutable id of the Google Apps account
1789
+ # @param [Array<String>, String] org_unit_path
1790
+ # Full path of the organization unit or its Id
1791
+ # @param [String] fields
1792
+ # Selector specifying which fields to include in a partial response.
1793
+ # @param [String] quota_user
1794
+ # Available to use for quota purposes for server-side applications. Can be any
1795
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1796
+ # Overrides userIp if both are provided.
1797
+ # @param [String] user_ip
1798
+ # IP address of the site where the request originates. Use this if you want to
1799
+ # enforce per-user limits.
1800
+ # @param [Google::Apis::RequestOptions] options
1801
+ # Request-specific options
1802
+ #
1803
+ # @yield [result, err] Result & error if block supplied
1804
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
1805
+ # @yieldparam err [StandardError] error object if request failed
1806
+ #
1807
+ # @return [Google::Apis::AdminDirectoryV1::OrgUnit]
1808
+ #
1809
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1810
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1811
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1812
+ def get_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1813
+ command = make_simple_command(:get, 'customer/{customerId}/orgunits{/orgUnitPath*}', options)
1814
+ command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1815
+ command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
1816
+ command.params['customerId'] = customer_id unless customer_id.nil?
1817
+ command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
1818
+ command.query['fields'] = fields unless fields.nil?
1819
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1820
+ command.query['userIp'] = user_ip unless user_ip.nil?
1821
+ execute_or_queue_command(command, &block)
1822
+ end
1823
+
1824
+ # Add Organization Unit
1825
+ # @param [String] customer_id
1826
+ # Immutable id of the Google Apps account
1827
+ # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
1828
+ # @param [String] fields
1829
+ # Selector specifying which fields to include in a partial response.
1830
+ # @param [String] quota_user
1831
+ # Available to use for quota purposes for server-side applications. Can be any
1832
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1833
+ # Overrides userIp if both are provided.
1834
+ # @param [String] user_ip
1835
+ # IP address of the site where the request originates. Use this if you want to
1836
+ # enforce per-user limits.
1837
+ # @param [Google::Apis::RequestOptions] options
1838
+ # Request-specific options
1839
+ #
1840
+ # @yield [result, err] Result & error if block supplied
1841
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
1842
+ # @yieldparam err [StandardError] error object if request failed
1843
+ #
1844
+ # @return [Google::Apis::AdminDirectoryV1::OrgUnit]
1845
+ #
1846
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1847
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1848
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1849
+ def insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1850
+ command = make_simple_command(:post, 'customer/{customerId}/orgunits', options)
1851
+ command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1852
+ command.request_object = org_unit_object
1853
+ command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1854
+ command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
1855
+ command.params['customerId'] = customer_id unless customer_id.nil?
1856
+ command.query['fields'] = fields unless fields.nil?
1857
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1858
+ command.query['userIp'] = user_ip unless user_ip.nil?
1859
+ execute_or_queue_command(command, &block)
1860
+ end
1861
+
1862
+ # Retrieve all Organization Units
1863
+ # @param [String] customer_id
1864
+ # Immutable id of the Google Apps account
1865
+ # @param [String] org_unit_path
1866
+ # the URL-encoded organization unit's path or its Id
1867
+ # @param [String] type
1868
+ # Whether to return all sub-organizations or just immediate children
1869
+ # @param [String] fields
1870
+ # Selector specifying which fields to include in a partial response.
1871
+ # @param [String] quota_user
1872
+ # Available to use for quota purposes for server-side applications. Can be any
1873
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1874
+ # Overrides userIp if both are provided.
1875
+ # @param [String] user_ip
1876
+ # IP address of the site where the request originates. Use this if you want to
1877
+ # enforce per-user limits.
1878
+ # @param [Google::Apis::RequestOptions] options
1879
+ # Request-specific options
1880
+ #
1881
+ # @yield [result, err] Result & error if block supplied
1882
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnits] parsed result object
1883
+ # @yieldparam err [StandardError] error object if request failed
1884
+ #
1885
+ # @return [Google::Apis::AdminDirectoryV1::OrgUnits]
1886
+ #
1887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1890
+ def list_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1891
+ command = make_simple_command(:get, 'customer/{customerId}/orgunits', options)
1892
+ command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnits::Representation
1893
+ command.response_class = Google::Apis::AdminDirectoryV1::OrgUnits
1894
+ command.params['customerId'] = customer_id unless customer_id.nil?
1895
+ command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
1896
+ command.query['type'] = type unless type.nil?
1897
+ command.query['fields'] = fields unless fields.nil?
1898
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1899
+ command.query['userIp'] = user_ip unless user_ip.nil?
1900
+ execute_or_queue_command(command, &block)
1901
+ end
1902
+
1903
+ # Update Organization Unit. This method supports patch semantics.
1904
+ # @param [String] customer_id
1905
+ # Immutable id of the Google Apps account
1906
+ # @param [Array<String>, String] org_unit_path
1907
+ # Full path of the organization unit or its Id
1908
+ # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
1909
+ # @param [String] fields
1910
+ # Selector specifying which fields to include in a partial response.
1911
+ # @param [String] quota_user
1912
+ # Available to use for quota purposes for server-side applications. Can be any
1913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1914
+ # Overrides userIp if both are provided.
1915
+ # @param [String] user_ip
1916
+ # IP address of the site where the request originates. Use this if you want to
1917
+ # enforce per-user limits.
1918
+ # @param [Google::Apis::RequestOptions] options
1919
+ # Request-specific options
1920
+ #
1921
+ # @yield [result, err] Result & error if block supplied
1922
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
1923
+ # @yieldparam err [StandardError] error object if request failed
1924
+ #
1925
+ # @return [Google::Apis::AdminDirectoryV1::OrgUnit]
1926
+ #
1927
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1928
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1929
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1930
+ def patch_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1931
+ command = make_simple_command(:patch, 'customer/{customerId}/orgunits{/orgUnitPath*}', options)
1932
+ command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1933
+ command.request_object = org_unit_object
1934
+ command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1935
+ command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
1936
+ command.params['customerId'] = customer_id unless customer_id.nil?
1937
+ command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
1938
+ command.query['fields'] = fields unless fields.nil?
1939
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1940
+ command.query['userIp'] = user_ip unless user_ip.nil?
1941
+ execute_or_queue_command(command, &block)
1942
+ end
1943
+
1944
+ # Update Organization Unit
1945
+ # @param [String] customer_id
1946
+ # Immutable id of the Google Apps account
1947
+ # @param [Array<String>, String] org_unit_path
1948
+ # Full path of the organization unit or its Id
1949
+ # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
1950
+ # @param [String] fields
1951
+ # Selector specifying which fields to include in a partial response.
1952
+ # @param [String] quota_user
1953
+ # Available to use for quota purposes for server-side applications. Can be any
1954
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1955
+ # Overrides userIp if both are provided.
1956
+ # @param [String] user_ip
1957
+ # IP address of the site where the request originates. Use this if you want to
1958
+ # enforce per-user limits.
1959
+ # @param [Google::Apis::RequestOptions] options
1960
+ # Request-specific options
1961
+ #
1962
+ # @yield [result, err] Result & error if block supplied
1963
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
1964
+ # @yieldparam err [StandardError] error object if request failed
1965
+ #
1966
+ # @return [Google::Apis::AdminDirectoryV1::OrgUnit]
1967
+ #
1968
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1969
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1970
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1971
+ def update_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1972
+ command = make_simple_command(:put, 'customer/{customerId}/orgunits{/orgUnitPath*}', options)
1973
+ command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1974
+ command.request_object = org_unit_object
1975
+ command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
1976
+ command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
1977
+ command.params['customerId'] = customer_id unless customer_id.nil?
1978
+ command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
1979
+ command.query['fields'] = fields unless fields.nil?
1980
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1981
+ command.query['userIp'] = user_ip unless user_ip.nil?
1982
+ execute_or_queue_command(command, &block)
1983
+ end
1984
+
1985
+ # Retrieves a paginated list of all privileges for a customer.
1986
+ # @param [String] customer
1987
+ # Immutable ID of the Google Apps account.
1988
+ # @param [String] fields
1989
+ # Selector specifying which fields to include in a partial response.
1990
+ # @param [String] quota_user
1991
+ # Available to use for quota purposes for server-side applications. Can be any
1992
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1993
+ # Overrides userIp if both are provided.
1994
+ # @param [String] user_ip
1995
+ # IP address of the site where the request originates. Use this if you want to
1996
+ # enforce per-user limits.
1997
+ # @param [Google::Apis::RequestOptions] options
1998
+ # Request-specific options
1999
+ #
2000
+ # @yield [result, err] Result & error if block supplied
2001
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Privileges] parsed result object
2002
+ # @yieldparam err [StandardError] error object if request failed
2003
+ #
2004
+ # @return [Google::Apis::AdminDirectoryV1::Privileges]
2005
+ #
2006
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2007
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2008
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2009
+ def list_privileges(customer, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2010
+ command = make_simple_command(:get, 'customer/{customer}/roles/ALL/privileges', options)
2011
+ command.response_representation = Google::Apis::AdminDirectoryV1::Privileges::Representation
2012
+ command.response_class = Google::Apis::AdminDirectoryV1::Privileges
2013
+ command.params['customer'] = customer unless customer.nil?
2014
+ command.query['fields'] = fields unless fields.nil?
2015
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2016
+ command.query['userIp'] = user_ip unless user_ip.nil?
2017
+ execute_or_queue_command(command, &block)
2018
+ end
2019
+
2020
+ # Deletes a calendar resource.
2021
+ # @param [String] customer
2022
+ # The unique ID for the customer's Google account. As an account administrator,
2023
+ # you can also use the my_customer alias to represent your account's customer ID.
2024
+ # @param [String] calendar_resource_id
2025
+ # The unique ID of the calendar resource to delete.
2026
+ # @param [String] fields
2027
+ # Selector specifying which fields to include in a partial response.
2028
+ # @param [String] quota_user
2029
+ # Available to use for quota purposes for server-side applications. Can be any
2030
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2031
+ # Overrides userIp if both are provided.
2032
+ # @param [String] user_ip
2033
+ # IP address of the site where the request originates. Use this if you want to
2034
+ # enforce per-user limits.
2035
+ # @param [Google::Apis::RequestOptions] options
2036
+ # Request-specific options
2037
+ #
2038
+ # @yield [result, err] Result & error if block supplied
2039
+ # @yieldparam result [NilClass] No result returned for this method
2040
+ # @yieldparam err [StandardError] error object if request failed
2041
+ #
2042
+ # @return [void]
2043
+ #
2044
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2045
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2046
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2047
+ def delete_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2048
+ command = make_simple_command(:delete, 'customer/{customer}/resources/calendars/{calendarResourceId}', options)
2049
+ command.params['customer'] = customer unless customer.nil?
2050
+ command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.nil?
2051
+ command.query['fields'] = fields unless fields.nil?
2052
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2053
+ command.query['userIp'] = user_ip unless user_ip.nil?
2054
+ execute_or_queue_command(command, &block)
2055
+ end
2056
+
2057
+ # Retrieves a calendar resource.
2058
+ # @param [String] customer
2059
+ # The unique ID for the customer's Google account. As an account administrator,
2060
+ # you can also use the my_customer alias to represent your account's customer ID.
2061
+ # @param [String] calendar_resource_id
2062
+ # The unique ID of the calendar resource to retrieve.
2063
+ # @param [String] fields
2064
+ # Selector specifying which fields to include in a partial response.
2065
+ # @param [String] quota_user
2066
+ # Available to use for quota purposes for server-side applications. Can be any
2067
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2068
+ # Overrides userIp if both are provided.
2069
+ # @param [String] user_ip
2070
+ # IP address of the site where the request originates. Use this if you want to
2071
+ # enforce per-user limits.
2072
+ # @param [Google::Apis::RequestOptions] options
2073
+ # Request-specific options
2074
+ #
2075
+ # @yield [result, err] Result & error if block supplied
2076
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::CalendarResource] parsed result object
2077
+ # @yieldparam err [StandardError] error object if request failed
2078
+ #
2079
+ # @return [Google::Apis::AdminDirectoryV1::CalendarResource]
2080
+ #
2081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2084
+ def get_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2085
+ command = make_simple_command(:get, 'customer/{customer}/resources/calendars/{calendarResourceId}', options)
2086
+ command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2087
+ command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
2088
+ command.params['customer'] = customer unless customer.nil?
2089
+ command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.nil?
2090
+ command.query['fields'] = fields unless fields.nil?
2091
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2092
+ command.query['userIp'] = user_ip unless user_ip.nil?
2093
+ execute_or_queue_command(command, &block)
2094
+ end
2095
+
2096
+ # Inserts a calendar resource.
2097
+ # @param [String] customer
2098
+ # The unique ID for the customer's Google account. As an account administrator,
2099
+ # you can also use the my_customer alias to represent your account's customer ID.
2100
+ # @param [Google::Apis::AdminDirectoryV1::CalendarResource] calendar_resource_object
2101
+ # @param [String] fields
2102
+ # Selector specifying which fields to include in a partial response.
2103
+ # @param [String] quota_user
2104
+ # Available to use for quota purposes for server-side applications. Can be any
2105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2106
+ # Overrides userIp if both are provided.
2107
+ # @param [String] user_ip
2108
+ # IP address of the site where the request originates. Use this if you want to
2109
+ # enforce per-user limits.
2110
+ # @param [Google::Apis::RequestOptions] options
2111
+ # Request-specific options
2112
+ #
2113
+ # @yield [result, err] Result & error if block supplied
2114
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::CalendarResource] parsed result object
2115
+ # @yieldparam err [StandardError] error object if request failed
2116
+ #
2117
+ # @return [Google::Apis::AdminDirectoryV1::CalendarResource]
2118
+ #
2119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2122
+ def calendar_resource(customer, calendar_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2123
+ command = make_simple_command(:post, 'customer/{customer}/resources/calendars', options)
2124
+ command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2125
+ command.request_object = calendar_resource_object
2126
+ command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2127
+ command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
2128
+ command.params['customer'] = customer unless customer.nil?
2129
+ command.query['fields'] = fields unless fields.nil?
2130
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2131
+ command.query['userIp'] = user_ip unless user_ip.nil?
2132
+ execute_or_queue_command(command, &block)
2133
+ end
2134
+
2135
+ # Retrieves a list of calendar resources for an account.
2136
+ # @param [String] customer
2137
+ # The unique ID for the customer's Google account. As an account administrator,
2138
+ # you can also use the my_customer alias to represent your account's customer ID.
2139
+ # @param [Fixnum] max_results
2140
+ # Maximum number of results to return.
2141
+ # @param [String] page_token
2142
+ # Token to specify the next page in the list.
2143
+ # @param [String] fields
2144
+ # Selector specifying which fields to include in a partial response.
2145
+ # @param [String] quota_user
2146
+ # Available to use for quota purposes for server-side applications. Can be any
2147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2148
+ # Overrides userIp if both are provided.
2149
+ # @param [String] user_ip
2150
+ # IP address of the site where the request originates. Use this if you want to
2151
+ # enforce per-user limits.
2152
+ # @param [Google::Apis::RequestOptions] options
2153
+ # Request-specific options
2154
+ #
2155
+ # @yield [result, err] Result & error if block supplied
2156
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::CalendarResources] parsed result object
2157
+ # @yieldparam err [StandardError] error object if request failed
2158
+ #
2159
+ # @return [Google::Apis::AdminDirectoryV1::CalendarResources]
2160
+ #
2161
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2162
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2163
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2164
+ def list_calendar_resources(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2165
+ command = make_simple_command(:get, 'customer/{customer}/resources/calendars', options)
2166
+ command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResources::Representation
2167
+ command.response_class = Google::Apis::AdminDirectoryV1::CalendarResources
2168
+ command.params['customer'] = customer unless customer.nil?
2169
+ command.query['maxResults'] = max_results unless max_results.nil?
2170
+ command.query['pageToken'] = page_token unless page_token.nil?
2171
+ command.query['fields'] = fields unless fields.nil?
2172
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2173
+ command.query['userIp'] = user_ip unless user_ip.nil?
2174
+ execute_or_queue_command(command, &block)
2175
+ end
2176
+
2177
+ # Updates a calendar resource. This method supports patch semantics.
2178
+ # @param [String] customer
2179
+ # The unique ID for the customer's Google account. As an account administrator,
2180
+ # you can also use the my_customer alias to represent your account's customer ID.
2181
+ # @param [String] calendar_resource_id
2182
+ # The unique ID of the calendar resource to update.
2183
+ # @param [Google::Apis::AdminDirectoryV1::CalendarResource] calendar_resource_object
2184
+ # @param [String] fields
2185
+ # Selector specifying which fields to include in a partial response.
2186
+ # @param [String] quota_user
2187
+ # Available to use for quota purposes for server-side applications. Can be any
2188
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2189
+ # Overrides userIp if both are provided.
2190
+ # @param [String] user_ip
2191
+ # IP address of the site where the request originates. Use this if you want to
2192
+ # enforce per-user limits.
2193
+ # @param [Google::Apis::RequestOptions] options
2194
+ # Request-specific options
2195
+ #
2196
+ # @yield [result, err] Result & error if block supplied
2197
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::CalendarResource] parsed result object
2198
+ # @yieldparam err [StandardError] error object if request failed
2199
+ #
2200
+ # @return [Google::Apis::AdminDirectoryV1::CalendarResource]
2201
+ #
2202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2205
+ def patch_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2206
+ command = make_simple_command(:patch, 'customer/{customer}/resources/calendars/{calendarResourceId}', options)
2207
+ command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2208
+ command.request_object = calendar_resource_object
2209
+ command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2210
+ command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
2211
+ command.params['customer'] = customer unless customer.nil?
2212
+ command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.nil?
2213
+ command.query['fields'] = fields unless fields.nil?
2214
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2215
+ command.query['userIp'] = user_ip unless user_ip.nil?
2216
+ execute_or_queue_command(command, &block)
2217
+ end
2218
+
2219
+ # Updates a calendar resource.
2220
+ # @param [String] customer
2221
+ # The unique ID for the customer's Google account. As an account administrator,
2222
+ # you can also use the my_customer alias to represent your account's customer ID.
2223
+ # @param [String] calendar_resource_id
2224
+ # The unique ID of the calendar resource to update.
2225
+ # @param [Google::Apis::AdminDirectoryV1::CalendarResource] calendar_resource_object
2226
+ # @param [String] fields
2227
+ # Selector specifying which fields to include in a partial response.
2228
+ # @param [String] quota_user
2229
+ # Available to use for quota purposes for server-side applications. Can be any
2230
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2231
+ # Overrides userIp if both are provided.
2232
+ # @param [String] user_ip
2233
+ # IP address of the site where the request originates. Use this if you want to
2234
+ # enforce per-user limits.
2235
+ # @param [Google::Apis::RequestOptions] options
2236
+ # Request-specific options
2237
+ #
2238
+ # @yield [result, err] Result & error if block supplied
2239
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::CalendarResource] parsed result object
2240
+ # @yieldparam err [StandardError] error object if request failed
2241
+ #
2242
+ # @return [Google::Apis::AdminDirectoryV1::CalendarResource]
2243
+ #
2244
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2245
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2246
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2247
+ def update_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2248
+ command = make_simple_command(:put, 'customer/{customer}/resources/calendars/{calendarResourceId}', options)
2249
+ command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2250
+ command.request_object = calendar_resource_object
2251
+ command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
2252
+ command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
2253
+ command.params['customer'] = customer unless customer.nil?
2254
+ command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.nil?
2255
+ command.query['fields'] = fields unless fields.nil?
2256
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2257
+ command.query['userIp'] = user_ip unless user_ip.nil?
2258
+ execute_or_queue_command(command, &block)
2259
+ end
2260
+
2261
+ # Deletes a role assignment.
2262
+ # @param [String] customer
2263
+ # Immutable ID of the Google Apps account.
2264
+ # @param [String] role_assignment_id
2265
+ # Immutable ID of the role assignment.
2266
+ # @param [String] fields
2267
+ # Selector specifying which fields to include in a partial response.
2268
+ # @param [String] quota_user
2269
+ # Available to use for quota purposes for server-side applications. Can be any
2270
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2271
+ # Overrides userIp if both are provided.
2272
+ # @param [String] user_ip
2273
+ # IP address of the site where the request originates. Use this if you want to
2274
+ # enforce per-user limits.
2275
+ # @param [Google::Apis::RequestOptions] options
2276
+ # Request-specific options
2277
+ #
2278
+ # @yield [result, err] Result & error if block supplied
2279
+ # @yieldparam result [NilClass] No result returned for this method
2280
+ # @yieldparam err [StandardError] error object if request failed
2281
+ #
2282
+ # @return [void]
2283
+ #
2284
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2285
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2286
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2287
+ def delete_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2288
+ command = make_simple_command(:delete, 'customer/{customer}/roleassignments/{roleAssignmentId}', options)
2289
+ command.params['customer'] = customer unless customer.nil?
2290
+ command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_id.nil?
2291
+ command.query['fields'] = fields unless fields.nil?
2292
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2293
+ command.query['userIp'] = user_ip unless user_ip.nil?
2294
+ execute_or_queue_command(command, &block)
2295
+ end
2296
+
2297
+ # Retrieve a role assignment.
2298
+ # @param [String] customer
2299
+ # Immutable ID of the Google Apps account.
2300
+ # @param [String] role_assignment_id
2301
+ # Immutable ID of the role assignment.
2302
+ # @param [String] fields
2303
+ # Selector specifying which fields to include in a partial response.
2304
+ # @param [String] quota_user
2305
+ # Available to use for quota purposes for server-side applications. Can be any
2306
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2307
+ # Overrides userIp if both are provided.
2308
+ # @param [String] user_ip
2309
+ # IP address of the site where the request originates. Use this if you want to
2310
+ # enforce per-user limits.
2311
+ # @param [Google::Apis::RequestOptions] options
2312
+ # Request-specific options
2313
+ #
2314
+ # @yield [result, err] Result & error if block supplied
2315
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::RoleAssignment] parsed result object
2316
+ # @yieldparam err [StandardError] error object if request failed
2317
+ #
2318
+ # @return [Google::Apis::AdminDirectoryV1::RoleAssignment]
2319
+ #
2320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2323
+ def get_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2324
+ command = make_simple_command(:get, 'customer/{customer}/roleassignments/{roleAssignmentId}', options)
2325
+ command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
2326
+ command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
2327
+ command.params['customer'] = customer unless customer.nil?
2328
+ command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_id.nil?
2329
+ command.query['fields'] = fields unless fields.nil?
2330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2331
+ command.query['userIp'] = user_ip unless user_ip.nil?
2332
+ execute_or_queue_command(command, &block)
2333
+ end
2334
+
2335
+ # Creates a role assignment.
2336
+ # @param [String] customer
2337
+ # Immutable ID of the Google Apps account.
2338
+ # @param [Google::Apis::AdminDirectoryV1::RoleAssignment] role_assignment_object
2339
+ # @param [String] fields
2340
+ # Selector specifying which fields to include in a partial response.
2341
+ # @param [String] quota_user
2342
+ # Available to use for quota purposes for server-side applications. Can be any
2343
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2344
+ # Overrides userIp if both are provided.
2345
+ # @param [String] user_ip
2346
+ # IP address of the site where the request originates. Use this if you want to
2347
+ # enforce per-user limits.
2348
+ # @param [Google::Apis::RequestOptions] options
2349
+ # Request-specific options
2350
+ #
2351
+ # @yield [result, err] Result & error if block supplied
2352
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::RoleAssignment] parsed result object
2353
+ # @yieldparam err [StandardError] error object if request failed
2354
+ #
2355
+ # @return [Google::Apis::AdminDirectoryV1::RoleAssignment]
2356
+ #
2357
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2358
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2359
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2360
+ def insert_role_assignment(customer, role_assignment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2361
+ command = make_simple_command(:post, 'customer/{customer}/roleassignments', options)
2362
+ command.request_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
2363
+ command.request_object = role_assignment_object
2364
+ command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
2365
+ command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
2366
+ command.params['customer'] = customer unless customer.nil?
2367
+ command.query['fields'] = fields unless fields.nil?
2368
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2369
+ command.query['userIp'] = user_ip unless user_ip.nil?
2370
+ execute_or_queue_command(command, &block)
2371
+ end
2372
+
2373
+ # Retrieves a paginated list of all roleAssignments.
2374
+ # @param [String] customer
2375
+ # Immutable ID of the Google Apps account.
2376
+ # @param [Fixnum] max_results
2377
+ # Maximum number of results to return.
2378
+ # @param [String] page_token
2379
+ # Token to specify the next page in the list.
2380
+ # @param [String] role_id
2381
+ # Immutable ID of a role. If included in the request, returns only role
2382
+ # assignments containing this role ID.
2383
+ # @param [String] user_key
2384
+ # The user's primary email address, alias email address, or unique user ID. If
2385
+ # included in the request, returns role assignments only for this user.
2386
+ # @param [String] fields
2387
+ # Selector specifying which fields to include in a partial response.
2388
+ # @param [String] quota_user
2389
+ # Available to use for quota purposes for server-side applications. Can be any
2390
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2391
+ # Overrides userIp if both are provided.
2392
+ # @param [String] user_ip
2393
+ # IP address of the site where the request originates. Use this if you want to
2394
+ # enforce per-user limits.
2395
+ # @param [Google::Apis::RequestOptions] options
2396
+ # Request-specific options
2397
+ #
2398
+ # @yield [result, err] Result & error if block supplied
2399
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::RoleAssignments] parsed result object
2400
+ # @yieldparam err [StandardError] error object if request failed
2401
+ #
2402
+ # @return [Google::Apis::AdminDirectoryV1::RoleAssignments]
2403
+ #
2404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2407
+ def list_role_assignments(customer, max_results: nil, page_token: nil, role_id: nil, user_key: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2408
+ command = make_simple_command(:get, 'customer/{customer}/roleassignments', options)
2409
+ command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignments::Representation
2410
+ command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignments
2411
+ command.params['customer'] = customer unless customer.nil?
2412
+ command.query['maxResults'] = max_results unless max_results.nil?
2413
+ command.query['pageToken'] = page_token unless page_token.nil?
2414
+ command.query['roleId'] = role_id unless role_id.nil?
2415
+ command.query['userKey'] = user_key unless user_key.nil?
2416
+ command.query['fields'] = fields unless fields.nil?
2417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2418
+ command.query['userIp'] = user_ip unless user_ip.nil?
2419
+ execute_or_queue_command(command, &block)
2420
+ end
2421
+
2422
+ # Deletes a role.
2423
+ # @param [String] customer
2424
+ # Immutable ID of the Google Apps account.
2425
+ # @param [String] role_id
2426
+ # Immutable ID of the role.
2427
+ # @param [String] fields
2428
+ # Selector specifying which fields to include in a partial response.
2429
+ # @param [String] quota_user
2430
+ # Available to use for quota purposes for server-side applications. Can be any
2431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2432
+ # Overrides userIp if both are provided.
2433
+ # @param [String] user_ip
2434
+ # IP address of the site where the request originates. Use this if you want to
2435
+ # enforce per-user limits.
2436
+ # @param [Google::Apis::RequestOptions] options
2437
+ # Request-specific options
2438
+ #
2439
+ # @yield [result, err] Result & error if block supplied
2440
+ # @yieldparam result [NilClass] No result returned for this method
2441
+ # @yieldparam err [StandardError] error object if request failed
2442
+ #
2443
+ # @return [void]
2444
+ #
2445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2448
+ def delete_role(customer, role_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2449
+ command = make_simple_command(:delete, 'customer/{customer}/roles/{roleId}', options)
2450
+ command.params['customer'] = customer unless customer.nil?
2451
+ command.params['roleId'] = role_id unless role_id.nil?
2452
+ command.query['fields'] = fields unless fields.nil?
2453
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2454
+ command.query['userIp'] = user_ip unless user_ip.nil?
2455
+ execute_or_queue_command(command, &block)
2456
+ end
2457
+
2458
+ # Retrieves a role.
2459
+ # @param [String] customer
2460
+ # Immutable ID of the Google Apps account.
2461
+ # @param [String] role_id
2462
+ # Immutable ID of the role.
2463
+ # @param [String] fields
2464
+ # Selector specifying which fields to include in a partial response.
2465
+ # @param [String] quota_user
2466
+ # Available to use for quota purposes for server-side applications. Can be any
2467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2468
+ # Overrides userIp if both are provided.
2469
+ # @param [String] user_ip
2470
+ # IP address of the site where the request originates. Use this if you want to
2471
+ # enforce per-user limits.
2472
+ # @param [Google::Apis::RequestOptions] options
2473
+ # Request-specific options
2474
+ #
2475
+ # @yield [result, err] Result & error if block supplied
2476
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Role] parsed result object
2477
+ # @yieldparam err [StandardError] error object if request failed
2478
+ #
2479
+ # @return [Google::Apis::AdminDirectoryV1::Role]
2480
+ #
2481
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2482
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2483
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2484
+ def get_role(customer, role_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2485
+ command = make_simple_command(:get, 'customer/{customer}/roles/{roleId}', options)
2486
+ command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2487
+ command.response_class = Google::Apis::AdminDirectoryV1::Role
2488
+ command.params['customer'] = customer unless customer.nil?
2489
+ command.params['roleId'] = role_id unless role_id.nil?
2490
+ command.query['fields'] = fields unless fields.nil?
2491
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2492
+ command.query['userIp'] = user_ip unless user_ip.nil?
2493
+ execute_or_queue_command(command, &block)
2494
+ end
2495
+
2496
+ # Creates a role.
2497
+ # @param [String] customer
2498
+ # Immutable ID of the Google Apps account.
2499
+ # @param [Google::Apis::AdminDirectoryV1::Role] role_object
2500
+ # @param [String] fields
2501
+ # Selector specifying which fields to include in a partial response.
2502
+ # @param [String] quota_user
2503
+ # Available to use for quota purposes for server-side applications. Can be any
2504
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2505
+ # Overrides userIp if both are provided.
2506
+ # @param [String] user_ip
2507
+ # IP address of the site where the request originates. Use this if you want to
2508
+ # enforce per-user limits.
2509
+ # @param [Google::Apis::RequestOptions] options
2510
+ # Request-specific options
2511
+ #
2512
+ # @yield [result, err] Result & error if block supplied
2513
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Role] parsed result object
2514
+ # @yieldparam err [StandardError] error object if request failed
2515
+ #
2516
+ # @return [Google::Apis::AdminDirectoryV1::Role]
2517
+ #
2518
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2519
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2520
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2521
+ def insert_role(customer, role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2522
+ command = make_simple_command(:post, 'customer/{customer}/roles', options)
2523
+ command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2524
+ command.request_object = role_object
2525
+ command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2526
+ command.response_class = Google::Apis::AdminDirectoryV1::Role
2527
+ command.params['customer'] = customer unless customer.nil?
2528
+ command.query['fields'] = fields unless fields.nil?
2529
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2530
+ command.query['userIp'] = user_ip unless user_ip.nil?
2531
+ execute_or_queue_command(command, &block)
2532
+ end
2533
+
2534
+ # Retrieves a paginated list of all the roles in a domain.
2535
+ # @param [String] customer
2536
+ # Immutable id of the Google Apps account.
2537
+ # @param [Fixnum] max_results
2538
+ # Maximum number of results to return.
2539
+ # @param [String] page_token
2540
+ # Token to specify the next page in the list.
2541
+ # @param [String] fields
2542
+ # Selector specifying which fields to include in a partial response.
2543
+ # @param [String] quota_user
2544
+ # Available to use for quota purposes for server-side applications. Can be any
2545
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2546
+ # Overrides userIp if both are provided.
2547
+ # @param [String] user_ip
2548
+ # IP address of the site where the request originates. Use this if you want to
2549
+ # enforce per-user limits.
2550
+ # @param [Google::Apis::RequestOptions] options
2551
+ # Request-specific options
2552
+ #
2553
+ # @yield [result, err] Result & error if block supplied
2554
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Roles] parsed result object
2555
+ # @yieldparam err [StandardError] error object if request failed
2556
+ #
2557
+ # @return [Google::Apis::AdminDirectoryV1::Roles]
2558
+ #
2559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2562
+ def list_roles(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2563
+ command = make_simple_command(:get, 'customer/{customer}/roles', options)
2564
+ command.response_representation = Google::Apis::AdminDirectoryV1::Roles::Representation
2565
+ command.response_class = Google::Apis::AdminDirectoryV1::Roles
2566
+ command.params['customer'] = customer unless customer.nil?
2567
+ command.query['maxResults'] = max_results unless max_results.nil?
2568
+ command.query['pageToken'] = page_token unless page_token.nil?
2569
+ command.query['fields'] = fields unless fields.nil?
2570
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2571
+ command.query['userIp'] = user_ip unless user_ip.nil?
2572
+ execute_or_queue_command(command, &block)
2573
+ end
2574
+
2575
+ # Updates a role. This method supports patch semantics.
2576
+ # @param [String] customer
2577
+ # Immutable ID of the Google Apps account.
2578
+ # @param [String] role_id
2579
+ # Immutable ID of the role.
2580
+ # @param [Google::Apis::AdminDirectoryV1::Role] role_object
2581
+ # @param [String] fields
2582
+ # Selector specifying which fields to include in a partial response.
2583
+ # @param [String] quota_user
2584
+ # Available to use for quota purposes for server-side applications. Can be any
2585
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2586
+ # Overrides userIp if both are provided.
2587
+ # @param [String] user_ip
2588
+ # IP address of the site where the request originates. Use this if you want to
2589
+ # enforce per-user limits.
2590
+ # @param [Google::Apis::RequestOptions] options
2591
+ # Request-specific options
2592
+ #
2593
+ # @yield [result, err] Result & error if block supplied
2594
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Role] parsed result object
2595
+ # @yieldparam err [StandardError] error object if request failed
2596
+ #
2597
+ # @return [Google::Apis::AdminDirectoryV1::Role]
2598
+ #
2599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2602
+ def patch_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2603
+ command = make_simple_command(:patch, 'customer/{customer}/roles/{roleId}', options)
2604
+ command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2605
+ command.request_object = role_object
2606
+ command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2607
+ command.response_class = Google::Apis::AdminDirectoryV1::Role
2608
+ command.params['customer'] = customer unless customer.nil?
2609
+ command.params['roleId'] = role_id unless role_id.nil?
2610
+ command.query['fields'] = fields unless fields.nil?
2611
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2612
+ command.query['userIp'] = user_ip unless user_ip.nil?
2613
+ execute_or_queue_command(command, &block)
2614
+ end
2615
+
2616
+ # Updates a role.
2617
+ # @param [String] customer
2618
+ # Immutable ID of the Google Apps account.
2619
+ # @param [String] role_id
2620
+ # Immutable ID of the role.
2621
+ # @param [Google::Apis::AdminDirectoryV1::Role] role_object
2622
+ # @param [String] fields
2623
+ # Selector specifying which fields to include in a partial response.
2624
+ # @param [String] quota_user
2625
+ # Available to use for quota purposes for server-side applications. Can be any
2626
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2627
+ # Overrides userIp if both are provided.
2628
+ # @param [String] user_ip
2629
+ # IP address of the site where the request originates. Use this if you want to
2630
+ # enforce per-user limits.
2631
+ # @param [Google::Apis::RequestOptions] options
2632
+ # Request-specific options
2633
+ #
2634
+ # @yield [result, err] Result & error if block supplied
2635
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Role] parsed result object
2636
+ # @yieldparam err [StandardError] error object if request failed
2637
+ #
2638
+ # @return [Google::Apis::AdminDirectoryV1::Role]
2639
+ #
2640
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2641
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2642
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2643
+ def update_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2644
+ command = make_simple_command(:put, 'customer/{customer}/roles/{roleId}', options)
2645
+ command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2646
+ command.request_object = role_object
2647
+ command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
2648
+ command.response_class = Google::Apis::AdminDirectoryV1::Role
2649
+ command.params['customer'] = customer unless customer.nil?
2650
+ command.params['roleId'] = role_id unless role_id.nil?
2651
+ command.query['fields'] = fields unless fields.nil?
2652
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2653
+ command.query['userIp'] = user_ip unless user_ip.nil?
2654
+ execute_or_queue_command(command, &block)
2655
+ end
2656
+
2657
+ # Delete schema
2658
+ # @param [String] customer_id
2659
+ # Immutable id of the Google Apps account
2660
+ # @param [String] schema_key
2661
+ # Name or immutable Id of the schema
2662
+ # @param [String] fields
2663
+ # Selector specifying which fields to include in a partial response.
2664
+ # @param [String] quota_user
2665
+ # Available to use for quota purposes for server-side applications. Can be any
2666
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2667
+ # Overrides userIp if both are provided.
2668
+ # @param [String] user_ip
2669
+ # IP address of the site where the request originates. Use this if you want to
2670
+ # enforce per-user limits.
2671
+ # @param [Google::Apis::RequestOptions] options
2672
+ # Request-specific options
2673
+ #
2674
+ # @yield [result, err] Result & error if block supplied
2675
+ # @yieldparam result [NilClass] No result returned for this method
2676
+ # @yieldparam err [StandardError] error object if request failed
2677
+ #
2678
+ # @return [void]
2679
+ #
2680
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2681
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2682
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2683
+ def delete_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2684
+ command = make_simple_command(:delete, 'customer/{customerId}/schemas/{schemaKey}', options)
2685
+ command.params['customerId'] = customer_id unless customer_id.nil?
2686
+ command.params['schemaKey'] = schema_key unless schema_key.nil?
2687
+ command.query['fields'] = fields unless fields.nil?
2688
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2689
+ command.query['userIp'] = user_ip unless user_ip.nil?
2690
+ execute_or_queue_command(command, &block)
2691
+ end
2692
+
2693
+ # Retrieve schema
2694
+ # @param [String] customer_id
2695
+ # Immutable id of the Google Apps account
2696
+ # @param [String] schema_key
2697
+ # Name or immutable Id of the schema
2698
+ # @param [String] fields
2699
+ # Selector specifying which fields to include in a partial response.
2700
+ # @param [String] quota_user
2701
+ # Available to use for quota purposes for server-side applications. Can be any
2702
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2703
+ # Overrides userIp if both are provided.
2704
+ # @param [String] user_ip
2705
+ # IP address of the site where the request originates. Use this if you want to
2706
+ # enforce per-user limits.
2707
+ # @param [Google::Apis::RequestOptions] options
2708
+ # Request-specific options
2709
+ #
2710
+ # @yield [result, err] Result & error if block supplied
2711
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
2712
+ # @yieldparam err [StandardError] error object if request failed
2713
+ #
2714
+ # @return [Google::Apis::AdminDirectoryV1::Schema]
2715
+ #
2716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2719
+ def get_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2720
+ command = make_simple_command(:get, 'customer/{customerId}/schemas/{schemaKey}', options)
2721
+ command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2722
+ command.response_class = Google::Apis::AdminDirectoryV1::Schema
2723
+ command.params['customerId'] = customer_id unless customer_id.nil?
2724
+ command.params['schemaKey'] = schema_key unless schema_key.nil?
2725
+ command.query['fields'] = fields unless fields.nil?
2726
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2727
+ command.query['userIp'] = user_ip unless user_ip.nil?
2728
+ execute_or_queue_command(command, &block)
2729
+ end
2730
+
2731
+ # Create schema.
2732
+ # @param [String] customer_id
2733
+ # Immutable id of the Google Apps account
2734
+ # @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
2735
+ # @param [String] fields
2736
+ # Selector specifying which fields to include in a partial response.
2737
+ # @param [String] quota_user
2738
+ # Available to use for quota purposes for server-side applications. Can be any
2739
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2740
+ # Overrides userIp if both are provided.
2741
+ # @param [String] user_ip
2742
+ # IP address of the site where the request originates. Use this if you want to
2743
+ # enforce per-user limits.
2744
+ # @param [Google::Apis::RequestOptions] options
2745
+ # Request-specific options
2746
+ #
2747
+ # @yield [result, err] Result & error if block supplied
2748
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
2749
+ # @yieldparam err [StandardError] error object if request failed
2750
+ #
2751
+ # @return [Google::Apis::AdminDirectoryV1::Schema]
2752
+ #
2753
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2754
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2755
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2756
+ def insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2757
+ command = make_simple_command(:post, 'customer/{customerId}/schemas', options)
2758
+ command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2759
+ command.request_object = schema_object
2760
+ command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2761
+ command.response_class = Google::Apis::AdminDirectoryV1::Schema
2762
+ command.params['customerId'] = customer_id unless customer_id.nil?
2763
+ command.query['fields'] = fields unless fields.nil?
2764
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2765
+ command.query['userIp'] = user_ip unless user_ip.nil?
2766
+ execute_or_queue_command(command, &block)
2767
+ end
2768
+
2769
+ # Retrieve all schemas for a customer
2770
+ # @param [String] customer_id
2771
+ # Immutable id of the Google Apps account
2772
+ # @param [String] fields
2773
+ # Selector specifying which fields to include in a partial response.
2774
+ # @param [String] quota_user
2775
+ # Available to use for quota purposes for server-side applications. Can be any
2776
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2777
+ # Overrides userIp if both are provided.
2778
+ # @param [String] user_ip
2779
+ # IP address of the site where the request originates. Use this if you want to
2780
+ # enforce per-user limits.
2781
+ # @param [Google::Apis::RequestOptions] options
2782
+ # Request-specific options
2783
+ #
2784
+ # @yield [result, err] Result & error if block supplied
2785
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Schemas] parsed result object
2786
+ # @yieldparam err [StandardError] error object if request failed
2787
+ #
2788
+ # @return [Google::Apis::AdminDirectoryV1::Schemas]
2789
+ #
2790
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2791
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2792
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2793
+ def list_schemas(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2794
+ command = make_simple_command(:get, 'customer/{customerId}/schemas', options)
2795
+ command.response_representation = Google::Apis::AdminDirectoryV1::Schemas::Representation
2796
+ command.response_class = Google::Apis::AdminDirectoryV1::Schemas
2797
+ command.params['customerId'] = customer_id unless customer_id.nil?
2798
+ command.query['fields'] = fields unless fields.nil?
2799
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2800
+ command.query['userIp'] = user_ip unless user_ip.nil?
2801
+ execute_or_queue_command(command, &block)
2802
+ end
2803
+
2804
+ # Update schema. This method supports patch semantics.
2805
+ # @param [String] customer_id
2806
+ # Immutable id of the Google Apps account
2807
+ # @param [String] schema_key
2808
+ # Name or immutable Id of the schema.
2809
+ # @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
2810
+ # @param [String] fields
2811
+ # Selector specifying which fields to include in a partial response.
2812
+ # @param [String] quota_user
2813
+ # Available to use for quota purposes for server-side applications. Can be any
2814
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2815
+ # Overrides userIp if both are provided.
2816
+ # @param [String] user_ip
2817
+ # IP address of the site where the request originates. Use this if you want to
2818
+ # enforce per-user limits.
2819
+ # @param [Google::Apis::RequestOptions] options
2820
+ # Request-specific options
2821
+ #
2822
+ # @yield [result, err] Result & error if block supplied
2823
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
2824
+ # @yieldparam err [StandardError] error object if request failed
2825
+ #
2826
+ # @return [Google::Apis::AdminDirectoryV1::Schema]
2827
+ #
2828
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2829
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2830
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2831
+ def patch_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2832
+ command = make_simple_command(:patch, 'customer/{customerId}/schemas/{schemaKey}', options)
2833
+ command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2834
+ command.request_object = schema_object
2835
+ command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2836
+ command.response_class = Google::Apis::AdminDirectoryV1::Schema
2837
+ command.params['customerId'] = customer_id unless customer_id.nil?
2838
+ command.params['schemaKey'] = schema_key unless schema_key.nil?
2839
+ command.query['fields'] = fields unless fields.nil?
2840
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2841
+ command.query['userIp'] = user_ip unless user_ip.nil?
2842
+ execute_or_queue_command(command, &block)
2843
+ end
2844
+
2845
+ # Update schema
2846
+ # @param [String] customer_id
2847
+ # Immutable id of the Google Apps account
2848
+ # @param [String] schema_key
2849
+ # Name or immutable Id of the schema.
2850
+ # @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
2851
+ # @param [String] fields
2852
+ # Selector specifying which fields to include in a partial response.
2853
+ # @param [String] quota_user
2854
+ # Available to use for quota purposes for server-side applications. Can be any
2855
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2856
+ # Overrides userIp if both are provided.
2857
+ # @param [String] user_ip
2858
+ # IP address of the site where the request originates. Use this if you want to
2859
+ # enforce per-user limits.
2860
+ # @param [Google::Apis::RequestOptions] options
2861
+ # Request-specific options
2862
+ #
2863
+ # @yield [result, err] Result & error if block supplied
2864
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
2865
+ # @yieldparam err [StandardError] error object if request failed
2866
+ #
2867
+ # @return [Google::Apis::AdminDirectoryV1::Schema]
2868
+ #
2869
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2870
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2871
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2872
+ def update_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2873
+ command = make_simple_command(:put, 'customer/{customerId}/schemas/{schemaKey}', options)
2874
+ command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2875
+ command.request_object = schema_object
2876
+ command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
2877
+ command.response_class = Google::Apis::AdminDirectoryV1::Schema
2878
+ command.params['customerId'] = customer_id unless customer_id.nil?
2879
+ command.params['schemaKey'] = schema_key unless schema_key.nil?
2880
+ command.query['fields'] = fields unless fields.nil?
2881
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2882
+ command.query['userIp'] = user_ip unless user_ip.nil?
2883
+ execute_or_queue_command(command, &block)
2884
+ end
2885
+
2886
+ # Delete all access tokens issued by a user for an application.
2887
+ # @param [String] user_key
2888
+ # Identifies the user in the API request. The value can be the user's primary
2889
+ # email address, alias email address, or unique user ID.
2890
+ # @param [String] client_id
2891
+ # The Client ID of the application the token is issued to.
2892
+ # @param [String] fields
2893
+ # Selector specifying which fields to include in a partial response.
2894
+ # @param [String] quota_user
2895
+ # Available to use for quota purposes for server-side applications. Can be any
2896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2897
+ # Overrides userIp if both are provided.
2898
+ # @param [String] user_ip
2899
+ # IP address of the site where the request originates. Use this if you want to
2900
+ # enforce per-user limits.
2901
+ # @param [Google::Apis::RequestOptions] options
2902
+ # Request-specific options
2903
+ #
2904
+ # @yield [result, err] Result & error if block supplied
2905
+ # @yieldparam result [NilClass] No result returned for this method
2906
+ # @yieldparam err [StandardError] error object if request failed
2907
+ #
2908
+ # @return [void]
2909
+ #
2910
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2911
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2912
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2913
+ def delete_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2914
+ command = make_simple_command(:delete, 'users/{userKey}/tokens/{clientId}', options)
2915
+ command.params['userKey'] = user_key unless user_key.nil?
2916
+ command.params['clientId'] = client_id unless client_id.nil?
2917
+ command.query['fields'] = fields unless fields.nil?
2918
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2919
+ command.query['userIp'] = user_ip unless user_ip.nil?
2920
+ execute_or_queue_command(command, &block)
2921
+ end
2922
+
2923
+ # Get information about an access token issued by a user.
2924
+ # @param [String] user_key
2925
+ # Identifies the user in the API request. The value can be the user's primary
2926
+ # email address, alias email address, or unique user ID.
2927
+ # @param [String] client_id
2928
+ # The Client ID of the application the token is issued to.
2929
+ # @param [String] fields
2930
+ # Selector specifying which fields to include in a partial response.
2931
+ # @param [String] quota_user
2932
+ # Available to use for quota purposes for server-side applications. Can be any
2933
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2934
+ # Overrides userIp if both are provided.
2935
+ # @param [String] user_ip
2936
+ # IP address of the site where the request originates. Use this if you want to
2937
+ # enforce per-user limits.
2938
+ # @param [Google::Apis::RequestOptions] options
2939
+ # Request-specific options
2940
+ #
2941
+ # @yield [result, err] Result & error if block supplied
2942
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Token] parsed result object
2943
+ # @yieldparam err [StandardError] error object if request failed
2944
+ #
2945
+ # @return [Google::Apis::AdminDirectoryV1::Token]
2946
+ #
2947
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2948
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2949
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2950
+ def get_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2951
+ command = make_simple_command(:get, 'users/{userKey}/tokens/{clientId}', options)
2952
+ command.response_representation = Google::Apis::AdminDirectoryV1::Token::Representation
2953
+ command.response_class = Google::Apis::AdminDirectoryV1::Token
2954
+ command.params['userKey'] = user_key unless user_key.nil?
2955
+ command.params['clientId'] = client_id unless client_id.nil?
2956
+ command.query['fields'] = fields unless fields.nil?
2957
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2958
+ command.query['userIp'] = user_ip unless user_ip.nil?
2959
+ execute_or_queue_command(command, &block)
2960
+ end
2961
+
2962
+ # Returns the set of tokens specified user has issued to 3rd party applications.
2963
+ # @param [String] user_key
2964
+ # Identifies the user in the API request. The value can be the user's primary
2965
+ # email address, alias email address, or unique user ID.
2966
+ # @param [String] fields
2967
+ # Selector specifying which fields to include in a partial response.
2968
+ # @param [String] quota_user
2969
+ # Available to use for quota purposes for server-side applications. Can be any
2970
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2971
+ # Overrides userIp if both are provided.
2972
+ # @param [String] user_ip
2973
+ # IP address of the site where the request originates. Use this if you want to
2974
+ # enforce per-user limits.
2975
+ # @param [Google::Apis::RequestOptions] options
2976
+ # Request-specific options
2977
+ #
2978
+ # @yield [result, err] Result & error if block supplied
2979
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Tokens] parsed result object
2980
+ # @yieldparam err [StandardError] error object if request failed
2981
+ #
2982
+ # @return [Google::Apis::AdminDirectoryV1::Tokens]
2983
+ #
2984
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2985
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2986
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2987
+ def list_tokens(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2988
+ command = make_simple_command(:get, 'users/{userKey}/tokens', options)
2989
+ command.response_representation = Google::Apis::AdminDirectoryV1::Tokens::Representation
2990
+ command.response_class = Google::Apis::AdminDirectoryV1::Tokens
2991
+ command.params['userKey'] = user_key unless user_key.nil?
2992
+ command.query['fields'] = fields unless fields.nil?
2993
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2994
+ command.query['userIp'] = user_ip unless user_ip.nil?
2995
+ execute_or_queue_command(command, &block)
2996
+ end
2997
+
2998
+ # Delete user
2999
+ # @param [String] user_key
3000
+ # Email or immutable Id of the user
3001
+ # @param [String] fields
3002
+ # Selector specifying which fields to include in a partial response.
3003
+ # @param [String] quota_user
3004
+ # Available to use for quota purposes for server-side applications. Can be any
3005
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3006
+ # Overrides userIp if both are provided.
3007
+ # @param [String] user_ip
3008
+ # IP address of the site where the request originates. Use this if you want to
3009
+ # enforce per-user limits.
3010
+ # @param [Google::Apis::RequestOptions] options
3011
+ # Request-specific options
3012
+ #
3013
+ # @yield [result, err] Result & error if block supplied
3014
+ # @yieldparam result [NilClass] No result returned for this method
3015
+ # @yieldparam err [StandardError] error object if request failed
3016
+ #
3017
+ # @return [void]
3018
+ #
3019
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3020
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3021
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3022
+ def delete_user(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3023
+ command = make_simple_command(:delete, 'users/{userKey}', options)
3024
+ command.params['userKey'] = user_key unless user_key.nil?
3025
+ command.query['fields'] = fields unless fields.nil?
3026
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3027
+ command.query['userIp'] = user_ip unless user_ip.nil?
3028
+ execute_or_queue_command(command, &block)
3029
+ end
3030
+
3031
+ # retrieve user
3032
+ # @param [String] user_key
3033
+ # Email or immutable Id of the user
3034
+ # @param [String] custom_field_mask
3035
+ # Comma-separated list of schema names. All fields from these schemas are
3036
+ # fetched. This should only be set when projection=custom.
3037
+ # @param [String] projection
3038
+ # What subset of fields to fetch for this user.
3039
+ # @param [String] view_type
3040
+ # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
3041
+ # @param [String] fields
3042
+ # Selector specifying which fields to include in a partial response.
3043
+ # @param [String] quota_user
3044
+ # Available to use for quota purposes for server-side applications. Can be any
3045
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3046
+ # Overrides userIp if both are provided.
3047
+ # @param [String] user_ip
3048
+ # IP address of the site where the request originates. Use this if you want to
3049
+ # enforce per-user limits.
3050
+ # @param [Google::Apis::RequestOptions] options
3051
+ # Request-specific options
3052
+ #
3053
+ # @yield [result, err] Result & error if block supplied
3054
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
3055
+ # @yieldparam err [StandardError] error object if request failed
3056
+ #
3057
+ # @return [Google::Apis::AdminDirectoryV1::User]
3058
+ #
3059
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3060
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3061
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3062
+ def get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3063
+ command = make_simple_command(:get, 'users/{userKey}', options)
3064
+ command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
3065
+ command.response_class = Google::Apis::AdminDirectoryV1::User
3066
+ command.params['userKey'] = user_key unless user_key.nil?
3067
+ command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
3068
+ command.query['projection'] = projection unless projection.nil?
3069
+ command.query['viewType'] = view_type unless view_type.nil?
3070
+ command.query['fields'] = fields unless fields.nil?
3071
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3072
+ command.query['userIp'] = user_ip unless user_ip.nil?
3073
+ execute_or_queue_command(command, &block)
3074
+ end
3075
+
3076
+ # create user.
3077
+ # @param [Google::Apis::AdminDirectoryV1::User] user_object
3078
+ # @param [String] fields
3079
+ # Selector specifying which fields to include in a partial response.
3080
+ # @param [String] quota_user
3081
+ # Available to use for quota purposes for server-side applications. Can be any
3082
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3083
+ # Overrides userIp if both are provided.
3084
+ # @param [String] user_ip
3085
+ # IP address of the site where the request originates. Use this if you want to
3086
+ # enforce per-user limits.
3087
+ # @param [Google::Apis::RequestOptions] options
3088
+ # Request-specific options
3089
+ #
3090
+ # @yield [result, err] Result & error if block supplied
3091
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
3092
+ # @yieldparam err [StandardError] error object if request failed
3093
+ #
3094
+ # @return [Google::Apis::AdminDirectoryV1::User]
3095
+ #
3096
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3097
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3098
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3099
+ def insert_user(user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3100
+ command = make_simple_command(:post, 'users', options)
3101
+ command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
3102
+ command.request_object = user_object
3103
+ command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
3104
+ command.response_class = Google::Apis::AdminDirectoryV1::User
3105
+ command.query['fields'] = fields unless fields.nil?
3106
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3107
+ command.query['userIp'] = user_ip unless user_ip.nil?
3108
+ execute_or_queue_command(command, &block)
3109
+ end
3110
+
3111
+ # Retrieve either deleted users or all users in a domain (paginated)
3112
+ # @param [String] custom_field_mask
3113
+ # Comma-separated list of schema names. All fields from these schemas are
3114
+ # fetched. This should only be set when projection=custom.
3115
+ # @param [String] customer
3116
+ # Immutable id of the Google Apps account. In case of multi-domain, to fetch all
3117
+ # users for a customer, fill this field instead of domain.
3118
+ # @param [String] domain
3119
+ # Name of the domain. Fill this field to get users from only this domain. To
3120
+ # return all users in a multi-domain fill customer field instead.
3121
+ # @param [String] event
3122
+ # Event on which subscription is intended (if subscribing)
3123
+ # @param [Fixnum] max_results
3124
+ # Maximum number of results to return. Default is 100. Max allowed is 500
3125
+ # @param [String] order_by
3126
+ # Column to use for sorting results
3127
+ # @param [String] page_token
3128
+ # Token to specify next page in the list
3129
+ # @param [String] projection
3130
+ # What subset of fields to fetch for this user.
3131
+ # @param [String] query
3132
+ # Query string search. Should be of the form "". Complete documentation is at
3133
+ # https://developers.google.com/admin-sdk/directory/v1/guides/search-users
3134
+ # @param [String] show_deleted
3135
+ # If set to true retrieves the list of deleted users. Default is false
3136
+ # @param [String] sort_order
3137
+ # Whether to return results in ascending or descending order.
3138
+ # @param [String] view_type
3139
+ # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
3140
+ # @param [String] fields
3141
+ # Selector specifying which fields to include in a partial response.
3142
+ # @param [String] quota_user
3143
+ # Available to use for quota purposes for server-side applications. Can be any
3144
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3145
+ # Overrides userIp if both are provided.
3146
+ # @param [String] user_ip
3147
+ # IP address of the site where the request originates. Use this if you want to
3148
+ # enforce per-user limits.
3149
+ # @param [Google::Apis::RequestOptions] options
3150
+ # Request-specific options
3151
+ #
3152
+ # @yield [result, err] Result & error if block supplied
3153
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Users] parsed result object
3154
+ # @yieldparam err [StandardError] error object if request failed
3155
+ #
3156
+ # @return [Google::Apis::AdminDirectoryV1::Users]
3157
+ #
3158
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3159
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3160
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3161
+ def list_users(custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3162
+ command = make_simple_command(:get, 'users', options)
3163
+ command.response_representation = Google::Apis::AdminDirectoryV1::Users::Representation
3164
+ command.response_class = Google::Apis::AdminDirectoryV1::Users
3165
+ command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
3166
+ command.query['customer'] = customer unless customer.nil?
3167
+ command.query['domain'] = domain unless domain.nil?
3168
+ command.query['event'] = event unless event.nil?
3169
+ command.query['maxResults'] = max_results unless max_results.nil?
3170
+ command.query['orderBy'] = order_by unless order_by.nil?
3171
+ command.query['pageToken'] = page_token unless page_token.nil?
3172
+ command.query['projection'] = projection unless projection.nil?
3173
+ command.query['query'] = query unless query.nil?
3174
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
3175
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
3176
+ command.query['viewType'] = view_type unless view_type.nil?
3177
+ command.query['fields'] = fields unless fields.nil?
3178
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3179
+ command.query['userIp'] = user_ip unless user_ip.nil?
3180
+ execute_or_queue_command(command, &block)
3181
+ end
3182
+
3183
+ # change admin status of a user
3184
+ # @param [String] user_key
3185
+ # Email or immutable Id of the user as admin
3186
+ # @param [Google::Apis::AdminDirectoryV1::UserMakeAdmin] user_make_admin_object
3187
+ # @param [String] fields
3188
+ # Selector specifying which fields to include in a partial response.
3189
+ # @param [String] quota_user
3190
+ # Available to use for quota purposes for server-side applications. Can be any
3191
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3192
+ # Overrides userIp if both are provided.
3193
+ # @param [String] user_ip
3194
+ # IP address of the site where the request originates. Use this if you want to
3195
+ # enforce per-user limits.
3196
+ # @param [Google::Apis::RequestOptions] options
3197
+ # Request-specific options
3198
+ #
3199
+ # @yield [result, err] Result & error if block supplied
3200
+ # @yieldparam result [NilClass] No result returned for this method
3201
+ # @yieldparam err [StandardError] error object if request failed
3202
+ #
3203
+ # @return [void]
3204
+ #
3205
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3206
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3207
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3208
+ def make_user_admin(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3209
+ command = make_simple_command(:post, 'users/{userKey}/makeAdmin', options)
3210
+ command.request_representation = Google::Apis::AdminDirectoryV1::UserMakeAdmin::Representation
3211
+ command.request_object = user_make_admin_object
3212
+ command.params['userKey'] = user_key unless user_key.nil?
3213
+ command.query['fields'] = fields unless fields.nil?
3214
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3215
+ command.query['userIp'] = user_ip unless user_ip.nil?
3216
+ execute_or_queue_command(command, &block)
3217
+ end
3218
+
3219
+ # update user. This method supports patch semantics.
3220
+ # @param [String] user_key
3221
+ # Email or immutable Id of the user. If Id, it should match with id of user
3222
+ # object
3223
+ # @param [Google::Apis::AdminDirectoryV1::User] user_object
3224
+ # @param [String] fields
3225
+ # Selector specifying which fields to include in a partial response.
3226
+ # @param [String] quota_user
3227
+ # Available to use for quota purposes for server-side applications. Can be any
3228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3229
+ # Overrides userIp if both are provided.
3230
+ # @param [String] user_ip
3231
+ # IP address of the site where the request originates. Use this if you want to
3232
+ # enforce per-user limits.
3233
+ # @param [Google::Apis::RequestOptions] options
3234
+ # Request-specific options
3235
+ #
3236
+ # @yield [result, err] Result & error if block supplied
3237
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
3238
+ # @yieldparam err [StandardError] error object if request failed
3239
+ #
3240
+ # @return [Google::Apis::AdminDirectoryV1::User]
3241
+ #
3242
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3243
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3244
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3245
+ def patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3246
+ command = make_simple_command(:patch, 'users/{userKey}', options)
3247
+ command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
3248
+ command.request_object = user_object
3249
+ command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
3250
+ command.response_class = Google::Apis::AdminDirectoryV1::User
3251
+ command.params['userKey'] = user_key unless user_key.nil?
3252
+ command.query['fields'] = fields unless fields.nil?
3253
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3254
+ command.query['userIp'] = user_ip unless user_ip.nil?
3255
+ execute_or_queue_command(command, &block)
3256
+ end
3257
+
3258
+ # Undelete a deleted user
3259
+ # @param [String] user_key
3260
+ # The immutable id of the user
3261
+ # @param [Google::Apis::AdminDirectoryV1::UserUndelete] user_undelete_object
3262
+ # @param [String] fields
3263
+ # Selector specifying which fields to include in a partial response.
3264
+ # @param [String] quota_user
3265
+ # Available to use for quota purposes for server-side applications. Can be any
3266
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3267
+ # Overrides userIp if both are provided.
3268
+ # @param [String] user_ip
3269
+ # IP address of the site where the request originates. Use this if you want to
3270
+ # enforce per-user limits.
3271
+ # @param [Google::Apis::RequestOptions] options
3272
+ # Request-specific options
3273
+ #
3274
+ # @yield [result, err] Result & error if block supplied
3275
+ # @yieldparam result [NilClass] No result returned for this method
3276
+ # @yieldparam err [StandardError] error object if request failed
3277
+ #
3278
+ # @return [void]
3279
+ #
3280
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3281
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3282
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3283
+ def undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3284
+ command = make_simple_command(:post, 'users/{userKey}/undelete', options)
3285
+ command.request_representation = Google::Apis::AdminDirectoryV1::UserUndelete::Representation
3286
+ command.request_object = user_undelete_object
3287
+ command.params['userKey'] = user_key unless user_key.nil?
3288
+ command.query['fields'] = fields unless fields.nil?
3289
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3290
+ command.query['userIp'] = user_ip unless user_ip.nil?
3291
+ execute_or_queue_command(command, &block)
3292
+ end
3293
+
3294
+ # update user
3295
+ # @param [String] user_key
3296
+ # Email or immutable Id of the user. If Id, it should match with id of user
3297
+ # object
3298
+ # @param [Google::Apis::AdminDirectoryV1::User] user_object
3299
+ # @param [String] fields
3300
+ # Selector specifying which fields to include in a partial response.
3301
+ # @param [String] quota_user
3302
+ # Available to use for quota purposes for server-side applications. Can be any
3303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3304
+ # Overrides userIp if both are provided.
3305
+ # @param [String] user_ip
3306
+ # IP address of the site where the request originates. Use this if you want to
3307
+ # enforce per-user limits.
3308
+ # @param [Google::Apis::RequestOptions] options
3309
+ # Request-specific options
3310
+ #
3311
+ # @yield [result, err] Result & error if block supplied
3312
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
3313
+ # @yieldparam err [StandardError] error object if request failed
3314
+ #
3315
+ # @return [Google::Apis::AdminDirectoryV1::User]
3316
+ #
3317
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3318
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3319
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3320
+ def update_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3321
+ command = make_simple_command(:put, 'users/{userKey}', options)
3322
+ command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
3323
+ command.request_object = user_object
3324
+ command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
3325
+ command.response_class = Google::Apis::AdminDirectoryV1::User
3326
+ command.params['userKey'] = user_key unless user_key.nil?
3327
+ command.query['fields'] = fields unless fields.nil?
3328
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3329
+ command.query['userIp'] = user_ip unless user_ip.nil?
3330
+ execute_or_queue_command(command, &block)
3331
+ end
3332
+
3333
+ # Watch for changes in users list
3334
+ # @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
3335
+ # @param [String] custom_field_mask
3336
+ # Comma-separated list of schema names. All fields from these schemas are
3337
+ # fetched. This should only be set when projection=custom.
3338
+ # @param [String] customer
3339
+ # Immutable id of the Google Apps account. In case of multi-domain, to fetch all
3340
+ # users for a customer, fill this field instead of domain.
3341
+ # @param [String] domain
3342
+ # Name of the domain. Fill this field to get users from only this domain. To
3343
+ # return all users in a multi-domain fill customer field instead.
3344
+ # @param [String] event
3345
+ # Event on which subscription is intended (if subscribing)
3346
+ # @param [Fixnum] max_results
3347
+ # Maximum number of results to return. Default is 100. Max allowed is 500
3348
+ # @param [String] order_by
3349
+ # Column to use for sorting results
3350
+ # @param [String] page_token
3351
+ # Token to specify next page in the list
3352
+ # @param [String] projection
3353
+ # What subset of fields to fetch for this user.
3354
+ # @param [String] query
3355
+ # Query string search. Should be of the form "". Complete documentation is at
3356
+ # https://developers.google.com/admin-sdk/directory/v1/guides/search-users
3357
+ # @param [String] show_deleted
3358
+ # If set to true retrieves the list of deleted users. Default is false
3359
+ # @param [String] sort_order
3360
+ # Whether to return results in ascending or descending order.
3361
+ # @param [String] view_type
3362
+ # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
3363
+ # @param [String] fields
3364
+ # Selector specifying which fields to include in a partial response.
3365
+ # @param [String] quota_user
3366
+ # Available to use for quota purposes for server-side applications. Can be any
3367
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3368
+ # Overrides userIp if both are provided.
3369
+ # @param [String] user_ip
3370
+ # IP address of the site where the request originates. Use this if you want to
3371
+ # enforce per-user limits.
3372
+ # @param [Google::Apis::RequestOptions] options
3373
+ # Request-specific options
3374
+ #
3375
+ # @yield [result, err] Result & error if block supplied
3376
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Channel] parsed result object
3377
+ # @yieldparam err [StandardError] error object if request failed
3378
+ #
3379
+ # @return [Google::Apis::AdminDirectoryV1::Channel]
3380
+ #
3381
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3382
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3383
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3384
+ def watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3385
+ command = make_simple_command(:post, 'users/watch', options)
3386
+ command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
3387
+ command.request_object = channel_object
3388
+ command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
3389
+ command.response_class = Google::Apis::AdminDirectoryV1::Channel
3390
+ command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
3391
+ command.query['customer'] = customer unless customer.nil?
3392
+ command.query['domain'] = domain unless domain.nil?
3393
+ command.query['event'] = event unless event.nil?
3394
+ command.query['maxResults'] = max_results unless max_results.nil?
3395
+ command.query['orderBy'] = order_by unless order_by.nil?
3396
+ command.query['pageToken'] = page_token unless page_token.nil?
3397
+ command.query['projection'] = projection unless projection.nil?
3398
+ command.query['query'] = query unless query.nil?
3399
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
3400
+ command.query['sortOrder'] = sort_order unless sort_order.nil?
3401
+ command.query['viewType'] = view_type unless view_type.nil?
3402
+ command.query['fields'] = fields unless fields.nil?
3403
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3404
+ command.query['userIp'] = user_ip unless user_ip.nil?
3405
+ execute_or_queue_command(command, &block)
3406
+ end
3407
+
3408
+ # Remove a alias for the user
3409
+ # @param [String] user_key
3410
+ # Email or immutable Id of the user
3411
+ # @param [String] user_alias
3412
+ # The alias to be removed
3413
+ # @param [String] fields
3414
+ # Selector specifying which fields to include in a partial response.
3415
+ # @param [String] quota_user
3416
+ # Available to use for quota purposes for server-side applications. Can be any
3417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3418
+ # Overrides userIp if both are provided.
3419
+ # @param [String] user_ip
3420
+ # IP address of the site where the request originates. Use this if you want to
3421
+ # enforce per-user limits.
3422
+ # @param [Google::Apis::RequestOptions] options
3423
+ # Request-specific options
3424
+ #
3425
+ # @yield [result, err] Result & error if block supplied
3426
+ # @yieldparam result [NilClass] No result returned for this method
3427
+ # @yieldparam err [StandardError] error object if request failed
3428
+ #
3429
+ # @return [void]
3430
+ #
3431
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3432
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3433
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3434
+ def delete_user_alias(user_key, user_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3435
+ command = make_simple_command(:delete, 'users/{userKey}/aliases/{alias}', options)
3436
+ command.params['userKey'] = user_key unless user_key.nil?
3437
+ command.params['alias'] = user_alias unless user_alias.nil?
3438
+ command.query['fields'] = fields unless fields.nil?
3439
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3440
+ command.query['userIp'] = user_ip unless user_ip.nil?
3441
+ execute_or_queue_command(command, &block)
3442
+ end
3443
+
3444
+ # Add a alias for the user
3445
+ # @param [String] user_key
3446
+ # Email or immutable Id of the user
3447
+ # @param [Google::Apis::AdminDirectoryV1::Alias] alias_object
3448
+ # @param [String] fields
3449
+ # Selector specifying which fields to include in a partial response.
3450
+ # @param [String] quota_user
3451
+ # Available to use for quota purposes for server-side applications. Can be any
3452
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3453
+ # Overrides userIp if both are provided.
3454
+ # @param [String] user_ip
3455
+ # IP address of the site where the request originates. Use this if you want to
3456
+ # enforce per-user limits.
3457
+ # @param [Google::Apis::RequestOptions] options
3458
+ # Request-specific options
3459
+ #
3460
+ # @yield [result, err] Result & error if block supplied
3461
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Alias] parsed result object
3462
+ # @yieldparam err [StandardError] error object if request failed
3463
+ #
3464
+ # @return [Google::Apis::AdminDirectoryV1::Alias]
3465
+ #
3466
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3467
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3468
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3469
+ def insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3470
+ command = make_simple_command(:post, 'users/{userKey}/aliases', options)
3471
+ command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
3472
+ command.request_object = alias_object
3473
+ command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
3474
+ command.response_class = Google::Apis::AdminDirectoryV1::Alias
3475
+ command.params['userKey'] = user_key unless user_key.nil?
3476
+ command.query['fields'] = fields unless fields.nil?
3477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3478
+ command.query['userIp'] = user_ip unless user_ip.nil?
3479
+ execute_or_queue_command(command, &block)
3480
+ end
3481
+
3482
+ # List all aliases for a user
3483
+ # @param [String] user_key
3484
+ # Email or immutable Id of the user
3485
+ # @param [String] event
3486
+ # Event on which subscription is intended (if subscribing)
3487
+ # @param [String] fields
3488
+ # Selector specifying which fields to include in a partial response.
3489
+ # @param [String] quota_user
3490
+ # Available to use for quota purposes for server-side applications. Can be any
3491
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3492
+ # Overrides userIp if both are provided.
3493
+ # @param [String] user_ip
3494
+ # IP address of the site where the request originates. Use this if you want to
3495
+ # enforce per-user limits.
3496
+ # @param [Google::Apis::RequestOptions] options
3497
+ # Request-specific options
3498
+ #
3499
+ # @yield [result, err] Result & error if block supplied
3500
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Aliases] parsed result object
3501
+ # @yieldparam err [StandardError] error object if request failed
3502
+ #
3503
+ # @return [Google::Apis::AdminDirectoryV1::Aliases]
3504
+ #
3505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3508
+ def list_user_aliases(user_key, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3509
+ command = make_simple_command(:get, 'users/{userKey}/aliases', options)
3510
+ command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
3511
+ command.response_class = Google::Apis::AdminDirectoryV1::Aliases
3512
+ command.params['userKey'] = user_key unless user_key.nil?
3513
+ command.query['event'] = event unless event.nil?
3514
+ command.query['fields'] = fields unless fields.nil?
3515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3516
+ command.query['userIp'] = user_ip unless user_ip.nil?
3517
+ execute_or_queue_command(command, &block)
3518
+ end
3519
+
3520
+ # Watch for changes in user aliases list
3521
+ # @param [String] user_key
3522
+ # Email or immutable Id of the user
3523
+ # @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
3524
+ # @param [String] event
3525
+ # Event on which subscription is intended (if subscribing)
3526
+ # @param [String] fields
3527
+ # Selector specifying which fields to include in a partial response.
3528
+ # @param [String] quota_user
3529
+ # Available to use for quota purposes for server-side applications. Can be any
3530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3531
+ # Overrides userIp if both are provided.
3532
+ # @param [String] user_ip
3533
+ # IP address of the site where the request originates. Use this if you want to
3534
+ # enforce per-user limits.
3535
+ # @param [Google::Apis::RequestOptions] options
3536
+ # Request-specific options
3537
+ #
3538
+ # @yield [result, err] Result & error if block supplied
3539
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::Channel] parsed result object
3540
+ # @yieldparam err [StandardError] error object if request failed
3541
+ #
3542
+ # @return [Google::Apis::AdminDirectoryV1::Channel]
3543
+ #
3544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3547
+ def watch_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3548
+ command = make_simple_command(:post, 'users/{userKey}/aliases/watch', options)
3549
+ command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
3550
+ command.request_object = channel_object
3551
+ command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
3552
+ command.response_class = Google::Apis::AdminDirectoryV1::Channel
3553
+ command.params['userKey'] = user_key unless user_key.nil?
3554
+ command.query['event'] = event unless event.nil?
3555
+ command.query['fields'] = fields unless fields.nil?
3556
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3557
+ command.query['userIp'] = user_ip unless user_ip.nil?
3558
+ execute_or_queue_command(command, &block)
3559
+ end
3560
+
3561
+ # Remove photos for the user
3562
+ # @param [String] user_key
3563
+ # Email or immutable Id of the user
3564
+ # @param [String] fields
3565
+ # Selector specifying which fields to include in a partial response.
3566
+ # @param [String] quota_user
3567
+ # Available to use for quota purposes for server-side applications. Can be any
3568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3569
+ # Overrides userIp if both are provided.
3570
+ # @param [String] user_ip
3571
+ # IP address of the site where the request originates. Use this if you want to
3572
+ # enforce per-user limits.
3573
+ # @param [Google::Apis::RequestOptions] options
3574
+ # Request-specific options
3575
+ #
3576
+ # @yield [result, err] Result & error if block supplied
3577
+ # @yieldparam result [NilClass] No result returned for this method
3578
+ # @yieldparam err [StandardError] error object if request failed
3579
+ #
3580
+ # @return [void]
3581
+ #
3582
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3583
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3584
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3585
+ def delete_user_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3586
+ command = make_simple_command(:delete, 'users/{userKey}/photos/thumbnail', options)
3587
+ command.params['userKey'] = user_key unless user_key.nil?
3588
+ command.query['fields'] = fields unless fields.nil?
3589
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3590
+ command.query['userIp'] = user_ip unless user_ip.nil?
3591
+ execute_or_queue_command(command, &block)
3592
+ end
3593
+
3594
+ # Retrieve photo of a user
3595
+ # @param [String] user_key
3596
+ # Email or immutable Id of the user
3597
+ # @param [String] fields
3598
+ # Selector specifying which fields to include in a partial response.
3599
+ # @param [String] quota_user
3600
+ # Available to use for quota purposes for server-side applications. Can be any
3601
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3602
+ # Overrides userIp if both are provided.
3603
+ # @param [String] user_ip
3604
+ # IP address of the site where the request originates. Use this if you want to
3605
+ # enforce per-user limits.
3606
+ # @param [Google::Apis::RequestOptions] options
3607
+ # Request-specific options
3608
+ #
3609
+ # @yield [result, err] Result & error if block supplied
3610
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
3611
+ # @yieldparam err [StandardError] error object if request failed
3612
+ #
3613
+ # @return [Google::Apis::AdminDirectoryV1::UserPhoto]
3614
+ #
3615
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3616
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3617
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3618
+ def get_user_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3619
+ command = make_simple_command(:get, 'users/{userKey}/photos/thumbnail', options)
3620
+ command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
3621
+ command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
3622
+ command.params['userKey'] = user_key unless user_key.nil?
3623
+ command.query['fields'] = fields unless fields.nil?
3624
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3625
+ command.query['userIp'] = user_ip unless user_ip.nil?
3626
+ execute_or_queue_command(command, &block)
3627
+ end
3628
+
3629
+ # Add a photo for the user. This method supports patch semantics.
3630
+ # @param [String] user_key
3631
+ # Email or immutable Id of the user
3632
+ # @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_object
3633
+ # @param [String] fields
3634
+ # Selector specifying which fields to include in a partial response.
3635
+ # @param [String] quota_user
3636
+ # Available to use for quota purposes for server-side applications. Can be any
3637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3638
+ # Overrides userIp if both are provided.
3639
+ # @param [String] user_ip
3640
+ # IP address of the site where the request originates. Use this if you want to
3641
+ # enforce per-user limits.
3642
+ # @param [Google::Apis::RequestOptions] options
3643
+ # Request-specific options
3644
+ #
3645
+ # @yield [result, err] Result & error if block supplied
3646
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
3647
+ # @yieldparam err [StandardError] error object if request failed
3648
+ #
3649
+ # @return [Google::Apis::AdminDirectoryV1::UserPhoto]
3650
+ #
3651
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3652
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3653
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3654
+ def patch_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3655
+ command = make_simple_command(:patch, 'users/{userKey}/photos/thumbnail', options)
3656
+ command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
3657
+ command.request_object = user_photo_object
3658
+ command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
3659
+ command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
3660
+ command.params['userKey'] = user_key unless user_key.nil?
3661
+ command.query['fields'] = fields unless fields.nil?
3662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3663
+ command.query['userIp'] = user_ip unless user_ip.nil?
3664
+ execute_or_queue_command(command, &block)
3665
+ end
3666
+
3667
+ # Add a photo for the user
3668
+ # @param [String] user_key
3669
+ # Email or immutable Id of the user
3670
+ # @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_object
3671
+ # @param [String] fields
3672
+ # Selector specifying which fields to include in a partial response.
3673
+ # @param [String] quota_user
3674
+ # Available to use for quota purposes for server-side applications. Can be any
3675
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3676
+ # Overrides userIp if both are provided.
3677
+ # @param [String] user_ip
3678
+ # IP address of the site where the request originates. Use this if you want to
3679
+ # enforce per-user limits.
3680
+ # @param [Google::Apis::RequestOptions] options
3681
+ # Request-specific options
3682
+ #
3683
+ # @yield [result, err] Result & error if block supplied
3684
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
3685
+ # @yieldparam err [StandardError] error object if request failed
3686
+ #
3687
+ # @return [Google::Apis::AdminDirectoryV1::UserPhoto]
3688
+ #
3689
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3690
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3691
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3692
+ def update_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3693
+ command = make_simple_command(:put, 'users/{userKey}/photos/thumbnail', options)
3694
+ command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
3695
+ command.request_object = user_photo_object
3696
+ command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
3697
+ command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
3698
+ command.params['userKey'] = user_key unless user_key.nil?
3699
+ command.query['fields'] = fields unless fields.nil?
3700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3701
+ command.query['userIp'] = user_ip unless user_ip.nil?
3702
+ execute_or_queue_command(command, &block)
3703
+ end
3704
+
3705
+ # Generate new backup verification codes for the user.
3706
+ # @param [String] user_key
3707
+ # Email or immutable Id of the user
3708
+ # @param [String] fields
3709
+ # Selector specifying which fields to include in a partial response.
3710
+ # @param [String] quota_user
3711
+ # Available to use for quota purposes for server-side applications. Can be any
3712
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3713
+ # Overrides userIp if both are provided.
3714
+ # @param [String] user_ip
3715
+ # IP address of the site where the request originates. Use this if you want to
3716
+ # enforce per-user limits.
3717
+ # @param [Google::Apis::RequestOptions] options
3718
+ # Request-specific options
3719
+ #
3720
+ # @yield [result, err] Result & error if block supplied
3721
+ # @yieldparam result [NilClass] No result returned for this method
3722
+ # @yieldparam err [StandardError] error object if request failed
3723
+ #
3724
+ # @return [void]
3725
+ #
3726
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3727
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3728
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3729
+ def generate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3730
+ command = make_simple_command(:post, 'users/{userKey}/verificationCodes/generate', options)
3731
+ command.params['userKey'] = user_key unless user_key.nil?
3732
+ command.query['fields'] = fields unless fields.nil?
3733
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3734
+ command.query['userIp'] = user_ip unless user_ip.nil?
3735
+ execute_or_queue_command(command, &block)
3736
+ end
3737
+
3738
+ # Invalidate the current backup verification codes for the user.
3739
+ # @param [String] user_key
3740
+ # Email or immutable Id of the user
3741
+ # @param [String] fields
3742
+ # Selector specifying which fields to include in a partial response.
3743
+ # @param [String] quota_user
3744
+ # Available to use for quota purposes for server-side applications. Can be any
3745
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3746
+ # Overrides userIp if both are provided.
3747
+ # @param [String] user_ip
3748
+ # IP address of the site where the request originates. Use this if you want to
3749
+ # enforce per-user limits.
3750
+ # @param [Google::Apis::RequestOptions] options
3751
+ # Request-specific options
3752
+ #
3753
+ # @yield [result, err] Result & error if block supplied
3754
+ # @yieldparam result [NilClass] No result returned for this method
3755
+ # @yieldparam err [StandardError] error object if request failed
3756
+ #
3757
+ # @return [void]
3758
+ #
3759
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3760
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3761
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3762
+ def invalidate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3763
+ command = make_simple_command(:post, 'users/{userKey}/verificationCodes/invalidate', options)
3764
+ command.params['userKey'] = user_key unless user_key.nil?
3765
+ command.query['fields'] = fields unless fields.nil?
3766
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3767
+ command.query['userIp'] = user_ip unless user_ip.nil?
3768
+ execute_or_queue_command(command, &block)
3769
+ end
3770
+
3771
+ # Returns the current set of valid backup verification codes for the specified
3772
+ # user.
3773
+ # @param [String] user_key
3774
+ # Identifies the user in the API request. The value can be the user's primary
3775
+ # email address, alias email address, or unique user ID.
3776
+ # @param [String] fields
3777
+ # Selector specifying which fields to include in a partial response.
3778
+ # @param [String] quota_user
3779
+ # Available to use for quota purposes for server-side applications. Can be any
3780
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3781
+ # Overrides userIp if both are provided.
3782
+ # @param [String] user_ip
3783
+ # IP address of the site where the request originates. Use this if you want to
3784
+ # enforce per-user limits.
3785
+ # @param [Google::Apis::RequestOptions] options
3786
+ # Request-specific options
3787
+ #
3788
+ # @yield [result, err] Result & error if block supplied
3789
+ # @yieldparam result [Google::Apis::AdminDirectoryV1::VerificationCodes] parsed result object
3790
+ # @yieldparam err [StandardError] error object if request failed
3791
+ #
3792
+ # @return [Google::Apis::AdminDirectoryV1::VerificationCodes]
3793
+ #
3794
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3795
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3796
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3797
+ def list_verification_codes(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3798
+ command = make_simple_command(:get, 'users/{userKey}/verificationCodes', options)
3799
+ command.response_representation = Google::Apis::AdminDirectoryV1::VerificationCodes::Representation
3800
+ command.response_class = Google::Apis::AdminDirectoryV1::VerificationCodes
3801
+ command.params['userKey'] = user_key unless user_key.nil?
3802
+ command.query['fields'] = fields unless fields.nil?
3803
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3804
+ command.query['userIp'] = user_ip unless user_ip.nil?
3805
+ execute_or_queue_command(command, &block)
3806
+ end
3807
+
3808
+ protected
3809
+
3810
+ def apply_command_defaults(command)
3811
+ command.query['key'] = key unless key.nil?
3812
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3813
+ command.query['userIp'] = user_ip unless user_ip.nil?
3814
+ end
3815
+ end
3816
+ end
3817
+ end
3818
+ end