lemboy-google-api-client 0.9.26

Sign up to get free protection for your applications and to get access to all the features.
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,2754 @@
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 DriveV2
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_v2'
30
+ #
31
+ # Drive = Google::Apis::DriveV2 # 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/v2/')
54
+ end
55
+
56
+ # Gets the information about the current user along with Drive API settings
57
+ # @param [Boolean] include_subscribed
58
+ # When calculating the number of remaining change IDs, whether to include public
59
+ # files the user has opened and shared files. When set to false, this counts
60
+ # only change IDs for owned files and any shared or public files that the user
61
+ # has explicitly added to a folder they own.
62
+ # @param [String] max_change_id_count
63
+ # Maximum number of remaining change IDs to count
64
+ # @param [String] start_change_id
65
+ # Change ID to start counting from when calculating number of remaining change
66
+ # IDs
67
+ # @param [String] fields
68
+ # Selector specifying which fields to include in a partial response.
69
+ # @param [String] quota_user
70
+ # Available to use for quota purposes for server-side applications. Can be any
71
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
72
+ # Overrides userIp if both are provided.
73
+ # @param [String] user_ip
74
+ # IP address of the site where the request originates. Use this if you want to
75
+ # enforce per-user limits.
76
+ # @param [Google::Apis::RequestOptions] options
77
+ # Request-specific options
78
+ #
79
+ # @yield [result, err] Result & error if block supplied
80
+ # @yieldparam result [Google::Apis::DriveV2::About] parsed result object
81
+ # @yieldparam err [StandardError] error object if request failed
82
+ #
83
+ # @return [Google::Apis::DriveV2::About]
84
+ #
85
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
86
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
87
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
88
+ def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
89
+ command = make_simple_command(:get, 'about', options)
90
+ command.response_representation = Google::Apis::DriveV2::About::Representation
91
+ command.response_class = Google::Apis::DriveV2::About
92
+ command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
93
+ command.query['maxChangeIdCount'] = max_change_id_count unless max_change_id_count.nil?
94
+ command.query['startChangeId'] = start_change_id unless start_change_id.nil?
95
+ command.query['fields'] = fields unless fields.nil?
96
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
97
+ command.query['userIp'] = user_ip unless user_ip.nil?
98
+ execute_or_queue_command(command, &block)
99
+ end
100
+
101
+ # Gets a specific app.
102
+ # @param [String] app_id
103
+ # The ID of the app.
104
+ # @param [String] fields
105
+ # Selector specifying which fields to include in a partial response.
106
+ # @param [String] quota_user
107
+ # Available to use for quota purposes for server-side applications. Can be any
108
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
109
+ # Overrides userIp if both are provided.
110
+ # @param [String] user_ip
111
+ # IP address of the site where the request originates. Use this if you want to
112
+ # enforce per-user limits.
113
+ # @param [Google::Apis::RequestOptions] options
114
+ # Request-specific options
115
+ #
116
+ # @yield [result, err] Result & error if block supplied
117
+ # @yieldparam result [Google::Apis::DriveV2::App] parsed result object
118
+ # @yieldparam err [StandardError] error object if request failed
119
+ #
120
+ # @return [Google::Apis::DriveV2::App]
121
+ #
122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
125
+ def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
126
+ command = make_simple_command(:get, 'apps/{appId}', options)
127
+ command.response_representation = Google::Apis::DriveV2::App::Representation
128
+ command.response_class = Google::Apis::DriveV2::App
129
+ command.params['appId'] = app_id unless app_id.nil?
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ command.query['userIp'] = user_ip unless user_ip.nil?
133
+ execute_or_queue_command(command, &block)
134
+ end
135
+
136
+ # Lists a user's installed apps.
137
+ # @param [String] app_filter_extensions
138
+ # A comma-separated list of file extensions for open with filtering. All apps
139
+ # within the given app query scope which can open any of the given file
140
+ # extensions will be included in the response. If appFilterMimeTypes are
141
+ # provided as well, the result is a union of the two resulting app lists.
142
+ # @param [String] app_filter_mime_types
143
+ # A comma-separated list of MIME types for open with filtering. All apps within
144
+ # the given app query scope which can open any of the given MIME types will be
145
+ # included in the response. If appFilterExtensions are provided as well, the
146
+ # result is a union of the two resulting app lists.
147
+ # @param [String] language_code
148
+ # A language or locale code, as defined by BCP 47, with some extensions from
149
+ # Unicode's LDML format (http://www.unicode.org/reports/tr35/).
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # Overrides userIp if both are provided.
156
+ # @param [String] user_ip
157
+ # IP address of the site where the request originates. Use this if you want to
158
+ # enforce per-user limits.
159
+ # @param [Google::Apis::RequestOptions] options
160
+ # Request-specific options
161
+ #
162
+ # @yield [result, err] Result & error if block supplied
163
+ # @yieldparam result [Google::Apis::DriveV2::AppList] parsed result object
164
+ # @yieldparam err [StandardError] error object if request failed
165
+ #
166
+ # @return [Google::Apis::DriveV2::AppList]
167
+ #
168
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
169
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
170
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
171
+ def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
172
+ command = make_simple_command(:get, 'apps', options)
173
+ command.response_representation = Google::Apis::DriveV2::AppList::Representation
174
+ command.response_class = Google::Apis::DriveV2::AppList
175
+ command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil?
176
+ command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil?
177
+ command.query['languageCode'] = language_code unless language_code.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ command.query['userIp'] = user_ip unless user_ip.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ # Gets a specific change.
185
+ # @param [String] change_id
186
+ # The ID of the change.
187
+ # @param [String] fields
188
+ # Selector specifying which fields to include in a partial response.
189
+ # @param [String] quota_user
190
+ # Available to use for quota purposes for server-side applications. Can be any
191
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
192
+ # Overrides userIp if both are provided.
193
+ # @param [String] user_ip
194
+ # IP address of the site where the request originates. Use this if you want to
195
+ # enforce per-user limits.
196
+ # @param [Google::Apis::RequestOptions] options
197
+ # Request-specific options
198
+ #
199
+ # @yield [result, err] Result & error if block supplied
200
+ # @yieldparam result [Google::Apis::DriveV2::Change] parsed result object
201
+ # @yieldparam err [StandardError] error object if request failed
202
+ #
203
+ # @return [Google::Apis::DriveV2::Change]
204
+ #
205
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
206
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
207
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
208
+ def get_change(change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
209
+ command = make_simple_command(:get, 'changes/{changeId}', options)
210
+ command.response_representation = Google::Apis::DriveV2::Change::Representation
211
+ command.response_class = Google::Apis::DriveV2::Change
212
+ command.params['changeId'] = change_id unless change_id.nil?
213
+ command.query['fields'] = fields unless fields.nil?
214
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
215
+ command.query['userIp'] = user_ip unless user_ip.nil?
216
+ execute_or_queue_command(command, &block)
217
+ end
218
+
219
+ # Lists the changes for a user.
220
+ # @param [Boolean] include_deleted
221
+ # Whether to include deleted items.
222
+ # @param [Boolean] include_subscribed
223
+ # Whether to include public files the user has opened and shared files. When set
224
+ # to false, the list only includes owned files plus any shared or public files
225
+ # the user has explicitly added to a folder they own.
226
+ # @param [Fixnum] max_results
227
+ # Maximum number of changes to return.
228
+ # @param [String] page_token
229
+ # Page token for changes.
230
+ # @param [String] spaces
231
+ # A comma-separated list of spaces to query. Supported values are 'drive', '
232
+ # appDataFolder' and 'photos'.
233
+ # @param [String] start_change_id
234
+ # Change ID to start listing changes from.
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # Overrides userIp if both are provided.
241
+ # @param [String] user_ip
242
+ # IP address of the site where the request originates. Use this if you want to
243
+ # enforce per-user limits.
244
+ # @param [Google::Apis::RequestOptions] options
245
+ # Request-specific options
246
+ #
247
+ # @yield [result, err] Result & error if block supplied
248
+ # @yieldparam result [Google::Apis::DriveV2::ChangeList] parsed result object
249
+ # @yieldparam err [StandardError] error object if request failed
250
+ #
251
+ # @return [Google::Apis::DriveV2::ChangeList]
252
+ #
253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
256
+ def list_changes(include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
257
+ command = make_simple_command(:get, 'changes', options)
258
+ command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
259
+ command.response_class = Google::Apis::DriveV2::ChangeList
260
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
261
+ command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
262
+ command.query['maxResults'] = max_results unless max_results.nil?
263
+ command.query['pageToken'] = page_token unless page_token.nil?
264
+ command.query['spaces'] = spaces unless spaces.nil?
265
+ command.query['startChangeId'] = start_change_id unless start_change_id.nil?
266
+ command.query['fields'] = fields unless fields.nil?
267
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
268
+ command.query['userIp'] = user_ip unless user_ip.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Subscribe to changes for a user.
273
+ # @param [Google::Apis::DriveV2::Channel] channel_object
274
+ # @param [Boolean] include_deleted
275
+ # Whether to include deleted items.
276
+ # @param [Boolean] include_subscribed
277
+ # Whether to include public files the user has opened and shared files. When set
278
+ # to false, the list only includes owned files plus any shared or public files
279
+ # the user has explicitly added to a folder they own.
280
+ # @param [Fixnum] max_results
281
+ # Maximum number of changes to return.
282
+ # @param [String] page_token
283
+ # Page token for changes.
284
+ # @param [String] spaces
285
+ # A comma-separated list of spaces to query. Supported values are 'drive', '
286
+ # appDataFolder' and 'photos'.
287
+ # @param [String] start_change_id
288
+ # Change ID to start listing changes from.
289
+ # @param [String] fields
290
+ # Selector specifying which fields to include in a partial response.
291
+ # @param [String] quota_user
292
+ # Available to use for quota purposes for server-side applications. Can be any
293
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
294
+ # Overrides userIp if both are provided.
295
+ # @param [String] user_ip
296
+ # IP address of the site where the request originates. Use this if you want to
297
+ # enforce per-user limits.
298
+ # @param [Google::Apis::RequestOptions] options
299
+ # Request-specific options
300
+ #
301
+ # @yield [result, err] Result & error if block supplied
302
+ # @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
303
+ # @yieldparam err [StandardError] error object if request failed
304
+ #
305
+ # @return [Google::Apis::DriveV2::Channel]
306
+ #
307
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
308
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
309
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
310
+ def watch_change(channel_object = nil, include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
311
+ command = make_simple_command(:post, 'changes/watch', options)
312
+ command.request_representation = Google::Apis::DriveV2::Channel::Representation
313
+ command.request_object = channel_object
314
+ command.response_representation = Google::Apis::DriveV2::Channel::Representation
315
+ command.response_class = Google::Apis::DriveV2::Channel
316
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
317
+ command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
318
+ command.query['maxResults'] = max_results unless max_results.nil?
319
+ command.query['pageToken'] = page_token unless page_token.nil?
320
+ command.query['spaces'] = spaces unless spaces.nil?
321
+ command.query['startChangeId'] = start_change_id unless start_change_id.nil?
322
+ command.query['fields'] = fields unless fields.nil?
323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
324
+ command.query['userIp'] = user_ip unless user_ip.nil?
325
+ execute_or_queue_command(command, &block)
326
+ end
327
+
328
+ # Stop watching resources through this channel
329
+ # @param [Google::Apis::DriveV2::Channel] channel_object
330
+ # @param [String] fields
331
+ # Selector specifying which fields to include in a partial response.
332
+ # @param [String] quota_user
333
+ # Available to use for quota purposes for server-side applications. Can be any
334
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
335
+ # Overrides userIp if both are provided.
336
+ # @param [String] user_ip
337
+ # IP address of the site where the request originates. Use this if you want to
338
+ # enforce per-user limits.
339
+ # @param [Google::Apis::RequestOptions] options
340
+ # Request-specific options
341
+ #
342
+ # @yield [result, err] Result & error if block supplied
343
+ # @yieldparam result [NilClass] No result returned for this method
344
+ # @yieldparam err [StandardError] error object if request failed
345
+ #
346
+ # @return [void]
347
+ #
348
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
349
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
350
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
351
+ def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
352
+ command = make_simple_command(:post, 'channels/stop', options)
353
+ command.request_representation = Google::Apis::DriveV2::Channel::Representation
354
+ command.request_object = channel_object
355
+ command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
357
+ command.query['userIp'] = user_ip unless user_ip.nil?
358
+ execute_or_queue_command(command, &block)
359
+ end
360
+
361
+ # Removes a child from a folder.
362
+ # @param [String] folder_id
363
+ # The ID of the folder.
364
+ # @param [String] child_id
365
+ # The ID of the child.
366
+ # @param [String] fields
367
+ # Selector specifying which fields to include in a partial response.
368
+ # @param [String] quota_user
369
+ # Available to use for quota purposes for server-side applications. Can be any
370
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
371
+ # Overrides userIp if both are provided.
372
+ # @param [String] user_ip
373
+ # IP address of the site where the request originates. Use this if you want to
374
+ # enforce per-user limits.
375
+ # @param [Google::Apis::RequestOptions] options
376
+ # Request-specific options
377
+ #
378
+ # @yield [result, err] Result & error if block supplied
379
+ # @yieldparam result [NilClass] No result returned for this method
380
+ # @yieldparam err [StandardError] error object if request failed
381
+ #
382
+ # @return [void]
383
+ #
384
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
385
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
386
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
387
+ def delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
388
+ command = make_simple_command(:delete, 'files/{folderId}/children/{childId}', options)
389
+ command.params['folderId'] = folder_id unless folder_id.nil?
390
+ command.params['childId'] = child_id unless child_id.nil?
391
+ command.query['fields'] = fields unless fields.nil?
392
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
393
+ command.query['userIp'] = user_ip unless user_ip.nil?
394
+ execute_or_queue_command(command, &block)
395
+ end
396
+
397
+ # Gets a specific child reference.
398
+ # @param [String] folder_id
399
+ # The ID of the folder.
400
+ # @param [String] child_id
401
+ # The ID of the child.
402
+ # @param [String] fields
403
+ # Selector specifying which fields to include in a partial response.
404
+ # @param [String] quota_user
405
+ # Available to use for quota purposes for server-side applications. Can be any
406
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
407
+ # Overrides userIp if both are provided.
408
+ # @param [String] user_ip
409
+ # IP address of the site where the request originates. Use this if you want to
410
+ # enforce per-user limits.
411
+ # @param [Google::Apis::RequestOptions] options
412
+ # Request-specific options
413
+ #
414
+ # @yield [result, err] Result & error if block supplied
415
+ # @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [Google::Apis::DriveV2::ChildReference]
419
+ #
420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
423
+ def get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
424
+ command = make_simple_command(:get, 'files/{folderId}/children/{childId}', options)
425
+ command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
426
+ command.response_class = Google::Apis::DriveV2::ChildReference
427
+ command.params['folderId'] = folder_id unless folder_id.nil?
428
+ command.params['childId'] = child_id unless child_id.nil?
429
+ command.query['fields'] = fields unless fields.nil?
430
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
431
+ command.query['userIp'] = user_ip unless user_ip.nil?
432
+ execute_or_queue_command(command, &block)
433
+ end
434
+
435
+ # Inserts a file into a folder.
436
+ # @param [String] folder_id
437
+ # The ID of the folder.
438
+ # @param [Google::Apis::DriveV2::ChildReference] child_reference_object
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # Overrides userIp if both are provided.
445
+ # @param [String] user_ip
446
+ # IP address of the site where the request originates. Use this if you want to
447
+ # enforce per-user limits.
448
+ # @param [Google::Apis::RequestOptions] options
449
+ # Request-specific options
450
+ #
451
+ # @yield [result, err] Result & error if block supplied
452
+ # @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
453
+ # @yieldparam err [StandardError] error object if request failed
454
+ #
455
+ # @return [Google::Apis::DriveV2::ChildReference]
456
+ #
457
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
460
+ def insert_child(folder_id, child_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
461
+ command = make_simple_command(:post, 'files/{folderId}/children', options)
462
+ command.request_representation = Google::Apis::DriveV2::ChildReference::Representation
463
+ command.request_object = child_reference_object
464
+ command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
465
+ command.response_class = Google::Apis::DriveV2::ChildReference
466
+ command.params['folderId'] = folder_id unless folder_id.nil?
467
+ command.query['fields'] = fields unless fields.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ command.query['userIp'] = user_ip unless user_ip.nil?
470
+ execute_or_queue_command(command, &block)
471
+ end
472
+
473
+ # Lists a folder's children.
474
+ # @param [String] folder_id
475
+ # The ID of the folder.
476
+ # @param [Fixnum] max_results
477
+ # Maximum number of children to return.
478
+ # @param [String] order_by
479
+ # A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', '
480
+ # lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', '
481
+ # recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending
482
+ # by default, but may be reversed with the 'desc' modifier. Example usage: ?
483
+ # orderBy=folder,modifiedDate desc,title. Please note that there is a current
484
+ # limitation for users with approximately one million files in which the
485
+ # requested sort order is ignored.
486
+ # @param [String] page_token
487
+ # Page token for children.
488
+ # @param [String] q
489
+ # Query string for searching children.
490
+ # @param [String] fields
491
+ # Selector specifying which fields to include in a partial response.
492
+ # @param [String] quota_user
493
+ # Available to use for quota purposes for server-side applications. Can be any
494
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
495
+ # Overrides userIp if both are provided.
496
+ # @param [String] user_ip
497
+ # IP address of the site where the request originates. Use this if you want to
498
+ # enforce per-user limits.
499
+ # @param [Google::Apis::RequestOptions] options
500
+ # Request-specific options
501
+ #
502
+ # @yield [result, err] Result & error if block supplied
503
+ # @yieldparam result [Google::Apis::DriveV2::ChildList] parsed result object
504
+ # @yieldparam err [StandardError] error object if request failed
505
+ #
506
+ # @return [Google::Apis::DriveV2::ChildList]
507
+ #
508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
511
+ def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
512
+ command = make_simple_command(:get, 'files/{folderId}/children', options)
513
+ command.response_representation = Google::Apis::DriveV2::ChildList::Representation
514
+ command.response_class = Google::Apis::DriveV2::ChildList
515
+ command.params['folderId'] = folder_id unless folder_id.nil?
516
+ command.query['maxResults'] = max_results unless max_results.nil?
517
+ command.query['orderBy'] = order_by unless order_by.nil?
518
+ command.query['pageToken'] = page_token unless page_token.nil?
519
+ command.query['q'] = q unless q.nil?
520
+ command.query['fields'] = fields unless fields.nil?
521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
522
+ command.query['userIp'] = user_ip unless user_ip.nil?
523
+ execute_or_queue_command(command, &block)
524
+ end
525
+
526
+ # Deletes a comment.
527
+ # @param [String] file_id
528
+ # The ID of the file.
529
+ # @param [String] comment_id
530
+ # The ID of the comment.
531
+ # @param [String] fields
532
+ # Selector specifying which fields to include in a partial response.
533
+ # @param [String] quota_user
534
+ # Available to use for quota purposes for server-side applications. Can be any
535
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
536
+ # Overrides userIp if both are provided.
537
+ # @param [String] user_ip
538
+ # IP address of the site where the request originates. Use this if you want to
539
+ # enforce per-user limits.
540
+ # @param [Google::Apis::RequestOptions] options
541
+ # Request-specific options
542
+ #
543
+ # @yield [result, err] Result & error if block supplied
544
+ # @yieldparam result [NilClass] No result returned for this method
545
+ # @yieldparam err [StandardError] error object if request failed
546
+ #
547
+ # @return [void]
548
+ #
549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
552
+ def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
553
+ command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
554
+ command.params['fileId'] = file_id unless file_id.nil?
555
+ command.params['commentId'] = comment_id unless comment_id.nil?
556
+ command.query['fields'] = fields unless fields.nil?
557
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
558
+ command.query['userIp'] = user_ip unless user_ip.nil?
559
+ execute_or_queue_command(command, &block)
560
+ end
561
+
562
+ # Gets a comment by ID.
563
+ # @param [String] file_id
564
+ # The ID of the file.
565
+ # @param [String] comment_id
566
+ # The ID of the comment.
567
+ # @param [Boolean] include_deleted
568
+ # If set, this will succeed when retrieving a deleted comment, and will include
569
+ # any deleted replies.
570
+ # @param [String] fields
571
+ # Selector specifying which fields to include in a partial response.
572
+ # @param [String] quota_user
573
+ # Available to use for quota purposes for server-side applications. Can be any
574
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
575
+ # Overrides userIp if both are provided.
576
+ # @param [String] user_ip
577
+ # IP address of the site where the request originates. Use this if you want to
578
+ # enforce per-user limits.
579
+ # @param [Google::Apis::RequestOptions] options
580
+ # Request-specific options
581
+ #
582
+ # @yield [result, err] Result & error if block supplied
583
+ # @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
584
+ # @yieldparam err [StandardError] error object if request failed
585
+ #
586
+ # @return [Google::Apis::DriveV2::Comment]
587
+ #
588
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
589
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
590
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
591
+ def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
592
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
593
+ command.response_representation = Google::Apis::DriveV2::Comment::Representation
594
+ command.response_class = Google::Apis::DriveV2::Comment
595
+ command.params['fileId'] = file_id unless file_id.nil?
596
+ command.params['commentId'] = comment_id unless comment_id.nil?
597
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
598
+ command.query['fields'] = fields unless fields.nil?
599
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
600
+ command.query['userIp'] = user_ip unless user_ip.nil?
601
+ execute_or_queue_command(command, &block)
602
+ end
603
+
604
+ # Creates a new comment on the given file.
605
+ # @param [String] file_id
606
+ # The ID of the file.
607
+ # @param [Google::Apis::DriveV2::Comment] comment_object
608
+ # @param [String] fields
609
+ # Selector specifying which fields to include in a partial response.
610
+ # @param [String] quota_user
611
+ # Available to use for quota purposes for server-side applications. Can be any
612
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
613
+ # Overrides userIp if both are provided.
614
+ # @param [String] user_ip
615
+ # IP address of the site where the request originates. Use this if you want to
616
+ # enforce per-user limits.
617
+ # @param [Google::Apis::RequestOptions] options
618
+ # Request-specific options
619
+ #
620
+ # @yield [result, err] Result & error if block supplied
621
+ # @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
622
+ # @yieldparam err [StandardError] error object if request failed
623
+ #
624
+ # @return [Google::Apis::DriveV2::Comment]
625
+ #
626
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
627
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
628
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
629
+ def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
630
+ command = make_simple_command(:post, 'files/{fileId}/comments', options)
631
+ command.request_representation = Google::Apis::DriveV2::Comment::Representation
632
+ command.request_object = comment_object
633
+ command.response_representation = Google::Apis::DriveV2::Comment::Representation
634
+ command.response_class = Google::Apis::DriveV2::Comment
635
+ command.params['fileId'] = file_id unless file_id.nil?
636
+ command.query['fields'] = fields unless fields.nil?
637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ command.query['userIp'] = user_ip unless user_ip.nil?
639
+ execute_or_queue_command(command, &block)
640
+ end
641
+
642
+ # Lists a file's comments.
643
+ # @param [String] file_id
644
+ # The ID of the file.
645
+ # @param [Boolean] include_deleted
646
+ # If set, all comments and replies, including deleted comments and replies (with
647
+ # content stripped) will be returned.
648
+ # @param [Fixnum] max_results
649
+ # The maximum number of discussions to include in the response, used for paging.
650
+ # @param [String] page_token
651
+ # The continuation token, used to page through large result sets. To get the
652
+ # next page of results, set this parameter to the value of "nextPageToken" from
653
+ # the previous response.
654
+ # @param [String] updated_min
655
+ # Only discussions that were updated after this timestamp will be returned.
656
+ # Formatted as an RFC 3339 timestamp.
657
+ # @param [String] fields
658
+ # Selector specifying which fields to include in a partial response.
659
+ # @param [String] quota_user
660
+ # Available to use for quota purposes for server-side applications. Can be any
661
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
662
+ # Overrides userIp if both are provided.
663
+ # @param [String] user_ip
664
+ # IP address of the site where the request originates. Use this if you want to
665
+ # enforce per-user limits.
666
+ # @param [Google::Apis::RequestOptions] options
667
+ # Request-specific options
668
+ #
669
+ # @yield [result, err] Result & error if block supplied
670
+ # @yieldparam result [Google::Apis::DriveV2::CommentList] parsed result object
671
+ # @yieldparam err [StandardError] error object if request failed
672
+ #
673
+ # @return [Google::Apis::DriveV2::CommentList]
674
+ #
675
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
676
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
677
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
678
+ def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
679
+ command = make_simple_command(:get, 'files/{fileId}/comments', options)
680
+ command.response_representation = Google::Apis::DriveV2::CommentList::Representation
681
+ command.response_class = Google::Apis::DriveV2::CommentList
682
+ command.params['fileId'] = file_id unless file_id.nil?
683
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
684
+ command.query['maxResults'] = max_results unless max_results.nil?
685
+ command.query['pageToken'] = page_token unless page_token.nil?
686
+ command.query['updatedMin'] = updated_min unless updated_min.nil?
687
+ command.query['fields'] = fields unless fields.nil?
688
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
689
+ command.query['userIp'] = user_ip unless user_ip.nil?
690
+ execute_or_queue_command(command, &block)
691
+ end
692
+
693
+ # Updates an existing comment. This method supports patch semantics.
694
+ # @param [String] file_id
695
+ # The ID of the file.
696
+ # @param [String] comment_id
697
+ # The ID of the comment.
698
+ # @param [Google::Apis::DriveV2::Comment] comment_object
699
+ # @param [String] fields
700
+ # Selector specifying which fields to include in a partial response.
701
+ # @param [String] quota_user
702
+ # Available to use for quota purposes for server-side applications. Can be any
703
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
704
+ # Overrides userIp if both are provided.
705
+ # @param [String] user_ip
706
+ # IP address of the site where the request originates. Use this if you want to
707
+ # enforce per-user limits.
708
+ # @param [Google::Apis::RequestOptions] options
709
+ # Request-specific options
710
+ #
711
+ # @yield [result, err] Result & error if block supplied
712
+ # @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
713
+ # @yieldparam err [StandardError] error object if request failed
714
+ #
715
+ # @return [Google::Apis::DriveV2::Comment]
716
+ #
717
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
718
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
719
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
720
+ def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
721
+ command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
722
+ command.request_representation = Google::Apis::DriveV2::Comment::Representation
723
+ command.request_object = comment_object
724
+ command.response_representation = Google::Apis::DriveV2::Comment::Representation
725
+ command.response_class = Google::Apis::DriveV2::Comment
726
+ command.params['fileId'] = file_id unless file_id.nil?
727
+ command.params['commentId'] = comment_id unless comment_id.nil?
728
+ command.query['fields'] = fields unless fields.nil?
729
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
730
+ command.query['userIp'] = user_ip unless user_ip.nil?
731
+ execute_or_queue_command(command, &block)
732
+ end
733
+
734
+ # Updates an existing comment.
735
+ # @param [String] file_id
736
+ # The ID of the file.
737
+ # @param [String] comment_id
738
+ # The ID of the comment.
739
+ # @param [Google::Apis::DriveV2::Comment] comment_object
740
+ # @param [String] fields
741
+ # Selector specifying which fields to include in a partial response.
742
+ # @param [String] quota_user
743
+ # Available to use for quota purposes for server-side applications. Can be any
744
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
745
+ # Overrides userIp if both are provided.
746
+ # @param [String] user_ip
747
+ # IP address of the site where the request originates. Use this if you want to
748
+ # enforce per-user limits.
749
+ # @param [Google::Apis::RequestOptions] options
750
+ # Request-specific options
751
+ #
752
+ # @yield [result, err] Result & error if block supplied
753
+ # @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
754
+ # @yieldparam err [StandardError] error object if request failed
755
+ #
756
+ # @return [Google::Apis::DriveV2::Comment]
757
+ #
758
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
759
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
760
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
761
+ def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
762
+ command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}', options)
763
+ command.request_representation = Google::Apis::DriveV2::Comment::Representation
764
+ command.request_object = comment_object
765
+ command.response_representation = Google::Apis::DriveV2::Comment::Representation
766
+ command.response_class = Google::Apis::DriveV2::Comment
767
+ command.params['fileId'] = file_id unless file_id.nil?
768
+ command.params['commentId'] = comment_id unless comment_id.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
+ # Creates a copy of the specified file.
776
+ # @param [String] file_id
777
+ # The ID of the file to copy.
778
+ # @param [Google::Apis::DriveV2::File] file_object
779
+ # @param [Boolean] convert
780
+ # Whether to convert this file to the corresponding Google Docs format.
781
+ # @param [Boolean] ocr
782
+ # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
783
+ # @param [String] ocr_language
784
+ # If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
785
+ # @param [Boolean] pinned
786
+ # Whether to pin the head revision of the new copy. A file can have a maximum of
787
+ # 200 pinned revisions.
788
+ # @param [String] timed_text_language
789
+ # The language of the timed text.
790
+ # @param [String] timed_text_track_name
791
+ # The timed text track name.
792
+ # @param [String] visibility
793
+ # The visibility of the new file. This parameter is only relevant when the
794
+ # source is not a native Google Doc and convert=false.
795
+ # @param [String] fields
796
+ # Selector specifying which fields to include in a partial response.
797
+ # @param [String] quota_user
798
+ # Available to use for quota purposes for server-side applications. Can be any
799
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
800
+ # Overrides userIp if both are provided.
801
+ # @param [String] user_ip
802
+ # IP address of the site where the request originates. Use this if you want to
803
+ # enforce per-user limits.
804
+ # @param [Google::Apis::RequestOptions] options
805
+ # Request-specific options
806
+ #
807
+ # @yield [result, err] Result & error if block supplied
808
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
809
+ # @yieldparam err [StandardError] error object if request failed
810
+ #
811
+ # @return [Google::Apis::DriveV2::File]
812
+ #
813
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
814
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
815
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
816
+ def copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
817
+ command = make_simple_command(:post, 'files/{fileId}/copy', options)
818
+ command.request_representation = Google::Apis::DriveV2::File::Representation
819
+ command.request_object = file_object
820
+ command.response_representation = Google::Apis::DriveV2::File::Representation
821
+ command.response_class = Google::Apis::DriveV2::File
822
+ command.params['fileId'] = file_id unless file_id.nil?
823
+ command.query['convert'] = convert unless convert.nil?
824
+ command.query['ocr'] = ocr unless ocr.nil?
825
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
826
+ command.query['pinned'] = pinned unless pinned.nil?
827
+ command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
828
+ command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
829
+ command.query['visibility'] = visibility unless visibility.nil?
830
+ command.query['fields'] = fields unless fields.nil?
831
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
832
+ command.query['userIp'] = user_ip unless user_ip.nil?
833
+ execute_or_queue_command(command, &block)
834
+ end
835
+
836
+ # Permanently deletes a file by ID. Skips the trash. The currently authenticated
837
+ # user must own the file.
838
+ # @param [String] file_id
839
+ # The ID of the file to delete.
840
+ # @param [String] fields
841
+ # Selector specifying which fields to include in a partial response.
842
+ # @param [String] quota_user
843
+ # Available to use for quota purposes for server-side applications. Can be any
844
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
845
+ # Overrides userIp if both are provided.
846
+ # @param [String] user_ip
847
+ # IP address of the site where the request originates. Use this if you want to
848
+ # enforce per-user limits.
849
+ # @param [Google::Apis::RequestOptions] options
850
+ # Request-specific options
851
+ #
852
+ # @yield [result, err] Result & error if block supplied
853
+ # @yieldparam result [NilClass] No result returned for this method
854
+ # @yieldparam err [StandardError] error object if request failed
855
+ #
856
+ # @return [void]
857
+ #
858
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
859
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
860
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
861
+ def delete_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
862
+ command = make_simple_command(:delete, 'files/{fileId}', options)
863
+ command.params['fileId'] = file_id unless file_id.nil?
864
+ command.query['fields'] = fields unless fields.nil?
865
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
866
+ command.query['userIp'] = user_ip unless user_ip.nil?
867
+ execute_or_queue_command(command, &block)
868
+ end
869
+
870
+ # Permanently deletes all of the user's trashed files.
871
+ # @param [String] fields
872
+ # Selector specifying which fields to include in a partial response.
873
+ # @param [String] quota_user
874
+ # Available to use for quota purposes for server-side applications. Can be any
875
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
876
+ # Overrides userIp if both are provided.
877
+ # @param [String] user_ip
878
+ # IP address of the site where the request originates. Use this if you want to
879
+ # enforce per-user limits.
880
+ # @param [Google::Apis::RequestOptions] options
881
+ # Request-specific options
882
+ #
883
+ # @yield [result, err] Result & error if block supplied
884
+ # @yieldparam result [NilClass] No result returned for this method
885
+ # @yieldparam err [StandardError] error object if request failed
886
+ #
887
+ # @return [void]
888
+ #
889
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
890
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
891
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
892
+ def empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
893
+ command = make_simple_command(:delete, 'files/trash', options)
894
+ command.query['fields'] = fields unless fields.nil?
895
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
896
+ command.query['userIp'] = user_ip unless user_ip.nil?
897
+ execute_or_queue_command(command, &block)
898
+ end
899
+
900
+ # Exports a Google Doc to the requested MIME type and returns the exported
901
+ # content.
902
+ # @param [String] file_id
903
+ # The ID of the file.
904
+ # @param [String] mime_type
905
+ # The MIME type of the format requested for this export.
906
+ # @param [String] fields
907
+ # Selector specifying which fields to include in a partial response.
908
+ # @param [String] quota_user
909
+ # Available to use for quota purposes for server-side applications. Can be any
910
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
911
+ # Overrides userIp if both are provided.
912
+ # @param [String] user_ip
913
+ # IP address of the site where the request originates. Use this if you want to
914
+ # enforce per-user limits.
915
+ # @param [IO, String] download_dest
916
+ # IO stream or filename to receive content download
917
+ # @param [Google::Apis::RequestOptions] options
918
+ # Request-specific options
919
+ #
920
+ # @yield [result, err] Result & error if block supplied
921
+ # @yieldparam result [NilClass] No result returned for this method
922
+ # @yieldparam err [StandardError] error object if request failed
923
+ #
924
+ # @return [void]
925
+ #
926
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
927
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
928
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
929
+ def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
930
+ if download_dest.nil?
931
+ command = make_simple_command(:get, 'files/{fileId}/export', options)
932
+ else
933
+ command = make_download_command(:get, 'files/{fileId}/export', options)
934
+ command.download_dest = download_dest
935
+ end
936
+ command.params['fileId'] = file_id unless file_id.nil?
937
+ command.query['mimeType'] = mime_type unless mime_type.nil?
938
+ command.query['fields'] = fields unless fields.nil?
939
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
940
+ command.query['userIp'] = user_ip unless user_ip.nil?
941
+ execute_or_queue_command(command, &block)
942
+ end
943
+
944
+ # Generates a set of file IDs which can be provided in insert requests.
945
+ # @param [Fixnum] max_results
946
+ # Maximum number of IDs to return.
947
+ # @param [String] space
948
+ # The space in which the IDs can be used to create new files. Supported values
949
+ # are 'drive' and 'appDataFolder'.
950
+ # @param [String] fields
951
+ # Selector specifying which fields to include in a partial response.
952
+ # @param [String] quota_user
953
+ # Available to use for quota purposes for server-side applications. Can be any
954
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
955
+ # Overrides userIp if both are provided.
956
+ # @param [String] user_ip
957
+ # IP address of the site where the request originates. Use this if you want to
958
+ # enforce per-user limits.
959
+ # @param [Google::Apis::RequestOptions] options
960
+ # Request-specific options
961
+ #
962
+ # @yield [result, err] Result & error if block supplied
963
+ # @yieldparam result [Google::Apis::DriveV2::GeneratedIds] parsed result object
964
+ # @yieldparam err [StandardError] error object if request failed
965
+ #
966
+ # @return [Google::Apis::DriveV2::GeneratedIds]
967
+ #
968
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
969
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
970
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
971
+ def generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
972
+ command = make_simple_command(:get, 'files/generateIds', options)
973
+ command.response_representation = Google::Apis::DriveV2::GeneratedIds::Representation
974
+ command.response_class = Google::Apis::DriveV2::GeneratedIds
975
+ command.query['maxResults'] = max_results unless max_results.nil?
976
+ command.query['space'] = space unless space.nil?
977
+ command.query['fields'] = fields unless fields.nil?
978
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
979
+ command.query['userIp'] = user_ip unless user_ip.nil?
980
+ execute_or_queue_command(command, &block)
981
+ end
982
+
983
+ # Gets a file's metadata by ID.
984
+ # @param [String] file_id
985
+ # The ID for the file in question.
986
+ # @param [Boolean] acknowledge_abuse
987
+ # Whether the user is acknowledging the risk of downloading known malware or
988
+ # other abusive files.
989
+ # @param [String] projection
990
+ # This parameter is deprecated and has no function.
991
+ # @param [String] revision_id
992
+ # Specifies the Revision ID that should be downloaded. Ignored unless alt=media
993
+ # is specified.
994
+ # @param [Boolean] update_viewed_date
995
+ # Deprecated: Use files.update with modifiedDateBehavior=noChange,
996
+ # updateViewedDate=true and an empty request body.
997
+ # @param [String] fields
998
+ # Selector specifying which fields to include in a partial response.
999
+ # @param [String] quota_user
1000
+ # Available to use for quota purposes for server-side applications. Can be any
1001
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1002
+ # Overrides userIp if both are provided.
1003
+ # @param [String] user_ip
1004
+ # IP address of the site where the request originates. Use this if you want to
1005
+ # enforce per-user limits.
1006
+ # @param [IO, String] download_dest
1007
+ # IO stream or filename to receive content download
1008
+ # @param [Google::Apis::RequestOptions] options
1009
+ # Request-specific options
1010
+ #
1011
+ # @yield [result, err] Result & error if block supplied
1012
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1013
+ # @yieldparam err [StandardError] error object if request failed
1014
+ #
1015
+ # @return [Google::Apis::DriveV2::File]
1016
+ #
1017
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1018
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1019
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1020
+ def get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1021
+ if download_dest.nil?
1022
+ command = make_simple_command(:get, 'files/{fileId}', options)
1023
+ else
1024
+ command = make_download_command(:get, 'files/{fileId}', options)
1025
+ command.download_dest = download_dest
1026
+ end
1027
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1028
+ command.response_class = Google::Apis::DriveV2::File
1029
+ command.params['fileId'] = file_id unless file_id.nil?
1030
+ command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
1031
+ command.query['projection'] = projection unless projection.nil?
1032
+ command.query['revisionId'] = revision_id unless revision_id.nil?
1033
+ command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
1034
+ command.query['fields'] = fields unless fields.nil?
1035
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1036
+ command.query['userIp'] = user_ip unless user_ip.nil?
1037
+ execute_or_queue_command(command, &block)
1038
+ end
1039
+
1040
+ # Insert a new file.
1041
+ # @param [Google::Apis::DriveV2::File] file_object
1042
+ # @param [Boolean] convert
1043
+ # Whether to convert this file to the corresponding Google Docs format.
1044
+ # @param [Boolean] ocr
1045
+ # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1046
+ # @param [String] ocr_language
1047
+ # If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1048
+ # @param [Boolean] pinned
1049
+ # Whether to pin the head revision of the uploaded file. A file can have a
1050
+ # maximum of 200 pinned revisions.
1051
+ # @param [String] timed_text_language
1052
+ # The language of the timed text.
1053
+ # @param [String] timed_text_track_name
1054
+ # The timed text track name.
1055
+ # @param [Boolean] use_content_as_indexable_text
1056
+ # Whether to use the content as indexable text.
1057
+ # @param [String] visibility
1058
+ # The visibility of the new file. This parameter is only relevant when convert=
1059
+ # false.
1060
+ # @param [String] fields
1061
+ # Selector specifying which fields to include in a partial response.
1062
+ # @param [String] quota_user
1063
+ # Available to use for quota purposes for server-side applications. Can be any
1064
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1065
+ # Overrides userIp if both are provided.
1066
+ # @param [String] user_ip
1067
+ # IP address of the site where the request originates. Use this if you want to
1068
+ # enforce per-user limits.
1069
+ # @param [IO, String] upload_source
1070
+ # IO stream or filename containing content to upload
1071
+ # @param [String] content_type
1072
+ # Content type of the uploaded content.
1073
+ # @param [Google::Apis::RequestOptions] options
1074
+ # Request-specific options
1075
+ #
1076
+ # @yield [result, err] Result & error if block supplied
1077
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1078
+ # @yieldparam err [StandardError] error object if request failed
1079
+ #
1080
+ # @return [Google::Apis::DriveV2::File]
1081
+ #
1082
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1083
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1084
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1085
+ def insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1086
+ if upload_source.nil?
1087
+ command = make_simple_command(:post, 'files', options)
1088
+ else
1089
+ command = make_upload_command(:post, 'files', options)
1090
+ command.upload_source = upload_source
1091
+ command.upload_content_type = content_type
1092
+ end
1093
+ command.request_representation = Google::Apis::DriveV2::File::Representation
1094
+ command.request_object = file_object
1095
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1096
+ command.response_class = Google::Apis::DriveV2::File
1097
+ command.query['convert'] = convert unless convert.nil?
1098
+ command.query['ocr'] = ocr unless ocr.nil?
1099
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
1100
+ command.query['pinned'] = pinned unless pinned.nil?
1101
+ command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
1102
+ command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
1103
+ command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
1104
+ command.query['visibility'] = visibility unless visibility.nil?
1105
+ command.query['fields'] = fields unless fields.nil?
1106
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1107
+ command.query['userIp'] = user_ip unless user_ip.nil?
1108
+ execute_or_queue_command(command, &block)
1109
+ end
1110
+
1111
+ # Lists the user's files.
1112
+ # @param [String] corpus
1113
+ # The body of items (files/documents) to which the query applies.
1114
+ # @param [Fixnum] max_results
1115
+ # Maximum number of files to return.
1116
+ # @param [String] order_by
1117
+ # A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', '
1118
+ # lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', '
1119
+ # recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending
1120
+ # by default, but may be reversed with the 'desc' modifier. Example usage: ?
1121
+ # orderBy=folder,modifiedDate desc,title. Please note that there is a current
1122
+ # limitation for users with approximately one million files in which the
1123
+ # requested sort order is ignored.
1124
+ # @param [String] page_token
1125
+ # Page token for files.
1126
+ # @param [String] projection
1127
+ # This parameter is deprecated and has no function.
1128
+ # @param [String] q
1129
+ # Query string for searching files.
1130
+ # @param [String] spaces
1131
+ # A comma-separated list of spaces to query. Supported values are 'drive', '
1132
+ # appDataFolder' and 'photos'.
1133
+ # @param [String] fields
1134
+ # Selector specifying which fields to include in a partial response.
1135
+ # @param [String] quota_user
1136
+ # Available to use for quota purposes for server-side applications. Can be any
1137
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1138
+ # Overrides userIp if both are provided.
1139
+ # @param [String] user_ip
1140
+ # IP address of the site where the request originates. Use this if you want to
1141
+ # enforce per-user limits.
1142
+ # @param [Google::Apis::RequestOptions] options
1143
+ # Request-specific options
1144
+ #
1145
+ # @yield [result, err] Result & error if block supplied
1146
+ # @yieldparam result [Google::Apis::DriveV2::FileList] parsed result object
1147
+ # @yieldparam err [StandardError] error object if request failed
1148
+ #
1149
+ # @return [Google::Apis::DriveV2::FileList]
1150
+ #
1151
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1152
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1153
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1154
+ def list_files(corpus: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1155
+ command = make_simple_command(:get, 'files', options)
1156
+ command.response_representation = Google::Apis::DriveV2::FileList::Representation
1157
+ command.response_class = Google::Apis::DriveV2::FileList
1158
+ command.query['corpus'] = corpus unless corpus.nil?
1159
+ command.query['maxResults'] = max_results unless max_results.nil?
1160
+ command.query['orderBy'] = order_by unless order_by.nil?
1161
+ command.query['pageToken'] = page_token unless page_token.nil?
1162
+ command.query['projection'] = projection unless projection.nil?
1163
+ command.query['q'] = q unless q.nil?
1164
+ command.query['spaces'] = spaces unless spaces.nil?
1165
+ command.query['fields'] = fields unless fields.nil?
1166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1167
+ command.query['userIp'] = user_ip unless user_ip.nil?
1168
+ execute_or_queue_command(command, &block)
1169
+ end
1170
+
1171
+ # Updates file metadata and/or content. This method supports patch semantics.
1172
+ # @param [String] file_id
1173
+ # The ID of the file to update.
1174
+ # @param [Google::Apis::DriveV2::File] file_object
1175
+ # @param [String] add_parents
1176
+ # Comma-separated list of parent IDs to add.
1177
+ # @param [Boolean] convert
1178
+ # This parameter is deprecated and has no function.
1179
+ # @param [String] modified_date_behavior
1180
+ # Determines the behavior in which modifiedDate is updated. This overrides
1181
+ # setModifiedDate.
1182
+ # @param [Boolean] new_revision
1183
+ # Whether a blob upload should create a new revision. If false, the blob data in
1184
+ # the current head revision is replaced. If true or not set, a new blob is
1185
+ # created as head revision, and previous unpinned revisions are preserved for a
1186
+ # short period of time. Pinned revisions are stored indefinitely, using
1187
+ # additional storage quota, up to a maximum of 200 revisions. For details on how
1188
+ # revisions are retained, see the Drive Help Center.
1189
+ # @param [Boolean] ocr
1190
+ # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1191
+ # @param [String] ocr_language
1192
+ # If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1193
+ # @param [Boolean] pinned
1194
+ # Whether to pin the new revision. A file can have a maximum of 200 pinned
1195
+ # revisions.
1196
+ # @param [String] remove_parents
1197
+ # Comma-separated list of parent IDs to remove.
1198
+ # @param [Boolean] set_modified_date
1199
+ # Whether to set the modified date with the supplied modified date.
1200
+ # @param [String] timed_text_language
1201
+ # The language of the timed text.
1202
+ # @param [String] timed_text_track_name
1203
+ # The timed text track name.
1204
+ # @param [Boolean] update_viewed_date
1205
+ # Whether to update the view date after successfully updating the file.
1206
+ # @param [Boolean] use_content_as_indexable_text
1207
+ # Whether to use the content as indexable text.
1208
+ # @param [String] fields
1209
+ # Selector specifying which fields to include in a partial response.
1210
+ # @param [String] quota_user
1211
+ # Available to use for quota purposes for server-side applications. Can be any
1212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1213
+ # Overrides userIp if both are provided.
1214
+ # @param [String] user_ip
1215
+ # IP address of the site where the request originates. Use this if you want to
1216
+ # enforce per-user limits.
1217
+ # @param [Google::Apis::RequestOptions] options
1218
+ # Request-specific options
1219
+ #
1220
+ # @yield [result, err] Result & error if block supplied
1221
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1222
+ # @yieldparam err [StandardError] error object if request failed
1223
+ #
1224
+ # @return [Google::Apis::DriveV2::File]
1225
+ #
1226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1229
+ def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1230
+ command = make_simple_command(:patch, 'files/{fileId}', options)
1231
+ command.request_representation = Google::Apis::DriveV2::File::Representation
1232
+ command.request_object = file_object
1233
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1234
+ command.response_class = Google::Apis::DriveV2::File
1235
+ command.params['fileId'] = file_id unless file_id.nil?
1236
+ command.query['addParents'] = add_parents unless add_parents.nil?
1237
+ command.query['convert'] = convert unless convert.nil?
1238
+ command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
1239
+ command.query['newRevision'] = new_revision unless new_revision.nil?
1240
+ command.query['ocr'] = ocr unless ocr.nil?
1241
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
1242
+ command.query['pinned'] = pinned unless pinned.nil?
1243
+ command.query['removeParents'] = remove_parents unless remove_parents.nil?
1244
+ command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
1245
+ command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
1246
+ command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
1247
+ command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
1248
+ command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
1249
+ command.query['fields'] = fields unless fields.nil?
1250
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1251
+ command.query['userIp'] = user_ip unless user_ip.nil?
1252
+ execute_or_queue_command(command, &block)
1253
+ end
1254
+
1255
+ # Set the file's updated time to the current server time.
1256
+ # @param [String] file_id
1257
+ # The ID of the file to update.
1258
+ # @param [String] fields
1259
+ # Selector specifying which fields to include in a partial response.
1260
+ # @param [String] quota_user
1261
+ # Available to use for quota purposes for server-side applications. Can be any
1262
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1263
+ # Overrides userIp if both are provided.
1264
+ # @param [String] user_ip
1265
+ # IP address of the site where the request originates. Use this if you want to
1266
+ # enforce per-user limits.
1267
+ # @param [Google::Apis::RequestOptions] options
1268
+ # Request-specific options
1269
+ #
1270
+ # @yield [result, err] Result & error if block supplied
1271
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1272
+ # @yieldparam err [StandardError] error object if request failed
1273
+ #
1274
+ # @return [Google::Apis::DriveV2::File]
1275
+ #
1276
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1277
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1278
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1279
+ def touch_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1280
+ command = make_simple_command(:post, 'files/{fileId}/touch', options)
1281
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1282
+ command.response_class = Google::Apis::DriveV2::File
1283
+ command.params['fileId'] = file_id unless file_id.nil?
1284
+ command.query['fields'] = fields unless fields.nil?
1285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1286
+ command.query['userIp'] = user_ip unless user_ip.nil?
1287
+ execute_or_queue_command(command, &block)
1288
+ end
1289
+
1290
+ # Moves a file to the trash. The currently authenticated user must own the file.
1291
+ # @param [String] file_id
1292
+ # The ID of the file to trash.
1293
+ # @param [String] fields
1294
+ # Selector specifying which fields to include in a partial response.
1295
+ # @param [String] quota_user
1296
+ # Available to use for quota purposes for server-side applications. Can be any
1297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1298
+ # Overrides userIp if both are provided.
1299
+ # @param [String] user_ip
1300
+ # IP address of the site where the request originates. Use this if you want to
1301
+ # enforce per-user limits.
1302
+ # @param [Google::Apis::RequestOptions] options
1303
+ # Request-specific options
1304
+ #
1305
+ # @yield [result, err] Result & error if block supplied
1306
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1307
+ # @yieldparam err [StandardError] error object if request failed
1308
+ #
1309
+ # @return [Google::Apis::DriveV2::File]
1310
+ #
1311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1314
+ def trash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1315
+ command = make_simple_command(:post, 'files/{fileId}/trash', options)
1316
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1317
+ command.response_class = Google::Apis::DriveV2::File
1318
+ command.params['fileId'] = file_id unless file_id.nil?
1319
+ command.query['fields'] = fields unless fields.nil?
1320
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1321
+ command.query['userIp'] = user_ip unless user_ip.nil?
1322
+ execute_or_queue_command(command, &block)
1323
+ end
1324
+
1325
+ # Restores a file from the trash.
1326
+ # @param [String] file_id
1327
+ # The ID of the file to untrash.
1328
+ # @param [String] fields
1329
+ # Selector specifying which fields to include in a partial response.
1330
+ # @param [String] quota_user
1331
+ # Available to use for quota purposes for server-side applications. Can be any
1332
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1333
+ # Overrides userIp if both are provided.
1334
+ # @param [String] user_ip
1335
+ # IP address of the site where the request originates. Use this if you want to
1336
+ # enforce per-user limits.
1337
+ # @param [Google::Apis::RequestOptions] options
1338
+ # Request-specific options
1339
+ #
1340
+ # @yield [result, err] Result & error if block supplied
1341
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1342
+ # @yieldparam err [StandardError] error object if request failed
1343
+ #
1344
+ # @return [Google::Apis::DriveV2::File]
1345
+ #
1346
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1347
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1348
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1349
+ def untrash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1350
+ command = make_simple_command(:post, 'files/{fileId}/untrash', options)
1351
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1352
+ command.response_class = Google::Apis::DriveV2::File
1353
+ command.params['fileId'] = file_id unless file_id.nil?
1354
+ command.query['fields'] = fields unless fields.nil?
1355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1356
+ command.query['userIp'] = user_ip unless user_ip.nil?
1357
+ execute_or_queue_command(command, &block)
1358
+ end
1359
+
1360
+ # Updates file metadata and/or content.
1361
+ # @param [String] file_id
1362
+ # The ID of the file to update.
1363
+ # @param [Google::Apis::DriveV2::File] file_object
1364
+ # @param [String] add_parents
1365
+ # Comma-separated list of parent IDs to add.
1366
+ # @param [Boolean] convert
1367
+ # This parameter is deprecated and has no function.
1368
+ # @param [String] modified_date_behavior
1369
+ # Determines the behavior in which modifiedDate is updated. This overrides
1370
+ # setModifiedDate.
1371
+ # @param [Boolean] new_revision
1372
+ # Whether a blob upload should create a new revision. If false, the blob data in
1373
+ # the current head revision is replaced. If true or not set, a new blob is
1374
+ # created as head revision, and previous unpinned revisions are preserved for a
1375
+ # short period of time. Pinned revisions are stored indefinitely, using
1376
+ # additional storage quota, up to a maximum of 200 revisions. For details on how
1377
+ # revisions are retained, see the Drive Help Center.
1378
+ # @param [Boolean] ocr
1379
+ # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1380
+ # @param [String] ocr_language
1381
+ # If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1382
+ # @param [Boolean] pinned
1383
+ # Whether to pin the new revision. A file can have a maximum of 200 pinned
1384
+ # revisions.
1385
+ # @param [String] remove_parents
1386
+ # Comma-separated list of parent IDs to remove.
1387
+ # @param [Boolean] set_modified_date
1388
+ # Whether to set the modified date with the supplied modified date.
1389
+ # @param [String] timed_text_language
1390
+ # The language of the timed text.
1391
+ # @param [String] timed_text_track_name
1392
+ # The timed text track name.
1393
+ # @param [Boolean] update_viewed_date
1394
+ # Whether to update the view date after successfully updating the file.
1395
+ # @param [Boolean] use_content_as_indexable_text
1396
+ # Whether to use the content as indexable text.
1397
+ # @param [String] fields
1398
+ # Selector specifying which fields to include in a partial response.
1399
+ # @param [String] quota_user
1400
+ # Available to use for quota purposes for server-side applications. Can be any
1401
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1402
+ # Overrides userIp if both are provided.
1403
+ # @param [String] user_ip
1404
+ # IP address of the site where the request originates. Use this if you want to
1405
+ # enforce per-user limits.
1406
+ # @param [IO, String] upload_source
1407
+ # IO stream or filename containing content to upload
1408
+ # @param [String] content_type
1409
+ # Content type of the uploaded content.
1410
+ # @param [Google::Apis::RequestOptions] options
1411
+ # Request-specific options
1412
+ #
1413
+ # @yield [result, err] Result & error if block supplied
1414
+ # @yieldparam result [Google::Apis::DriveV2::File] parsed result object
1415
+ # @yieldparam err [StandardError] error object if request failed
1416
+ #
1417
+ # @return [Google::Apis::DriveV2::File]
1418
+ #
1419
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1420
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1421
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1422
+ def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1423
+ if upload_source.nil?
1424
+ command = make_simple_command(:put, 'files/{fileId}', options)
1425
+ else
1426
+ command = make_upload_command(:put, 'files/{fileId}', options)
1427
+ command.upload_source = upload_source
1428
+ command.upload_content_type = content_type
1429
+ end
1430
+ command.request_representation = Google::Apis::DriveV2::File::Representation
1431
+ command.request_object = file_object
1432
+ command.response_representation = Google::Apis::DriveV2::File::Representation
1433
+ command.response_class = Google::Apis::DriveV2::File
1434
+ command.params['fileId'] = file_id unless file_id.nil?
1435
+ command.query['addParents'] = add_parents unless add_parents.nil?
1436
+ command.query['convert'] = convert unless convert.nil?
1437
+ command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
1438
+ command.query['newRevision'] = new_revision unless new_revision.nil?
1439
+ command.query['ocr'] = ocr unless ocr.nil?
1440
+ command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
1441
+ command.query['pinned'] = pinned unless pinned.nil?
1442
+ command.query['removeParents'] = remove_parents unless remove_parents.nil?
1443
+ command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
1444
+ command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
1445
+ command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
1446
+ command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
1447
+ command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
1448
+ command.query['fields'] = fields unless fields.nil?
1449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1450
+ command.query['userIp'] = user_ip unless user_ip.nil?
1451
+ execute_or_queue_command(command, &block)
1452
+ end
1453
+
1454
+ # Subscribe to changes on a file
1455
+ # @param [String] file_id
1456
+ # The ID for the file in question.
1457
+ # @param [Google::Apis::DriveV2::Channel] channel_object
1458
+ # @param [Boolean] acknowledge_abuse
1459
+ # Whether the user is acknowledging the risk of downloading known malware or
1460
+ # other abusive files.
1461
+ # @param [String] projection
1462
+ # This parameter is deprecated and has no function.
1463
+ # @param [String] revision_id
1464
+ # Specifies the Revision ID that should be downloaded. Ignored unless alt=media
1465
+ # is specified.
1466
+ # @param [Boolean] update_viewed_date
1467
+ # Deprecated: Use files.update with modifiedDateBehavior=noChange,
1468
+ # updateViewedDate=true and an empty request body.
1469
+ # @param [String] fields
1470
+ # Selector specifying which fields to include in a partial response.
1471
+ # @param [String] quota_user
1472
+ # Available to use for quota purposes for server-side applications. Can be any
1473
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1474
+ # Overrides userIp if both are provided.
1475
+ # @param [String] user_ip
1476
+ # IP address of the site where the request originates. Use this if you want to
1477
+ # enforce per-user limits.
1478
+ # @param [IO, String] download_dest
1479
+ # IO stream or filename to receive content download
1480
+ # @param [Google::Apis::RequestOptions] options
1481
+ # Request-specific options
1482
+ #
1483
+ # @yield [result, err] Result & error if block supplied
1484
+ # @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
1485
+ # @yieldparam err [StandardError] error object if request failed
1486
+ #
1487
+ # @return [Google::Apis::DriveV2::Channel]
1488
+ #
1489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1492
+ def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1493
+ if download_dest.nil?
1494
+ command = make_simple_command(:post, 'files/{fileId}/watch', options)
1495
+ else
1496
+ command = make_download_command(:post, 'files/{fileId}/watch', options)
1497
+ command.download_dest = download_dest
1498
+ end
1499
+ command.request_representation = Google::Apis::DriveV2::Channel::Representation
1500
+ command.request_object = channel_object
1501
+ command.response_representation = Google::Apis::DriveV2::Channel::Representation
1502
+ command.response_class = Google::Apis::DriveV2::Channel
1503
+ command.params['fileId'] = file_id unless file_id.nil?
1504
+ command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
1505
+ command.query['projection'] = projection unless projection.nil?
1506
+ command.query['revisionId'] = revision_id unless revision_id.nil?
1507
+ command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
1508
+ command.query['fields'] = fields unless fields.nil?
1509
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1510
+ command.query['userIp'] = user_ip unless user_ip.nil?
1511
+ execute_or_queue_command(command, &block)
1512
+ end
1513
+
1514
+ # Removes a parent from a file.
1515
+ # @param [String] file_id
1516
+ # The ID of the file.
1517
+ # @param [String] parent_id
1518
+ # The ID of the parent.
1519
+ # @param [String] fields
1520
+ # Selector specifying which fields to include in a partial response.
1521
+ # @param [String] quota_user
1522
+ # Available to use for quota purposes for server-side applications. Can be any
1523
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1524
+ # Overrides userIp if both are provided.
1525
+ # @param [String] user_ip
1526
+ # IP address of the site where the request originates. Use this if you want to
1527
+ # enforce per-user limits.
1528
+ # @param [Google::Apis::RequestOptions] options
1529
+ # Request-specific options
1530
+ #
1531
+ # @yield [result, err] Result & error if block supplied
1532
+ # @yieldparam result [NilClass] No result returned for this method
1533
+ # @yieldparam err [StandardError] error object if request failed
1534
+ #
1535
+ # @return [void]
1536
+ #
1537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1540
+ def delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1541
+ command = make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', options)
1542
+ command.params['fileId'] = file_id unless file_id.nil?
1543
+ command.params['parentId'] = parent_id unless parent_id.nil?
1544
+ command.query['fields'] = fields unless fields.nil?
1545
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1546
+ command.query['userIp'] = user_ip unless user_ip.nil?
1547
+ execute_or_queue_command(command, &block)
1548
+ end
1549
+
1550
+ # Gets a specific parent reference.
1551
+ # @param [String] file_id
1552
+ # The ID of the file.
1553
+ # @param [String] parent_id
1554
+ # The ID of the parent.
1555
+ # @param [String] fields
1556
+ # Selector specifying which fields to include in a partial response.
1557
+ # @param [String] quota_user
1558
+ # Available to use for quota purposes for server-side applications. Can be any
1559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1560
+ # Overrides userIp if both are provided.
1561
+ # @param [String] user_ip
1562
+ # IP address of the site where the request originates. Use this if you want to
1563
+ # enforce per-user limits.
1564
+ # @param [Google::Apis::RequestOptions] options
1565
+ # Request-specific options
1566
+ #
1567
+ # @yield [result, err] Result & error if block supplied
1568
+ # @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
1569
+ # @yieldparam err [StandardError] error object if request failed
1570
+ #
1571
+ # @return [Google::Apis::DriveV2::ParentReference]
1572
+ #
1573
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1574
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1575
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1576
+ def get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1577
+ command = make_simple_command(:get, 'files/{fileId}/parents/{parentId}', options)
1578
+ command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
1579
+ command.response_class = Google::Apis::DriveV2::ParentReference
1580
+ command.params['fileId'] = file_id unless file_id.nil?
1581
+ command.params['parentId'] = parent_id unless parent_id.nil?
1582
+ command.query['fields'] = fields unless fields.nil?
1583
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1584
+ command.query['userIp'] = user_ip unless user_ip.nil?
1585
+ execute_or_queue_command(command, &block)
1586
+ end
1587
+
1588
+ # Adds a parent folder for a file.
1589
+ # @param [String] file_id
1590
+ # The ID of the file.
1591
+ # @param [Google::Apis::DriveV2::ParentReference] parent_reference_object
1592
+ # @param [String] fields
1593
+ # Selector specifying which fields to include in a partial response.
1594
+ # @param [String] quota_user
1595
+ # Available to use for quota purposes for server-side applications. Can be any
1596
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1597
+ # Overrides userIp if both are provided.
1598
+ # @param [String] user_ip
1599
+ # IP address of the site where the request originates. Use this if you want to
1600
+ # enforce per-user limits.
1601
+ # @param [Google::Apis::RequestOptions] options
1602
+ # Request-specific options
1603
+ #
1604
+ # @yield [result, err] Result & error if block supplied
1605
+ # @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
1606
+ # @yieldparam err [StandardError] error object if request failed
1607
+ #
1608
+ # @return [Google::Apis::DriveV2::ParentReference]
1609
+ #
1610
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1611
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1612
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1613
+ def insert_parent(file_id, parent_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1614
+ command = make_simple_command(:post, 'files/{fileId}/parents', options)
1615
+ command.request_representation = Google::Apis::DriveV2::ParentReference::Representation
1616
+ command.request_object = parent_reference_object
1617
+ command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
1618
+ command.response_class = Google::Apis::DriveV2::ParentReference
1619
+ command.params['fileId'] = file_id unless file_id.nil?
1620
+ command.query['fields'] = fields unless fields.nil?
1621
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1622
+ command.query['userIp'] = user_ip unless user_ip.nil?
1623
+ execute_or_queue_command(command, &block)
1624
+ end
1625
+
1626
+ # Lists a file's parents.
1627
+ # @param [String] file_id
1628
+ # The ID of the file.
1629
+ # @param [String] fields
1630
+ # Selector specifying which fields to include in a partial response.
1631
+ # @param [String] quota_user
1632
+ # Available to use for quota purposes for server-side applications. Can be any
1633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1634
+ # Overrides userIp if both are provided.
1635
+ # @param [String] user_ip
1636
+ # IP address of the site where the request originates. Use this if you want to
1637
+ # enforce per-user limits.
1638
+ # @param [Google::Apis::RequestOptions] options
1639
+ # Request-specific options
1640
+ #
1641
+ # @yield [result, err] Result & error if block supplied
1642
+ # @yieldparam result [Google::Apis::DriveV2::ParentList] parsed result object
1643
+ # @yieldparam err [StandardError] error object if request failed
1644
+ #
1645
+ # @return [Google::Apis::DriveV2::ParentList]
1646
+ #
1647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1650
+ def list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1651
+ command = make_simple_command(:get, 'files/{fileId}/parents', options)
1652
+ command.response_representation = Google::Apis::DriveV2::ParentList::Representation
1653
+ command.response_class = Google::Apis::DriveV2::ParentList
1654
+ command.params['fileId'] = file_id unless file_id.nil?
1655
+ command.query['fields'] = fields unless fields.nil?
1656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1657
+ command.query['userIp'] = user_ip unless user_ip.nil?
1658
+ execute_or_queue_command(command, &block)
1659
+ end
1660
+
1661
+ # Deletes a permission from a file.
1662
+ # @param [String] file_id
1663
+ # The ID for the file.
1664
+ # @param [String] permission_id
1665
+ # The ID for the permission.
1666
+ # @param [String] fields
1667
+ # Selector specifying which fields to include in a partial response.
1668
+ # @param [String] quota_user
1669
+ # Available to use for quota purposes for server-side applications. Can be any
1670
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1671
+ # Overrides userIp if both are provided.
1672
+ # @param [String] user_ip
1673
+ # IP address of the site where the request originates. Use this if you want to
1674
+ # enforce per-user limits.
1675
+ # @param [Google::Apis::RequestOptions] options
1676
+ # Request-specific options
1677
+ #
1678
+ # @yield [result, err] Result & error if block supplied
1679
+ # @yieldparam result [NilClass] No result returned for this method
1680
+ # @yieldparam err [StandardError] error object if request failed
1681
+ #
1682
+ # @return [void]
1683
+ #
1684
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1685
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1686
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1687
+ def delete_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1688
+ command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
1689
+ command.params['fileId'] = file_id unless file_id.nil?
1690
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1691
+ command.query['fields'] = fields unless fields.nil?
1692
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1693
+ command.query['userIp'] = user_ip unless user_ip.nil?
1694
+ execute_or_queue_command(command, &block)
1695
+ end
1696
+
1697
+ # Gets a permission by ID.
1698
+ # @param [String] file_id
1699
+ # The ID for the file.
1700
+ # @param [String] permission_id
1701
+ # The ID for the permission.
1702
+ # @param [String] fields
1703
+ # Selector specifying which fields to include in a partial response.
1704
+ # @param [String] quota_user
1705
+ # Available to use for quota purposes for server-side applications. Can be any
1706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1707
+ # Overrides userIp if both are provided.
1708
+ # @param [String] user_ip
1709
+ # IP address of the site where the request originates. Use this if you want to
1710
+ # enforce per-user limits.
1711
+ # @param [Google::Apis::RequestOptions] options
1712
+ # Request-specific options
1713
+ #
1714
+ # @yield [result, err] Result & error if block supplied
1715
+ # @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
1716
+ # @yieldparam err [StandardError] error object if request failed
1717
+ #
1718
+ # @return [Google::Apis::DriveV2::Permission]
1719
+ #
1720
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1721
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1722
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1723
+ def get_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1724
+ command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
1725
+ command.response_representation = Google::Apis::DriveV2::Permission::Representation
1726
+ command.response_class = Google::Apis::DriveV2::Permission
1727
+ command.params['fileId'] = file_id unless file_id.nil?
1728
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1729
+ command.query['fields'] = fields unless fields.nil?
1730
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1731
+ command.query['userIp'] = user_ip unless user_ip.nil?
1732
+ execute_or_queue_command(command, &block)
1733
+ end
1734
+
1735
+ # Returns the permission ID for an email address.
1736
+ # @param [String] email
1737
+ # The email address for which to return a permission ID
1738
+ # @param [String] fields
1739
+ # Selector specifying which fields to include in a partial response.
1740
+ # @param [String] quota_user
1741
+ # Available to use for quota purposes for server-side applications. Can be any
1742
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1743
+ # Overrides userIp if both are provided.
1744
+ # @param [String] user_ip
1745
+ # IP address of the site where the request originates. Use this if you want to
1746
+ # enforce per-user limits.
1747
+ # @param [Google::Apis::RequestOptions] options
1748
+ # Request-specific options
1749
+ #
1750
+ # @yield [result, err] Result & error if block supplied
1751
+ # @yieldparam result [Google::Apis::DriveV2::PermissionId] parsed result object
1752
+ # @yieldparam err [StandardError] error object if request failed
1753
+ #
1754
+ # @return [Google::Apis::DriveV2::PermissionId]
1755
+ #
1756
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1757
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1758
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1759
+ def get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1760
+ command = make_simple_command(:get, 'permissionIds/{email}', options)
1761
+ command.response_representation = Google::Apis::DriveV2::PermissionId::Representation
1762
+ command.response_class = Google::Apis::DriveV2::PermissionId
1763
+ command.params['email'] = email unless email.nil?
1764
+ command.query['fields'] = fields unless fields.nil?
1765
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1766
+ command.query['userIp'] = user_ip unless user_ip.nil?
1767
+ execute_or_queue_command(command, &block)
1768
+ end
1769
+
1770
+ # Inserts a permission for a file.
1771
+ # @param [String] file_id
1772
+ # The ID for the file.
1773
+ # @param [Google::Apis::DriveV2::Permission] permission_object
1774
+ # @param [String] email_message
1775
+ # A custom message to include in notification emails.
1776
+ # @param [Boolean] send_notification_emails
1777
+ # Whether to send notification emails when sharing to users or groups. This
1778
+ # parameter is ignored and an email is sent if the role is owner.
1779
+ # @param [String] fields
1780
+ # Selector specifying which fields to include in a partial response.
1781
+ # @param [String] quota_user
1782
+ # Available to use for quota purposes for server-side applications. Can be any
1783
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1784
+ # Overrides userIp if both are provided.
1785
+ # @param [String] user_ip
1786
+ # IP address of the site where the request originates. Use this if you want to
1787
+ # enforce per-user limits.
1788
+ # @param [Google::Apis::RequestOptions] options
1789
+ # Request-specific options
1790
+ #
1791
+ # @yield [result, err] Result & error if block supplied
1792
+ # @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
1793
+ # @yieldparam err [StandardError] error object if request failed
1794
+ #
1795
+ # @return [Google::Apis::DriveV2::Permission]
1796
+ #
1797
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1798
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1799
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1800
+ def insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1801
+ command = make_simple_command(:post, 'files/{fileId}/permissions', options)
1802
+ command.request_representation = Google::Apis::DriveV2::Permission::Representation
1803
+ command.request_object = permission_object
1804
+ command.response_representation = Google::Apis::DriveV2::Permission::Representation
1805
+ command.response_class = Google::Apis::DriveV2::Permission
1806
+ command.params['fileId'] = file_id unless file_id.nil?
1807
+ command.query['emailMessage'] = email_message unless email_message.nil?
1808
+ command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.nil?
1809
+ command.query['fields'] = fields unless fields.nil?
1810
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1811
+ command.query['userIp'] = user_ip unless user_ip.nil?
1812
+ execute_or_queue_command(command, &block)
1813
+ end
1814
+
1815
+ # Lists a file's permissions.
1816
+ # @param [String] file_id
1817
+ # The ID for the file.
1818
+ # @param [String] fields
1819
+ # Selector specifying which fields to include in a partial response.
1820
+ # @param [String] quota_user
1821
+ # Available to use for quota purposes for server-side applications. Can be any
1822
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1823
+ # Overrides userIp if both are provided.
1824
+ # @param [String] user_ip
1825
+ # IP address of the site where the request originates. Use this if you want to
1826
+ # enforce per-user limits.
1827
+ # @param [Google::Apis::RequestOptions] options
1828
+ # Request-specific options
1829
+ #
1830
+ # @yield [result, err] Result & error if block supplied
1831
+ # @yieldparam result [Google::Apis::DriveV2::PermissionList] parsed result object
1832
+ # @yieldparam err [StandardError] error object if request failed
1833
+ #
1834
+ # @return [Google::Apis::DriveV2::PermissionList]
1835
+ #
1836
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1837
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1838
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1839
+ def list_permissions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1840
+ command = make_simple_command(:get, 'files/{fileId}/permissions', options)
1841
+ command.response_representation = Google::Apis::DriveV2::PermissionList::Representation
1842
+ command.response_class = Google::Apis::DriveV2::PermissionList
1843
+ command.params['fileId'] = file_id unless file_id.nil?
1844
+ command.query['fields'] = fields unless fields.nil?
1845
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1846
+ command.query['userIp'] = user_ip unless user_ip.nil?
1847
+ execute_or_queue_command(command, &block)
1848
+ end
1849
+
1850
+ # Updates a permission using patch semantics.
1851
+ # @param [String] file_id
1852
+ # The ID for the file.
1853
+ # @param [String] permission_id
1854
+ # The ID for the permission.
1855
+ # @param [Google::Apis::DriveV2::Permission] permission_object
1856
+ # @param [Boolean] remove_expiration
1857
+ # Whether to remove the expiration date.
1858
+ # @param [Boolean] transfer_ownership
1859
+ # Whether changing a role to 'owner' downgrades the current owners to writers.
1860
+ # Does nothing if the specified role is not 'owner'.
1861
+ # @param [String] fields
1862
+ # Selector specifying which fields to include in a partial response.
1863
+ # @param [String] quota_user
1864
+ # Available to use for quota purposes for server-side applications. Can be any
1865
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1866
+ # Overrides userIp if both are provided.
1867
+ # @param [String] user_ip
1868
+ # IP address of the site where the request originates. Use this if you want to
1869
+ # enforce per-user limits.
1870
+ # @param [Google::Apis::RequestOptions] options
1871
+ # Request-specific options
1872
+ #
1873
+ # @yield [result, err] Result & error if block supplied
1874
+ # @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
1875
+ # @yieldparam err [StandardError] error object if request failed
1876
+ #
1877
+ # @return [Google::Apis::DriveV2::Permission]
1878
+ #
1879
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1880
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1881
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1882
+ def patch_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)
1883
+ command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
1884
+ command.request_representation = Google::Apis::DriveV2::Permission::Representation
1885
+ command.request_object = permission_object
1886
+ command.response_representation = Google::Apis::DriveV2::Permission::Representation
1887
+ command.response_class = Google::Apis::DriveV2::Permission
1888
+ command.params['fileId'] = file_id unless file_id.nil?
1889
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1890
+ command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
1891
+ command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
1892
+ command.query['fields'] = fields unless fields.nil?
1893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1894
+ command.query['userIp'] = user_ip unless user_ip.nil?
1895
+ execute_or_queue_command(command, &block)
1896
+ end
1897
+
1898
+ # Updates a permission.
1899
+ # @param [String] file_id
1900
+ # The ID for the file.
1901
+ # @param [String] permission_id
1902
+ # The ID for the permission.
1903
+ # @param [Google::Apis::DriveV2::Permission] permission_object
1904
+ # @param [Boolean] remove_expiration
1905
+ # Whether to remove the expiration date.
1906
+ # @param [Boolean] transfer_ownership
1907
+ # Whether changing a role to 'owner' downgrades the current owners to writers.
1908
+ # Does nothing if the specified role is not 'owner'.
1909
+ # @param [String] fields
1910
+ # Selector specifying which fields to include in a partial response.
1911
+ # @param [String] quota_user
1912
+ # Available to use for quota purposes for server-side applications. Can be any
1913
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1914
+ # Overrides userIp if both are provided.
1915
+ # @param [String] user_ip
1916
+ # IP address of the site where the request originates. Use this if you want to
1917
+ # enforce per-user limits.
1918
+ # @param [Google::Apis::RequestOptions] options
1919
+ # Request-specific options
1920
+ #
1921
+ # @yield [result, err] Result & error if block supplied
1922
+ # @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
1923
+ # @yieldparam err [StandardError] error object if request failed
1924
+ #
1925
+ # @return [Google::Apis::DriveV2::Permission]
1926
+ #
1927
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1928
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1929
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1930
+ def 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)
1931
+ command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
1932
+ command.request_representation = Google::Apis::DriveV2::Permission::Representation
1933
+ command.request_object = permission_object
1934
+ command.response_representation = Google::Apis::DriveV2::Permission::Representation
1935
+ command.response_class = Google::Apis::DriveV2::Permission
1936
+ command.params['fileId'] = file_id unless file_id.nil?
1937
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1938
+ command.query['removeExpiration'] = remove_expiration unless remove_expiration.nil?
1939
+ command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
1940
+ command.query['fields'] = fields unless fields.nil?
1941
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1942
+ command.query['userIp'] = user_ip unless user_ip.nil?
1943
+ execute_or_queue_command(command, &block)
1944
+ end
1945
+
1946
+ # Deletes a property.
1947
+ # @param [String] file_id
1948
+ # The ID of the file.
1949
+ # @param [String] property_key
1950
+ # The key of the property.
1951
+ # @param [String] visibility
1952
+ # The visibility of the property.
1953
+ # @param [String] fields
1954
+ # Selector specifying which fields to include in a partial response.
1955
+ # @param [String] quota_user
1956
+ # Available to use for quota purposes for server-side applications. Can be any
1957
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1958
+ # Overrides userIp if both are provided.
1959
+ # @param [String] user_ip
1960
+ # IP address of the site where the request originates. Use this if you want to
1961
+ # enforce per-user limits.
1962
+ # @param [Google::Apis::RequestOptions] options
1963
+ # Request-specific options
1964
+ #
1965
+ # @yield [result, err] Result & error if block supplied
1966
+ # @yieldparam result [NilClass] No result returned for this method
1967
+ # @yieldparam err [StandardError] error object if request failed
1968
+ #
1969
+ # @return [void]
1970
+ #
1971
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1972
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1973
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1974
+ def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1975
+ command = make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', options)
1976
+ command.params['fileId'] = file_id unless file_id.nil?
1977
+ command.params['propertyKey'] = property_key unless property_key.nil?
1978
+ command.query['visibility'] = visibility unless visibility.nil?
1979
+ command.query['fields'] = fields unless fields.nil?
1980
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1981
+ command.query['userIp'] = user_ip unless user_ip.nil?
1982
+ execute_or_queue_command(command, &block)
1983
+ end
1984
+
1985
+ # Gets a property by its key.
1986
+ # @param [String] file_id
1987
+ # The ID of the file.
1988
+ # @param [String] property_key
1989
+ # The key of the property.
1990
+ # @param [String] visibility
1991
+ # The visibility of the property.
1992
+ # @param [String] fields
1993
+ # Selector specifying which fields to include in a partial response.
1994
+ # @param [String] quota_user
1995
+ # Available to use for quota purposes for server-side applications. Can be any
1996
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1997
+ # Overrides userIp if both are provided.
1998
+ # @param [String] user_ip
1999
+ # IP address of the site where the request originates. Use this if you want to
2000
+ # enforce per-user limits.
2001
+ # @param [Google::Apis::RequestOptions] options
2002
+ # Request-specific options
2003
+ #
2004
+ # @yield [result, err] Result & error if block supplied
2005
+ # @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
2006
+ # @yieldparam err [StandardError] error object if request failed
2007
+ #
2008
+ # @return [Google::Apis::DriveV2::Property]
2009
+ #
2010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2013
+ def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2014
+ command = make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', options)
2015
+ command.response_representation = Google::Apis::DriveV2::Property::Representation
2016
+ command.response_class = Google::Apis::DriveV2::Property
2017
+ command.params['fileId'] = file_id unless file_id.nil?
2018
+ command.params['propertyKey'] = property_key unless property_key.nil?
2019
+ command.query['visibility'] = visibility unless visibility.nil?
2020
+ command.query['fields'] = fields unless fields.nil?
2021
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2022
+ command.query['userIp'] = user_ip unless user_ip.nil?
2023
+ execute_or_queue_command(command, &block)
2024
+ end
2025
+
2026
+ # Adds a property to a file, or updates it if it already exists.
2027
+ # @param [String] file_id
2028
+ # The ID of the file.
2029
+ # @param [Google::Apis::DriveV2::Property] property_object
2030
+ # @param [String] fields
2031
+ # Selector specifying which fields to include in a partial response.
2032
+ # @param [String] quota_user
2033
+ # Available to use for quota purposes for server-side applications. Can be any
2034
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2035
+ # Overrides userIp if both are provided.
2036
+ # @param [String] user_ip
2037
+ # IP address of the site where the request originates. Use this if you want to
2038
+ # enforce per-user limits.
2039
+ # @param [Google::Apis::RequestOptions] options
2040
+ # Request-specific options
2041
+ #
2042
+ # @yield [result, err] Result & error if block supplied
2043
+ # @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
2044
+ # @yieldparam err [StandardError] error object if request failed
2045
+ #
2046
+ # @return [Google::Apis::DriveV2::Property]
2047
+ #
2048
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2049
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2050
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2051
+ def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2052
+ command = make_simple_command(:post, 'files/{fileId}/properties', options)
2053
+ command.request_representation = Google::Apis::DriveV2::Property::Representation
2054
+ command.request_object = property_object
2055
+ command.response_representation = Google::Apis::DriveV2::Property::Representation
2056
+ command.response_class = Google::Apis::DriveV2::Property
2057
+ command.params['fileId'] = file_id unless file_id.nil?
2058
+ command.query['fields'] = fields unless fields.nil?
2059
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2060
+ command.query['userIp'] = user_ip unless user_ip.nil?
2061
+ execute_or_queue_command(command, &block)
2062
+ end
2063
+
2064
+ # Lists a file's properties.
2065
+ # @param [String] file_id
2066
+ # The ID of the file.
2067
+ # @param [String] fields
2068
+ # Selector specifying which fields to include in a partial response.
2069
+ # @param [String] quota_user
2070
+ # Available to use for quota purposes for server-side applications. Can be any
2071
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2072
+ # Overrides userIp if both are provided.
2073
+ # @param [String] user_ip
2074
+ # IP address of the site where the request originates. Use this if you want to
2075
+ # enforce per-user limits.
2076
+ # @param [Google::Apis::RequestOptions] options
2077
+ # Request-specific options
2078
+ #
2079
+ # @yield [result, err] Result & error if block supplied
2080
+ # @yieldparam result [Google::Apis::DriveV2::PropertyList] parsed result object
2081
+ # @yieldparam err [StandardError] error object if request failed
2082
+ #
2083
+ # @return [Google::Apis::DriveV2::PropertyList]
2084
+ #
2085
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2086
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2087
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2088
+ def list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2089
+ command = make_simple_command(:get, 'files/{fileId}/properties', options)
2090
+ command.response_representation = Google::Apis::DriveV2::PropertyList::Representation
2091
+ command.response_class = Google::Apis::DriveV2::PropertyList
2092
+ command.params['fileId'] = file_id unless file_id.nil?
2093
+ command.query['fields'] = fields unless fields.nil?
2094
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2095
+ command.query['userIp'] = user_ip unless user_ip.nil?
2096
+ execute_or_queue_command(command, &block)
2097
+ end
2098
+
2099
+ # Updates a property, or adds it if it doesn't exist. This method supports patch
2100
+ # semantics.
2101
+ # @param [String] file_id
2102
+ # The ID of the file.
2103
+ # @param [String] property_key
2104
+ # The key of the property.
2105
+ # @param [Google::Apis::DriveV2::Property] property_object
2106
+ # @param [String] visibility
2107
+ # The visibility of the property.
2108
+ # @param [String] fields
2109
+ # Selector specifying which fields to include in a partial response.
2110
+ # @param [String] quota_user
2111
+ # Available to use for quota purposes for server-side applications. Can be any
2112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2113
+ # Overrides userIp if both are provided.
2114
+ # @param [String] user_ip
2115
+ # IP address of the site where the request originates. Use this if you want to
2116
+ # enforce per-user limits.
2117
+ # @param [Google::Apis::RequestOptions] options
2118
+ # Request-specific options
2119
+ #
2120
+ # @yield [result, err] Result & error if block supplied
2121
+ # @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
2122
+ # @yieldparam err [StandardError] error object if request failed
2123
+ #
2124
+ # @return [Google::Apis::DriveV2::Property]
2125
+ #
2126
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2127
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2128
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2129
+ def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2130
+ command = make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', options)
2131
+ command.request_representation = Google::Apis::DriveV2::Property::Representation
2132
+ command.request_object = property_object
2133
+ command.response_representation = Google::Apis::DriveV2::Property::Representation
2134
+ command.response_class = Google::Apis::DriveV2::Property
2135
+ command.params['fileId'] = file_id unless file_id.nil?
2136
+ command.params['propertyKey'] = property_key unless property_key.nil?
2137
+ command.query['visibility'] = visibility unless visibility.nil?
2138
+ command.query['fields'] = fields unless fields.nil?
2139
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2140
+ command.query['userIp'] = user_ip unless user_ip.nil?
2141
+ execute_or_queue_command(command, &block)
2142
+ end
2143
+
2144
+ # Updates a property, or adds it if it doesn't exist.
2145
+ # @param [String] file_id
2146
+ # The ID of the file.
2147
+ # @param [String] property_key
2148
+ # The key of the property.
2149
+ # @param [Google::Apis::DriveV2::Property] property_object
2150
+ # @param [String] visibility
2151
+ # The visibility of the property.
2152
+ # @param [String] fields
2153
+ # Selector specifying which fields to include in a partial response.
2154
+ # @param [String] quota_user
2155
+ # Available to use for quota purposes for server-side applications. Can be any
2156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2157
+ # Overrides userIp if both are provided.
2158
+ # @param [String] user_ip
2159
+ # IP address of the site where the request originates. Use this if you want to
2160
+ # enforce per-user limits.
2161
+ # @param [Google::Apis::RequestOptions] options
2162
+ # Request-specific options
2163
+ #
2164
+ # @yield [result, err] Result & error if block supplied
2165
+ # @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
2166
+ # @yieldparam err [StandardError] error object if request failed
2167
+ #
2168
+ # @return [Google::Apis::DriveV2::Property]
2169
+ #
2170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2173
+ def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2174
+ command = make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', options)
2175
+ command.request_representation = Google::Apis::DriveV2::Property::Representation
2176
+ command.request_object = property_object
2177
+ command.response_representation = Google::Apis::DriveV2::Property::Representation
2178
+ command.response_class = Google::Apis::DriveV2::Property
2179
+ command.params['fileId'] = file_id unless file_id.nil?
2180
+ command.params['propertyKey'] = property_key unless property_key.nil?
2181
+ command.query['visibility'] = visibility unless visibility.nil?
2182
+ command.query['fields'] = fields unless fields.nil?
2183
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2184
+ command.query['userIp'] = user_ip unless user_ip.nil?
2185
+ execute_or_queue_command(command, &block)
2186
+ end
2187
+
2188
+ # Exports the contents of the Realtime API data model associated with this file
2189
+ # as JSON.
2190
+ # @param [String] file_id
2191
+ # The ID of the file that the Realtime API data model is associated with.
2192
+ # @param [Fixnum] revision
2193
+ # The revision of the Realtime API data model to export. Revisions start at 1 (
2194
+ # the initial empty data model) and are incremented with each change. If this
2195
+ # parameter is excluded, the most recent data model will be returned.
2196
+ # @param [String] fields
2197
+ # Selector specifying which fields to include in a partial response.
2198
+ # @param [String] quota_user
2199
+ # Available to use for quota purposes for server-side applications. Can be any
2200
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2201
+ # Overrides userIp if both are provided.
2202
+ # @param [String] user_ip
2203
+ # IP address of the site where the request originates. Use this if you want to
2204
+ # enforce per-user limits.
2205
+ # @param [IO, String] download_dest
2206
+ # IO stream or filename to receive content download
2207
+ # @param [Google::Apis::RequestOptions] options
2208
+ # Request-specific options
2209
+ #
2210
+ # @yield [result, err] Result & error if block supplied
2211
+ # @yieldparam result [NilClass] No result returned for this method
2212
+ # @yieldparam err [StandardError] error object if request failed
2213
+ #
2214
+ # @return [void]
2215
+ #
2216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2219
+ def get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
2220
+ if download_dest.nil?
2221
+ command = make_simple_command(:get, 'files/{fileId}/realtime', options)
2222
+ else
2223
+ command = make_download_command(:get, 'files/{fileId}/realtime', options)
2224
+ command.download_dest = download_dest
2225
+ end
2226
+ command.params['fileId'] = file_id unless file_id.nil?
2227
+ command.query['revision'] = revision unless revision.nil?
2228
+ command.query['fields'] = fields unless fields.nil?
2229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2230
+ command.query['userIp'] = user_ip unless user_ip.nil?
2231
+ execute_or_queue_command(command, &block)
2232
+ end
2233
+
2234
+ # Overwrites the Realtime API data model associated with this file with the
2235
+ # provided JSON data model.
2236
+ # @param [String] file_id
2237
+ # The ID of the file that the Realtime API data model is associated with.
2238
+ # @param [String] base_revision
2239
+ # The revision of the model to diff the uploaded model against. If set, the
2240
+ # uploaded model is diffed against the provided revision and those differences
2241
+ # are merged with any changes made to the model after the provided revision. If
2242
+ # not set, the uploaded model replaces the current model on the server.
2243
+ # @param [String] fields
2244
+ # Selector specifying which fields to include in a partial response.
2245
+ # @param [String] quota_user
2246
+ # Available to use for quota purposes for server-side applications. Can be any
2247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2248
+ # Overrides userIp if both are provided.
2249
+ # @param [String] user_ip
2250
+ # IP address of the site where the request originates. Use this if you want to
2251
+ # enforce per-user limits.
2252
+ # @param [IO, String] upload_source
2253
+ # IO stream or filename containing content to upload
2254
+ # @param [String] content_type
2255
+ # Content type of the uploaded content.
2256
+ # @param [Google::Apis::RequestOptions] options
2257
+ # Request-specific options
2258
+ #
2259
+ # @yield [result, err] Result & error if block supplied
2260
+ # @yieldparam result [NilClass] No result returned for this method
2261
+ # @yieldparam err [StandardError] error object if request failed
2262
+ #
2263
+ # @return [void]
2264
+ #
2265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2268
+ def update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
2269
+ if upload_source.nil?
2270
+ command = make_simple_command(:put, 'files/{fileId}/realtime', options)
2271
+ else
2272
+ command = make_upload_command(:put, 'files/{fileId}/realtime', options)
2273
+ command.upload_source = upload_source
2274
+ command.upload_content_type = content_type
2275
+ end
2276
+ command.params['fileId'] = file_id unless file_id.nil?
2277
+ command.query['baseRevision'] = base_revision unless base_revision.nil?
2278
+ command.query['fields'] = fields unless fields.nil?
2279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2280
+ command.query['userIp'] = user_ip unless user_ip.nil?
2281
+ execute_or_queue_command(command, &block)
2282
+ end
2283
+
2284
+ # Deletes a reply.
2285
+ # @param [String] file_id
2286
+ # The ID of the file.
2287
+ # @param [String] comment_id
2288
+ # The ID of the comment.
2289
+ # @param [String] reply_id
2290
+ # The ID of the reply.
2291
+ # @param [String] fields
2292
+ # Selector specifying which fields to include in a partial response.
2293
+ # @param [String] quota_user
2294
+ # Available to use for quota purposes for server-side applications. Can be any
2295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2296
+ # Overrides userIp if both are provided.
2297
+ # @param [String] user_ip
2298
+ # IP address of the site where the request originates. Use this if you want to
2299
+ # enforce per-user limits.
2300
+ # @param [Google::Apis::RequestOptions] options
2301
+ # Request-specific options
2302
+ #
2303
+ # @yield [result, err] Result & error if block supplied
2304
+ # @yieldparam result [NilClass] No result returned for this method
2305
+ # @yieldparam err [StandardError] error object if request failed
2306
+ #
2307
+ # @return [void]
2308
+ #
2309
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2310
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2311
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2312
+ def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2313
+ command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
2314
+ command.params['fileId'] = file_id unless file_id.nil?
2315
+ command.params['commentId'] = comment_id unless comment_id.nil?
2316
+ command.params['replyId'] = reply_id unless reply_id.nil?
2317
+ command.query['fields'] = fields unless fields.nil?
2318
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2319
+ command.query['userIp'] = user_ip unless user_ip.nil?
2320
+ execute_or_queue_command(command, &block)
2321
+ end
2322
+
2323
+ # Gets a reply.
2324
+ # @param [String] file_id
2325
+ # The ID of the file.
2326
+ # @param [String] comment_id
2327
+ # The ID of the comment.
2328
+ # @param [String] reply_id
2329
+ # The ID of the reply.
2330
+ # @param [Boolean] include_deleted
2331
+ # If set, this will succeed when retrieving a deleted reply.
2332
+ # @param [String] fields
2333
+ # Selector specifying which fields to include in a partial response.
2334
+ # @param [String] quota_user
2335
+ # Available to use for quota purposes for server-side applications. Can be any
2336
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2337
+ # Overrides userIp if both are provided.
2338
+ # @param [String] user_ip
2339
+ # IP address of the site where the request originates. Use this if you want to
2340
+ # enforce per-user limits.
2341
+ # @param [Google::Apis::RequestOptions] options
2342
+ # Request-specific options
2343
+ #
2344
+ # @yield [result, err] Result & error if block supplied
2345
+ # @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
2346
+ # @yieldparam err [StandardError] error object if request failed
2347
+ #
2348
+ # @return [Google::Apis::DriveV2::CommentReply]
2349
+ #
2350
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2351
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2352
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2353
+ def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2354
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
2355
+ command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
2356
+ command.response_class = Google::Apis::DriveV2::CommentReply
2357
+ command.params['fileId'] = file_id unless file_id.nil?
2358
+ command.params['commentId'] = comment_id unless comment_id.nil?
2359
+ command.params['replyId'] = reply_id unless reply_id.nil?
2360
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
2361
+ command.query['fields'] = fields unless fields.nil?
2362
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2363
+ command.query['userIp'] = user_ip unless user_ip.nil?
2364
+ execute_or_queue_command(command, &block)
2365
+ end
2366
+
2367
+ # Creates a new reply to the given comment.
2368
+ # @param [String] file_id
2369
+ # The ID of the file.
2370
+ # @param [String] comment_id
2371
+ # The ID of the comment.
2372
+ # @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
2373
+ # @param [String] fields
2374
+ # Selector specifying which fields to include in a partial response.
2375
+ # @param [String] quota_user
2376
+ # Available to use for quota purposes for server-side applications. Can be any
2377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2378
+ # Overrides userIp if both are provided.
2379
+ # @param [String] user_ip
2380
+ # IP address of the site where the request originates. Use this if you want to
2381
+ # enforce per-user limits.
2382
+ # @param [Google::Apis::RequestOptions] options
2383
+ # Request-specific options
2384
+ #
2385
+ # @yield [result, err] Result & error if block supplied
2386
+ # @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
2387
+ # @yieldparam err [StandardError] error object if request failed
2388
+ #
2389
+ # @return [Google::Apis::DriveV2::CommentReply]
2390
+ #
2391
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2392
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2393
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2394
+ def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2395
+ command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
2396
+ command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
2397
+ command.request_object = comment_reply_object
2398
+ command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
2399
+ command.response_class = Google::Apis::DriveV2::CommentReply
2400
+ command.params['fileId'] = file_id unless file_id.nil?
2401
+ command.params['commentId'] = comment_id unless comment_id.nil?
2402
+ command.query['fields'] = fields unless fields.nil?
2403
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2404
+ command.query['userIp'] = user_ip unless user_ip.nil?
2405
+ execute_or_queue_command(command, &block)
2406
+ end
2407
+
2408
+ # Lists all of the replies to a comment.
2409
+ # @param [String] file_id
2410
+ # The ID of the file.
2411
+ # @param [String] comment_id
2412
+ # The ID of the comment.
2413
+ # @param [Boolean] include_deleted
2414
+ # If set, all replies, including deleted replies (with content stripped) will be
2415
+ # returned.
2416
+ # @param [Fixnum] max_results
2417
+ # The maximum number of replies to include in the response, used for paging.
2418
+ # @param [String] page_token
2419
+ # The continuation token, used to page through large result sets. To get the
2420
+ # next page of results, set this parameter to the value of "nextPageToken" from
2421
+ # the previous response.
2422
+ # @param [String] fields
2423
+ # Selector specifying which fields to include in a partial response.
2424
+ # @param [String] quota_user
2425
+ # Available to use for quota purposes for server-side applications. Can be any
2426
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2427
+ # Overrides userIp if both are provided.
2428
+ # @param [String] user_ip
2429
+ # IP address of the site where the request originates. Use this if you want to
2430
+ # enforce per-user limits.
2431
+ # @param [Google::Apis::RequestOptions] options
2432
+ # Request-specific options
2433
+ #
2434
+ # @yield [result, err] Result & error if block supplied
2435
+ # @yieldparam result [Google::Apis::DriveV2::CommentReplyList] parsed result object
2436
+ # @yieldparam err [StandardError] error object if request failed
2437
+ #
2438
+ # @return [Google::Apis::DriveV2::CommentReplyList]
2439
+ #
2440
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2441
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2442
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2443
+ def list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2444
+ command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
2445
+ command.response_representation = Google::Apis::DriveV2::CommentReplyList::Representation
2446
+ command.response_class = Google::Apis::DriveV2::CommentReplyList
2447
+ command.params['fileId'] = file_id unless file_id.nil?
2448
+ command.params['commentId'] = comment_id unless comment_id.nil?
2449
+ command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
2450
+ command.query['maxResults'] = max_results unless max_results.nil?
2451
+ command.query['pageToken'] = page_token unless page_token.nil?
2452
+ command.query['fields'] = fields unless fields.nil?
2453
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2454
+ command.query['userIp'] = user_ip unless user_ip.nil?
2455
+ execute_or_queue_command(command, &block)
2456
+ end
2457
+
2458
+ # Updates an existing reply. This method supports patch semantics.
2459
+ # @param [String] file_id
2460
+ # The ID of the file.
2461
+ # @param [String] comment_id
2462
+ # The ID of the comment.
2463
+ # @param [String] reply_id
2464
+ # The ID of the reply.
2465
+ # @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
2466
+ # @param [String] fields
2467
+ # Selector specifying which fields to include in a partial response.
2468
+ # @param [String] quota_user
2469
+ # Available to use for quota purposes for server-side applications. Can be any
2470
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2471
+ # Overrides userIp if both are provided.
2472
+ # @param [String] user_ip
2473
+ # IP address of the site where the request originates. Use this if you want to
2474
+ # enforce per-user limits.
2475
+ # @param [Google::Apis::RequestOptions] options
2476
+ # Request-specific options
2477
+ #
2478
+ # @yield [result, err] Result & error if block supplied
2479
+ # @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
2480
+ # @yieldparam err [StandardError] error object if request failed
2481
+ #
2482
+ # @return [Google::Apis::DriveV2::CommentReply]
2483
+ #
2484
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2485
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2486
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2487
+ def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2488
+ command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
2489
+ command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
2490
+ command.request_object = comment_reply_object
2491
+ command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
2492
+ command.response_class = Google::Apis::DriveV2::CommentReply
2493
+ command.params['fileId'] = file_id unless file_id.nil?
2494
+ command.params['commentId'] = comment_id unless comment_id.nil?
2495
+ command.params['replyId'] = reply_id unless reply_id.nil?
2496
+ command.query['fields'] = fields unless fields.nil?
2497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2498
+ command.query['userIp'] = user_ip unless user_ip.nil?
2499
+ execute_or_queue_command(command, &block)
2500
+ end
2501
+
2502
+ # Updates an existing reply.
2503
+ # @param [String] file_id
2504
+ # The ID of the file.
2505
+ # @param [String] comment_id
2506
+ # The ID of the comment.
2507
+ # @param [String] reply_id
2508
+ # The ID of the reply.
2509
+ # @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
2510
+ # @param [String] fields
2511
+ # Selector specifying which fields to include in a partial response.
2512
+ # @param [String] quota_user
2513
+ # Available to use for quota purposes for server-side applications. Can be any
2514
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2515
+ # Overrides userIp if both are provided.
2516
+ # @param [String] user_ip
2517
+ # IP address of the site where the request originates. Use this if you want to
2518
+ # enforce per-user limits.
2519
+ # @param [Google::Apis::RequestOptions] options
2520
+ # Request-specific options
2521
+ #
2522
+ # @yield [result, err] Result & error if block supplied
2523
+ # @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
2524
+ # @yieldparam err [StandardError] error object if request failed
2525
+ #
2526
+ # @return [Google::Apis::DriveV2::CommentReply]
2527
+ #
2528
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2529
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2530
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2531
+ def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2532
+ command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
2533
+ command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
2534
+ command.request_object = comment_reply_object
2535
+ command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
2536
+ command.response_class = Google::Apis::DriveV2::CommentReply
2537
+ command.params['fileId'] = file_id unless file_id.nil?
2538
+ command.params['commentId'] = comment_id unless comment_id.nil?
2539
+ command.params['replyId'] = reply_id unless reply_id.nil?
2540
+ command.query['fields'] = fields unless fields.nil?
2541
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2542
+ command.query['userIp'] = user_ip unless user_ip.nil?
2543
+ execute_or_queue_command(command, &block)
2544
+ end
2545
+
2546
+ # Removes a revision.
2547
+ # @param [String] file_id
2548
+ # The ID of the file.
2549
+ # @param [String] revision_id
2550
+ # The ID of the revision.
2551
+ # @param [String] fields
2552
+ # Selector specifying which fields to include in a partial response.
2553
+ # @param [String] quota_user
2554
+ # Available to use for quota purposes for server-side applications. Can be any
2555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2556
+ # Overrides userIp if both are provided.
2557
+ # @param [String] user_ip
2558
+ # IP address of the site where the request originates. Use this if you want to
2559
+ # enforce per-user limits.
2560
+ # @param [Google::Apis::RequestOptions] options
2561
+ # Request-specific options
2562
+ #
2563
+ # @yield [result, err] Result & error if block supplied
2564
+ # @yieldparam result [NilClass] No result returned for this method
2565
+ # @yieldparam err [StandardError] error object if request failed
2566
+ #
2567
+ # @return [void]
2568
+ #
2569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2572
+ def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2573
+ command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
2574
+ command.params['fileId'] = file_id unless file_id.nil?
2575
+ command.params['revisionId'] = revision_id unless revision_id.nil?
2576
+ command.query['fields'] = fields unless fields.nil?
2577
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2578
+ command.query['userIp'] = user_ip unless user_ip.nil?
2579
+ execute_or_queue_command(command, &block)
2580
+ end
2581
+
2582
+ # Gets a specific revision.
2583
+ # @param [String] file_id
2584
+ # The ID of the file.
2585
+ # @param [String] revision_id
2586
+ # The ID of the revision.
2587
+ # @param [String] fields
2588
+ # Selector specifying which fields to include in a partial response.
2589
+ # @param [String] quota_user
2590
+ # Available to use for quota purposes for server-side applications. Can be any
2591
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2592
+ # Overrides userIp if both are provided.
2593
+ # @param [String] user_ip
2594
+ # IP address of the site where the request originates. Use this if you want to
2595
+ # enforce per-user limits.
2596
+ # @param [Google::Apis::RequestOptions] options
2597
+ # Request-specific options
2598
+ #
2599
+ # @yield [result, err] Result & error if block supplied
2600
+ # @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
2601
+ # @yieldparam err [StandardError] error object if request failed
2602
+ #
2603
+ # @return [Google::Apis::DriveV2::Revision]
2604
+ #
2605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2608
+ def get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2609
+ command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
2610
+ command.response_representation = Google::Apis::DriveV2::Revision::Representation
2611
+ command.response_class = Google::Apis::DriveV2::Revision
2612
+ command.params['fileId'] = file_id unless file_id.nil?
2613
+ command.params['revisionId'] = revision_id unless revision_id.nil?
2614
+ command.query['fields'] = fields unless fields.nil?
2615
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2616
+ command.query['userIp'] = user_ip unless user_ip.nil?
2617
+ execute_or_queue_command(command, &block)
2618
+ end
2619
+
2620
+ # Lists a file's revisions.
2621
+ # @param [String] file_id
2622
+ # The ID of the file.
2623
+ # @param [Fixnum] max_results
2624
+ # Maximum number of revisions to return.
2625
+ # @param [String] page_token
2626
+ # Page token for revisions. To get the next page of results, set this parameter
2627
+ # to the value of "nextPageToken" from the previous response.
2628
+ # @param [String] fields
2629
+ # Selector specifying which fields to include in a partial response.
2630
+ # @param [String] quota_user
2631
+ # Available to use for quota purposes for server-side applications. Can be any
2632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2633
+ # Overrides userIp if both are provided.
2634
+ # @param [String] user_ip
2635
+ # IP address of the site where the request originates. Use this if you want to
2636
+ # enforce per-user limits.
2637
+ # @param [Google::Apis::RequestOptions] options
2638
+ # Request-specific options
2639
+ #
2640
+ # @yield [result, err] Result & error if block supplied
2641
+ # @yieldparam result [Google::Apis::DriveV2::RevisionList] parsed result object
2642
+ # @yieldparam err [StandardError] error object if request failed
2643
+ #
2644
+ # @return [Google::Apis::DriveV2::RevisionList]
2645
+ #
2646
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2647
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2648
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2649
+ def list_revisions(file_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2650
+ command = make_simple_command(:get, 'files/{fileId}/revisions', options)
2651
+ command.response_representation = Google::Apis::DriveV2::RevisionList::Representation
2652
+ command.response_class = Google::Apis::DriveV2::RevisionList
2653
+ command.params['fileId'] = file_id unless file_id.nil?
2654
+ command.query['maxResults'] = max_results unless max_results.nil?
2655
+ command.query['pageToken'] = page_token unless page_token.nil?
2656
+ command.query['fields'] = fields unless fields.nil?
2657
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2658
+ command.query['userIp'] = user_ip unless user_ip.nil?
2659
+ execute_or_queue_command(command, &block)
2660
+ end
2661
+
2662
+ # Updates a revision. This method supports patch semantics.
2663
+ # @param [String] file_id
2664
+ # The ID for the file.
2665
+ # @param [String] revision_id
2666
+ # The ID for the revision.
2667
+ # @param [Google::Apis::DriveV2::Revision] revision_object
2668
+ # @param [String] fields
2669
+ # Selector specifying which fields to include in a partial response.
2670
+ # @param [String] quota_user
2671
+ # Available to use for quota purposes for server-side applications. Can be any
2672
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2673
+ # Overrides userIp if both are provided.
2674
+ # @param [String] user_ip
2675
+ # IP address of the site where the request originates. Use this if you want to
2676
+ # enforce per-user limits.
2677
+ # @param [Google::Apis::RequestOptions] options
2678
+ # Request-specific options
2679
+ #
2680
+ # @yield [result, err] Result & error if block supplied
2681
+ # @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
2682
+ # @yieldparam err [StandardError] error object if request failed
2683
+ #
2684
+ # @return [Google::Apis::DriveV2::Revision]
2685
+ #
2686
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2687
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2688
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2689
+ def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2690
+ command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
2691
+ command.request_representation = Google::Apis::DriveV2::Revision::Representation
2692
+ command.request_object = revision_object
2693
+ command.response_representation = Google::Apis::DriveV2::Revision::Representation
2694
+ command.response_class = Google::Apis::DriveV2::Revision
2695
+ command.params['fileId'] = file_id unless file_id.nil?
2696
+ command.params['revisionId'] = revision_id unless revision_id.nil?
2697
+ command.query['fields'] = fields unless fields.nil?
2698
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2699
+ command.query['userIp'] = user_ip unless user_ip.nil?
2700
+ execute_or_queue_command(command, &block)
2701
+ end
2702
+
2703
+ # Updates a revision.
2704
+ # @param [String] file_id
2705
+ # The ID for the file.
2706
+ # @param [String] revision_id
2707
+ # The ID for the revision.
2708
+ # @param [Google::Apis::DriveV2::Revision] revision_object
2709
+ # @param [String] fields
2710
+ # Selector specifying which fields to include in a partial response.
2711
+ # @param [String] quota_user
2712
+ # Available to use for quota purposes for server-side applications. Can be any
2713
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2714
+ # Overrides userIp if both are provided.
2715
+ # @param [String] user_ip
2716
+ # IP address of the site where the request originates. Use this if you want to
2717
+ # enforce per-user limits.
2718
+ # @param [Google::Apis::RequestOptions] options
2719
+ # Request-specific options
2720
+ #
2721
+ # @yield [result, err] Result & error if block supplied
2722
+ # @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
2723
+ # @yieldparam err [StandardError] error object if request failed
2724
+ #
2725
+ # @return [Google::Apis::DriveV2::Revision]
2726
+ #
2727
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2728
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2729
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2730
+ def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2731
+ command = make_simple_command(:put, 'files/{fileId}/revisions/{revisionId}', options)
2732
+ command.request_representation = Google::Apis::DriveV2::Revision::Representation
2733
+ command.request_object = revision_object
2734
+ command.response_representation = Google::Apis::DriveV2::Revision::Representation
2735
+ command.response_class = Google::Apis::DriveV2::Revision
2736
+ command.params['fileId'] = file_id unless file_id.nil?
2737
+ command.params['revisionId'] = revision_id unless revision_id.nil?
2738
+ command.query['fields'] = fields unless fields.nil?
2739
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2740
+ command.query['userIp'] = user_ip unless user_ip.nil?
2741
+ execute_or_queue_command(command, &block)
2742
+ end
2743
+
2744
+ protected
2745
+
2746
+ def apply_command_defaults(command)
2747
+ command.query['key'] = key unless key.nil?
2748
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2749
+ command.query['userIp'] = user_ip unless user_ip.nil?
2750
+ end
2751
+ end
2752
+ end
2753
+ end
2754
+ end