google-api-client 0.8.6 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (537) 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 +23 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +58 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +38 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +189 -147
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1088 -0
  15. data/api_names_out.yaml +26978 -0
  16. data/bin/generate-api +109 -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/adexchangebuyer_v1_4/classes.rb +3025 -0
  22. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1240 -0
  23. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1446 -0
  24. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  25. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  26. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +347 -0
  27. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  28. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  29. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  30. data/generated/google/apis/admin_datatransfer_v1/representations.rb +130 -0
  31. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  32. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  33. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  34. data/generated/google/apis/admin_directory_v1/representations.rb +1147 -0
  35. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  36. data/generated/google/apis/admin_directory_v1.rb +113 -0
  37. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  38. data/generated/google/apis/admin_reports_v1/representations.rb +257 -0
  39. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  40. data/generated/google/apis/admin_reports_v1.rb +38 -0
  41. data/generated/google/apis/adsense_v1_4/classes.rb +1280 -0
  42. data/generated/google/apis/adsense_v1_4/representations.rb +555 -0
  43. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  44. data/generated/google/apis/adsense_v1_4.rb +38 -0
  45. data/generated/google/apis/adsensehost_v4_1/classes.rb +837 -0
  46. data/generated/google/apis/adsensehost_v4_1/representations.rb +367 -0
  47. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  48. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  49. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  50. data/generated/google/apis/analytics_v3/representations.rb +1850 -0
  51. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  52. data/generated/google/apis/analytics_v3.rb +49 -0
  53. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  54. data/generated/google/apis/androidenterprise_v1/representations.rb +614 -0
  55. data/generated/google/apis/androidenterprise_v1/service.rb +2607 -0
  56. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  57. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  58. data/generated/google/apis/androidpublisher_v2/representations.rb +738 -0
  59. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  60. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  61. data/generated/google/apis/appengine_v1beta4/classes.rb +1585 -0
  62. data/generated/google/apis/appengine_v1beta4/representations.rb +542 -0
  63. data/generated/google/apis/appengine_v1beta4/service.rb +477 -0
  64. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  65. data/generated/google/apis/appengine_v1beta5/classes.rb +1544 -0
  66. data/generated/google/apis/appengine_v1beta5/representations.rb +594 -0
  67. data/generated/google/apis/appengine_v1beta5/service.rb +521 -0
  68. data/generated/google/apis/appengine_v1beta5.rb +35 -0
  69. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  70. data/generated/google/apis/appsactivity_v1/representations.rb +206 -0
  71. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  72. data/generated/google/apis/appsactivity_v1.rb +46 -0
  73. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  74. data/generated/google/apis/appstate_v1/representations.rb +87 -0
  75. data/generated/google/apis/appstate_v1/service.rb +260 -0
  76. data/generated/google/apis/appstate_v1.rb +34 -0
  77. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  78. data/generated/google/apis/autoscaler_v1beta2/representations.rb +313 -0
  79. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  80. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  81. data/generated/google/apis/bigquery_v2/classes.rb +2503 -0
  82. data/generated/google/apis/bigquery_v2/representations.rb +914 -0
  83. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  84. data/generated/google/apis/bigquery_v2.rb +52 -0
  85. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  86. data/generated/google/apis/blogger_v3/representations.rb +632 -0
  87. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  88. data/generated/google/apis/blogger_v3.rb +37 -0
  89. data/generated/google/apis/books_v1/classes.rb +4006 -0
  90. data/generated/google/apis/books_v1/representations.rb +1742 -0
  91. data/generated/google/apis/books_v1/service.rb +2293 -0
  92. data/generated/google/apis/books_v1.rb +34 -0
  93. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  94. data/generated/google/apis/calendar_v3/representations.rb +631 -0
  95. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  96. data/generated/google/apis/calendar_v3.rb +37 -0
  97. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  98. data/generated/google/apis/civicinfo_v2/representations.rb +423 -0
  99. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  100. data/generated/google/apis/civicinfo_v2.rb +31 -0
  101. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  102. data/generated/google/apis/classroom_v1/representations.rb +245 -0
  103. data/generated/google/apis/classroom_v1/service.rb +970 -0
  104. data/generated/google/apis/classroom_v1.rb +49 -0
  105. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  106. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  107. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  108. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  109. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  110. data/generated/google/apis/cloudbilling_v1/representations.rb +87 -0
  111. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  112. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  113. data/generated/google/apis/cloudbuild_v1/classes.rb +521 -0
  114. data/generated/google/apis/cloudbuild_v1/representations.rb +214 -0
  115. data/generated/google/apis/cloudbuild_v1/service.rb +278 -0
  116. data/generated/google/apis/cloudbuild_v1.rb +35 -0
  117. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  118. data/generated/google/apis/clouddebugger_v2/representations.rb +464 -0
  119. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  120. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  121. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  122. data/generated/google/apis/cloudlatencytest_v2/representations.rb +127 -0
  123. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  124. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  125. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  126. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +353 -0
  127. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  128. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  129. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +450 -0
  130. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +226 -0
  131. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -0
  132. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  133. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  134. data/generated/google/apis/cloudtrace_v1/representations.rb +102 -0
  135. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  136. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  137. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  138. data/generated/google/apis/clouduseraccounts_beta/representations.rb +351 -0
  139. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  140. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  141. data/generated/google/apis/compute_beta/classes.rb +9741 -0
  142. data/generated/google/apis/compute_beta/representations.rb +3649 -0
  143. data/generated/google/apis/compute_beta/service.rb +10636 -0
  144. data/generated/google/apis/compute_beta.rb +49 -0
  145. data/generated/google/apis/compute_v1/classes.rb +9095 -0
  146. data/generated/google/apis/compute_v1/representations.rb +3389 -0
  147. data/generated/google/apis/compute_v1/service.rb +9627 -0
  148. data/generated/google/apis/compute_v1.rb +49 -0
  149. data/generated/google/apis/container_v1/classes.rb +463 -0
  150. data/generated/google/apis/container_v1/representations.rb +195 -0
  151. data/generated/google/apis/container_v1/service.rb +367 -0
  152. data/generated/google/apis/container_v1.rb +35 -0
  153. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  154. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  155. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  156. data/generated/google/apis/container_v1beta1.rb +35 -0
  157. data/generated/google/apis/content_v2/classes.rb +6114 -0
  158. data/generated/google/apis/content_v2/representations.rb +2624 -0
  159. data/generated/google/apis/content_v2/service.rb +2338 -0
  160. data/generated/google/apis/content_v2.rb +35 -0
  161. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  162. data/generated/google/apis/coordinate_v1/representations.rb +321 -0
  163. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  164. data/generated/google/apis/coordinate_v1.rb +37 -0
  165. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  166. data/generated/google/apis/customsearch_v1/representations.rb +302 -0
  167. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  168. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  169. data/generated/google/apis/dataproc_v1/classes.rb +1590 -0
  170. data/generated/google/apis/dataproc_v1/representations.rb +653 -0
  171. data/generated/google/apis/dataproc_v1/service.rb +719 -0
  172. data/generated/google/apis/dataproc_v1.rb +43 -0
  173. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  174. data/generated/google/apis/datastore_v1beta2/representations.rb +594 -0
  175. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  176. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  177. data/generated/google/apis/deploymentmanager_v2/classes.rb +1162 -0
  178. data/generated/google/apis/deploymentmanager_v2/representations.rb +508 -0
  179. data/generated/google/apis/deploymentmanager_v2/service.rb +862 -0
  180. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  181. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  182. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  183. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  184. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  185. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  186. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  187. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  188. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  189. data/generated/google/apis/dfareporting_v2_3/classes.rb +10830 -0
  190. data/generated/google/apis/dfareporting_v2_3/representations.rb +3829 -0
  191. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  192. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  193. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  194. data/generated/google/apis/discovery_v1/representations.rb +397 -0
  195. data/generated/google/apis/discovery_v1/service.rb +142 -0
  196. data/generated/google/apis/discovery_v1.rb +32 -0
  197. data/generated/google/apis/dns_v1/classes.rb +406 -0
  198. data/generated/google/apis/dns_v1/representations.rb +167 -0
  199. data/generated/google/apis/dns_v1/service.rb +454 -0
  200. data/generated/google/apis/dns_v1.rb +44 -0
  201. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +802 -0
  202. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +371 -0
  203. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +374 -0
  204. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  205. data/generated/google/apis/doubleclicksearch_v2/classes.rb +958 -0
  206. data/generated/google/apis/doubleclicksearch_v2/representations.rb +350 -0
  207. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  208. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  209. data/generated/google/apis/drive_v2/classes.rb +2569 -0
  210. data/generated/google/apis/drive_v2/representations.rb +878 -0
  211. data/generated/google/apis/drive_v2/service.rb +2740 -0
  212. data/generated/google/apis/drive_v2.rb +58 -0
  213. data/generated/google/apis/drive_v3/classes.rb +1541 -0
  214. data/generated/google/apis/drive_v3/representations.rb +548 -0
  215. data/generated/google/apis/drive_v3/service.rb +1542 -0
  216. data/generated/google/apis/drive_v3.rb +55 -0
  217. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  218. data/generated/google/apis/fitness_v1/representations.rb +360 -0
  219. data/generated/google/apis/fitness_v1/service.rb +675 -0
  220. data/generated/google/apis/fitness_v1.rb +49 -0
  221. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  222. data/generated/google/apis/fusiontables_v2/representations.rb +457 -0
  223. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  224. data/generated/google/apis/fusiontables_v2.rb +37 -0
  225. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  226. data/generated/google/apis/games_configuration_v1configuration/representations.rb +228 -0
  227. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  228. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  229. data/generated/google/apis/games_management_v1management/classes.rb +533 -0
  230. data/generated/google/apis/games_management_v1management/representations.rb +262 -0
  231. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  232. data/generated/google/apis/games_management_v1management.rb +37 -0
  233. data/generated/google/apis/games_v1/classes.rb +4626 -0
  234. data/generated/google/apis/games_v1/representations.rb +1783 -0
  235. data/generated/google/apis/games_v1/service.rb +2290 -0
  236. data/generated/google/apis/games_v1.rb +40 -0
  237. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  238. data/generated/google/apis/gan_v1beta1/representations.rb +462 -0
  239. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  240. data/generated/google/apis/gan_v1beta1.rb +31 -0
  241. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  242. data/generated/google/apis/genomics_v1/representations.rb +1029 -0
  243. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  244. data/generated/google/apis/genomics_v1.rb +49 -0
  245. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  246. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  247. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  248. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  249. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  250. data/generated/google/apis/gmail_v1/representations.rb +383 -0
  251. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  252. data/generated/google/apis/gmail_v1.rb +52 -0
  253. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  254. data/generated/google/apis/groupsmigration_v1/representations.rb +40 -0
  255. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  256. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  257. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  258. data/generated/google/apis/groupssettings_v1/representations.rb +66 -0
  259. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  260. data/generated/google/apis/groupssettings_v1.rb +34 -0
  261. data/generated/google/apis/identitytoolkit_v3/classes.rb +1637 -0
  262. data/generated/google/apis/identitytoolkit_v3/representations.rb +618 -0
  263. data/generated/google/apis/identitytoolkit_v3/service.rb +616 -0
  264. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  265. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  266. data/generated/google/apis/kgsearch_v1/representations.rb +41 -0
  267. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  268. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  269. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  270. data/generated/google/apis/licensing_v1/representations.rb +74 -0
  271. data/generated/google/apis/licensing_v1/service.rb +369 -0
  272. data/generated/google/apis/licensing_v1.rb +34 -0
  273. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  274. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  275. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  276. data/generated/google/apis/logging_v1beta3.rb +47 -0
  277. data/generated/google/apis/logging_v2beta1/classes.rb +990 -0
  278. data/generated/google/apis/logging_v2beta1/representations.rb +377 -0
  279. data/generated/google/apis/logging_v2beta1/service.rb +547 -0
  280. data/generated/google/apis/logging_v2beta1.rb +47 -0
  281. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  282. data/generated/google/apis/manager_v1beta2/representations.rb +606 -0
  283. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  284. data/generated/google/apis/manager_v1beta2.rb +53 -0
  285. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  286. data/generated/google/apis/mirror_v1/representations.rb +390 -0
  287. data/generated/google/apis/mirror_v1/service.rb +977 -0
  288. data/generated/google/apis/mirror_v1.rb +37 -0
  289. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  290. data/generated/google/apis/oauth2_v2/representations.rb +102 -0
  291. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  292. data/generated/google/apis/oauth2_v2.rb +43 -0
  293. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  294. data/generated/google/apis/pagespeedonline_v2/representations.rb +272 -0
  295. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  296. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  297. data/generated/google/apis/partners_v2/classes.rb +942 -0
  298. data/generated/google/apis/partners_v2/representations.rb +454 -0
  299. data/generated/google/apis/partners_v2/service.rb +400 -0
  300. data/generated/google/apis/partners_v2.rb +32 -0
  301. data/generated/google/apis/people_v1/classes.rb +1521 -0
  302. data/generated/google/apis/people_v1/representations.rb +663 -0
  303. data/generated/google/apis/people_v1/service.rb +189 -0
  304. data/generated/google/apis/people_v1.rb +59 -0
  305. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  306. data/generated/google/apis/plus_domains_v1/representations.rb +1111 -0
  307. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  308. data/generated/google/apis/plus_domains_v1.rb +61 -0
  309. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  310. data/generated/google/apis/plus_v1/representations.rb +907 -0
  311. data/generated/google/apis/plus_v1/service.rb +470 -0
  312. data/generated/google/apis/plus_v1.rb +43 -0
  313. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  314. data/generated/google/apis/prediction_v1_6/representations.rb +369 -0
  315. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  316. data/generated/google/apis/prediction_v1_6.rb +44 -0
  317. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  318. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +312 -0
  319. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  320. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  321. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  322. data/generated/google/apis/pubsub_v1/representations.rb +323 -0
  323. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  324. data/generated/google/apis/pubsub_v1.rb +37 -0
  325. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  326. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  327. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  328. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  329. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  330. data/generated/google/apis/qpx_express_v1/representations.rb +472 -0
  331. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  332. data/generated/google/apis/qpx_express_v1.rb +31 -0
  333. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  334. data/generated/google/apis/replicapool_v1beta2/representations.rb +264 -0
  335. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  336. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  337. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  338. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +294 -0
  339. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  340. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  341. data/generated/google/apis/reseller_v1/classes.rb +526 -0
  342. data/generated/google/apis/reseller_v1/representations.rb +223 -0
  343. data/generated/google/apis/reseller_v1/service.rb +623 -0
  344. data/generated/google/apis/reseller_v1.rb +37 -0
  345. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  346. data/generated/google/apis/resourceviews_v1beta2/representations.rb +301 -0
  347. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  348. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  349. data/generated/google/apis/script_v1/classes.rb +259 -0
  350. data/generated/google/apis/script_v1/representations.rb +118 -0
  351. data/generated/google/apis/script_v1/service.rb +98 -0
  352. data/generated/google/apis/script_v1.rb +61 -0
  353. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  354. data/generated/google/apis/site_verification_v1/representations.rb +113 -0
  355. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  356. data/generated/google/apis/site_verification_v1.rb +37 -0
  357. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2030 -0
  358. data/generated/google/apis/sqladmin_v1beta4/representations.rb +856 -0
  359. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  360. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  361. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  362. data/generated/google/apis/storage_v1/representations.rb +497 -0
  363. data/generated/google/apis/storage_v1/service.rb +1903 -0
  364. data/generated/google/apis/storage_v1.rb +46 -0
  365. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  366. data/generated/google/apis/storagetransfer_v1/representations.rb +418 -0
  367. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  368. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  369. data/generated/google/apis/tagmanager_v1/classes.rb +1494 -0
  370. data/generated/google/apis/tagmanager_v1/representations.rb +611 -0
  371. data/generated/google/apis/tagmanager_v1/service.rb +2119 -0
  372. data/generated/google/apis/tagmanager_v1.rb +52 -0
  373. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  374. data/generated/google/apis/taskqueue_v1beta2/representations.rb +126 -0
  375. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  376. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  377. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  378. data/generated/google/apis/tasks_v1/representations.rb +125 -0
  379. data/generated/google/apis/tasks_v1/service.rb +643 -0
  380. data/generated/google/apis/tasks_v1.rb +37 -0
  381. data/generated/google/apis/translate_v2/classes.rb +168 -0
  382. data/generated/google/apis/translate_v2/representations.rb +121 -0
  383. data/generated/google/apis/translate_v2/service.rb +182 -0
  384. data/generated/google/apis/translate_v2.rb +31 -0
  385. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  386. data/generated/google/apis/urlshortener_v1/representations.rb +121 -0
  387. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  388. data/generated/google/apis/urlshortener_v1.rb +34 -0
  389. data/generated/google/apis/vision_v1/classes.rb +1259 -0
  390. data/generated/google/apis/vision_v1/representations.rb +418 -0
  391. data/generated/google/apis/vision_v1/service.rb +91 -0
  392. data/generated/google/apis/vision_v1.rb +37 -0
  393. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  394. data/generated/google/apis/webmasters_v3/representations.rb +282 -0
  395. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  396. data/generated/google/apis/webmasters_v3.rb +37 -0
  397. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  398. data/generated/google/apis/youtube_analytics_v1/representations.rb +273 -0
  399. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  400. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  401. data/generated/google/apis/youtube_v3/classes.rb +8071 -0
  402. data/generated/google/apis/youtube_v3/representations.rb +3134 -0
  403. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  404. data/generated/google/apis/youtube_v3.rb +49 -0
  405. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  406. data/generated/google/apis/youtubereporting_v1/representations.rb +144 -0
  407. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  408. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  409. data/google-api-client.gemspec +25 -39
  410. data/lib/google/api_client/auth/installed_app.rb +7 -5
  411. data/lib/google/api_client/auth/key_utils.rb +1 -0
  412. data/lib/google/api_client/auth/storage.rb +4 -2
  413. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  414. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  415. data/lib/google/api_client/client_secrets.rb +7 -9
  416. data/lib/google/apis/core/api_command.rb +136 -0
  417. data/lib/google/apis/core/base_service.rb +317 -0
  418. data/lib/google/apis/core/batch.rb +239 -0
  419. data/lib/google/apis/core/download.rb +94 -0
  420. data/lib/google/apis/core/hashable.rb +44 -0
  421. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  422. data/lib/google/apis/core/http_command.rb +328 -0
  423. data/lib/google/apis/core/json_representation.rb +145 -0
  424. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  425. data/lib/google/apis/core/multipart.rb +187 -0
  426. data/lib/google/apis/core/upload.rb +289 -0
  427. data/lib/google/{api_client → apis}/errors.rb +39 -28
  428. data/lib/google/apis/generator/annotator.rb +295 -0
  429. data/lib/google/apis/generator/helpers.rb +74 -0
  430. data/lib/google/apis/generator/model.rb +143 -0
  431. data/lib/google/apis/generator/template.rb +124 -0
  432. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  433. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  434. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  435. data/lib/google/apis/generator/templates/_representation_stub.tmpl +17 -0
  436. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  437. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  438. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  439. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  440. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  441. data/lib/google/apis/generator.rb +70 -0
  442. data/lib/google/apis/options.rb +85 -0
  443. data/lib/google/apis/version.rb +39 -0
  444. data/lib/google/apis.rb +48 -0
  445. data/rakelib/metrics.rake +22 -0
  446. data/rakelib/rubocop.rake +10 -0
  447. data/rakelib/spec.rake +11 -0
  448. data/rakelib/yard.rake +11 -0
  449. data/samples/cli/Gemfile +7 -0
  450. data/samples/cli/README.md +51 -0
  451. data/samples/cli/google-api-samples +32 -0
  452. data/samples/cli/lib/base_cli.rb +95 -0
  453. data/samples/cli/lib/samples/analytics.rb +62 -0
  454. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  455. data/samples/cli/lib/samples/calendar.rb +83 -0
  456. data/samples/cli/lib/samples/drive.rb +82 -0
  457. data/samples/cli/lib/samples/gmail.rb +50 -0
  458. data/samples/cli/lib/samples/pubsub.rb +114 -0
  459. data/samples/cli/lib/samples/translate.rb +44 -0
  460. data/samples/cli/lib/samples/you_tube.rb +44 -0
  461. data/samples/web/Gemfile +7 -0
  462. data/samples/web/README.md +44 -0
  463. data/samples/web/app.rb +120 -0
  464. data/samples/web/views/calendar.erb +34 -0
  465. data/{lib/google/api_client/service_account.rb → samples/web/views/drive.erb} +20 -8
  466. data/samples/web/views/home.erb +35 -0
  467. data/samples/web/views/layout.erb +40 -0
  468. data/script/generate +100 -0
  469. data/script/package +8 -0
  470. data/script/release +15 -0
  471. data/spec/fixtures/files/api_names.yaml +3 -0
  472. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  473. data/spec/fixtures/files/child/.gitignore +0 -0
  474. data/spec/fixtures/files/client_secrets.json +1 -0
  475. data/spec/fixtures/files/invalid.json +1 -0
  476. data/spec/fixtures/files/test.blah +1 -0
  477. data/spec/fixtures/files/test.txt +1 -0
  478. data/spec/fixtures/files/test_api.json +440 -0
  479. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  480. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  481. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  482. data/spec/google/api_client/client_secrets_spec.rb +338 -2
  483. data/spec/google/apis/core/api_command_spec.rb +209 -0
  484. data/spec/google/apis/core/batch_spec.rb +142 -0
  485. data/spec/google/apis/core/download_spec.rb +103 -0
  486. data/spec/google/apis/core/hashable_spec.rb +60 -0
  487. data/spec/google/apis/core/http_command_spec.rb +303 -0
  488. data/spec/google/apis/core/json_representation_spec.rb +199 -0
  489. data/spec/google/apis/core/service_spec.rb +247 -0
  490. data/spec/google/apis/core/upload_spec.rb +300 -0
  491. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  492. data/spec/google/apis/generator/generator_spec.rb +324 -0
  493. data/spec/google/apis/logging_spec.rb +45 -0
  494. data/spec/google/apis/options_spec.rb +40 -0
  495. data/spec/integration_tests/adsense_spec.rb +29 -0
  496. data/spec/integration_tests/drive_spec.rb +35 -0
  497. data/spec/integration_tests/pubsub_spec.rb +48 -0
  498. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  499. data/spec/spec_helper/load_path_spec.rb +33 -0
  500. data/spec/spec_helper.rb +131 -44
  501. data/third_party/hurley_patches.rb +103 -0
  502. metadata +563 -188
  503. data/lib/compat/multi_json.rb +0 -19
  504. data/lib/google/api_client/auth/file_storage.rb +0 -59
  505. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  506. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  507. data/lib/google/api_client/batch.rb +0 -326
  508. data/lib/google/api_client/charset.rb +0 -33
  509. data/lib/google/api_client/discovery/api.rb +0 -310
  510. data/lib/google/api_client/discovery/media.rb +0 -77
  511. data/lib/google/api_client/discovery/method.rb +0 -363
  512. data/lib/google/api_client/discovery/resource.rb +0 -156
  513. data/lib/google/api_client/discovery/schema.rb +0 -117
  514. data/lib/google/api_client/environment.rb +0 -42
  515. data/lib/google/api_client/gzip.rb +0 -28
  516. data/lib/google/api_client/logging.rb +0 -32
  517. data/lib/google/api_client/media.rb +0 -259
  518. data/lib/google/api_client/railtie.rb +0 -18
  519. data/lib/google/api_client/request.rb +0 -350
  520. data/lib/google/api_client/result.rb +0 -255
  521. data/lib/google/api_client/service/batch.rb +0 -110
  522. data/lib/google/api_client/service/request.rb +0 -144
  523. data/lib/google/api_client/service/resource.rb +0 -40
  524. data/lib/google/api_client/service/result.rb +0 -162
  525. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  526. data/lib/google/api_client/service/stub_generator.rb +0 -61
  527. data/lib/google/api_client/service.rb +0 -233
  528. data/lib/google/api_client.rb +0 -750
  529. data/spec/google/api_client/batch_spec.rb +0 -248
  530. data/spec/google/api_client/discovery_spec.rb +0 -708
  531. data/spec/google/api_client/gzip_spec.rb +0 -98
  532. data/spec/google/api_client/media_spec.rb +0 -178
  533. data/spec/google/api_client/result_spec.rb +0 -207
  534. data/spec/google/api_client/service_account_spec.rb +0 -169
  535. data/spec/google/api_client/service_spec.rb +0 -618
  536. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  537. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1542 @@
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 DriveV3
23
+ # Drive API
24
+ #
25
+ # The API to interact with Drive.
26
+ #
27
+ # @example
28
+ # require 'google/apis/drive_v3'
29
+ #
30
+ # Drive = Google::Apis::DriveV3 # Alias the module
31
+ # service = Drive::DriveService.new
32
+ #
33
+ # @see https://developers.google.com/drive/
34
+ class DriveService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'drive/v3/')
53
+ end
54
+
55
+ # Gets information about the user, the user's Drive, and system capabilities.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # Overrides userIp if both are provided.
62
+ # @param [String] user_ip
63
+ # IP address of the site where the request originates. Use this if you want to
64
+ # enforce per-user limits.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::DriveV3::About] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::DriveV3::About]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
78
+ command = make_simple_command(:get, 'about', options)
79
+ command.response_representation = Google::Apis::DriveV3::About::Representation
80
+ command.response_class = Google::Apis::DriveV3::About
81
+ command.query['fields'] = fields unless fields.nil?
82
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
83
+ command.query['userIp'] = user_ip unless user_ip.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
87
+ # Gets the starting pageToken for listing future changes.
88
+ # @param [String] fields
89
+ # Selector specifying which fields to include in a partial response.
90
+ # @param [String] quota_user
91
+ # Available to use for quota purposes for server-side applications. Can be any
92
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # Overrides userIp if both are provided.
94
+ # @param [String] user_ip
95
+ # IP address of the site where the request originates. Use this if you want to
96
+ # enforce per-user limits.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::DriveV3::StartPageToken] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::DriveV3::StartPageToken]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def get_changes_start_page_token(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'changes/startPageToken', options)
111
+ command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation
112
+ command.response_class = Google::Apis::DriveV3::StartPageToken
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ command.query['userIp'] = user_ip unless user_ip.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Lists changes for a user.
120
+ # @param [String] page_token
121
+ # The token for continuing a previous list request on the next page. This should
122
+ # be set to the value of 'nextPageToken' from the previous response or to the
123
+ # response from the getStartPageToken method.
124
+ # @param [Boolean] include_removed
125
+ # Whether to include changes indicating that items have left the view of the
126
+ # changes list, for example by deletion or lost access.
127
+ # @param [Fixnum] page_size
128
+ # The maximum number of changes to return per page.
129
+ # @param [Boolean] restrict_to_my_drive
130
+ # Whether to restrict the results to changes inside the My Drive hierarchy. This
131
+ # omits changes to files such as those in the Application Data folder or shared
132
+ # files which have not been added to My Drive.
133
+ # @param [String] spaces
134
+ # A comma-separated list of spaces to query within the user corpus. Supported
135
+ # values are 'drive', 'appDataFolder' and 'photos'.
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::DriveV3::ChangeList] parsed result object
150
+ # @yieldparam err [StandardError] error object if request failed
151
+ #
152
+ # @return [Google::Apis::DriveV3::ChangeList]
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_changes(page_token, include_removed: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
158
+ command = make_simple_command(:get, 'changes', options)
159
+ command.response_representation = Google::Apis::DriveV3::ChangeList::Representation
160
+ command.response_class = Google::Apis::DriveV3::ChangeList
161
+ command.query['includeRemoved'] = include_removed unless include_removed.nil?
162
+ command.query['pageSize'] = page_size unless page_size.nil?
163
+ command.query['pageToken'] = page_token unless page_token.nil?
164
+ command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
165
+ command.query['spaces'] = spaces unless spaces.nil?
166
+ command.query['fields'] = fields unless fields.nil?
167
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
168
+ command.query['userIp'] = user_ip unless user_ip.nil?
169
+ execute_or_queue_command(command, &block)
170
+ end
171
+
172
+ # Subscribes to changes for a user.
173
+ # @param [String] page_token
174
+ # The token for continuing a previous list request on the next page. This should
175
+ # be set to the value of 'nextPageToken' from the previous response or to the
176
+ # response from the getStartPageToken method.
177
+ # @param [Google::Apis::DriveV3::Channel] channel_object
178
+ # @param [Boolean] include_removed
179
+ # Whether to include changes indicating that items have left the view of the
180
+ # changes list, for example by deletion or lost access.
181
+ # @param [Fixnum] page_size
182
+ # The maximum number of changes to return per page.
183
+ # @param [Boolean] restrict_to_my_drive
184
+ # Whether to restrict the results to changes inside the My Drive hierarchy. This
185
+ # omits changes to files such as those in the Application Data folder or shared
186
+ # files which have not been added to My Drive.
187
+ # @param [String] spaces
188
+ # A comma-separated list of spaces to query within the user corpus. Supported
189
+ # values are 'drive', 'appDataFolder' and 'photos'.
190
+ # @param [String] fields
191
+ # Selector specifying which fields to include in a partial response.
192
+ # @param [String] quota_user
193
+ # Available to use for quota purposes for server-side applications. Can be any
194
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
195
+ # Overrides userIp if both are provided.
196
+ # @param [String] user_ip
197
+ # IP address of the site where the request originates. Use this if you want to
198
+ # enforce per-user limits.
199
+ # @param [Google::Apis::RequestOptions] options
200
+ # Request-specific options
201
+ #
202
+ # @yield [result, err] Result & error if block supplied
203
+ # @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
204
+ # @yieldparam err [StandardError] error object if request failed
205
+ #
206
+ # @return [Google::Apis::DriveV3::Channel]
207
+ #
208
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
211
+ def watch_change(page_token, channel_object = nil, include_removed: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
212
+ command = make_simple_command(:post, 'changes/watch', options)
213
+ command.request_representation = Google::Apis::DriveV3::Channel::Representation
214
+ command.request_object = channel_object
215
+ command.response_representation = Google::Apis::DriveV3::Channel::Representation
216
+ command.response_class = Google::Apis::DriveV3::Channel
217
+ command.query['includeRemoved'] = include_removed unless include_removed.nil?
218
+ command.query['pageSize'] = page_size unless page_size.nil?
219
+ command.query['pageToken'] = page_token unless page_token.nil?
220
+ command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
221
+ command.query['spaces'] = spaces unless spaces.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
224
+ command.query['userIp'] = user_ip unless user_ip.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ # Stop watching resources through this channel
229
+ # @param [Google::Apis::DriveV3::Channel] channel_object
230
+ # @param [String] fields
231
+ # Selector specifying which fields to include in a partial response.
232
+ # @param [String] quota_user
233
+ # Available to use for quota purposes for server-side applications. Can be any
234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
235
+ # Overrides userIp if both are provided.
236
+ # @param [String] user_ip
237
+ # IP address of the site where the request originates. Use this if you want to
238
+ # enforce per-user limits.
239
+ # @param [Google::Apis::RequestOptions] options
240
+ # Request-specific options
241
+ #
242
+ # @yield [result, err] Result & error if block supplied
243
+ # @yieldparam result [NilClass] No result returned for this method
244
+ # @yieldparam err [StandardError] error object if request failed
245
+ #
246
+ # @return [void]
247
+ #
248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
251
+ def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
252
+ command = make_simple_command(:post, 'channels/stop', options)
253
+ command.request_representation = Google::Apis::DriveV3::Channel::Representation
254
+ command.request_object = channel_object
255
+ command.query['fields'] = fields unless fields.nil?
256
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
257
+ command.query['userIp'] = user_ip unless user_ip.nil?
258
+ execute_or_queue_command(command, &block)
259
+ end
260
+
261
+ # Creates a new comment on a file.
262
+ # @param [String] file_id
263
+ # The ID of the file.
264
+ # @param [Google::Apis::DriveV3::Comment] comment_object
265
+ # @param [String] fields
266
+ # Selector specifying which fields to include in a partial response.
267
+ # @param [String] quota_user
268
+ # Available to use for quota purposes for server-side applications. Can be any
269
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
270
+ # Overrides userIp if both are provided.
271
+ # @param [String] user_ip
272
+ # IP address of the site where the request originates. Use this if you want to
273
+ # enforce per-user limits.
274
+ # @param [Google::Apis::RequestOptions] options
275
+ # Request-specific options
276
+ #
277
+ # @yield [result, err] Result & error if block supplied
278
+ # @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
279
+ # @yieldparam err [StandardError] error object if request failed
280
+ #
281
+ # @return [Google::Apis::DriveV3::Comment]
282
+ #
283
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
284
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
285
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
286
+ def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
287
+ command = make_simple_command(:post, 'files/{fileId}/comments', options)
288
+ command.request_representation = Google::Apis::DriveV3::Comment::Representation
289
+ command.request_object = comment_object
290
+ command.response_representation = Google::Apis::DriveV3::Comment::Representation
291
+ command.response_class = Google::Apis::DriveV3::Comment
292
+ command.params['fileId'] = file_id unless file_id.nil?
293
+ command.query['fields'] = fields unless fields.nil?
294
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
295
+ command.query['userIp'] = user_ip unless user_ip.nil?
296
+ execute_or_queue_command(command, &block)
297
+ end
298
+
299
+ # Deletes a comment.
300
+ # @param [String] file_id
301
+ # The ID of the file.
302
+ # @param [String] comment_id
303
+ # The ID of the comment.
304
+ # @param [String] fields
305
+ # Selector specifying which fields to include in a partial response.
306
+ # @param [String] quota_user
307
+ # Available to use for quota purposes for server-side applications. Can be any
308
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
309
+ # Overrides userIp if both are provided.
310
+ # @param [String] user_ip
311
+ # IP address of the site where the request originates. Use this if you want to
312
+ # enforce per-user limits.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [NilClass] No result returned for this method
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [void]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
326
+ command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
327
+ command.params['fileId'] = file_id unless file_id.nil?
328
+ command.params['commentId'] = comment_id unless comment_id.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ command.query['userIp'] = user_ip unless user_ip.nil?
332
+ execute_or_queue_command(command, &block)
333
+ end
334
+
335
+ # Gets a comment by ID.
336
+ # @param [String] file_id
337
+ # The ID of the file.
338
+ # @param [String] comment_id
339
+ # The ID of the comment.
340
+ # @param [Boolean] include_deleted
341
+ # Whether to return deleted comments. Deleted comments will not include their
342
+ # original content.
343
+ # @param [String] fields
344
+ # Selector specifying which fields to include in a partial response.
345
+ # @param [String] quota_user
346
+ # Available to use for quota purposes for server-side applications. Can be any
347
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
348
+ # Overrides userIp if both are provided.
349
+ # @param [String] user_ip
350
+ # IP address of the site where the request originates. Use this if you want to
351
+ # enforce per-user limits.
352
+ # @param [Google::Apis::RequestOptions] options
353
+ # Request-specific options
354
+ #
355
+ # @yield [result, err] Result & error if block supplied
356
+ # @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
357
+ # @yieldparam err [StandardError] error object if request failed
358
+ #
359
+ # @return [Google::Apis::DriveV3::Comment]
360
+ #
361
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
362
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
363
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
364
+ def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
365
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
366
+ command.response_representation = Google::Apis::DriveV3::Comment::Representation
367
+ command.response_class = Google::Apis::DriveV3::Comment
368
+ command.params['fileId'] = file_id unless file_id.nil?
369
+ command.params['commentId'] = comment_id unless comment_id.nil?
370
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ command.query['userIp'] = user_ip unless user_ip.nil?
374
+ execute_or_queue_command(command, &block)
375
+ end
376
+
377
+ # Lists a file's comments.
378
+ # @param [String] file_id
379
+ # The ID of the file.
380
+ # @param [Boolean] include_deleted
381
+ # Whether to include deleted comments. Deleted comments will not include their
382
+ # original content.
383
+ # @param [Fixnum] page_size
384
+ # The maximum number of comments to return per page.
385
+ # @param [String] page_token
386
+ # The token for continuing a previous list request on the next page. This should
387
+ # be set to the value of 'nextPageToken' from the previous response.
388
+ # @param [String] start_modified_time
389
+ # The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-
390
+ # time).
391
+ # @param [String] fields
392
+ # Selector specifying which fields to include in a partial response.
393
+ # @param [String] quota_user
394
+ # Available to use for quota purposes for server-side applications. Can be any
395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # Overrides userIp if both are provided.
397
+ # @param [String] user_ip
398
+ # IP address of the site where the request originates. Use this if you want to
399
+ # enforce per-user limits.
400
+ # @param [Google::Apis::RequestOptions] options
401
+ # Request-specific options
402
+ #
403
+ # @yield [result, err] Result & error if block supplied
404
+ # @yieldparam result [Google::Apis::DriveV3::CommentList] parsed result object
405
+ # @yieldparam err [StandardError] error object if request failed
406
+ #
407
+ # @return [Google::Apis::DriveV3::CommentList]
408
+ #
409
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
410
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
411
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
412
+ def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
413
+ command = make_simple_command(:get, 'files/{fileId}/comments', options)
414
+ command.response_representation = Google::Apis::DriveV3::CommentList::Representation
415
+ command.response_class = Google::Apis::DriveV3::CommentList
416
+ command.params['fileId'] = file_id unless file_id.nil?
417
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
418
+ command.query['pageSize'] = page_size unless page_size.nil?
419
+ command.query['pageToken'] = page_token unless page_token.nil?
420
+ command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
421
+ command.query['fields'] = fields unless fields.nil?
422
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
423
+ command.query['userIp'] = user_ip unless user_ip.nil?
424
+ execute_or_queue_command(command, &block)
425
+ end
426
+
427
+ # Updates a comment with patch semantics.
428
+ # @param [String] file_id
429
+ # The ID of the file.
430
+ # @param [String] comment_id
431
+ # The ID of the comment.
432
+ # @param [Google::Apis::DriveV3::Comment] comment_object
433
+ # @param [String] fields
434
+ # Selector specifying which fields to include in a partial response.
435
+ # @param [String] quota_user
436
+ # Available to use for quota purposes for server-side applications. Can be any
437
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
438
+ # Overrides userIp if both are provided.
439
+ # @param [String] user_ip
440
+ # IP address of the site where the request originates. Use this if you want to
441
+ # enforce per-user limits.
442
+ # @param [Google::Apis::RequestOptions] options
443
+ # Request-specific options
444
+ #
445
+ # @yield [result, err] Result & error if block supplied
446
+ # @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
447
+ # @yieldparam err [StandardError] error object if request failed
448
+ #
449
+ # @return [Google::Apis::DriveV3::Comment]
450
+ #
451
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
452
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
453
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
454
+ def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
455
+ command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
456
+ command.request_representation = Google::Apis::DriveV3::Comment::Representation
457
+ command.request_object = comment_object
458
+ command.response_representation = Google::Apis::DriveV3::Comment::Representation
459
+ command.response_class = Google::Apis::DriveV3::Comment
460
+ command.params['fileId'] = file_id unless file_id.nil?
461
+ command.params['commentId'] = comment_id unless comment_id.nil?
462
+ command.query['fields'] = fields unless fields.nil?
463
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
464
+ command.query['userIp'] = user_ip unless user_ip.nil?
465
+ execute_or_queue_command(command, &block)
466
+ end
467
+
468
+ # Creates a copy of a file and applies any requested updates with patch
469
+ # semantics.
470
+ # @param [String] file_id
471
+ # The ID of the file.
472
+ # @param [Google::Apis::DriveV3::File] file_object
473
+ # @param [Boolean] ignore_default_visibility
474
+ # Whether to ignore the domain's default visibility settings for the created
475
+ # file. Domain administrators can choose to make all uploaded files visible to
476
+ # the domain by default; this parameter bypasses that behavior for the request.
477
+ # Permissions are still inherited from parent folders.
478
+ # @param [Boolean] keep_revision_forever
479
+ # Whether to set the 'keepForever' field in the new head revision. This is only
480
+ # applicable to files with binary content in Drive.
481
+ # @param [String] ocr_language
482
+ # A language hint for OCR processing during image import (ISO 639-1 code).
483
+ # @param [String] fields
484
+ # Selector specifying which fields to include in a partial response.
485
+ # @param [String] quota_user
486
+ # Available to use for quota purposes for server-side applications. Can be any
487
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
488
+ # Overrides userIp if both are provided.
489
+ # @param [String] user_ip
490
+ # IP address of the site where the request originates. Use this if you want to
491
+ # enforce per-user limits.
492
+ # @param [Google::Apis::RequestOptions] options
493
+ # Request-specific options
494
+ #
495
+ # @yield [result, err] Result & error if block supplied
496
+ # @yieldparam result [Google::Apis::DriveV3::File] parsed result object
497
+ # @yieldparam err [StandardError] error object if request failed
498
+ #
499
+ # @return [Google::Apis::DriveV3::File]
500
+ #
501
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
502
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
503
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
504
+ def copy_file(file_id, file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
505
+ command = make_simple_command(:post, 'files/{fileId}/copy', options)
506
+ command.request_representation = Google::Apis::DriveV3::File::Representation
507
+ command.request_object = file_object
508
+ command.response_representation = Google::Apis::DriveV3::File::Representation
509
+ command.response_class = Google::Apis::DriveV3::File
510
+ command.params['fileId'] = file_id unless file_id.nil?
511
+ command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
512
+ command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
513
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
514
+ command.query['fields'] = fields unless fields.nil?
515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
516
+ command.query['userIp'] = user_ip unless user_ip.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Creates a new file.
521
+ # @param [Google::Apis::DriveV3::File] file_object
522
+ # @param [Boolean] ignore_default_visibility
523
+ # Whether to ignore the domain's default visibility settings for the created
524
+ # file. Domain administrators can choose to make all uploaded files visible to
525
+ # the domain by default; this parameter bypasses that behavior for the request.
526
+ # Permissions are still inherited from parent folders.
527
+ # @param [Boolean] keep_revision_forever
528
+ # Whether to set the 'keepForever' field in the new head revision. This is only
529
+ # applicable to files with binary content in Drive.
530
+ # @param [String] ocr_language
531
+ # A language hint for OCR processing during image import (ISO 639-1 code).
532
+ # @param [Boolean] use_content_as_indexable_text
533
+ # Whether to use the uploaded content as indexable text.
534
+ # @param [String] fields
535
+ # Selector specifying which fields to include in a partial response.
536
+ # @param [String] quota_user
537
+ # Available to use for quota purposes for server-side applications. Can be any
538
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
539
+ # Overrides userIp if both are provided.
540
+ # @param [String] user_ip
541
+ # IP address of the site where the request originates. Use this if you want to
542
+ # enforce per-user limits.
543
+ # @param [IO, String] upload_source
544
+ # IO stream or filename containing content to upload
545
+ # @param [String] content_type
546
+ # Content type of the uploaded content.
547
+ # @param [Google::Apis::RequestOptions] options
548
+ # Request-specific options
549
+ #
550
+ # @yield [result, err] Result & error if block supplied
551
+ # @yieldparam result [Google::Apis::DriveV3::File] parsed result object
552
+ # @yieldparam err [StandardError] error object if request failed
553
+ #
554
+ # @return [Google::Apis::DriveV3::File]
555
+ #
556
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
557
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
558
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
559
+ def create_file(file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
560
+ if upload_source.nil?
561
+ command = make_simple_command(:post, 'files', options)
562
+ else
563
+ command = make_upload_command(:post, 'files', options)
564
+ command.upload_source = upload_source
565
+ command.upload_content_type = content_type
566
+ end
567
+ command.request_representation = Google::Apis::DriveV3::File::Representation
568
+ command.request_object = file_object
569
+ command.response_representation = Google::Apis::DriveV3::File::Representation
570
+ command.response_class = Google::Apis::DriveV3::File
571
+ command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
572
+ command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
573
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
574
+ command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
575
+ command.query['fields'] = fields unless fields.nil?
576
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
577
+ command.query['userIp'] = user_ip unless user_ip.nil?
578
+ execute_or_queue_command(command, &block)
579
+ end
580
+
581
+ # Permanently deletes a file owned by the user without moving it to the trash.
582
+ # If the target is a folder, all descendants owned by the user are also deleted.
583
+ # @param [String] file_id
584
+ # The ID of the file.
585
+ # @param [String] fields
586
+ # Selector specifying which fields to include in a partial response.
587
+ # @param [String] quota_user
588
+ # Available to use for quota purposes for server-side applications. Can be any
589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
590
+ # Overrides userIp if both are provided.
591
+ # @param [String] user_ip
592
+ # IP address of the site where the request originates. Use this if you want to
593
+ # enforce per-user limits.
594
+ # @param [Google::Apis::RequestOptions] options
595
+ # Request-specific options
596
+ #
597
+ # @yield [result, err] Result & error if block supplied
598
+ # @yieldparam result [NilClass] No result returned for this method
599
+ # @yieldparam err [StandardError] error object if request failed
600
+ #
601
+ # @return [void]
602
+ #
603
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
604
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
605
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
606
+ def delete_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
607
+ command = make_simple_command(:delete, 'files/{fileId}', options)
608
+ command.params['fileId'] = file_id unless file_id.nil?
609
+ command.query['fields'] = fields unless fields.nil?
610
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
611
+ command.query['userIp'] = user_ip unless user_ip.nil?
612
+ execute_or_queue_command(command, &block)
613
+ end
614
+
615
+ # Permanently deletes all of the user's trashed files.
616
+ # @param [String] fields
617
+ # Selector specifying which fields to include in a partial response.
618
+ # @param [String] quota_user
619
+ # Available to use for quota purposes for server-side applications. Can be any
620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
621
+ # Overrides userIp if both are provided.
622
+ # @param [String] user_ip
623
+ # IP address of the site where the request originates. Use this if you want to
624
+ # enforce per-user limits.
625
+ # @param [Google::Apis::RequestOptions] options
626
+ # Request-specific options
627
+ #
628
+ # @yield [result, err] Result & error if block supplied
629
+ # @yieldparam result [NilClass] No result returned for this method
630
+ # @yieldparam err [StandardError] error object if request failed
631
+ #
632
+ # @return [void]
633
+ #
634
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
635
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
636
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
637
+ def empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
638
+ command = make_simple_command(:delete, 'files/trash', options)
639
+ command.query['fields'] = fields unless fields.nil?
640
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
641
+ command.query['userIp'] = user_ip unless user_ip.nil?
642
+ execute_or_queue_command(command, &block)
643
+ end
644
+
645
+ # Exports a Google Doc to the requested MIME type and returns the exported
646
+ # content.
647
+ # @param [String] file_id
648
+ # The ID of the file.
649
+ # @param [String] mime_type
650
+ # The MIME type of the format requested for this export.
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 [IO, String] download_dest
661
+ # IO stream or filename to receive content download
662
+ # @param [Google::Apis::RequestOptions] options
663
+ # Request-specific options
664
+ #
665
+ # @yield [result, err] Result & error if block supplied
666
+ # @yieldparam result [NilClass] No result returned for this method
667
+ # @yieldparam err [StandardError] error object if request failed
668
+ #
669
+ # @return [void]
670
+ #
671
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
672
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
673
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
674
+ def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
675
+ if download_dest.nil?
676
+ command = make_simple_command(:get, 'files/{fileId}/export', options)
677
+ else
678
+ command = make_download_command(:get, 'files/{fileId}/export', options)
679
+ command.download_dest = download_dest
680
+ end
681
+ command.params['fileId'] = file_id unless file_id.nil?
682
+ command.query['mimeType'] = mime_type unless mime_type.nil?
683
+ command.query['fields'] = fields unless fields.nil?
684
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
685
+ command.query['userIp'] = user_ip unless user_ip.nil?
686
+ execute_or_queue_command(command, &block)
687
+ end
688
+
689
+ # Generates a set of file IDs which can be provided in create requests.
690
+ # @param [Fixnum] count
691
+ # The number of IDs to return.
692
+ # @param [String] space
693
+ # The space in which the IDs can be used to create new files. Supported values
694
+ # are 'drive' and 'appDataFolder'.
695
+ # @param [String] fields
696
+ # Selector specifying which fields to include in a partial response.
697
+ # @param [String] quota_user
698
+ # Available to use for quota purposes for server-side applications. Can be any
699
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
700
+ # Overrides userIp if both are provided.
701
+ # @param [String] user_ip
702
+ # IP address of the site where the request originates. Use this if you want to
703
+ # enforce per-user limits.
704
+ # @param [Google::Apis::RequestOptions] options
705
+ # Request-specific options
706
+ #
707
+ # @yield [result, err] Result & error if block supplied
708
+ # @yieldparam result [Google::Apis::DriveV3::GeneratedIds] parsed result object
709
+ # @yieldparam err [StandardError] error object if request failed
710
+ #
711
+ # @return [Google::Apis::DriveV3::GeneratedIds]
712
+ #
713
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
714
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
715
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
716
+ def generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
717
+ command = make_simple_command(:get, 'files/generateIds', options)
718
+ command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
719
+ command.response_class = Google::Apis::DriveV3::GeneratedIds
720
+ command.query['count'] = count unless count.nil?
721
+ command.query['space'] = space unless space.nil?
722
+ command.query['fields'] = fields unless fields.nil?
723
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
724
+ command.query['userIp'] = user_ip unless user_ip.nil?
725
+ execute_or_queue_command(command, &block)
726
+ end
727
+
728
+ # Gets a file's metadata or content by ID.
729
+ # @param [String] file_id
730
+ # The ID of the file.
731
+ # @param [Boolean] acknowledge_abuse
732
+ # Whether the user is acknowledging the risk of downloading known malware or
733
+ # other abusive files. This is only applicable when alt=media.
734
+ # @param [String] fields
735
+ # Selector specifying which fields to include in a partial response.
736
+ # @param [String] quota_user
737
+ # Available to use for quota purposes for server-side applications. Can be any
738
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
739
+ # Overrides userIp if both are provided.
740
+ # @param [String] user_ip
741
+ # IP address of the site where the request originates. Use this if you want to
742
+ # enforce per-user limits.
743
+ # @param [IO, String] download_dest
744
+ # IO stream or filename to receive content download
745
+ # @param [Google::Apis::RequestOptions] options
746
+ # Request-specific options
747
+ #
748
+ # @yield [result, err] Result & error if block supplied
749
+ # @yieldparam result [Google::Apis::DriveV3::File] parsed result object
750
+ # @yieldparam err [StandardError] error object if request failed
751
+ #
752
+ # @return [Google::Apis::DriveV3::File]
753
+ #
754
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
755
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
756
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
757
+ def get_file(file_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
758
+ if download_dest.nil?
759
+ command = make_simple_command(:get, 'files/{fileId}', options)
760
+ else
761
+ command = make_download_command(:get, 'files/{fileId}', options)
762
+ command.download_dest = download_dest
763
+ end
764
+ command.response_representation = Google::Apis::DriveV3::File::Representation
765
+ command.response_class = Google::Apis::DriveV3::File
766
+ command.params['fileId'] = file_id unless file_id.nil?
767
+ command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
768
+ command.query['fields'] = fields unless fields.nil?
769
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
770
+ command.query['userIp'] = user_ip unless user_ip.nil?
771
+ execute_or_queue_command(command, &block)
772
+ end
773
+
774
+ # Lists or searches files.
775
+ # @param [String] corpus
776
+ # The source of files to list.
777
+ # @param [String] order_by
778
+ # A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', '
779
+ # modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', 'recency', '
780
+ # sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending
781
+ # by default, but may be reversed with the 'desc' modifier. Example usage: ?
782
+ # orderBy=folder,modifiedTime desc,name. Please note that there is a current
783
+ # limitation for users with approximately one million files in which the
784
+ # requested sort order is ignored.
785
+ # @param [Fixnum] page_size
786
+ # The maximum number of files to return per page.
787
+ # @param [String] page_token
788
+ # The token for continuing a previous list request on the next page. This should
789
+ # be set to the value of 'nextPageToken' from the previous response.
790
+ # @param [String] q
791
+ # A query for filtering the file results. See the "Search for Files" guide for
792
+ # supported syntax.
793
+ # @param [String] spaces
794
+ # A comma-separated list of spaces to query within the corpus. Supported values
795
+ # are 'drive', 'appDataFolder' and 'photos'.
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 [Google::Apis::DriveV3::FileList] parsed result object
810
+ # @yieldparam err [StandardError] error object if request failed
811
+ #
812
+ # @return [Google::Apis::DriveV3::FileList]
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 list_files(corpus: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
818
+ command = make_simple_command(:get, 'files', options)
819
+ command.response_representation = Google::Apis::DriveV3::FileList::Representation
820
+ command.response_class = Google::Apis::DriveV3::FileList
821
+ command.query['corpus'] = corpus unless corpus.nil?
822
+ command.query['orderBy'] = order_by unless order_by.nil?
823
+ command.query['pageSize'] = page_size unless page_size.nil?
824
+ command.query['pageToken'] = page_token unless page_token.nil?
825
+ command.query['q'] = q unless q.nil?
826
+ command.query['spaces'] = spaces unless spaces.nil?
827
+ command.query['fields'] = fields unless fields.nil?
828
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
829
+ command.query['userIp'] = user_ip unless user_ip.nil?
830
+ execute_or_queue_command(command, &block)
831
+ end
832
+
833
+ # Updates a file's metadata and/or content with patch semantics.
834
+ # @param [String] file_id
835
+ # The ID of the file.
836
+ # @param [Google::Apis::DriveV3::File] file_object
837
+ # @param [String] add_parents
838
+ # A comma-separated list of parent IDs to add.
839
+ # @param [Boolean] keep_revision_forever
840
+ # Whether to set the 'keepForever' field in the new head revision. This is only
841
+ # applicable to files with binary content in Drive.
842
+ # @param [String] ocr_language
843
+ # A language hint for OCR processing during image import (ISO 639-1 code).
844
+ # @param [String] remove_parents
845
+ # A comma-separated list of parent IDs to remove.
846
+ # @param [Boolean] use_content_as_indexable_text
847
+ # Whether to use the uploaded content as indexable text.
848
+ # @param [String] fields
849
+ # Selector specifying which fields to include in a partial response.
850
+ # @param [String] quota_user
851
+ # Available to use for quota purposes for server-side applications. Can be any
852
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
853
+ # Overrides userIp if both are provided.
854
+ # @param [String] user_ip
855
+ # IP address of the site where the request originates. Use this if you want to
856
+ # enforce per-user limits.
857
+ # @param [IO, String] upload_source
858
+ # IO stream or filename containing content to upload
859
+ # @param [String] content_type
860
+ # Content type of the uploaded content.
861
+ # @param [Google::Apis::RequestOptions] options
862
+ # Request-specific options
863
+ #
864
+ # @yield [result, err] Result & error if block supplied
865
+ # @yieldparam result [Google::Apis::DriveV3::File] parsed result object
866
+ # @yieldparam err [StandardError] error object if request failed
867
+ #
868
+ # @return [Google::Apis::DriveV3::File]
869
+ #
870
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
871
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
872
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
873
+ def update_file(file_id, file_object = nil, add_parents: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
874
+ if upload_source.nil?
875
+ command = make_simple_command(:patch, 'files/{fileId}', options)
876
+ else
877
+ command = make_upload_command(:patch, 'files/{fileId}', options)
878
+ command.upload_source = upload_source
879
+ command.upload_content_type = content_type
880
+ end
881
+ command.request_representation = Google::Apis::DriveV3::File::Representation
882
+ command.request_object = file_object
883
+ command.response_representation = Google::Apis::DriveV3::File::Representation
884
+ command.response_class = Google::Apis::DriveV3::File
885
+ command.params['fileId'] = file_id unless file_id.nil?
886
+ command.query['addParents'] = add_parents unless add_parents.nil?
887
+ command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
888
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
889
+ command.query['removeParents'] = remove_parents unless remove_parents.nil?
890
+ command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
891
+ command.query['fields'] = fields unless fields.nil?
892
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
893
+ command.query['userIp'] = user_ip unless user_ip.nil?
894
+ execute_or_queue_command(command, &block)
895
+ end
896
+
897
+ # Subscribes to changes to a file
898
+ # @param [String] file_id
899
+ # The ID of the file.
900
+ # @param [Google::Apis::DriveV3::Channel] channel_object
901
+ # @param [Boolean] acknowledge_abuse
902
+ # Whether the user is acknowledging the risk of downloading known malware or
903
+ # other abusive files. This is only applicable when alt=media.
904
+ # @param [String] fields
905
+ # Selector specifying which fields to include in a partial response.
906
+ # @param [String] quota_user
907
+ # Available to use for quota purposes for server-side applications. Can be any
908
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
909
+ # Overrides userIp if both are provided.
910
+ # @param [String] user_ip
911
+ # IP address of the site where the request originates. Use this if you want to
912
+ # enforce per-user limits.
913
+ # @param [IO, String] download_dest
914
+ # IO stream or filename to receive content download
915
+ # @param [Google::Apis::RequestOptions] options
916
+ # Request-specific options
917
+ #
918
+ # @yield [result, err] Result & error if block supplied
919
+ # @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
920
+ # @yieldparam err [StandardError] error object if request failed
921
+ #
922
+ # @return [Google::Apis::DriveV3::Channel]
923
+ #
924
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
925
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
926
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
927
+ def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
928
+ if download_dest.nil?
929
+ command = make_simple_command(:post, 'files/{fileId}/watch', options)
930
+ else
931
+ command = make_download_command(:post, 'files/{fileId}/watch', options)
932
+ command.download_dest = download_dest
933
+ end
934
+ command.request_representation = Google::Apis::DriveV3::Channel::Representation
935
+ command.request_object = channel_object
936
+ command.response_representation = Google::Apis::DriveV3::Channel::Representation
937
+ command.response_class = Google::Apis::DriveV3::Channel
938
+ command.params['fileId'] = file_id unless file_id.nil?
939
+ command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.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
+ # Creates a permission for a file.
947
+ # @param [String] file_id
948
+ # The ID of the file.
949
+ # @param [Google::Apis::DriveV3::Permission] permission_object
950
+ # @param [String] email_message
951
+ # A custom message to include in the notification email.
952
+ # @param [Boolean] send_notification_email
953
+ # Whether to send a notification email when sharing to users or groups. This
954
+ # defaults to true for users and groups, and is not allowed for other requests.
955
+ # It must not be disabled for ownership transfers.
956
+ # @param [Boolean] transfer_ownership
957
+ # Whether to transfer ownership to the specified user and downgrade the current
958
+ # owner to a writer. This parameter is required as an acknowledgement of the
959
+ # side effect.
960
+ # @param [String] fields
961
+ # Selector specifying which fields to include in a partial response.
962
+ # @param [String] quota_user
963
+ # Available to use for quota purposes for server-side applications. Can be any
964
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
965
+ # Overrides userIp if both are provided.
966
+ # @param [String] user_ip
967
+ # IP address of the site where the request originates. Use this if you want to
968
+ # enforce per-user limits.
969
+ # @param [Google::Apis::RequestOptions] options
970
+ # Request-specific options
971
+ #
972
+ # @yield [result, err] Result & error if block supplied
973
+ # @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
974
+ # @yieldparam err [StandardError] error object if request failed
975
+ #
976
+ # @return [Google::Apis::DriveV3::Permission]
977
+ #
978
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
979
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
980
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
981
+ def create_permission(file_id, permission_object = nil, email_message: nil, send_notification_email: nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
982
+ command = make_simple_command(:post, 'files/{fileId}/permissions', options)
983
+ command.request_representation = Google::Apis::DriveV3::Permission::Representation
984
+ command.request_object = permission_object
985
+ command.response_representation = Google::Apis::DriveV3::Permission::Representation
986
+ command.response_class = Google::Apis::DriveV3::Permission
987
+ command.params['fileId'] = file_id unless file_id.nil?
988
+ command.query['emailMessage'] = email_message unless email_message.nil?
989
+ command.query['sendNotificationEmail'] = send_notification_email unless send_notification_email.nil?
990
+ command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
991
+ command.query['fields'] = fields unless fields.nil?
992
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
993
+ command.query['userIp'] = user_ip unless user_ip.nil?
994
+ execute_or_queue_command(command, &block)
995
+ end
996
+
997
+ # Deletes a permission.
998
+ # @param [String] file_id
999
+ # The ID of the file.
1000
+ # @param [String] permission_id
1001
+ # The ID of the permission.
1002
+ # @param [String] fields
1003
+ # Selector specifying which fields to include in a partial response.
1004
+ # @param [String] quota_user
1005
+ # Available to use for quota purposes for server-side applications. Can be any
1006
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1007
+ # Overrides userIp if both are provided.
1008
+ # @param [String] user_ip
1009
+ # IP address of the site where the request originates. Use this if you want to
1010
+ # enforce per-user limits.
1011
+ # @param [Google::Apis::RequestOptions] options
1012
+ # Request-specific options
1013
+ #
1014
+ # @yield [result, err] Result & error if block supplied
1015
+ # @yieldparam result [NilClass] No result returned for this method
1016
+ # @yieldparam err [StandardError] error object if request failed
1017
+ #
1018
+ # @return [void]
1019
+ #
1020
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1021
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1022
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1023
+ def delete_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1024
+ command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
1025
+ command.params['fileId'] = file_id unless file_id.nil?
1026
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1027
+ command.query['fields'] = fields unless fields.nil?
1028
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1029
+ command.query['userIp'] = user_ip unless user_ip.nil?
1030
+ execute_or_queue_command(command, &block)
1031
+ end
1032
+
1033
+ # Gets a permission by ID.
1034
+ # @param [String] file_id
1035
+ # The ID of the file.
1036
+ # @param [String] permission_id
1037
+ # The ID of the permission.
1038
+ # @param [String] fields
1039
+ # Selector specifying which fields to include in a partial response.
1040
+ # @param [String] quota_user
1041
+ # Available to use for quota purposes for server-side applications. Can be any
1042
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1043
+ # Overrides userIp if both are provided.
1044
+ # @param [String] user_ip
1045
+ # IP address of the site where the request originates. Use this if you want to
1046
+ # enforce per-user limits.
1047
+ # @param [Google::Apis::RequestOptions] options
1048
+ # Request-specific options
1049
+ #
1050
+ # @yield [result, err] Result & error if block supplied
1051
+ # @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
1052
+ # @yieldparam err [StandardError] error object if request failed
1053
+ #
1054
+ # @return [Google::Apis::DriveV3::Permission]
1055
+ #
1056
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1057
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1058
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1059
+ def get_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1060
+ command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
1061
+ command.response_representation = Google::Apis::DriveV3::Permission::Representation
1062
+ command.response_class = Google::Apis::DriveV3::Permission
1063
+ command.params['fileId'] = file_id unless file_id.nil?
1064
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1065
+ command.query['fields'] = fields unless fields.nil?
1066
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1067
+ command.query['userIp'] = user_ip unless user_ip.nil?
1068
+ execute_or_queue_command(command, &block)
1069
+ end
1070
+
1071
+ # Lists a file's permissions.
1072
+ # @param [String] file_id
1073
+ # The ID of the file.
1074
+ # @param [String] fields
1075
+ # Selector specifying which fields to include in a partial response.
1076
+ # @param [String] quota_user
1077
+ # Available to use for quota purposes for server-side applications. Can be any
1078
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1079
+ # Overrides userIp if both are provided.
1080
+ # @param [String] user_ip
1081
+ # IP address of the site where the request originates. Use this if you want to
1082
+ # enforce per-user limits.
1083
+ # @param [Google::Apis::RequestOptions] options
1084
+ # Request-specific options
1085
+ #
1086
+ # @yield [result, err] Result & error if block supplied
1087
+ # @yieldparam result [Google::Apis::DriveV3::PermissionList] parsed result object
1088
+ # @yieldparam err [StandardError] error object if request failed
1089
+ #
1090
+ # @return [Google::Apis::DriveV3::PermissionList]
1091
+ #
1092
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1093
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1094
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1095
+ def list_permissions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1096
+ command = make_simple_command(:get, 'files/{fileId}/permissions', options)
1097
+ command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
1098
+ command.response_class = Google::Apis::DriveV3::PermissionList
1099
+ command.params['fileId'] = file_id unless file_id.nil?
1100
+ command.query['fields'] = fields unless fields.nil?
1101
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1102
+ command.query['userIp'] = user_ip unless user_ip.nil?
1103
+ execute_or_queue_command(command, &block)
1104
+ end
1105
+
1106
+ # Updates a permission with patch semantics.
1107
+ # @param [String] file_id
1108
+ # The ID of the file.
1109
+ # @param [String] permission_id
1110
+ # The ID of the permission.
1111
+ # @param [Google::Apis::DriveV3::Permission] permission_object
1112
+ # @param [Boolean] transfer_ownership
1113
+ # Whether to transfer ownership to the specified user and downgrade the current
1114
+ # owner to a writer. This parameter is required as an acknowledgement of the
1115
+ # side effect.
1116
+ # @param [String] fields
1117
+ # Selector specifying which fields to include in a partial response.
1118
+ # @param [String] quota_user
1119
+ # Available to use for quota purposes for server-side applications. Can be any
1120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1121
+ # Overrides userIp if both are provided.
1122
+ # @param [String] user_ip
1123
+ # IP address of the site where the request originates. Use this if you want to
1124
+ # enforce per-user limits.
1125
+ # @param [Google::Apis::RequestOptions] options
1126
+ # Request-specific options
1127
+ #
1128
+ # @yield [result, err] Result & error if block supplied
1129
+ # @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
1130
+ # @yieldparam err [StandardError] error object if request failed
1131
+ #
1132
+ # @return [Google::Apis::DriveV3::Permission]
1133
+ #
1134
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1135
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1136
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1137
+ def update_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1138
+ command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
1139
+ command.request_representation = Google::Apis::DriveV3::Permission::Representation
1140
+ command.request_object = permission_object
1141
+ command.response_representation = Google::Apis::DriveV3::Permission::Representation
1142
+ command.response_class = Google::Apis::DriveV3::Permission
1143
+ command.params['fileId'] = file_id unless file_id.nil?
1144
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1145
+ command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
1146
+ command.query['fields'] = fields unless fields.nil?
1147
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1148
+ command.query['userIp'] = user_ip unless user_ip.nil?
1149
+ execute_or_queue_command(command, &block)
1150
+ end
1151
+
1152
+ # Creates a new reply to a comment.
1153
+ # @param [String] file_id
1154
+ # The ID of the file.
1155
+ # @param [String] comment_id
1156
+ # The ID of the comment.
1157
+ # @param [Google::Apis::DriveV3::Reply] reply_object
1158
+ # @param [String] fields
1159
+ # Selector specifying which fields to include in a partial response.
1160
+ # @param [String] quota_user
1161
+ # Available to use for quota purposes for server-side applications. Can be any
1162
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1163
+ # Overrides userIp if both are provided.
1164
+ # @param [String] user_ip
1165
+ # IP address of the site where the request originates. Use this if you want to
1166
+ # enforce per-user limits.
1167
+ # @param [Google::Apis::RequestOptions] options
1168
+ # Request-specific options
1169
+ #
1170
+ # @yield [result, err] Result & error if block supplied
1171
+ # @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
1172
+ # @yieldparam err [StandardError] error object if request failed
1173
+ #
1174
+ # @return [Google::Apis::DriveV3::Reply]
1175
+ #
1176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1179
+ def create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1180
+ command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
1181
+ command.request_representation = Google::Apis::DriveV3::Reply::Representation
1182
+ command.request_object = reply_object
1183
+ command.response_representation = Google::Apis::DriveV3::Reply::Representation
1184
+ command.response_class = Google::Apis::DriveV3::Reply
1185
+ command.params['fileId'] = file_id unless file_id.nil?
1186
+ command.params['commentId'] = comment_id unless comment_id.nil?
1187
+ command.query['fields'] = fields unless fields.nil?
1188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1189
+ command.query['userIp'] = user_ip unless user_ip.nil?
1190
+ execute_or_queue_command(command, &block)
1191
+ end
1192
+
1193
+ # Deletes a reply.
1194
+ # @param [String] file_id
1195
+ # The ID of the file.
1196
+ # @param [String] comment_id
1197
+ # The ID of the comment.
1198
+ # @param [String] reply_id
1199
+ # The ID of the reply.
1200
+ # @param [String] fields
1201
+ # Selector specifying which fields to include in a partial response.
1202
+ # @param [String] quota_user
1203
+ # Available to use for quota purposes for server-side applications. Can be any
1204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1205
+ # Overrides userIp if both are provided.
1206
+ # @param [String] user_ip
1207
+ # IP address of the site where the request originates. Use this if you want to
1208
+ # enforce per-user limits.
1209
+ # @param [Google::Apis::RequestOptions] options
1210
+ # Request-specific options
1211
+ #
1212
+ # @yield [result, err] Result & error if block supplied
1213
+ # @yieldparam result [NilClass] No result returned for this method
1214
+ # @yieldparam err [StandardError] error object if request failed
1215
+ #
1216
+ # @return [void]
1217
+ #
1218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1221
+ def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1222
+ command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
1223
+ command.params['fileId'] = file_id unless file_id.nil?
1224
+ command.params['commentId'] = comment_id unless comment_id.nil?
1225
+ command.params['replyId'] = reply_id unless reply_id.nil?
1226
+ command.query['fields'] = fields unless fields.nil?
1227
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1228
+ command.query['userIp'] = user_ip unless user_ip.nil?
1229
+ execute_or_queue_command(command, &block)
1230
+ end
1231
+
1232
+ # Gets a reply by ID.
1233
+ # @param [String] file_id
1234
+ # The ID of the file.
1235
+ # @param [String] comment_id
1236
+ # The ID of the comment.
1237
+ # @param [String] reply_id
1238
+ # The ID of the reply.
1239
+ # @param [Boolean] include_deleted
1240
+ # Whether to return deleted replies. Deleted replies will not include their
1241
+ # original content.
1242
+ # @param [String] fields
1243
+ # Selector specifying which fields to include in a partial response.
1244
+ # @param [String] quota_user
1245
+ # Available to use for quota purposes for server-side applications. Can be any
1246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1247
+ # Overrides userIp if both are provided.
1248
+ # @param [String] user_ip
1249
+ # IP address of the site where the request originates. Use this if you want to
1250
+ # enforce per-user limits.
1251
+ # @param [Google::Apis::RequestOptions] options
1252
+ # Request-specific options
1253
+ #
1254
+ # @yield [result, err] Result & error if block supplied
1255
+ # @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
1256
+ # @yieldparam err [StandardError] error object if request failed
1257
+ #
1258
+ # @return [Google::Apis::DriveV3::Reply]
1259
+ #
1260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1263
+ def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1264
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
1265
+ command.response_representation = Google::Apis::DriveV3::Reply::Representation
1266
+ command.response_class = Google::Apis::DriveV3::Reply
1267
+ command.params['fileId'] = file_id unless file_id.nil?
1268
+ command.params['commentId'] = comment_id unless comment_id.nil?
1269
+ command.params['replyId'] = reply_id unless reply_id.nil?
1270
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
1271
+ command.query['fields'] = fields unless fields.nil?
1272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
+ command.query['userIp'] = user_ip unless user_ip.nil?
1274
+ execute_or_queue_command(command, &block)
1275
+ end
1276
+
1277
+ # Lists a comment's replies.
1278
+ # @param [String] file_id
1279
+ # The ID of the file.
1280
+ # @param [String] comment_id
1281
+ # The ID of the comment.
1282
+ # @param [Boolean] include_deleted
1283
+ # Whether to include deleted replies. Deleted replies will not include their
1284
+ # original content.
1285
+ # @param [Fixnum] page_size
1286
+ # The maximum number of replies to return per page.
1287
+ # @param [String] page_token
1288
+ # The token for continuing a previous list request on the next page. This should
1289
+ # be set to the value of 'nextPageToken' from the previous response.
1290
+ # @param [String] fields
1291
+ # Selector specifying which fields to include in a partial response.
1292
+ # @param [String] quota_user
1293
+ # Available to use for quota purposes for server-side applications. Can be any
1294
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1295
+ # Overrides userIp if both are provided.
1296
+ # @param [String] user_ip
1297
+ # IP address of the site where the request originates. Use this if you want to
1298
+ # enforce per-user limits.
1299
+ # @param [Google::Apis::RequestOptions] options
1300
+ # Request-specific options
1301
+ #
1302
+ # @yield [result, err] Result & error if block supplied
1303
+ # @yieldparam result [Google::Apis::DriveV3::ReplyList] parsed result object
1304
+ # @yieldparam err [StandardError] error object if request failed
1305
+ #
1306
+ # @return [Google::Apis::DriveV3::ReplyList]
1307
+ #
1308
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1309
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1310
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1311
+ def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1312
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
1313
+ command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
1314
+ command.response_class = Google::Apis::DriveV3::ReplyList
1315
+ command.params['fileId'] = file_id unless file_id.nil?
1316
+ command.params['commentId'] = comment_id unless comment_id.nil?
1317
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
1318
+ command.query['pageSize'] = page_size unless page_size.nil?
1319
+ command.query['pageToken'] = page_token unless page_token.nil?
1320
+ command.query['fields'] = fields unless fields.nil?
1321
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1322
+ command.query['userIp'] = user_ip unless user_ip.nil?
1323
+ execute_or_queue_command(command, &block)
1324
+ end
1325
+
1326
+ # Updates a reply with patch semantics.
1327
+ # @param [String] file_id
1328
+ # The ID of the file.
1329
+ # @param [String] comment_id
1330
+ # The ID of the comment.
1331
+ # @param [String] reply_id
1332
+ # The ID of the reply.
1333
+ # @param [Google::Apis::DriveV3::Reply] reply_object
1334
+ # @param [String] fields
1335
+ # Selector specifying which fields to include in a partial response.
1336
+ # @param [String] quota_user
1337
+ # Available to use for quota purposes for server-side applications. Can be any
1338
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1339
+ # Overrides userIp if both are provided.
1340
+ # @param [String] user_ip
1341
+ # IP address of the site where the request originates. Use this if you want to
1342
+ # enforce per-user limits.
1343
+ # @param [Google::Apis::RequestOptions] options
1344
+ # Request-specific options
1345
+ #
1346
+ # @yield [result, err] Result & error if block supplied
1347
+ # @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
1348
+ # @yieldparam err [StandardError] error object if request failed
1349
+ #
1350
+ # @return [Google::Apis::DriveV3::Reply]
1351
+ #
1352
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1353
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1354
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1355
+ def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1356
+ command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
1357
+ command.request_representation = Google::Apis::DriveV3::Reply::Representation
1358
+ command.request_object = reply_object
1359
+ command.response_representation = Google::Apis::DriveV3::Reply::Representation
1360
+ command.response_class = Google::Apis::DriveV3::Reply
1361
+ command.params['fileId'] = file_id unless file_id.nil?
1362
+ command.params['commentId'] = comment_id unless comment_id.nil?
1363
+ command.params['replyId'] = reply_id unless reply_id.nil?
1364
+ command.query['fields'] = fields unless fields.nil?
1365
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1366
+ command.query['userIp'] = user_ip unless user_ip.nil?
1367
+ execute_or_queue_command(command, &block)
1368
+ end
1369
+
1370
+ # Permanently deletes a revision. This method is only applicable to files with
1371
+ # binary content in Drive.
1372
+ # @param [String] file_id
1373
+ # The ID of the file.
1374
+ # @param [String] revision_id
1375
+ # The ID of the revision.
1376
+ # @param [String] fields
1377
+ # Selector specifying which fields to include in a partial response.
1378
+ # @param [String] quota_user
1379
+ # Available to use for quota purposes for server-side applications. Can be any
1380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1381
+ # Overrides userIp if both are provided.
1382
+ # @param [String] user_ip
1383
+ # IP address of the site where the request originates. Use this if you want to
1384
+ # enforce per-user limits.
1385
+ # @param [Google::Apis::RequestOptions] options
1386
+ # Request-specific options
1387
+ #
1388
+ # @yield [result, err] Result & error if block supplied
1389
+ # @yieldparam result [NilClass] No result returned for this method
1390
+ # @yieldparam err [StandardError] error object if request failed
1391
+ #
1392
+ # @return [void]
1393
+ #
1394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1397
+ def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1398
+ command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
1399
+ command.params['fileId'] = file_id unless file_id.nil?
1400
+ command.params['revisionId'] = revision_id unless revision_id.nil?
1401
+ command.query['fields'] = fields unless fields.nil?
1402
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1403
+ command.query['userIp'] = user_ip unless user_ip.nil?
1404
+ execute_or_queue_command(command, &block)
1405
+ end
1406
+
1407
+ # Gets a revision's metadata or content by ID.
1408
+ # @param [String] file_id
1409
+ # The ID of the file.
1410
+ # @param [String] revision_id
1411
+ # The ID of the revision.
1412
+ # @param [Boolean] acknowledge_abuse
1413
+ # Whether the user is acknowledging the risk of downloading known malware or
1414
+ # other abusive files. This is only applicable when alt=media.
1415
+ # @param [String] fields
1416
+ # Selector specifying which fields to include in a partial response.
1417
+ # @param [String] quota_user
1418
+ # Available to use for quota purposes for server-side applications. Can be any
1419
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1420
+ # Overrides userIp if both are provided.
1421
+ # @param [String] user_ip
1422
+ # IP address of the site where the request originates. Use this if you want to
1423
+ # enforce per-user limits.
1424
+ # @param [IO, String] download_dest
1425
+ # IO stream or filename to receive content download
1426
+ # @param [Google::Apis::RequestOptions] options
1427
+ # Request-specific options
1428
+ #
1429
+ # @yield [result, err] Result & error if block supplied
1430
+ # @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
1431
+ # @yieldparam err [StandardError] error object if request failed
1432
+ #
1433
+ # @return [Google::Apis::DriveV3::Revision]
1434
+ #
1435
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1436
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1437
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1438
+ def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1439
+ if download_dest.nil?
1440
+ command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
1441
+ else
1442
+ command = make_download_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
1443
+ command.download_dest = download_dest
1444
+ end
1445
+ command.response_representation = Google::Apis::DriveV3::Revision::Representation
1446
+ command.response_class = Google::Apis::DriveV3::Revision
1447
+ command.params['fileId'] = file_id unless file_id.nil?
1448
+ command.params['revisionId'] = revision_id unless revision_id.nil?
1449
+ command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
1450
+ command.query['fields'] = fields unless fields.nil?
1451
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1452
+ command.query['userIp'] = user_ip unless user_ip.nil?
1453
+ execute_or_queue_command(command, &block)
1454
+ end
1455
+
1456
+ # Lists a file's revisions.
1457
+ # @param [String] file_id
1458
+ # The ID of the file.
1459
+ # @param [String] fields
1460
+ # Selector specifying which fields to include in a partial response.
1461
+ # @param [String] quota_user
1462
+ # Available to use for quota purposes for server-side applications. Can be any
1463
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1464
+ # Overrides userIp if both are provided.
1465
+ # @param [String] user_ip
1466
+ # IP address of the site where the request originates. Use this if you want to
1467
+ # enforce per-user limits.
1468
+ # @param [Google::Apis::RequestOptions] options
1469
+ # Request-specific options
1470
+ #
1471
+ # @yield [result, err] Result & error if block supplied
1472
+ # @yieldparam result [Google::Apis::DriveV3::RevisionList] parsed result object
1473
+ # @yieldparam err [StandardError] error object if request failed
1474
+ #
1475
+ # @return [Google::Apis::DriveV3::RevisionList]
1476
+ #
1477
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1478
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1479
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1480
+ def list_revisions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1481
+ command = make_simple_command(:get, 'files/{fileId}/revisions', options)
1482
+ command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
1483
+ command.response_class = Google::Apis::DriveV3::RevisionList
1484
+ command.params['fileId'] = file_id unless file_id.nil?
1485
+ command.query['fields'] = fields unless fields.nil?
1486
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1487
+ command.query['userIp'] = user_ip unless user_ip.nil?
1488
+ execute_or_queue_command(command, &block)
1489
+ end
1490
+
1491
+ # Updates a revision with patch semantics.
1492
+ # @param [String] file_id
1493
+ # The ID of the file.
1494
+ # @param [String] revision_id
1495
+ # The ID of the revision.
1496
+ # @param [Google::Apis::DriveV3::Revision] revision_object
1497
+ # @param [String] fields
1498
+ # Selector specifying which fields to include in a partial response.
1499
+ # @param [String] quota_user
1500
+ # Available to use for quota purposes for server-side applications. Can be any
1501
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1502
+ # Overrides userIp if both are provided.
1503
+ # @param [String] user_ip
1504
+ # IP address of the site where the request originates. Use this if you want to
1505
+ # enforce per-user limits.
1506
+ # @param [Google::Apis::RequestOptions] options
1507
+ # Request-specific options
1508
+ #
1509
+ # @yield [result, err] Result & error if block supplied
1510
+ # @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
1511
+ # @yieldparam err [StandardError] error object if request failed
1512
+ #
1513
+ # @return [Google::Apis::DriveV3::Revision]
1514
+ #
1515
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1516
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1517
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1518
+ def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1519
+ command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
1520
+ command.request_representation = Google::Apis::DriveV3::Revision::Representation
1521
+ command.request_object = revision_object
1522
+ command.response_representation = Google::Apis::DriveV3::Revision::Representation
1523
+ command.response_class = Google::Apis::DriveV3::Revision
1524
+ command.params['fileId'] = file_id unless file_id.nil?
1525
+ command.params['revisionId'] = revision_id unless revision_id.nil?
1526
+ command.query['fields'] = fields unless fields.nil?
1527
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1528
+ command.query['userIp'] = user_ip unless user_ip.nil?
1529
+ execute_or_queue_command(command, &block)
1530
+ end
1531
+
1532
+ protected
1533
+
1534
+ def apply_command_defaults(command)
1535
+ command.query['key'] = key unless key.nil?
1536
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1537
+ command.query['userIp'] = user_ip unless user_ip.nil?
1538
+ end
1539
+ end
1540
+ end
1541
+ end
1542
+ end