lemboy-google-api-client 0.9.26

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