google-api-client 0.9.pre3 → 0.9.pre4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +14 -2
  4. data/Gemfile +4 -0
  5. data/MIGRATING.md +1 -1
  6. data/README.md +17 -3
  7. data/api_names.yaml +127 -14
  8. data/api_names_out.yaml +5442 -710
  9. data/bin/generate-api +16 -14
  10. data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +213 -2
  12. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +71 -0
  13. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +21 -42
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +15 -29
  16. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  17. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  18. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  19. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  20. data/generated/google/apis/admin_directory_v1.rb +25 -1
  21. data/generated/google/apis/admin_directory_v1/classes.rb +718 -0
  22. data/generated/google/apis/admin_directory_v1/representations.rb +244 -0
  23. data/generated/google/apis/admin_directory_v1/service.rb +1522 -509
  24. data/generated/google/apis/admin_reports_v1.rb +1 -1
  25. data/generated/google/apis/admin_reports_v1/service.rb +5 -10
  26. data/generated/google/apis/adsense_v1_4.rb +1 -1
  27. data/generated/google/apis/adsense_v1_4/classes.rb +6 -0
  28. data/generated/google/apis/adsense_v1_4/representations.rb +1 -0
  29. data/generated/google/apis/adsense_v1_4/service.rb +40 -78
  30. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  31. data/generated/google/apis/adsensehost_v4_1/service.rb +26 -52
  32. data/generated/google/apis/analytics_v3.rb +1 -1
  33. data/generated/google/apis/analytics_v3/classes.rb +11 -13
  34. data/generated/google/apis/analytics_v3/service.rb +84 -158
  35. data/generated/google/apis/androidenterprise_v1.rb +2 -2
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +276 -8
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +106 -0
  38. data/generated/google/apis/androidenterprise_v1/service.rb +715 -97
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +2 -2
  41. data/generated/google/apis/androidpublisher_v2/service.rb +55 -107
  42. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  43. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  44. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  45. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  46. data/generated/google/apis/appsactivity_v1.rb +1 -1
  47. data/generated/google/apis/appsactivity_v1/service.rb +1 -2
  48. data/generated/google/apis/appstate_v1.rb +1 -1
  49. data/generated/google/apis/appstate_v1/service.rb +6 -11
  50. data/generated/google/apis/autoscaler_v1beta2/service.rb +10 -20
  51. data/generated/google/apis/bigquery_v2.rb +4 -1
  52. data/generated/google/apis/bigquery_v2/classes.rb +231 -16
  53. data/generated/google/apis/bigquery_v2/representations.rb +62 -0
  54. data/generated/google/apis/bigquery_v2/service.rb +24 -45
  55. data/generated/google/apis/blogger_v3/service.rb +33 -66
  56. data/generated/google/apis/books_v1.rb +1 -1
  57. data/generated/google/apis/books_v1/classes.rb +441 -0
  58. data/generated/google/apis/books_v1/representations.rb +177 -0
  59. data/generated/google/apis/books_v1/service.rb +210 -90
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +34 -18
  62. data/generated/google/apis/calendar_v3/service.rb +118 -103
  63. data/generated/google/apis/civicinfo_v2.rb +1 -1
  64. data/generated/google/apis/civicinfo_v2/classes.rb +12 -3
  65. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +5 -10
  67. data/generated/google/apis/classroom_v1.rb +49 -0
  68. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  69. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  70. data/generated/google/apis/classroom_v1/service.rb +970 -0
  71. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  74. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  75. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  76. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  77. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  78. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  79. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  80. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +6 -12
  81. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +5 -2
  82. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +173 -249
  83. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +36 -68
  84. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +293 -80
  85. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  86. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  87. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  88. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  89. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  90. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  91. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  92. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  93. data/generated/google/apis/compute_beta.rb +49 -0
  94. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  95. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  96. data/generated/google/apis/compute_beta/service.rb +10154 -0
  97. data/generated/google/apis/compute_v1.rb +1 -1
  98. data/generated/google/apis/compute_v1/classes.rb +1305 -520
  99. data/generated/google/apis/compute_v1/representations.rb +122 -15
  100. data/generated/google/apis/compute_v1/service.rb +2202 -1085
  101. data/generated/google/apis/container_v1.rb +1 -1
  102. data/generated/google/apis/container_v1/classes.rb +56 -31
  103. data/generated/google/apis/container_v1/representations.rb +12 -0
  104. data/generated/google/apis/container_v1/service.rb +62 -41
  105. data/generated/google/apis/content_v2.rb +2 -2
  106. data/generated/google/apis/content_v2/classes.rb +2252 -56
  107. data/generated/google/apis/content_v2/representations.rb +917 -87
  108. data/generated/google/apis/content_v2/service.rb +680 -85
  109. data/generated/google/apis/coordinate_v1.rb +1 -1
  110. data/generated/google/apis/coordinate_v1/service.rb +16 -25
  111. data/generated/google/apis/customsearch_v1/service.rb +1 -2
  112. data/generated/google/apis/datastore_v1beta2.rb +1 -1
  113. data/generated/google/apis/datastore_v1beta2/service.rb +12 -18
  114. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  115. data/generated/google/apis/deploymentmanager_v2/classes.rb +1089 -0
  116. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  117. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2.rb +5 -2
  119. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +22 -3
  120. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +3 -0
  121. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +14 -27
  122. data/generated/google/apis/dfareporting_v2_1.rb +1 -1
  123. data/generated/google/apis/dfareporting_v2_1/classes.rb +29 -14
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +196 -389
  125. data/generated/google/apis/discovery_v1/classes.rb +7 -0
  126. data/generated/google/apis/discovery_v1/representations.rb +1 -0
  127. data/generated/google/apis/discovery_v1/service.rb +2 -4
  128. data/generated/google/apis/dns_v1.rb +4 -1
  129. data/generated/google/apis/dns_v1/service.rb +9 -18
  130. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  131. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +9 -2
  132. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +1 -0
  133. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -16
  134. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  135. data/generated/google/apis/doubleclicksearch_v2/classes.rb +15 -6
  136. data/generated/google/apis/doubleclicksearch_v2/representations.rb +1 -0
  137. data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -23
  138. data/generated/google/apis/drive_v2.rb +1 -1
  139. data/generated/google/apis/drive_v2/classes.rb +73 -30
  140. data/generated/google/apis/drive_v2/representations.rb +14 -0
  141. data/generated/google/apis/drive_v2/service.rb +139 -135
  142. data/generated/google/apis/drive_v3.rb +55 -0
  143. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  144. data/generated/google/apis/drive_v3/representations.rb +497 -0
  145. data/generated/google/apis/drive_v3/service.rb +1541 -0
  146. data/generated/google/apis/fitness_v1.rb +1 -1
  147. data/generated/google/apis/fitness_v1/service.rb +14 -27
  148. data/generated/google/apis/fusiontables_v2/service.rb +40 -73
  149. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  150. data/generated/google/apis/games_configuration_v1configuration/service.rb +14 -27
  151. data/generated/google/apis/games_management_v1management.rb +37 -0
  152. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  153. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  154. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  155. data/generated/google/apis/games_v1.rb +1 -1
  156. data/generated/google/apis/games_v1/classes.rb +39 -0
  157. data/generated/google/apis/games_v1/representations.rb +14 -0
  158. data/generated/google/apis/games_v1/service.rb +93 -109
  159. data/generated/google/apis/gan_v1beta1/service.rb +10 -20
  160. data/generated/google/apis/genomics_v1.rb +5 -3
  161. data/generated/google/apis/genomics_v1/classes.rb +519 -200
  162. data/generated/google/apis/genomics_v1/representations.rb +126 -13
  163. data/generated/google/apis/genomics_v1/service.rb +392 -236
  164. data/generated/google/apis/gmail_v1.rb +4 -1
  165. data/generated/google/apis/gmail_v1/service.rb +39 -71
  166. data/generated/google/apis/groupsmigration_v1/service.rb +2 -3
  167. data/generated/google/apis/groupssettings_v1/service.rb +3 -6
  168. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  169. data/generated/google/apis/identitytoolkit_v3/classes.rb +125 -0
  170. data/generated/google/apis/identitytoolkit_v3/representations.rb +37 -0
  171. data/generated/google/apis/identitytoolkit_v3/service.rb +44 -24
  172. data/generated/google/apis/kgsearch_v1.rb +32 -0
  173. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  174. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  175. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  176. data/generated/google/apis/licensing_v1.rb +1 -1
  177. data/generated/google/apis/licensing_v1/service.rb +7 -14
  178. data/generated/google/apis/logging_v1beta3.rb +16 -4
  179. data/generated/google/apis/logging_v1beta3/classes.rb +620 -46
  180. data/generated/google/apis/logging_v1beta3/representations.rb +144 -0
  181. data/generated/google/apis/logging_v1beta3/service.rb +435 -104
  182. data/generated/google/apis/manager_v1beta2.rb +3 -0
  183. data/generated/google/apis/manager_v1beta2/service.rb +8 -16
  184. data/generated/google/apis/mapsengine_v1.rb +1 -1
  185. data/generated/google/apis/mapsengine_v1/service.rb +85 -162
  186. data/generated/google/apis/mirror_v1.rb +1 -1
  187. data/generated/google/apis/mirror_v1/service.rb +28 -52
  188. data/generated/google/apis/oauth2_v2.rb +1 -1
  189. data/generated/google/apis/oauth2_v2/service.rb +4 -8
  190. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -2
  191. data/generated/google/apis/partners_v2.rb +32 -0
  192. data/generated/google/apis/partners_v2/classes.rb +942 -0
  193. data/generated/google/apis/partners_v2/representations.rb +402 -0
  194. data/generated/google/apis/partners_v2/service.rb +400 -0
  195. data/generated/google/apis/plus_domains_v1.rb +1 -1
  196. data/generated/google/apis/plus_domains_v1/classes.rb +207 -0
  197. data/generated/google/apis/plus_domains_v1/representations.rb +114 -0
  198. data/generated/google/apis/plus_domains_v1/service.rb +21 -41
  199. data/generated/google/apis/plus_v1.rb +1 -1
  200. data/generated/google/apis/plus_v1/classes.rb +207 -0
  201. data/generated/google/apis/plus_v1/representations.rb +114 -0
  202. data/generated/google/apis/plus_v1/service.rb +11 -56
  203. data/generated/google/apis/prediction_v1_6.rb +1 -1
  204. data/generated/google/apis/prediction_v1_6/service.rb +8 -16
  205. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  206. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  207. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  208. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  209. data/generated/google/apis/pubsub_v1.rb +37 -0
  210. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  211. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  212. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  213. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  214. data/generated/google/apis/pubsub_v1beta2/classes.rb +78 -283
  215. data/generated/google/apis/pubsub_v1beta2/representations.rb +1 -85
  216. data/generated/google/apis/pubsub_v1beta2/service.rb +79 -87
  217. data/generated/google/apis/qpx_express_v1/service.rb +1 -2
  218. data/generated/google/apis/replicapool_v1beta2.rb +3 -0
  219. data/generated/google/apis/replicapool_v1beta2/service.rb +12 -24
  220. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -1
  221. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +46 -2
  222. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +16 -0
  223. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +58 -18
  224. data/generated/google/apis/reseller_v1.rb +1 -1
  225. data/generated/google/apis/reseller_v1/classes.rb +19 -1
  226. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  227. data/generated/google/apis/reseller_v1/service.rb +16 -30
  228. data/generated/google/apis/resourceviews_v1beta2.rb +3 -0
  229. data/generated/google/apis/resourceviews_v1beta2/service.rb +16 -27
  230. data/generated/google/apis/script_v1.rb +61 -0
  231. data/generated/google/apis/script_v1/classes.rb +259 -0
  232. data/generated/google/apis/script_v1/representations.rb +106 -0
  233. data/generated/google/apis/script_v1/service.rb +98 -0
  234. data/generated/google/apis/site_verification_v1.rb +1 -1
  235. data/generated/google/apis/site_verification_v1/service.rb +8 -15
  236. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  237. data/generated/google/apis/sqladmin_v1beta4/classes.rb +186 -2
  238. data/generated/google/apis/sqladmin_v1beta4/representations.rb +70 -0
  239. data/generated/google/apis/sqladmin_v1beta4/service.rb +166 -75
  240. data/generated/google/apis/storage_v1.rb +5 -2
  241. data/generated/google/apis/storage_v1/classes.rb +47 -4
  242. data/generated/google/apis/storage_v1/representations.rb +18 -0
  243. data/generated/google/apis/storage_v1/service.rb +77 -94
  244. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  245. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  246. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  247. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  248. data/generated/google/apis/tagmanager_v1.rb +1 -1
  249. data/generated/google/apis/tagmanager_v1/classes.rb +189 -31
  250. data/generated/google/apis/tagmanager_v1/representations.rb +69 -15
  251. data/generated/google/apis/tagmanager_v1/service.rb +114 -275
  252. data/generated/google/apis/taskqueue_v1beta2/service.rb +8 -16
  253. data/generated/google/apis/tasks_v1/service.rb +14 -28
  254. data/generated/google/apis/translate_v2/service.rb +3 -6
  255. data/generated/google/apis/urlshortener_v1/service.rb +3 -6
  256. data/generated/google/apis/webmasters_v3.rb +3 -3
  257. data/generated/google/apis/webmasters_v3/classes.rb +4 -4
  258. data/generated/google/apis/webmasters_v3/service.rb +16 -30
  259. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  260. data/generated/google/apis/youtube_analytics_v1/classes.rb +6 -0
  261. data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -0
  262. data/generated/google/apis/youtube_analytics_v1/service.rb +16 -21
  263. data/generated/google/apis/youtube_v3.rb +1 -1
  264. data/generated/google/apis/youtube_v3/classes.rb +111 -78
  265. data/generated/google/apis/youtube_v3/representations.rb +2 -0
  266. data/generated/google/apis/youtube_v3/service.rb +78 -246
  267. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  268. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  269. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  270. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  271. data/google-api-client.gemspec +3 -3
  272. data/lib/google/api_client/auth/installed_app.rb +2 -2
  273. data/lib/google/api_client/auth/key_utils.rb +1 -0
  274. data/lib/google/api_client/auth/storage.rb +1 -0
  275. data/lib/google/api_client/auth/storages/file_store.rb +1 -0
  276. data/lib/google/api_client/auth/storages/redis_store.rb +1 -0
  277. data/lib/google/api_client/client_secrets.rb +4 -5
  278. data/lib/google/apis/core/api_command.rb +2 -2
  279. data/lib/google/apis/core/base_service.rb +1 -0
  280. data/lib/google/apis/core/batch.rb +25 -8
  281. data/lib/google/apis/core/download.rb +1 -1
  282. data/lib/google/apis/core/http_command.rb +24 -12
  283. data/lib/google/apis/core/multipart.rb +20 -6
  284. data/lib/google/apis/core/upload.rb +11 -4
  285. data/lib/google/apis/generator/annotator.rb +29 -10
  286. data/lib/google/apis/generator/helpers.rb +1 -1
  287. data/lib/google/apis/generator/templates/_method.tmpl +5 -6
  288. data/lib/google/apis/options.rb +7 -3
  289. data/lib/google/apis/version.rb +1 -1
  290. data/samples/calendar/calendar.rb +1 -1
  291. data/samples/drive/drive.rb +9 -2
  292. data/samples/pubsub/pubsub.rb +5 -6
  293. data/samples/translate/translate.rb +1 -5
  294. data/script/generate +20 -5
  295. data/spec/fixtures/files/child/.gitignore +0 -0
  296. data/spec/fixtures/files/invalid.json +1 -0
  297. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  298. data/spec/google/apis/core/batch_spec.rb +22 -8
  299. data/spec/google/apis/core/download_spec.rb +13 -0
  300. data/spec/google/apis/core/http_command_spec.rb +26 -9
  301. data/spec/google/apis/core/upload_spec.rb +65 -17
  302. data/spec/google/apis/options_spec.rb +8 -0
  303. data/spec/integration_tests/adsense_spec.rb +28 -0
  304. data/spec/integration_tests/pubsub_spec.rb +3 -3
  305. data/spec/spec_helper.rb +5 -1
  306. data/third_party/hurley_patches.rb +103 -0
  307. metadata +87 -7
@@ -0,0 +1,55 @@
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/drive_v3/service.rb'
16
+ require 'google/apis/drive_v3/classes.rb'
17
+ require 'google/apis/drive_v3/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Drive API
22
+ #
23
+ # The API to interact with Drive.
24
+ #
25
+ # @see https://developers.google.com/drive/
26
+ module DriveV3
27
+ VERSION = 'V3'
28
+ REVISION = '20151209'
29
+
30
+ # View and manage the files in your Google Drive
31
+ AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
32
+
33
+ # View and manage its own configuration data in your Google Drive
34
+ AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
35
+
36
+ # View and manage Google Drive files and folders that you have opened or created with this app
37
+ AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file'
38
+
39
+ # View and manage metadata of files in your Google Drive
40
+ AUTH_DRIVE_METADATA = 'https://www.googleapis.com/auth/drive.metadata'
41
+
42
+ # View metadata for files in your Google Drive
43
+ AUTH_DRIVE_METADATA_READONLY = 'https://www.googleapis.com/auth/drive.metadata.readonly'
44
+
45
+ # View the photos, videos and albums in your Google Photos
46
+ AUTH_DRIVE_PHOTOS_READONLY = 'https://www.googleapis.com/auth/drive.photos.readonly'
47
+
48
+ # View the files in your Google Drive
49
+ AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
50
+
51
+ # Modify your Google Apps Script scripts' behavior
52
+ AUTH_DRIVE_SCRIPTS = 'https://www.googleapis.com/auth/drive.scripts'
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,1534 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DriveV3
24
+
25
+ # Information about the user, the user's Drive, and system capabilities.
26
+ class About
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Whether the user has installed the requesting app.
30
+ # Corresponds to the JSON property `appInstalled`
31
+ # @return [Boolean]
32
+ attr_accessor :app_installed
33
+ alias_method :app_installed?, :app_installed
34
+
35
+ # A map of source MIME type to possible targets for all supported exports.
36
+ # Corresponds to the JSON property `exportFormats`
37
+ # @return [Hash<String,Array<String>>]
38
+ attr_accessor :export_formats
39
+
40
+ # The currently supported folder colors as RGB hex strings.
41
+ # Corresponds to the JSON property `folderColorPalette`
42
+ # @return [Array<String>]
43
+ attr_accessor :folder_color_palette
44
+
45
+ # A map of source MIME type to possible targets for all supported imports.
46
+ # Corresponds to the JSON property `importFormats`
47
+ # @return [Hash<String,Array<String>>]
48
+ attr_accessor :import_formats
49
+
50
+ # This is always drive#about.
51
+ # Corresponds to the JSON property `kind`
52
+ # @return [String]
53
+ attr_accessor :kind
54
+
55
+ # A map of maximum import sizes by MIME type, in bytes.
56
+ # Corresponds to the JSON property `maxImportSizes`
57
+ # @return [Hash<String,String>]
58
+ attr_accessor :max_import_sizes
59
+
60
+ # The maximum upload size in bytes.
61
+ # Corresponds to the JSON property `maxUploadSize`
62
+ # @return [String]
63
+ attr_accessor :max_upload_size
64
+
65
+ # The user's storage quota limits and usage. All fields are measured in bytes.
66
+ # Corresponds to the JSON property `storageQuota`
67
+ # @return [Google::Apis::DriveV3::About::StorageQuota]
68
+ attr_accessor :storage_quota
69
+
70
+ # Information about a Drive user.
71
+ # Corresponds to the JSON property `user`
72
+ # @return [Google::Apis::DriveV3::User]
73
+ attr_accessor :user
74
+
75
+ def initialize(**args)
76
+ update!(**args)
77
+ end
78
+
79
+ # Update properties of this object
80
+ def update!(**args)
81
+ @app_installed = args[:app_installed] unless args[:app_installed].nil?
82
+ @export_formats = args[:export_formats] unless args[:export_formats].nil?
83
+ @folder_color_palette = args[:folder_color_palette] unless args[:folder_color_palette].nil?
84
+ @import_formats = args[:import_formats] unless args[:import_formats].nil?
85
+ @kind = args[:kind] unless args[:kind].nil?
86
+ @max_import_sizes = args[:max_import_sizes] unless args[:max_import_sizes].nil?
87
+ @max_upload_size = args[:max_upload_size] unless args[:max_upload_size].nil?
88
+ @storage_quota = args[:storage_quota] unless args[:storage_quota].nil?
89
+ @user = args[:user] unless args[:user].nil?
90
+ end
91
+
92
+ # The user's storage quota limits and usage. All fields are measured in bytes.
93
+ class StorageQuota
94
+ include Google::Apis::Core::Hashable
95
+
96
+ # The usage limit, if applicable. This will not be present if the user has
97
+ # unlimited storage.
98
+ # Corresponds to the JSON property `limit`
99
+ # @return [String]
100
+ attr_accessor :limit
101
+
102
+ # The total usage across all services.
103
+ # Corresponds to the JSON property `usage`
104
+ # @return [String]
105
+ attr_accessor :usage
106
+
107
+ # The usage by all files in Google Drive.
108
+ # Corresponds to the JSON property `usageInDrive`
109
+ # @return [String]
110
+ attr_accessor :usage_in_drive
111
+
112
+ # The usage by trashed files in Google Drive.
113
+ # Corresponds to the JSON property `usageInDriveTrash`
114
+ # @return [String]
115
+ attr_accessor :usage_in_drive_trash
116
+
117
+ def initialize(**args)
118
+ update!(**args)
119
+ end
120
+
121
+ # Update properties of this object
122
+ def update!(**args)
123
+ @limit = args[:limit] unless args[:limit].nil?
124
+ @usage = args[:usage] unless args[:usage].nil?
125
+ @usage_in_drive = args[:usage_in_drive] unless args[:usage_in_drive].nil?
126
+ @usage_in_drive_trash = args[:usage_in_drive_trash] unless args[:usage_in_drive_trash].nil?
127
+ end
128
+ end
129
+ end
130
+
131
+ # A change to a file.
132
+ class Change
133
+ include Google::Apis::Core::Hashable
134
+
135
+ # The metadata for a file.
136
+ # Corresponds to the JSON property `file`
137
+ # @return [Google::Apis::DriveV3::File]
138
+ attr_accessor :file
139
+
140
+ # The ID of the file which has changed.
141
+ # Corresponds to the JSON property `fileId`
142
+ # @return [String]
143
+ attr_accessor :file_id
144
+
145
+ # This is always drive#change.
146
+ # Corresponds to the JSON property `kind`
147
+ # @return [String]
148
+ attr_accessor :kind
149
+
150
+ # Whether the file has been removed from the view of the changes list, for
151
+ # example by deletion or lost access.
152
+ # Corresponds to the JSON property `removed`
153
+ # @return [Boolean]
154
+ attr_accessor :removed
155
+ alias_method :removed?, :removed
156
+
157
+ # The time of this change (RFC 3339 date-time).
158
+ # Corresponds to the JSON property `time`
159
+ # @return [DateTime]
160
+ attr_accessor :time
161
+
162
+ def initialize(**args)
163
+ update!(**args)
164
+ end
165
+
166
+ # Update properties of this object
167
+ def update!(**args)
168
+ @file = args[:file] unless args[:file].nil?
169
+ @file_id = args[:file_id] unless args[:file_id].nil?
170
+ @kind = args[:kind] unless args[:kind].nil?
171
+ @removed = args[:removed] unless args[:removed].nil?
172
+ @time = args[:time] unless args[:time].nil?
173
+ end
174
+ end
175
+
176
+ # A list of changes for a user.
177
+ class ChangeList
178
+ include Google::Apis::Core::Hashable
179
+
180
+ # The page of changes.
181
+ # Corresponds to the JSON property `changes`
182
+ # @return [Array<Google::Apis::DriveV3::Change>]
183
+ attr_accessor :changes
184
+
185
+ # This is always drive#changeList.
186
+ # Corresponds to the JSON property `kind`
187
+ # @return [String]
188
+ attr_accessor :kind
189
+
190
+ # The starting page token for future changes. This will be present only if the
191
+ # end of the current changes list has been reached.
192
+ # Corresponds to the JSON property `newStartPageToken`
193
+ # @return [String]
194
+ attr_accessor :new_start_page_token
195
+
196
+ # The page token for the next page of changes. This will be absent if the end of
197
+ # the current changes list has been reached.
198
+ # Corresponds to the JSON property `nextPageToken`
199
+ # @return [String]
200
+ attr_accessor :next_page_token
201
+
202
+ def initialize(**args)
203
+ update!(**args)
204
+ end
205
+
206
+ # Update properties of this object
207
+ def update!(**args)
208
+ @changes = args[:changes] unless args[:changes].nil?
209
+ @kind = args[:kind] unless args[:kind].nil?
210
+ @new_start_page_token = args[:new_start_page_token] unless args[:new_start_page_token].nil?
211
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
212
+ end
213
+ end
214
+
215
+ # An notification channel used to watch for resource changes.
216
+ class Channel
217
+ include Google::Apis::Core::Hashable
218
+
219
+ # The address where notifications are delivered for this channel.
220
+ # Corresponds to the JSON property `address`
221
+ # @return [String]
222
+ attr_accessor :address
223
+
224
+ # Date and time of notification channel expiration, expressed as a Unix
225
+ # timestamp, in milliseconds. Optional.
226
+ # Corresponds to the JSON property `expiration`
227
+ # @return [String]
228
+ attr_accessor :expiration
229
+
230
+ # A UUID or similar unique string that identifies this channel.
231
+ # Corresponds to the JSON property `id`
232
+ # @return [String]
233
+ attr_accessor :id
234
+
235
+ # Identifies this as a notification channel used to watch for changes to a
236
+ # resource. Value: the fixed string "api#channel".
237
+ # Corresponds to the JSON property `kind`
238
+ # @return [String]
239
+ attr_accessor :kind
240
+
241
+ # Additional parameters controlling delivery channel behavior. Optional.
242
+ # Corresponds to the JSON property `params`
243
+ # @return [Hash<String,String>]
244
+ attr_accessor :params
245
+
246
+ # A Boolean value to indicate whether payload is wanted. Optional.
247
+ # Corresponds to the JSON property `payload`
248
+ # @return [Boolean]
249
+ attr_accessor :payload
250
+ alias_method :payload?, :payload
251
+
252
+ # An opaque ID that identifies the resource being watched on this channel.
253
+ # Stable across different API versions.
254
+ # Corresponds to the JSON property `resourceId`
255
+ # @return [String]
256
+ attr_accessor :resource_id
257
+
258
+ # A version-specific identifier for the watched resource.
259
+ # Corresponds to the JSON property `resourceUri`
260
+ # @return [String]
261
+ attr_accessor :resource_uri
262
+
263
+ # An arbitrary string delivered to the target address with each notification
264
+ # delivered over this channel. Optional.
265
+ # Corresponds to the JSON property `token`
266
+ # @return [String]
267
+ attr_accessor :token
268
+
269
+ # The type of delivery mechanism used for this channel.
270
+ # Corresponds to the JSON property `type`
271
+ # @return [String]
272
+ attr_accessor :type
273
+
274
+ def initialize(**args)
275
+ update!(**args)
276
+ end
277
+
278
+ # Update properties of this object
279
+ def update!(**args)
280
+ @address = args[:address] unless args[:address].nil?
281
+ @expiration = args[:expiration] unless args[:expiration].nil?
282
+ @id = args[:id] unless args[:id].nil?
283
+ @kind = args[:kind] unless args[:kind].nil?
284
+ @params = args[:params] unless args[:params].nil?
285
+ @payload = args[:payload] unless args[:payload].nil?
286
+ @resource_id = args[:resource_id] unless args[:resource_id].nil?
287
+ @resource_uri = args[:resource_uri] unless args[:resource_uri].nil?
288
+ @token = args[:token] unless args[:token].nil?
289
+ @type = args[:type] unless args[:type].nil?
290
+ end
291
+ end
292
+
293
+ # A comment on a file.
294
+ class Comment
295
+ include Google::Apis::Core::Hashable
296
+
297
+ # A region of the document represented as a JSON string. See anchor
298
+ # documentation for details on how to define and interpret anchor properties.
299
+ # Corresponds to the JSON property `anchor`
300
+ # @return [String]
301
+ attr_accessor :anchor
302
+
303
+ # Information about a Drive user.
304
+ # Corresponds to the JSON property `author`
305
+ # @return [Google::Apis::DriveV3::User]
306
+ attr_accessor :author
307
+
308
+ # The plain text content of the comment. This field is used for setting the
309
+ # content, while htmlContent should be displayed.
310
+ # Corresponds to the JSON property `content`
311
+ # @return [String]
312
+ attr_accessor :content
313
+
314
+ # The time at which the comment was created (RFC 3339 date-time).
315
+ # Corresponds to the JSON property `createdTime`
316
+ # @return [DateTime]
317
+ attr_accessor :created_time
318
+
319
+ # Whether the comment has been deleted. A deleted comment has no content.
320
+ # Corresponds to the JSON property `deleted`
321
+ # @return [Boolean]
322
+ attr_accessor :deleted
323
+ alias_method :deleted?, :deleted
324
+
325
+ # The content of the comment with HTML formatting.
326
+ # Corresponds to the JSON property `htmlContent`
327
+ # @return [String]
328
+ attr_accessor :html_content
329
+
330
+ # The ID of the comment.
331
+ # Corresponds to the JSON property `id`
332
+ # @return [String]
333
+ attr_accessor :id
334
+
335
+ # This is always drive#comment.
336
+ # Corresponds to the JSON property `kind`
337
+ # @return [String]
338
+ attr_accessor :kind
339
+
340
+ # The last time the comment or any of its replies was modified (RFC 3339 date-
341
+ # time).
342
+ # Corresponds to the JSON property `modifiedTime`
343
+ # @return [DateTime]
344
+ attr_accessor :modified_time
345
+
346
+ # The file content to which the comment refers, typically within the anchor
347
+ # region. For a text file, for example, this would be the text at the location
348
+ # of the comment.
349
+ # Corresponds to the JSON property `quotedFileContent`
350
+ # @return [Google::Apis::DriveV3::Comment::QuotedFileContent]
351
+ attr_accessor :quoted_file_content
352
+
353
+ # The full list of replies to the comment in chronological order.
354
+ # Corresponds to the JSON property `replies`
355
+ # @return [Array<Google::Apis::DriveV3::Reply>]
356
+ attr_accessor :replies
357
+
358
+ # Whether the comment has been resolved by one of its replies.
359
+ # Corresponds to the JSON property `resolved`
360
+ # @return [Boolean]
361
+ attr_accessor :resolved
362
+ alias_method :resolved?, :resolved
363
+
364
+ def initialize(**args)
365
+ update!(**args)
366
+ end
367
+
368
+ # Update properties of this object
369
+ def update!(**args)
370
+ @anchor = args[:anchor] unless args[:anchor].nil?
371
+ @author = args[:author] unless args[:author].nil?
372
+ @content = args[:content] unless args[:content].nil?
373
+ @created_time = args[:created_time] unless args[:created_time].nil?
374
+ @deleted = args[:deleted] unless args[:deleted].nil?
375
+ @html_content = args[:html_content] unless args[:html_content].nil?
376
+ @id = args[:id] unless args[:id].nil?
377
+ @kind = args[:kind] unless args[:kind].nil?
378
+ @modified_time = args[:modified_time] unless args[:modified_time].nil?
379
+ @quoted_file_content = args[:quoted_file_content] unless args[:quoted_file_content].nil?
380
+ @replies = args[:replies] unless args[:replies].nil?
381
+ @resolved = args[:resolved] unless args[:resolved].nil?
382
+ end
383
+
384
+ # The file content to which the comment refers, typically within the anchor
385
+ # region. For a text file, for example, this would be the text at the location
386
+ # of the comment.
387
+ class QuotedFileContent
388
+ include Google::Apis::Core::Hashable
389
+
390
+ # The MIME type of the quoted content.
391
+ # Corresponds to the JSON property `mimeType`
392
+ # @return [String]
393
+ attr_accessor :mime_type
394
+
395
+ # The quoted content itself. This is interpreted as plain text if set through
396
+ # the API.
397
+ # Corresponds to the JSON property `value`
398
+ # @return [String]
399
+ attr_accessor :value
400
+
401
+ def initialize(**args)
402
+ update!(**args)
403
+ end
404
+
405
+ # Update properties of this object
406
+ def update!(**args)
407
+ @mime_type = args[:mime_type] unless args[:mime_type].nil?
408
+ @value = args[:value] unless args[:value].nil?
409
+ end
410
+ end
411
+ end
412
+
413
+ # A list of comments on a file.
414
+ class CommentList
415
+ include Google::Apis::Core::Hashable
416
+
417
+ # The page of comments.
418
+ # Corresponds to the JSON property `comments`
419
+ # @return [Array<Google::Apis::DriveV3::Comment>]
420
+ attr_accessor :comments
421
+
422
+ # This is always drive#commentList.
423
+ # Corresponds to the JSON property `kind`
424
+ # @return [String]
425
+ attr_accessor :kind
426
+
427
+ # The page token for the next page of comments. This will be absent if the end
428
+ # of the comments list has been reached.
429
+ # Corresponds to the JSON property `nextPageToken`
430
+ # @return [String]
431
+ attr_accessor :next_page_token
432
+
433
+ def initialize(**args)
434
+ update!(**args)
435
+ end
436
+
437
+ # Update properties of this object
438
+ def update!(**args)
439
+ @comments = args[:comments] unless args[:comments].nil?
440
+ @kind = args[:kind] unless args[:kind].nil?
441
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
442
+ end
443
+ end
444
+
445
+ # The metadata for a file.
446
+ class File
447
+ include Google::Apis::Core::Hashable
448
+
449
+ # A collection of arbitrary key-value pairs which are private to the requesting
450
+ # app.
451
+ # Entries with null values are cleared in update and copy requests.
452
+ # Corresponds to the JSON property `appProperties`
453
+ # @return [Hash<String,String>]
454
+ attr_accessor :app_properties
455
+
456
+ # Capabilities the current user has on the file.
457
+ # Corresponds to the JSON property `capabilities`
458
+ # @return [Google::Apis::DriveV3::File::Capabilities]
459
+ attr_accessor :capabilities
460
+
461
+ # Additional information about the content of the file. These fields are never
462
+ # populated in responses.
463
+ # Corresponds to the JSON property `contentHints`
464
+ # @return [Google::Apis::DriveV3::File::ContentHints]
465
+ attr_accessor :content_hints
466
+
467
+ # The time at which the file was created (RFC 3339 date-time).
468
+ # Corresponds to the JSON property `createdTime`
469
+ # @return [DateTime]
470
+ attr_accessor :created_time
471
+
472
+ # A short description of the file.
473
+ # Corresponds to the JSON property `description`
474
+ # @return [String]
475
+ attr_accessor :description
476
+
477
+ # Whether the file has been explicitly trashed, as opposed to recursively
478
+ # trashed from a parent folder.
479
+ # Corresponds to the JSON property `explicitlyTrashed`
480
+ # @return [Boolean]
481
+ attr_accessor :explicitly_trashed
482
+ alias_method :explicitly_trashed?, :explicitly_trashed
483
+
484
+ # The final component of fullFileExtension. This is only available for files
485
+ # with binary content in Drive.
486
+ # Corresponds to the JSON property `fileExtension`
487
+ # @return [String]
488
+ attr_accessor :file_extension
489
+
490
+ # The color for a folder as an RGB hex string. The supported colors are
491
+ # published in the folderColorPalette field of the About resource.
492
+ # If an unsupported color is specified, the closest color in the palette will be
493
+ # used instead.
494
+ # Corresponds to the JSON property `folderColorRgb`
495
+ # @return [String]
496
+ attr_accessor :folder_color_rgb
497
+
498
+ # The full file extension extracted from the name field. May contain multiple
499
+ # concatenated extensions, such as "tar.gz". This is only available for files
500
+ # with binary content in Drive.
501
+ # This is automatically updated when the name field changes, however it is not
502
+ # cleared if the new name does not contain a valid extension.
503
+ # Corresponds to the JSON property `fullFileExtension`
504
+ # @return [String]
505
+ attr_accessor :full_file_extension
506
+
507
+ # The ID of the file's head revision. This is currently only available for files
508
+ # with binary content in Drive.
509
+ # Corresponds to the JSON property `headRevisionId`
510
+ # @return [String]
511
+ attr_accessor :head_revision_id
512
+
513
+ # A static, unauthenticated link to the file's icon.
514
+ # Corresponds to the JSON property `iconLink`
515
+ # @return [String]
516
+ attr_accessor :icon_link
517
+
518
+ # The ID of the file.
519
+ # Corresponds to the JSON property `id`
520
+ # @return [String]
521
+ attr_accessor :id
522
+
523
+ # Additional metadata about image media, if available.
524
+ # Corresponds to the JSON property `imageMediaMetadata`
525
+ # @return [Google::Apis::DriveV3::File::ImageMediaMetadata]
526
+ attr_accessor :image_media_metadata
527
+
528
+ # This is always drive#file.
529
+ # Corresponds to the JSON property `kind`
530
+ # @return [String]
531
+ attr_accessor :kind
532
+
533
+ # Information about a Drive user.
534
+ # Corresponds to the JSON property `lastModifyingUser`
535
+ # @return [Google::Apis::DriveV3::User]
536
+ attr_accessor :last_modifying_user
537
+
538
+ # The MD5 checksum for the content of the file. This is only applicable to files
539
+ # with binary content in Drive.
540
+ # Corresponds to the JSON property `md5Checksum`
541
+ # @return [String]
542
+ attr_accessor :md5_checksum
543
+
544
+ # The MIME type of the file.
545
+ # Drive will attempt to automatically detect an appropriate value from uploaded
546
+ # content if no value is provided. The value cannot be changed unless a new
547
+ # revision is uploaded.
548
+ # If a file is created with a Google Doc MIME type, the uploaded content will be
549
+ # imported if possible. The supported import formats are published in the About
550
+ # resource.
551
+ # Corresponds to the JSON property `mimeType`
552
+ # @return [String]
553
+ attr_accessor :mime_type
554
+
555
+ # The last time the file was modified by the user (RFC 3339 date-time).
556
+ # Corresponds to the JSON property `modifiedByMeTime`
557
+ # @return [DateTime]
558
+ attr_accessor :modified_by_me_time
559
+
560
+ # The last time the file was modified by anyone (RFC 3339 date-time).
561
+ # Note that setting modifiedTime will also update modifiedByMeTime for the user.
562
+ # Corresponds to the JSON property `modifiedTime`
563
+ # @return [DateTime]
564
+ attr_accessor :modified_time
565
+
566
+ # The name of the file. This is not necessarily unique within a folder.
567
+ # Corresponds to the JSON property `name`
568
+ # @return [String]
569
+ attr_accessor :name
570
+
571
+ # The original filename of the uploaded content if available, or else the
572
+ # original value of the name field. This is only available for files with binary
573
+ # content in Drive.
574
+ # Corresponds to the JSON property `originalFilename`
575
+ # @return [String]
576
+ attr_accessor :original_filename
577
+
578
+ # Whether the user owns the file.
579
+ # Corresponds to the JSON property `ownedByMe`
580
+ # @return [Boolean]
581
+ attr_accessor :owned_by_me
582
+ alias_method :owned_by_me?, :owned_by_me
583
+
584
+ # The owners of the file. Currently, only certain legacy files may have more
585
+ # than one owner.
586
+ # Corresponds to the JSON property `owners`
587
+ # @return [Array<Google::Apis::DriveV3::User>]
588
+ attr_accessor :owners
589
+
590
+ # The IDs of the parent folders which contain the file.
591
+ # If not specified as part of a create request, the file will be placed directly
592
+ # in the My Drive folder. Update requests must use the addParents and
593
+ # removeParents parameters to modify the values.
594
+ # Corresponds to the JSON property `parents`
595
+ # @return [Array<String>]
596
+ attr_accessor :parents
597
+
598
+ # The full list of permissions for the file. This is only available if the
599
+ # requesting user can share the file.
600
+ # Corresponds to the JSON property `permissions`
601
+ # @return [Array<Google::Apis::DriveV3::Permission>]
602
+ attr_accessor :permissions
603
+
604
+ # A collection of arbitrary key-value pairs which are visible to all apps.
605
+ # Entries with null values are cleared in update and copy requests.
606
+ # Corresponds to the JSON property `properties`
607
+ # @return [Hash<String,String>]
608
+ attr_accessor :properties
609
+
610
+ # The number of storage quota bytes used by the file. This includes the head
611
+ # revision as well as previous revisions with keepForever enabled.
612
+ # Corresponds to the JSON property `quotaBytesUsed`
613
+ # @return [String]
614
+ attr_accessor :quota_bytes_used
615
+
616
+ # Whether the file has been shared.
617
+ # Corresponds to the JSON property `shared`
618
+ # @return [Boolean]
619
+ attr_accessor :shared
620
+ alias_method :shared?, :shared
621
+
622
+ # The time at which the file was shared with the user, if applicable (RFC 3339
623
+ # date-time).
624
+ # Corresponds to the JSON property `sharedWithMeTime`
625
+ # @return [DateTime]
626
+ attr_accessor :shared_with_me_time
627
+
628
+ # Information about a Drive user.
629
+ # Corresponds to the JSON property `sharingUser`
630
+ # @return [Google::Apis::DriveV3::User]
631
+ attr_accessor :sharing_user
632
+
633
+ # The size of the file's content in bytes. This is only applicable to files with
634
+ # binary content in Drive.
635
+ # Corresponds to the JSON property `size`
636
+ # @return [String]
637
+ attr_accessor :size
638
+
639
+ # The list of spaces which contain the file. The currently supported values are '
640
+ # drive', 'appDataFolder' and 'photos'.
641
+ # Corresponds to the JSON property `spaces`
642
+ # @return [Array<String>]
643
+ attr_accessor :spaces
644
+
645
+ # Whether the user has starred the file.
646
+ # Corresponds to the JSON property `starred`
647
+ # @return [Boolean]
648
+ attr_accessor :starred
649
+ alias_method :starred?, :starred
650
+
651
+ # A short-lived link to the file's thumbnail, if available. Typically lasts on
652
+ # the order of hours.
653
+ # Corresponds to the JSON property `thumbnailLink`
654
+ # @return [String]
655
+ attr_accessor :thumbnail_link
656
+
657
+ # Whether the file has been trashed, either explicitly or from a trashed parent
658
+ # folder. Only the owner may trash a file, and other users cannot see files in
659
+ # the owner's trash.
660
+ # Corresponds to the JSON property `trashed`
661
+ # @return [Boolean]
662
+ attr_accessor :trashed
663
+ alias_method :trashed?, :trashed
664
+
665
+ # A monotonically increasing version number for the file. This reflects every
666
+ # change made to the file on the server, even those not visible to the user.
667
+ # Corresponds to the JSON property `version`
668
+ # @return [String]
669
+ attr_accessor :version
670
+
671
+ # Additional metadata about video media. This may not be available immediately
672
+ # upon upload.
673
+ # Corresponds to the JSON property `videoMediaMetadata`
674
+ # @return [Google::Apis::DriveV3::File::VideoMediaMetadata]
675
+ attr_accessor :video_media_metadata
676
+
677
+ # Whether the file has been viewed by this user.
678
+ # Corresponds to the JSON property `viewedByMe`
679
+ # @return [Boolean]
680
+ attr_accessor :viewed_by_me
681
+ alias_method :viewed_by_me?, :viewed_by_me
682
+
683
+ # The last time the file was viewed by the user (RFC 3339 date-time).
684
+ # Corresponds to the JSON property `viewedByMeTime`
685
+ # @return [DateTime]
686
+ attr_accessor :viewed_by_me_time
687
+
688
+ # Whether users with only reader or commenter permission can copy the file's
689
+ # content. This affects copy, download, and print operations.
690
+ # Corresponds to the JSON property `viewersCanCopyContent`
691
+ # @return [Boolean]
692
+ attr_accessor :viewers_can_copy_content
693
+ alias_method :viewers_can_copy_content?, :viewers_can_copy_content
694
+
695
+ # A link for downloading the content of the file in a browser. This is only
696
+ # available for files with binary content in Drive.
697
+ # Corresponds to the JSON property `webContentLink`
698
+ # @return [String]
699
+ attr_accessor :web_content_link
700
+
701
+ # A link for opening the file in a relevant Google editor or viewer in a browser.
702
+ # Corresponds to the JSON property `webViewLink`
703
+ # @return [String]
704
+ attr_accessor :web_view_link
705
+
706
+ # Whether users with only writer permission can modify the file's permissions.
707
+ # Corresponds to the JSON property `writersCanShare`
708
+ # @return [Boolean]
709
+ attr_accessor :writers_can_share
710
+ alias_method :writers_can_share?, :writers_can_share
711
+
712
+ def initialize(**args)
713
+ update!(**args)
714
+ end
715
+
716
+ # Update properties of this object
717
+ def update!(**args)
718
+ @app_properties = args[:app_properties] unless args[:app_properties].nil?
719
+ @capabilities = args[:capabilities] unless args[:capabilities].nil?
720
+ @content_hints = args[:content_hints] unless args[:content_hints].nil?
721
+ @created_time = args[:created_time] unless args[:created_time].nil?
722
+ @description = args[:description] unless args[:description].nil?
723
+ @explicitly_trashed = args[:explicitly_trashed] unless args[:explicitly_trashed].nil?
724
+ @file_extension = args[:file_extension] unless args[:file_extension].nil?
725
+ @folder_color_rgb = args[:folder_color_rgb] unless args[:folder_color_rgb].nil?
726
+ @full_file_extension = args[:full_file_extension] unless args[:full_file_extension].nil?
727
+ @head_revision_id = args[:head_revision_id] unless args[:head_revision_id].nil?
728
+ @icon_link = args[:icon_link] unless args[:icon_link].nil?
729
+ @id = args[:id] unless args[:id].nil?
730
+ @image_media_metadata = args[:image_media_metadata] unless args[:image_media_metadata].nil?
731
+ @kind = args[:kind] unless args[:kind].nil?
732
+ @last_modifying_user = args[:last_modifying_user] unless args[:last_modifying_user].nil?
733
+ @md5_checksum = args[:md5_checksum] unless args[:md5_checksum].nil?
734
+ @mime_type = args[:mime_type] unless args[:mime_type].nil?
735
+ @modified_by_me_time = args[:modified_by_me_time] unless args[:modified_by_me_time].nil?
736
+ @modified_time = args[:modified_time] unless args[:modified_time].nil?
737
+ @name = args[:name] unless args[:name].nil?
738
+ @original_filename = args[:original_filename] unless args[:original_filename].nil?
739
+ @owned_by_me = args[:owned_by_me] unless args[:owned_by_me].nil?
740
+ @owners = args[:owners] unless args[:owners].nil?
741
+ @parents = args[:parents] unless args[:parents].nil?
742
+ @permissions = args[:permissions] unless args[:permissions].nil?
743
+ @properties = args[:properties] unless args[:properties].nil?
744
+ @quota_bytes_used = args[:quota_bytes_used] unless args[:quota_bytes_used].nil?
745
+ @shared = args[:shared] unless args[:shared].nil?
746
+ @shared_with_me_time = args[:shared_with_me_time] unless args[:shared_with_me_time].nil?
747
+ @sharing_user = args[:sharing_user] unless args[:sharing_user].nil?
748
+ @size = args[:size] unless args[:size].nil?
749
+ @spaces = args[:spaces] unless args[:spaces].nil?
750
+ @starred = args[:starred] unless args[:starred].nil?
751
+ @thumbnail_link = args[:thumbnail_link] unless args[:thumbnail_link].nil?
752
+ @trashed = args[:trashed] unless args[:trashed].nil?
753
+ @version = args[:version] unless args[:version].nil?
754
+ @video_media_metadata = args[:video_media_metadata] unless args[:video_media_metadata].nil?
755
+ @viewed_by_me = args[:viewed_by_me] unless args[:viewed_by_me].nil?
756
+ @viewed_by_me_time = args[:viewed_by_me_time] unless args[:viewed_by_me_time].nil?
757
+ @viewers_can_copy_content = args[:viewers_can_copy_content] unless args[:viewers_can_copy_content].nil?
758
+ @web_content_link = args[:web_content_link] unless args[:web_content_link].nil?
759
+ @web_view_link = args[:web_view_link] unless args[:web_view_link].nil?
760
+ @writers_can_share = args[:writers_can_share] unless args[:writers_can_share].nil?
761
+ end
762
+
763
+ # Capabilities the current user has on the file.
764
+ class Capabilities
765
+ include Google::Apis::Core::Hashable
766
+
767
+ # Whether the user can comment on the file.
768
+ # Corresponds to the JSON property `canComment`
769
+ # @return [Boolean]
770
+ attr_accessor :can_comment
771
+ alias_method :can_comment?, :can_comment
772
+
773
+ # Whether the user can copy the file.
774
+ # Corresponds to the JSON property `canCopy`
775
+ # @return [Boolean]
776
+ attr_accessor :can_copy
777
+ alias_method :can_copy?, :can_copy
778
+
779
+ # Whether the user can edit the file's content.
780
+ # Corresponds to the JSON property `canEdit`
781
+ # @return [Boolean]
782
+ attr_accessor :can_edit
783
+ alias_method :can_edit?, :can_edit
784
+
785
+ # Whether the user can modify the file's permissions and sharing settings.
786
+ # Corresponds to the JSON property `canShare`
787
+ # @return [Boolean]
788
+ attr_accessor :can_share
789
+ alias_method :can_share?, :can_share
790
+
791
+ def initialize(**args)
792
+ update!(**args)
793
+ end
794
+
795
+ # Update properties of this object
796
+ def update!(**args)
797
+ @can_comment = args[:can_comment] unless args[:can_comment].nil?
798
+ @can_copy = args[:can_copy] unless args[:can_copy].nil?
799
+ @can_edit = args[:can_edit] unless args[:can_edit].nil?
800
+ @can_share = args[:can_share] unless args[:can_share].nil?
801
+ end
802
+ end
803
+
804
+ # Additional information about the content of the file. These fields are never
805
+ # populated in responses.
806
+ class ContentHints
807
+ include Google::Apis::Core::Hashable
808
+
809
+ # Text to be indexed for the file to improve fullText queries. This is limited
810
+ # to 128KB in length and may contain HTML elements.
811
+ # Corresponds to the JSON property `indexableText`
812
+ # @return [String]
813
+ attr_accessor :indexable_text
814
+
815
+ # A thumbnail for the file. This will only be used if Drive cannot generate a
816
+ # standard thumbnail.
817
+ # Corresponds to the JSON property `thumbnail`
818
+ # @return [Google::Apis::DriveV3::File::ContentHints::Thumbnail]
819
+ attr_accessor :thumbnail
820
+
821
+ def initialize(**args)
822
+ update!(**args)
823
+ end
824
+
825
+ # Update properties of this object
826
+ def update!(**args)
827
+ @indexable_text = args[:indexable_text] unless args[:indexable_text].nil?
828
+ @thumbnail = args[:thumbnail] unless args[:thumbnail].nil?
829
+ end
830
+
831
+ # A thumbnail for the file. This will only be used if Drive cannot generate a
832
+ # standard thumbnail.
833
+ class Thumbnail
834
+ include Google::Apis::Core::Hashable
835
+
836
+ # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
837
+ # Corresponds to the JSON property `image`
838
+ # @return [String]
839
+ attr_accessor :image
840
+
841
+ # The MIME type of the thumbnail.
842
+ # Corresponds to the JSON property `mimeType`
843
+ # @return [String]
844
+ attr_accessor :mime_type
845
+
846
+ def initialize(**args)
847
+ update!(**args)
848
+ end
849
+
850
+ # Update properties of this object
851
+ def update!(**args)
852
+ @image = args[:image] unless args[:image].nil?
853
+ @mime_type = args[:mime_type] unless args[:mime_type].nil?
854
+ end
855
+ end
856
+ end
857
+
858
+ # Additional metadata about image media, if available.
859
+ class ImageMediaMetadata
860
+ include Google::Apis::Core::Hashable
861
+
862
+ # The aperture used to create the photo (f-number).
863
+ # Corresponds to the JSON property `aperture`
864
+ # @return [Float]
865
+ attr_accessor :aperture
866
+
867
+ # The make of the camera used to create the photo.
868
+ # Corresponds to the JSON property `cameraMake`
869
+ # @return [String]
870
+ attr_accessor :camera_make
871
+
872
+ # The model of the camera used to create the photo.
873
+ # Corresponds to the JSON property `cameraModel`
874
+ # @return [String]
875
+ attr_accessor :camera_model
876
+
877
+ # The color space of the photo.
878
+ # Corresponds to the JSON property `colorSpace`
879
+ # @return [String]
880
+ attr_accessor :color_space
881
+
882
+ # The exposure bias of the photo (APEX value).
883
+ # Corresponds to the JSON property `exposureBias`
884
+ # @return [Float]
885
+ attr_accessor :exposure_bias
886
+
887
+ # The exposure mode used to create the photo.
888
+ # Corresponds to the JSON property `exposureMode`
889
+ # @return [String]
890
+ attr_accessor :exposure_mode
891
+
892
+ # The length of the exposure, in seconds.
893
+ # Corresponds to the JSON property `exposureTime`
894
+ # @return [Float]
895
+ attr_accessor :exposure_time
896
+
897
+ # Whether a flash was used to create the photo.
898
+ # Corresponds to the JSON property `flashUsed`
899
+ # @return [Boolean]
900
+ attr_accessor :flash_used
901
+ alias_method :flash_used?, :flash_used
902
+
903
+ # The focal length used to create the photo, in millimeters.
904
+ # Corresponds to the JSON property `focalLength`
905
+ # @return [Float]
906
+ attr_accessor :focal_length
907
+
908
+ # The height of the image in pixels.
909
+ # Corresponds to the JSON property `height`
910
+ # @return [Fixnum]
911
+ attr_accessor :height
912
+
913
+ # The ISO speed used to create the photo.
914
+ # Corresponds to the JSON property `isoSpeed`
915
+ # @return [Fixnum]
916
+ attr_accessor :iso_speed
917
+
918
+ # The lens used to create the photo.
919
+ # Corresponds to the JSON property `lens`
920
+ # @return [String]
921
+ attr_accessor :lens
922
+
923
+ # Geographic location information stored in the image.
924
+ # Corresponds to the JSON property `location`
925
+ # @return [Google::Apis::DriveV3::File::ImageMediaMetadata::Location]
926
+ attr_accessor :location
927
+
928
+ # The smallest f-number of the lens at the focal length used to create the photo
929
+ # (APEX value).
930
+ # Corresponds to the JSON property `maxApertureValue`
931
+ # @return [Float]
932
+ attr_accessor :max_aperture_value
933
+
934
+ # The metering mode used to create the photo.
935
+ # Corresponds to the JSON property `meteringMode`
936
+ # @return [String]
937
+ attr_accessor :metering_mode
938
+
939
+ # The rotation in clockwise degrees from the image's original orientation.
940
+ # Corresponds to the JSON property `rotation`
941
+ # @return [Fixnum]
942
+ attr_accessor :rotation
943
+
944
+ # The type of sensor used to create the photo.
945
+ # Corresponds to the JSON property `sensor`
946
+ # @return [String]
947
+ attr_accessor :sensor
948
+
949
+ # The distance to the subject of the photo, in meters.
950
+ # Corresponds to the JSON property `subjectDistance`
951
+ # @return [Fixnum]
952
+ attr_accessor :subject_distance
953
+
954
+ # The date and time the photo was taken (EXIF DateTime).
955
+ # Corresponds to the JSON property `time`
956
+ # @return [String]
957
+ attr_accessor :time
958
+
959
+ # The white balance mode used to create the photo.
960
+ # Corresponds to the JSON property `whiteBalance`
961
+ # @return [String]
962
+ attr_accessor :white_balance
963
+
964
+ # The width of the image in pixels.
965
+ # Corresponds to the JSON property `width`
966
+ # @return [Fixnum]
967
+ attr_accessor :width
968
+
969
+ def initialize(**args)
970
+ update!(**args)
971
+ end
972
+
973
+ # Update properties of this object
974
+ def update!(**args)
975
+ @aperture = args[:aperture] unless args[:aperture].nil?
976
+ @camera_make = args[:camera_make] unless args[:camera_make].nil?
977
+ @camera_model = args[:camera_model] unless args[:camera_model].nil?
978
+ @color_space = args[:color_space] unless args[:color_space].nil?
979
+ @exposure_bias = args[:exposure_bias] unless args[:exposure_bias].nil?
980
+ @exposure_mode = args[:exposure_mode] unless args[:exposure_mode].nil?
981
+ @exposure_time = args[:exposure_time] unless args[:exposure_time].nil?
982
+ @flash_used = args[:flash_used] unless args[:flash_used].nil?
983
+ @focal_length = args[:focal_length] unless args[:focal_length].nil?
984
+ @height = args[:height] unless args[:height].nil?
985
+ @iso_speed = args[:iso_speed] unless args[:iso_speed].nil?
986
+ @lens = args[:lens] unless args[:lens].nil?
987
+ @location = args[:location] unless args[:location].nil?
988
+ @max_aperture_value = args[:max_aperture_value] unless args[:max_aperture_value].nil?
989
+ @metering_mode = args[:metering_mode] unless args[:metering_mode].nil?
990
+ @rotation = args[:rotation] unless args[:rotation].nil?
991
+ @sensor = args[:sensor] unless args[:sensor].nil?
992
+ @subject_distance = args[:subject_distance] unless args[:subject_distance].nil?
993
+ @time = args[:time] unless args[:time].nil?
994
+ @white_balance = args[:white_balance] unless args[:white_balance].nil?
995
+ @width = args[:width] unless args[:width].nil?
996
+ end
997
+
998
+ # Geographic location information stored in the image.
999
+ class Location
1000
+ include Google::Apis::Core::Hashable
1001
+
1002
+ # The altitude stored in the image.
1003
+ # Corresponds to the JSON property `altitude`
1004
+ # @return [Float]
1005
+ attr_accessor :altitude
1006
+
1007
+ # The latitude stored in the image.
1008
+ # Corresponds to the JSON property `latitude`
1009
+ # @return [Float]
1010
+ attr_accessor :latitude
1011
+
1012
+ # The longitude stored in the image.
1013
+ # Corresponds to the JSON property `longitude`
1014
+ # @return [Float]
1015
+ attr_accessor :longitude
1016
+
1017
+ def initialize(**args)
1018
+ update!(**args)
1019
+ end
1020
+
1021
+ # Update properties of this object
1022
+ def update!(**args)
1023
+ @altitude = args[:altitude] unless args[:altitude].nil?
1024
+ @latitude = args[:latitude] unless args[:latitude].nil?
1025
+ @longitude = args[:longitude] unless args[:longitude].nil?
1026
+ end
1027
+ end
1028
+ end
1029
+
1030
+ # Additional metadata about video media. This may not be available immediately
1031
+ # upon upload.
1032
+ class VideoMediaMetadata
1033
+ include Google::Apis::Core::Hashable
1034
+
1035
+ # The duration of the video in milliseconds.
1036
+ # Corresponds to the JSON property `durationMillis`
1037
+ # @return [String]
1038
+ attr_accessor :duration_millis
1039
+
1040
+ # The height of the video in pixels.
1041
+ # Corresponds to the JSON property `height`
1042
+ # @return [Fixnum]
1043
+ attr_accessor :height
1044
+
1045
+ # The width of the video in pixels.
1046
+ # Corresponds to the JSON property `width`
1047
+ # @return [Fixnum]
1048
+ attr_accessor :width
1049
+
1050
+ def initialize(**args)
1051
+ update!(**args)
1052
+ end
1053
+
1054
+ # Update properties of this object
1055
+ def update!(**args)
1056
+ @duration_millis = args[:duration_millis] unless args[:duration_millis].nil?
1057
+ @height = args[:height] unless args[:height].nil?
1058
+ @width = args[:width] unless args[:width].nil?
1059
+ end
1060
+ end
1061
+ end
1062
+
1063
+ # A list of files.
1064
+ class FileList
1065
+ include Google::Apis::Core::Hashable
1066
+
1067
+ # The page of files.
1068
+ # Corresponds to the JSON property `files`
1069
+ # @return [Array<Google::Apis::DriveV3::File>]
1070
+ attr_accessor :files
1071
+
1072
+ # This is always drive#fileList.
1073
+ # Corresponds to the JSON property `kind`
1074
+ # @return [String]
1075
+ attr_accessor :kind
1076
+
1077
+ # The page token for the next page of files. This will be absent if the end of
1078
+ # the files list has been reached.
1079
+ # Corresponds to the JSON property `nextPageToken`
1080
+ # @return [String]
1081
+ attr_accessor :next_page_token
1082
+
1083
+ def initialize(**args)
1084
+ update!(**args)
1085
+ end
1086
+
1087
+ # Update properties of this object
1088
+ def update!(**args)
1089
+ @files = args[:files] unless args[:files].nil?
1090
+ @kind = args[:kind] unless args[:kind].nil?
1091
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
1092
+ end
1093
+ end
1094
+
1095
+ # A list of generated file IDs which can be provided in create requests.
1096
+ class GeneratedIds
1097
+ include Google::Apis::Core::Hashable
1098
+
1099
+ # The IDs generated for the requesting user in the specified space.
1100
+ # Corresponds to the JSON property `ids`
1101
+ # @return [Array<String>]
1102
+ attr_accessor :ids
1103
+
1104
+ # This is always drive#generatedIds
1105
+ # Corresponds to the JSON property `kind`
1106
+ # @return [String]
1107
+ attr_accessor :kind
1108
+
1109
+ # The type of file that can be created with these IDs.
1110
+ # Corresponds to the JSON property `space`
1111
+ # @return [String]
1112
+ attr_accessor :space
1113
+
1114
+ def initialize(**args)
1115
+ update!(**args)
1116
+ end
1117
+
1118
+ # Update properties of this object
1119
+ def update!(**args)
1120
+ @ids = args[:ids] unless args[:ids].nil?
1121
+ @kind = args[:kind] unless args[:kind].nil?
1122
+ @space = args[:space] unless args[:space].nil?
1123
+ end
1124
+ end
1125
+
1126
+ # A permission for a file. A permission grants a user, group, domain or the
1127
+ # world access to a file or a folder hierarchy.
1128
+ class Permission
1129
+ include Google::Apis::Core::Hashable
1130
+
1131
+ # Whether the permission allows the file to be discovered through search. This
1132
+ # is only applicable for permissions of type domain or anyone.
1133
+ # Corresponds to the JSON property `allowFileDiscovery`
1134
+ # @return [Boolean]
1135
+ attr_accessor :allow_file_discovery
1136
+ alias_method :allow_file_discovery?, :allow_file_discovery
1137
+
1138
+ # A displayable name for users, groups or domains.
1139
+ # Corresponds to the JSON property `displayName`
1140
+ # @return [String]
1141
+ attr_accessor :display_name
1142
+
1143
+ # The domain to which this permission refers.
1144
+ # Corresponds to the JSON property `domain`
1145
+ # @return [String]
1146
+ attr_accessor :domain
1147
+
1148
+ # The email address of the user or group to which this permission refers.
1149
+ # Corresponds to the JSON property `emailAddress`
1150
+ # @return [String]
1151
+ attr_accessor :email_address
1152
+
1153
+ # The ID of this permission. This is a unique identifier for the grantee, and is
1154
+ # published in User resources as permissionId.
1155
+ # Corresponds to the JSON property `id`
1156
+ # @return [String]
1157
+ attr_accessor :id
1158
+
1159
+ # This is always drive#permission.
1160
+ # Corresponds to the JSON property `kind`
1161
+ # @return [String]
1162
+ attr_accessor :kind
1163
+
1164
+ # A link to the user's profile photo, if available.
1165
+ # Corresponds to the JSON property `photoLink`
1166
+ # @return [String]
1167
+ attr_accessor :photo_link
1168
+
1169
+ # The role granted by this permission. Valid values are:
1170
+ # - owner
1171
+ # - writer
1172
+ # - commenter
1173
+ # - reader
1174
+ # Corresponds to the JSON property `role`
1175
+ # @return [String]
1176
+ attr_accessor :role
1177
+
1178
+ # The type of the grantee. Valid values are:
1179
+ # - user
1180
+ # - group
1181
+ # - domain
1182
+ # - anyone
1183
+ # Corresponds to the JSON property `type`
1184
+ # @return [String]
1185
+ attr_accessor :type
1186
+
1187
+ def initialize(**args)
1188
+ update!(**args)
1189
+ end
1190
+
1191
+ # Update properties of this object
1192
+ def update!(**args)
1193
+ @allow_file_discovery = args[:allow_file_discovery] unless args[:allow_file_discovery].nil?
1194
+ @display_name = args[:display_name] unless args[:display_name].nil?
1195
+ @domain = args[:domain] unless args[:domain].nil?
1196
+ @email_address = args[:email_address] unless args[:email_address].nil?
1197
+ @id = args[:id] unless args[:id].nil?
1198
+ @kind = args[:kind] unless args[:kind].nil?
1199
+ @photo_link = args[:photo_link] unless args[:photo_link].nil?
1200
+ @role = args[:role] unless args[:role].nil?
1201
+ @type = args[:type] unless args[:type].nil?
1202
+ end
1203
+ end
1204
+
1205
+ # A list of permissions for a file.
1206
+ class PermissionList
1207
+ include Google::Apis::Core::Hashable
1208
+
1209
+ # This is always drive#permissionList.
1210
+ # Corresponds to the JSON property `kind`
1211
+ # @return [String]
1212
+ attr_accessor :kind
1213
+
1214
+ # The full list of permissions.
1215
+ # Corresponds to the JSON property `permissions`
1216
+ # @return [Array<Google::Apis::DriveV3::Permission>]
1217
+ attr_accessor :permissions
1218
+
1219
+ def initialize(**args)
1220
+ update!(**args)
1221
+ end
1222
+
1223
+ # Update properties of this object
1224
+ def update!(**args)
1225
+ @kind = args[:kind] unless args[:kind].nil?
1226
+ @permissions = args[:permissions] unless args[:permissions].nil?
1227
+ end
1228
+ end
1229
+
1230
+ # A reply to a comment on a file.
1231
+ class Reply
1232
+ include Google::Apis::Core::Hashable
1233
+
1234
+ # The action the reply performed to the parent comment. Valid values are:
1235
+ # - resolve
1236
+ # - reopen
1237
+ # Corresponds to the JSON property `action`
1238
+ # @return [String]
1239
+ attr_accessor :action
1240
+
1241
+ # Information about a Drive user.
1242
+ # Corresponds to the JSON property `author`
1243
+ # @return [Google::Apis::DriveV3::User]
1244
+ attr_accessor :author
1245
+
1246
+ # The plain text content of the reply. This field is used for setting the
1247
+ # content, while htmlContent should be displayed. This is required on creates if
1248
+ # no action is specified.
1249
+ # Corresponds to the JSON property `content`
1250
+ # @return [String]
1251
+ attr_accessor :content
1252
+
1253
+ # The time at which the reply was created (RFC 3339 date-time).
1254
+ # Corresponds to the JSON property `createdTime`
1255
+ # @return [DateTime]
1256
+ attr_accessor :created_time
1257
+
1258
+ # Whether the reply has been deleted. A deleted reply has no content.
1259
+ # Corresponds to the JSON property `deleted`
1260
+ # @return [Boolean]
1261
+ attr_accessor :deleted
1262
+ alias_method :deleted?, :deleted
1263
+
1264
+ # The content of the reply with HTML formatting.
1265
+ # Corresponds to the JSON property `htmlContent`
1266
+ # @return [String]
1267
+ attr_accessor :html_content
1268
+
1269
+ # The ID of the reply.
1270
+ # Corresponds to the JSON property `id`
1271
+ # @return [String]
1272
+ attr_accessor :id
1273
+
1274
+ # This is always drive#reply.
1275
+ # Corresponds to the JSON property `kind`
1276
+ # @return [String]
1277
+ attr_accessor :kind
1278
+
1279
+ # The last time the reply was modified (RFC 3339 date-time).
1280
+ # Corresponds to the JSON property `modifiedTime`
1281
+ # @return [DateTime]
1282
+ attr_accessor :modified_time
1283
+
1284
+ def initialize(**args)
1285
+ update!(**args)
1286
+ end
1287
+
1288
+ # Update properties of this object
1289
+ def update!(**args)
1290
+ @action = args[:action] unless args[:action].nil?
1291
+ @author = args[:author] unless args[:author].nil?
1292
+ @content = args[:content] unless args[:content].nil?
1293
+ @created_time = args[:created_time] unless args[:created_time].nil?
1294
+ @deleted = args[:deleted] unless args[:deleted].nil?
1295
+ @html_content = args[:html_content] unless args[:html_content].nil?
1296
+ @id = args[:id] unless args[:id].nil?
1297
+ @kind = args[:kind] unless args[:kind].nil?
1298
+ @modified_time = args[:modified_time] unless args[:modified_time].nil?
1299
+ end
1300
+ end
1301
+
1302
+ # A list of replies to a comment on a file.
1303
+ class ReplyList
1304
+ include Google::Apis::Core::Hashable
1305
+
1306
+ # This is always drive#replyList.
1307
+ # Corresponds to the JSON property `kind`
1308
+ # @return [String]
1309
+ attr_accessor :kind
1310
+
1311
+ # The page token for the next page of replies. This will be absent if the end of
1312
+ # the replies list has been reached.
1313
+ # Corresponds to the JSON property `nextPageToken`
1314
+ # @return [String]
1315
+ attr_accessor :next_page_token
1316
+
1317
+ # The page of replies.
1318
+ # Corresponds to the JSON property `replies`
1319
+ # @return [Array<Google::Apis::DriveV3::Reply>]
1320
+ attr_accessor :replies
1321
+
1322
+ def initialize(**args)
1323
+ update!(**args)
1324
+ end
1325
+
1326
+ # Update properties of this object
1327
+ def update!(**args)
1328
+ @kind = args[:kind] unless args[:kind].nil?
1329
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
1330
+ @replies = args[:replies] unless args[:replies].nil?
1331
+ end
1332
+ end
1333
+
1334
+ # The metadata for a revision to a file.
1335
+ class Revision
1336
+ include Google::Apis::Core::Hashable
1337
+
1338
+ # The ID of the revision.
1339
+ # Corresponds to the JSON property `id`
1340
+ # @return [String]
1341
+ attr_accessor :id
1342
+
1343
+ # Whether to keep this revision forever, even if it is no longer the head
1344
+ # revision. If not set, the revision will be automatically purged 30 days after
1345
+ # newer content is uploaded. This can be set on a maximum of 200 revisions for a
1346
+ # file.
1347
+ # This field is only applicable to files with binary content in Drive.
1348
+ # Corresponds to the JSON property `keepForever`
1349
+ # @return [Boolean]
1350
+ attr_accessor :keep_forever
1351
+ alias_method :keep_forever?, :keep_forever
1352
+
1353
+ # This is always drive#revision.
1354
+ # Corresponds to the JSON property `kind`
1355
+ # @return [String]
1356
+ attr_accessor :kind
1357
+
1358
+ # Information about a Drive user.
1359
+ # Corresponds to the JSON property `lastModifyingUser`
1360
+ # @return [Google::Apis::DriveV3::User]
1361
+ attr_accessor :last_modifying_user
1362
+
1363
+ # The MD5 checksum of the revision's content. This is only applicable to files
1364
+ # with binary content in Drive.
1365
+ # Corresponds to the JSON property `md5Checksum`
1366
+ # @return [String]
1367
+ attr_accessor :md5_checksum
1368
+
1369
+ # The MIME type of the revision.
1370
+ # Corresponds to the JSON property `mimeType`
1371
+ # @return [String]
1372
+ attr_accessor :mime_type
1373
+
1374
+ # The last time the revision was modified (RFC 3339 date-time).
1375
+ # Corresponds to the JSON property `modifiedTime`
1376
+ # @return [DateTime]
1377
+ attr_accessor :modified_time
1378
+
1379
+ # The original filename used to create this revision. This is only applicable to
1380
+ # files with binary content in Drive.
1381
+ # Corresponds to the JSON property `originalFilename`
1382
+ # @return [String]
1383
+ attr_accessor :original_filename
1384
+
1385
+ # Whether subsequent revisions will be automatically republished. This is only
1386
+ # applicable to Google Docs.
1387
+ # Corresponds to the JSON property `publishAuto`
1388
+ # @return [Boolean]
1389
+ attr_accessor :publish_auto
1390
+ alias_method :publish_auto?, :publish_auto
1391
+
1392
+ # Whether this revision is published. This is only applicable to Google Docs.
1393
+ # Corresponds to the JSON property `published`
1394
+ # @return [Boolean]
1395
+ attr_accessor :published
1396
+ alias_method :published?, :published
1397
+
1398
+ # Whether this revision is published outside the domain. This is only applicable
1399
+ # to Google Docs.
1400
+ # Corresponds to the JSON property `publishedOutsideDomain`
1401
+ # @return [Boolean]
1402
+ attr_accessor :published_outside_domain
1403
+ alias_method :published_outside_domain?, :published_outside_domain
1404
+
1405
+ # The size of the revision's content in bytes. This is only applicable to files
1406
+ # with binary content in Drive.
1407
+ # Corresponds to the JSON property `size`
1408
+ # @return [String]
1409
+ attr_accessor :size
1410
+
1411
+ def initialize(**args)
1412
+ update!(**args)
1413
+ end
1414
+
1415
+ # Update properties of this object
1416
+ def update!(**args)
1417
+ @id = args[:id] unless args[:id].nil?
1418
+ @keep_forever = args[:keep_forever] unless args[:keep_forever].nil?
1419
+ @kind = args[:kind] unless args[:kind].nil?
1420
+ @last_modifying_user = args[:last_modifying_user] unless args[:last_modifying_user].nil?
1421
+ @md5_checksum = args[:md5_checksum] unless args[:md5_checksum].nil?
1422
+ @mime_type = args[:mime_type] unless args[:mime_type].nil?
1423
+ @modified_time = args[:modified_time] unless args[:modified_time].nil?
1424
+ @original_filename = args[:original_filename] unless args[:original_filename].nil?
1425
+ @publish_auto = args[:publish_auto] unless args[:publish_auto].nil?
1426
+ @published = args[:published] unless args[:published].nil?
1427
+ @published_outside_domain = args[:published_outside_domain] unless args[:published_outside_domain].nil?
1428
+ @size = args[:size] unless args[:size].nil?
1429
+ end
1430
+ end
1431
+
1432
+ # A list of revisions of a file.
1433
+ class RevisionList
1434
+ include Google::Apis::Core::Hashable
1435
+
1436
+ # This is always drive#revisionList.
1437
+ # Corresponds to the JSON property `kind`
1438
+ # @return [String]
1439
+ attr_accessor :kind
1440
+
1441
+ # The full list of revisions.
1442
+ # Corresponds to the JSON property `revisions`
1443
+ # @return [Array<Google::Apis::DriveV3::Revision>]
1444
+ attr_accessor :revisions
1445
+
1446
+ def initialize(**args)
1447
+ update!(**args)
1448
+ end
1449
+
1450
+ # Update properties of this object
1451
+ def update!(**args)
1452
+ @kind = args[:kind] unless args[:kind].nil?
1453
+ @revisions = args[:revisions] unless args[:revisions].nil?
1454
+ end
1455
+ end
1456
+
1457
+ #
1458
+ class StartPageToken
1459
+ include Google::Apis::Core::Hashable
1460
+
1461
+ # This is always drive#startPageToken.
1462
+ # Corresponds to the JSON property `kind`
1463
+ # @return [String]
1464
+ attr_accessor :kind
1465
+
1466
+ # The starting page token for listing changes.
1467
+ # Corresponds to the JSON property `startPageToken`
1468
+ # @return [String]
1469
+ attr_accessor :start_page_token
1470
+
1471
+ def initialize(**args)
1472
+ update!(**args)
1473
+ end
1474
+
1475
+ # Update properties of this object
1476
+ def update!(**args)
1477
+ @kind = args[:kind] unless args[:kind].nil?
1478
+ @start_page_token = args[:start_page_token] unless args[:start_page_token].nil?
1479
+ end
1480
+ end
1481
+
1482
+ # Information about a Drive user.
1483
+ class User
1484
+ include Google::Apis::Core::Hashable
1485
+
1486
+ # A plain text displayable name for this user.
1487
+ # Corresponds to the JSON property `displayName`
1488
+ # @return [String]
1489
+ attr_accessor :display_name
1490
+
1491
+ # The email address of the user. This may not be present in certain contexts if
1492
+ # the user has not made their email address visible to the requester.
1493
+ # Corresponds to the JSON property `emailAddress`
1494
+ # @return [String]
1495
+ attr_accessor :email_address
1496
+
1497
+ # This is always drive#user.
1498
+ # Corresponds to the JSON property `kind`
1499
+ # @return [String]
1500
+ attr_accessor :kind
1501
+
1502
+ # Whether this user is the requesting user.
1503
+ # Corresponds to the JSON property `me`
1504
+ # @return [Boolean]
1505
+ attr_accessor :me
1506
+ alias_method :me?, :me
1507
+
1508
+ # The user's ID as visible in Permission resources.
1509
+ # Corresponds to the JSON property `permissionId`
1510
+ # @return [String]
1511
+ attr_accessor :permission_id
1512
+
1513
+ # A link to the user's profile photo, if available.
1514
+ # Corresponds to the JSON property `photoLink`
1515
+ # @return [String]
1516
+ attr_accessor :photo_link
1517
+
1518
+ def initialize(**args)
1519
+ update!(**args)
1520
+ end
1521
+
1522
+ # Update properties of this object
1523
+ def update!(**args)
1524
+ @display_name = args[:display_name] unless args[:display_name].nil?
1525
+ @email_address = args[:email_address] unless args[:email_address].nil?
1526
+ @kind = args[:kind] unless args[:kind].nil?
1527
+ @me = args[:me] unless args[:me].nil?
1528
+ @permission_id = args[:permission_id] unless args[:permission_id].nil?
1529
+ @photo_link = args[:photo_link] unless args[:photo_link].nil?
1530
+ end
1531
+ end
1532
+ end
1533
+ end
1534
+ end