google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,427 @@
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 StorageV1
24
+
25
+ class Bucket
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ class CorsConfiguration
29
+ class Representation < Google::Apis::Core::JsonRepresentation; end
30
+ end
31
+
32
+ class Lifecycle
33
+ class Representation < Google::Apis::Core::JsonRepresentation; end
34
+
35
+ class Rule
36
+ class Representation < Google::Apis::Core::JsonRepresentation; end
37
+
38
+ class Action
39
+ class Representation < Google::Apis::Core::JsonRepresentation; end
40
+ end
41
+
42
+ class Condition
43
+ class Representation < Google::Apis::Core::JsonRepresentation; end
44
+ end
45
+ end
46
+ end
47
+
48
+ class Logging
49
+ class Representation < Google::Apis::Core::JsonRepresentation; end
50
+ end
51
+
52
+ class Owner
53
+ class Representation < Google::Apis::Core::JsonRepresentation; end
54
+ end
55
+
56
+ class Versioning
57
+ class Representation < Google::Apis::Core::JsonRepresentation; end
58
+ end
59
+
60
+ class Website
61
+ class Representation < Google::Apis::Core::JsonRepresentation; end
62
+ end
63
+ end
64
+
65
+ class BucketAccessControl
66
+ class Representation < Google::Apis::Core::JsonRepresentation; end
67
+
68
+ class ProjectTeam
69
+ class Representation < Google::Apis::Core::JsonRepresentation; end
70
+ end
71
+ end
72
+
73
+ class BucketAccessControls
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class Buckets
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class Channel
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class ComposeRequest
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ class SourceObject
89
+ class Representation < Google::Apis::Core::JsonRepresentation; end
90
+
91
+ class ObjectPreconditions
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+ end
94
+ end
95
+ end
96
+
97
+ class Object
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ class Owner
101
+ class Representation < Google::Apis::Core::JsonRepresentation; end
102
+ end
103
+ end
104
+
105
+ class ObjectAccessControl
106
+ class Representation < Google::Apis::Core::JsonRepresentation; end
107
+
108
+ class ProjectTeam
109
+ class Representation < Google::Apis::Core::JsonRepresentation; end
110
+ end
111
+ end
112
+
113
+ class ObjectAccessControls
114
+ class Representation < Google::Apis::Core::JsonRepresentation; end
115
+ end
116
+
117
+ class Objects
118
+ class Representation < Google::Apis::Core::JsonRepresentation; end
119
+ end
120
+
121
+ class RewriteResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+ end
124
+
125
+ class Bucket
126
+ # @private
127
+ class Representation < Google::Apis::Core::JsonRepresentation
128
+ collection :acl, as: 'acl', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation
129
+
130
+ collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation
131
+
132
+ collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation
133
+
134
+ property :etag, as: 'etag'
135
+ property :id, as: 'id'
136
+ property :kind, as: 'kind'
137
+ property :lifecycle, as: 'lifecycle', class: Google::Apis::StorageV1::Bucket::Lifecycle, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Representation
138
+
139
+ property :location, as: 'location'
140
+ property :logging, as: 'logging', class: Google::Apis::StorageV1::Bucket::Logging, decorator: Google::Apis::StorageV1::Bucket::Logging::Representation
141
+
142
+ property :metageneration, as: 'metageneration'
143
+ property :name, as: 'name'
144
+ property :owner, as: 'owner', class: Google::Apis::StorageV1::Bucket::Owner, decorator: Google::Apis::StorageV1::Bucket::Owner::Representation
145
+
146
+ property :project_number, as: 'projectNumber'
147
+ property :self_link, as: 'selfLink'
148
+ property :storage_class, as: 'storageClass'
149
+ property :time_created, as: 'timeCreated', type: DateTime
150
+
151
+ property :versioning, as: 'versioning', class: Google::Apis::StorageV1::Bucket::Versioning, decorator: Google::Apis::StorageV1::Bucket::Versioning::Representation
152
+
153
+ property :website, as: 'website', class: Google::Apis::StorageV1::Bucket::Website, decorator: Google::Apis::StorageV1::Bucket::Website::Representation
154
+
155
+ end
156
+
157
+ class CorsConfiguration
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ property :max_age_seconds, as: 'maxAgeSeconds'
161
+ collection :http_method, as: 'method'
162
+ collection :origin, as: 'origin'
163
+ collection :response_header, as: 'responseHeader'
164
+ end
165
+ end
166
+
167
+ class Lifecycle
168
+ # @private
169
+ class Representation < Google::Apis::Core::JsonRepresentation
170
+ collection :rule, as: 'rule', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Representation
171
+
172
+ end
173
+
174
+ class Rule
175
+ # @private
176
+ class Representation < Google::Apis::Core::JsonRepresentation
177
+ property :action, as: 'action', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action::Representation
178
+
179
+ property :condition, as: 'condition', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition::Representation
180
+
181
+ end
182
+
183
+ class Action
184
+ # @private
185
+ class Representation < Google::Apis::Core::JsonRepresentation
186
+ property :type, as: 'type'
187
+ end
188
+ end
189
+
190
+ class Condition
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ property :age, as: 'age'
194
+ property :created_before, as: 'createdBefore', type: Date
195
+
196
+ property :is_live, as: 'isLive'
197
+ property :num_newer_versions, as: 'numNewerVersions'
198
+ end
199
+ end
200
+ end
201
+ end
202
+
203
+ class Logging
204
+ # @private
205
+ class Representation < Google::Apis::Core::JsonRepresentation
206
+ property :log_bucket, as: 'logBucket'
207
+ property :log_object_prefix, as: 'logObjectPrefix'
208
+ end
209
+ end
210
+
211
+ class Owner
212
+ # @private
213
+ class Representation < Google::Apis::Core::JsonRepresentation
214
+ property :entity, as: 'entity'
215
+ property :entity_id, as: 'entityId'
216
+ end
217
+ end
218
+
219
+ class Versioning
220
+ # @private
221
+ class Representation < Google::Apis::Core::JsonRepresentation
222
+ property :enabled, as: 'enabled'
223
+ end
224
+ end
225
+
226
+ class Website
227
+ # @private
228
+ class Representation < Google::Apis::Core::JsonRepresentation
229
+ property :main_page_suffix, as: 'mainPageSuffix'
230
+ property :not_found_page, as: 'notFoundPage'
231
+ end
232
+ end
233
+ end
234
+
235
+ class BucketAccessControl
236
+ # @private
237
+ class Representation < Google::Apis::Core::JsonRepresentation
238
+ property :bucket, as: 'bucket'
239
+ property :domain, as: 'domain'
240
+ property :email, as: 'email'
241
+ property :entity, as: 'entity'
242
+ property :entity_id, as: 'entityId'
243
+ property :etag, as: 'etag'
244
+ property :id, as: 'id'
245
+ property :kind, as: 'kind'
246
+ property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam::Representation
247
+
248
+ property :role, as: 'role'
249
+ property :self_link, as: 'selfLink'
250
+ end
251
+
252
+ class ProjectTeam
253
+ # @private
254
+ class Representation < Google::Apis::Core::JsonRepresentation
255
+ property :project_number, as: 'projectNumber'
256
+ property :team, as: 'team'
257
+ end
258
+ end
259
+ end
260
+
261
+ class BucketAccessControls
262
+ # @private
263
+ class Representation < Google::Apis::Core::JsonRepresentation
264
+ collection :items, as: 'items', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation
265
+
266
+ property :kind, as: 'kind'
267
+ end
268
+ end
269
+
270
+ class Buckets
271
+ # @private
272
+ class Representation < Google::Apis::Core::JsonRepresentation
273
+ collection :items, as: 'items', class: Google::Apis::StorageV1::Bucket, decorator: Google::Apis::StorageV1::Bucket::Representation
274
+
275
+ property :kind, as: 'kind'
276
+ property :next_page_token, as: 'nextPageToken'
277
+ end
278
+ end
279
+
280
+ class Channel
281
+ # @private
282
+ class Representation < Google::Apis::Core::JsonRepresentation
283
+ property :address, as: 'address'
284
+ property :expiration, as: 'expiration'
285
+ property :id, as: 'id'
286
+ property :kind, as: 'kind'
287
+ hash :params, as: 'params'
288
+ property :payload, as: 'payload'
289
+ property :resource_id, as: 'resourceId'
290
+ property :resource_uri, as: 'resourceUri'
291
+ property :token, as: 'token'
292
+ property :type, as: 'type'
293
+ end
294
+ end
295
+
296
+ class ComposeRequest
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :destination, as: 'destination', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
300
+
301
+ property :kind, as: 'kind'
302
+ collection :source_objects, as: 'sourceObjects', class: Google::Apis::StorageV1::ComposeRequest::SourceObject, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::Representation
303
+
304
+ end
305
+
306
+ class SourceObject
307
+ # @private
308
+ class Representation < Google::Apis::Core::JsonRepresentation
309
+ property :generation, as: 'generation'
310
+ property :name, as: 'name'
311
+ property :object_preconditions, as: 'objectPreconditions', class: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions::Representation
312
+
313
+ end
314
+
315
+ class ObjectPreconditions
316
+ # @private
317
+ class Representation < Google::Apis::Core::JsonRepresentation
318
+ property :if_generation_match, as: 'ifGenerationMatch'
319
+ end
320
+ end
321
+ end
322
+ end
323
+
324
+ class Object
325
+ # @private
326
+ class Representation < Google::Apis::Core::JsonRepresentation
327
+ collection :acl, as: 'acl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation
328
+
329
+ property :bucket, as: 'bucket'
330
+ property :cache_control, as: 'cacheControl'
331
+ property :component_count, as: 'componentCount'
332
+ property :content_disposition, as: 'contentDisposition'
333
+ property :content_encoding, as: 'contentEncoding'
334
+ property :content_language, as: 'contentLanguage'
335
+ property :content_type, as: 'contentType'
336
+ property :crc32c, as: 'crc32c'
337
+ property :etag, as: 'etag'
338
+ property :generation, as: 'generation'
339
+ property :id, as: 'id'
340
+ property :kind, as: 'kind'
341
+ property :md5_hash, as: 'md5Hash'
342
+ property :media_link, as: 'mediaLink'
343
+ hash :metadata, as: 'metadata'
344
+ property :metageneration, as: 'metageneration'
345
+ property :name, as: 'name'
346
+ property :owner, as: 'owner', class: Google::Apis::StorageV1::Object::Owner, decorator: Google::Apis::StorageV1::Object::Owner::Representation
347
+
348
+ property :self_link, as: 'selfLink'
349
+ property :size, as: 'size'
350
+ property :storage_class, as: 'storageClass'
351
+ property :time_deleted, as: 'timeDeleted', type: DateTime
352
+
353
+ property :updated, as: 'updated', type: DateTime
354
+
355
+ end
356
+
357
+ class Owner
358
+ # @private
359
+ class Representation < Google::Apis::Core::JsonRepresentation
360
+ property :entity, as: 'entity'
361
+ property :entity_id, as: 'entityId'
362
+ end
363
+ end
364
+ end
365
+
366
+ class ObjectAccessControl
367
+ # @private
368
+ class Representation < Google::Apis::Core::JsonRepresentation
369
+ property :bucket, as: 'bucket'
370
+ property :domain, as: 'domain'
371
+ property :email, as: 'email'
372
+ property :entity, as: 'entity'
373
+ property :entity_id, as: 'entityId'
374
+ property :etag, as: 'etag'
375
+ property :generation, as: 'generation'
376
+ property :id, as: 'id'
377
+ property :kind, as: 'kind'
378
+ property :object, as: 'object'
379
+ property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam::Representation
380
+
381
+ property :role, as: 'role'
382
+ property :self_link, as: 'selfLink'
383
+ end
384
+
385
+ class ProjectTeam
386
+ # @private
387
+ class Representation < Google::Apis::Core::JsonRepresentation
388
+ property :project_number, as: 'projectNumber'
389
+ property :team, as: 'team'
390
+ end
391
+ end
392
+ end
393
+
394
+ class ObjectAccessControls
395
+ # @private
396
+ class Representation < Google::Apis::Core::JsonRepresentation
397
+ collection :items, as: 'items'
398
+ property :kind, as: 'kind'
399
+ end
400
+ end
401
+
402
+ class Objects
403
+ # @private
404
+ class Representation < Google::Apis::Core::JsonRepresentation
405
+ collection :items, as: 'items', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
406
+
407
+ property :kind, as: 'kind'
408
+ property :next_page_token, as: 'nextPageToken'
409
+ collection :prefixes, as: 'prefixes'
410
+ end
411
+ end
412
+
413
+ class RewriteResponse
414
+ # @private
415
+ class Representation < Google::Apis::Core::JsonRepresentation
416
+ property :done, as: 'done'
417
+ property :kind, as: 'kind'
418
+ property :object_size, as: 'objectSize'
419
+ property :resource, as: 'resource', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
420
+
421
+ property :rewrite_token, as: 'rewriteToken'
422
+ property :total_bytes_rewritten, as: 'totalBytesRewritten'
423
+ end
424
+ end
425
+ end
426
+ end
427
+ end
@@ -0,0 +1,1920 @@
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 StorageV1
23
+ # Cloud Storage API
24
+ #
25
+ # Lets you store and retrieve potentially-large, immutable data objects.
26
+ #
27
+ # @example
28
+ # require 'google/apis/storage_v1'
29
+ #
30
+ # Storage = Google::Apis::StorageV1 # Alias the module
31
+ # service = Storage::StorageService.new
32
+ #
33
+ # @see https://developers.google.com/storage/docs/json_api/
34
+ class StorageService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'storage/v1/')
53
+ end
54
+
55
+ # Permanently deletes the ACL entry for the specified entity on the specified
56
+ # bucket.
57
+ # @param [String] bucket
58
+ # Name of a bucket.
59
+ # @param [String] entity
60
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
61
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # Overrides userIp if both are provided.
68
+ # @param [String] user_ip
69
+ # IP address of the site where the request originates. Use this if you want to
70
+ # enforce per-user limits.
71
+ # @param [Google::Apis::RequestOptions] options
72
+ # Request-specific options
73
+ #
74
+ # @yield [result, err] Result & error if block supplied
75
+ # @yieldparam result [NilClass] No result returned for this method
76
+ # @yieldparam err [StandardError] error object if request failed
77
+ #
78
+ # @return [void]
79
+ #
80
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
81
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
82
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
83
+ def delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
84
+ path = 'b/{bucket}/acl/{entity}'
85
+ command = make_simple_command(:delete, path, options)
86
+ command.params['bucket'] = bucket unless bucket.nil?
87
+ command.params['entity'] = entity unless entity.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ command.query['userIp'] = user_ip unless user_ip.nil?
91
+ execute_or_queue_command(command, &block)
92
+ end
93
+
94
+ # Returns the ACL entry for the specified entity on the specified bucket.
95
+ # @param [String] bucket
96
+ # Name of a bucket.
97
+ # @param [String] entity
98
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
99
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # Overrides userIp if both are provided.
106
+ # @param [String] user_ip
107
+ # IP address of the site where the request originates. Use this if you want to
108
+ # enforce per-user limits.
109
+ # @param [Google::Apis::RequestOptions] options
110
+ # Request-specific options
111
+ #
112
+ # @yield [result, err] Result & error if block supplied
113
+ # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
114
+ # @yieldparam err [StandardError] error object if request failed
115
+ #
116
+ # @return [Google::Apis::StorageV1::BucketAccessControl]
117
+ #
118
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
119
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
120
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
121
+ def get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
122
+ path = 'b/{bucket}/acl/{entity}'
123
+ command = make_simple_command(:get, path, options)
124
+ command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
125
+ command.response_class = Google::Apis::StorageV1::BucketAccessControl
126
+ command.params['bucket'] = bucket unless bucket.nil?
127
+ command.params['entity'] = entity unless entity.nil?
128
+ command.query['fields'] = fields unless fields.nil?
129
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
130
+ command.query['userIp'] = user_ip unless user_ip.nil?
131
+ execute_or_queue_command(command, &block)
132
+ end
133
+
134
+ # Creates a new ACL entry on the specified bucket.
135
+ # @param [String] bucket
136
+ # Name of a bucket.
137
+ # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
138
+ # @param [String] fields
139
+ # Selector specifying which fields to include in a partial response.
140
+ # @param [String] quota_user
141
+ # Available to use for quota purposes for server-side applications. Can be any
142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
143
+ # Overrides userIp if both are provided.
144
+ # @param [String] user_ip
145
+ # IP address of the site where the request originates. Use this if you want to
146
+ # enforce per-user limits.
147
+ # @param [Google::Apis::RequestOptions] options
148
+ # Request-specific options
149
+ #
150
+ # @yield [result, err] Result & error if block supplied
151
+ # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
152
+ # @yieldparam err [StandardError] error object if request failed
153
+ #
154
+ # @return [Google::Apis::StorageV1::BucketAccessControl]
155
+ #
156
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
157
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
158
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
159
+ def insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
160
+ path = 'b/{bucket}/acl'
161
+ command = make_simple_command(:post, path, options)
162
+ command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
163
+ command.request_object = bucket_access_control_object
164
+ command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
165
+ command.response_class = Google::Apis::StorageV1::BucketAccessControl
166
+ command.params['bucket'] = bucket unless bucket.nil?
167
+ command.query['fields'] = fields unless fields.nil?
168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
169
+ command.query['userIp'] = user_ip unless user_ip.nil?
170
+ execute_or_queue_command(command, &block)
171
+ end
172
+
173
+ # Retrieves ACL entries on the specified bucket.
174
+ # @param [String] bucket
175
+ # Name of a bucket.
176
+ # @param [String] fields
177
+ # Selector specifying which fields to include in a partial response.
178
+ # @param [String] quota_user
179
+ # Available to use for quota purposes for server-side applications. Can be any
180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
+ # Overrides userIp if both are provided.
182
+ # @param [String] user_ip
183
+ # IP address of the site where the request originates. Use this if you want to
184
+ # enforce per-user limits.
185
+ # @param [Google::Apis::RequestOptions] options
186
+ # Request-specific options
187
+ #
188
+ # @yield [result, err] Result & error if block supplied
189
+ # @yieldparam result [Google::Apis::StorageV1::BucketAccessControls] parsed result object
190
+ # @yieldparam err [StandardError] error object if request failed
191
+ #
192
+ # @return [Google::Apis::StorageV1::BucketAccessControls]
193
+ #
194
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
195
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
196
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
197
+ def list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
198
+ path = 'b/{bucket}/acl'
199
+ command = make_simple_command(:get, path, options)
200
+ command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation
201
+ command.response_class = Google::Apis::StorageV1::BucketAccessControls
202
+ command.params['bucket'] = bucket unless bucket.nil?
203
+ command.query['fields'] = fields unless fields.nil?
204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
205
+ command.query['userIp'] = user_ip unless user_ip.nil?
206
+ execute_or_queue_command(command, &block)
207
+ end
208
+
209
+ # Updates an ACL entry on the specified bucket. This method supports patch
210
+ # semantics.
211
+ # @param [String] bucket
212
+ # Name of a bucket.
213
+ # @param [String] entity
214
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
215
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
216
+ # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
217
+ # @param [String] fields
218
+ # Selector specifying which fields to include in a partial response.
219
+ # @param [String] quota_user
220
+ # Available to use for quota purposes for server-side applications. Can be any
221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
222
+ # Overrides userIp if both are provided.
223
+ # @param [String] user_ip
224
+ # IP address of the site where the request originates. Use this if you want to
225
+ # enforce per-user limits.
226
+ # @param [Google::Apis::RequestOptions] options
227
+ # Request-specific options
228
+ #
229
+ # @yield [result, err] Result & error if block supplied
230
+ # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
231
+ # @yieldparam err [StandardError] error object if request failed
232
+ #
233
+ # @return [Google::Apis::StorageV1::BucketAccessControl]
234
+ #
235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
238
+ def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
239
+ path = 'b/{bucket}/acl/{entity}'
240
+ command = make_simple_command(:patch, path, options)
241
+ command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
242
+ command.request_object = bucket_access_control_object
243
+ command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
244
+ command.response_class = Google::Apis::StorageV1::BucketAccessControl
245
+ command.params['bucket'] = bucket unless bucket.nil?
246
+ command.params['entity'] = entity unless entity.nil?
247
+ command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
+ command.query['userIp'] = user_ip unless user_ip.nil?
250
+ execute_or_queue_command(command, &block)
251
+ end
252
+
253
+ # Updates an ACL entry on the specified bucket.
254
+ # @param [String] bucket
255
+ # Name of a bucket.
256
+ # @param [String] entity
257
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
258
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
259
+ # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
260
+ # @param [String] fields
261
+ # Selector specifying which fields to include in a partial response.
262
+ # @param [String] quota_user
263
+ # Available to use for quota purposes for server-side applications. Can be any
264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
265
+ # Overrides userIp if both are provided.
266
+ # @param [String] user_ip
267
+ # IP address of the site where the request originates. Use this if you want to
268
+ # enforce per-user limits.
269
+ # @param [Google::Apis::RequestOptions] options
270
+ # Request-specific options
271
+ #
272
+ # @yield [result, err] Result & error if block supplied
273
+ # @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
274
+ # @yieldparam err [StandardError] error object if request failed
275
+ #
276
+ # @return [Google::Apis::StorageV1::BucketAccessControl]
277
+ #
278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
281
+ def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
282
+ path = 'b/{bucket}/acl/{entity}'
283
+ command = make_simple_command(:put, path, options)
284
+ command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
285
+ command.request_object = bucket_access_control_object
286
+ command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
287
+ command.response_class = Google::Apis::StorageV1::BucketAccessControl
288
+ command.params['bucket'] = bucket unless bucket.nil?
289
+ command.params['entity'] = entity unless entity.nil?
290
+ command.query['fields'] = fields unless fields.nil?
291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
292
+ command.query['userIp'] = user_ip unless user_ip.nil?
293
+ execute_or_queue_command(command, &block)
294
+ end
295
+
296
+ # Permanently deletes an empty bucket.
297
+ # @param [String] bucket
298
+ # Name of a bucket.
299
+ # @param [String] if_metageneration_match
300
+ # If set, only deletes the bucket if its metageneration matches this value.
301
+ # @param [String] if_metageneration_not_match
302
+ # If set, only deletes the bucket if its metageneration does not match this
303
+ # value.
304
+ # @param [String] fields
305
+ # Selector specifying which fields to include in a partial response.
306
+ # @param [String] quota_user
307
+ # Available to use for quota purposes for server-side applications. Can be any
308
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
309
+ # Overrides userIp if both are provided.
310
+ # @param [String] user_ip
311
+ # IP address of the site where the request originates. Use this if you want to
312
+ # enforce per-user limits.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [NilClass] No result returned for this method
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [void]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
326
+ path = 'b/{bucket}'
327
+ command = make_simple_command(:delete, path, options)
328
+ command.params['bucket'] = bucket unless bucket.nil?
329
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
330
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
331
+ command.query['fields'] = fields unless fields.nil?
332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
333
+ command.query['userIp'] = user_ip unless user_ip.nil?
334
+ execute_or_queue_command(command, &block)
335
+ end
336
+
337
+ # Returns metadata for the specified bucket.
338
+ # @param [String] bucket
339
+ # Name of a bucket.
340
+ # @param [String] if_metageneration_match
341
+ # Makes the return of the bucket metadata conditional on whether the bucket's
342
+ # current metageneration matches the given value.
343
+ # @param [String] if_metageneration_not_match
344
+ # Makes the return of the bucket metadata conditional on whether the bucket's
345
+ # current metageneration does not match the given value.
346
+ # @param [String] projection
347
+ # Set of properties to return. Defaults to noAcl.
348
+ # @param [String] fields
349
+ # Selector specifying which fields to include in a partial response.
350
+ # @param [String] quota_user
351
+ # Available to use for quota purposes for server-side applications. Can be any
352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
353
+ # Overrides userIp if both are provided.
354
+ # @param [String] user_ip
355
+ # IP address of the site where the request originates. Use this if you want to
356
+ # enforce per-user limits.
357
+ # @param [Google::Apis::RequestOptions] options
358
+ # Request-specific options
359
+ #
360
+ # @yield [result, err] Result & error if block supplied
361
+ # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
362
+ # @yieldparam err [StandardError] error object if request failed
363
+ #
364
+ # @return [Google::Apis::StorageV1::Bucket]
365
+ #
366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
369
+ def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
370
+ path = 'b/{bucket}'
371
+ command = make_simple_command(:get, path, options)
372
+ command.response_representation = Google::Apis::StorageV1::Bucket::Representation
373
+ command.response_class = Google::Apis::StorageV1::Bucket
374
+ command.params['bucket'] = bucket unless bucket.nil?
375
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
376
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
377
+ command.query['projection'] = projection unless projection.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ command.query['userIp'] = user_ip unless user_ip.nil?
381
+ execute_or_queue_command(command, &block)
382
+ end
383
+
384
+ # Creates a new bucket.
385
+ # @param [Google::Apis::StorageV1::Bucket] bucket_object
386
+ # @param [String] predefined_acl
387
+ # Apply a predefined set of access controls to this bucket.
388
+ # @param [String] predefined_default_object_acl
389
+ # Apply a predefined set of default object access controls to this bucket.
390
+ # @param [String] project
391
+ # A valid API project identifier.
392
+ # @param [String] projection
393
+ # Set of properties to return. Defaults to noAcl, unless the bucket resource
394
+ # specifies acl or defaultObjectAcl properties, when it defaults to full.
395
+ # @param [String] fields
396
+ # Selector specifying which fields to include in a partial response.
397
+ # @param [String] quota_user
398
+ # Available to use for quota purposes for server-side applications. Can be any
399
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
400
+ # Overrides userIp if both are provided.
401
+ # @param [String] user_ip
402
+ # IP address of the site where the request originates. Use this if you want to
403
+ # enforce per-user limits.
404
+ # @param [Google::Apis::RequestOptions] options
405
+ # Request-specific options
406
+ #
407
+ # @yield [result, err] Result & error if block supplied
408
+ # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
409
+ # @yieldparam err [StandardError] error object if request failed
410
+ #
411
+ # @return [Google::Apis::StorageV1::Bucket]
412
+ #
413
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
414
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
415
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
416
+ def insert_bucket(bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, project: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
417
+ path = 'b'
418
+ command = make_simple_command(:post, path, options)
419
+ command.request_representation = Google::Apis::StorageV1::Bucket::Representation
420
+ command.request_object = bucket_object
421
+ command.response_representation = Google::Apis::StorageV1::Bucket::Representation
422
+ command.response_class = Google::Apis::StorageV1::Bucket
423
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
424
+ command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
425
+ command.query['project'] = project unless project.nil?
426
+ command.query['projection'] = projection unless projection.nil?
427
+ command.query['fields'] = fields unless fields.nil?
428
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
429
+ command.query['userIp'] = user_ip unless user_ip.nil?
430
+ execute_or_queue_command(command, &block)
431
+ end
432
+
433
+ # Retrieves a list of buckets for a given project.
434
+ # @param [Fixnum] max_results
435
+ # Maximum number of buckets to return.
436
+ # @param [String] page_token
437
+ # A previously-returned page token representing part of the larger set of
438
+ # results to view.
439
+ # @param [String] prefix
440
+ # Filter results to buckets whose names begin with this prefix.
441
+ # @param [String] project
442
+ # A valid API project identifier.
443
+ # @param [String] projection
444
+ # Set of properties to return. Defaults to noAcl.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # Overrides userIp if both are provided.
451
+ # @param [String] user_ip
452
+ # IP address of the site where the request originates. Use this if you want to
453
+ # enforce per-user limits.
454
+ # @param [Google::Apis::RequestOptions] options
455
+ # Request-specific options
456
+ #
457
+ # @yield [result, err] Result & error if block supplied
458
+ # @yieldparam result [Google::Apis::StorageV1::Buckets] parsed result object
459
+ # @yieldparam err [StandardError] error object if request failed
460
+ #
461
+ # @return [Google::Apis::StorageV1::Buckets]
462
+ #
463
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
464
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
465
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
466
+ def list_buckets(max_results: nil, page_token: nil, prefix: nil, project: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
467
+ path = 'b'
468
+ command = make_simple_command(:get, path, options)
469
+ command.response_representation = Google::Apis::StorageV1::Buckets::Representation
470
+ command.response_class = Google::Apis::StorageV1::Buckets
471
+ command.query['maxResults'] = max_results unless max_results.nil?
472
+ command.query['pageToken'] = page_token unless page_token.nil?
473
+ command.query['prefix'] = prefix unless prefix.nil?
474
+ command.query['project'] = project unless project.nil?
475
+ command.query['projection'] = projection unless projection.nil?
476
+ command.query['fields'] = fields unless fields.nil?
477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
478
+ command.query['userIp'] = user_ip unless user_ip.nil?
479
+ execute_or_queue_command(command, &block)
480
+ end
481
+
482
+ # Updates a bucket. This method supports patch semantics.
483
+ # @param [String] bucket
484
+ # Name of a bucket.
485
+ # @param [Google::Apis::StorageV1::Bucket] bucket_object
486
+ # @param [String] if_metageneration_match
487
+ # Makes the return of the bucket metadata conditional on whether the bucket's
488
+ # current metageneration matches the given value.
489
+ # @param [String] if_metageneration_not_match
490
+ # Makes the return of the bucket metadata conditional on whether the bucket's
491
+ # current metageneration does not match the given value.
492
+ # @param [String] predefined_acl
493
+ # Apply a predefined set of access controls to this bucket.
494
+ # @param [String] predefined_default_object_acl
495
+ # Apply a predefined set of default object access controls to this bucket.
496
+ # @param [String] projection
497
+ # Set of properties to return. Defaults to full.
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # Overrides userIp if both are provided.
504
+ # @param [String] user_ip
505
+ # IP address of the site where the request originates. Use this if you want to
506
+ # enforce per-user limits.
507
+ # @param [Google::Apis::RequestOptions] options
508
+ # Request-specific options
509
+ #
510
+ # @yield [result, err] Result & error if block supplied
511
+ # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
512
+ # @yieldparam err [StandardError] error object if request failed
513
+ #
514
+ # @return [Google::Apis::StorageV1::Bucket]
515
+ #
516
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
517
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
518
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
519
+ def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
520
+ path = 'b/{bucket}'
521
+ command = make_simple_command(:patch, path, options)
522
+ command.request_representation = Google::Apis::StorageV1::Bucket::Representation
523
+ command.request_object = bucket_object
524
+ command.response_representation = Google::Apis::StorageV1::Bucket::Representation
525
+ command.response_class = Google::Apis::StorageV1::Bucket
526
+ command.params['bucket'] = bucket unless bucket.nil?
527
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
528
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
529
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
530
+ command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
531
+ command.query['projection'] = projection unless projection.nil?
532
+ command.query['fields'] = fields unless fields.nil?
533
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
534
+ command.query['userIp'] = user_ip unless user_ip.nil?
535
+ execute_or_queue_command(command, &block)
536
+ end
537
+
538
+ # Updates a bucket.
539
+ # @param [String] bucket
540
+ # Name of a bucket.
541
+ # @param [Google::Apis::StorageV1::Bucket] bucket_object
542
+ # @param [String] if_metageneration_match
543
+ # Makes the return of the bucket metadata conditional on whether the bucket's
544
+ # current metageneration matches the given value.
545
+ # @param [String] if_metageneration_not_match
546
+ # Makes the return of the bucket metadata conditional on whether the bucket's
547
+ # current metageneration does not match the given value.
548
+ # @param [String] predefined_acl
549
+ # Apply a predefined set of access controls to this bucket.
550
+ # @param [String] predefined_default_object_acl
551
+ # Apply a predefined set of default object access controls to this bucket.
552
+ # @param [String] projection
553
+ # Set of properties to return. Defaults to full.
554
+ # @param [String] fields
555
+ # Selector specifying which fields to include in a partial response.
556
+ # @param [String] quota_user
557
+ # Available to use for quota purposes for server-side applications. Can be any
558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
559
+ # Overrides userIp if both are provided.
560
+ # @param [String] user_ip
561
+ # IP address of the site where the request originates. Use this if you want to
562
+ # enforce per-user limits.
563
+ # @param [Google::Apis::RequestOptions] options
564
+ # Request-specific options
565
+ #
566
+ # @yield [result, err] Result & error if block supplied
567
+ # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
568
+ # @yieldparam err [StandardError] error object if request failed
569
+ #
570
+ # @return [Google::Apis::StorageV1::Bucket]
571
+ #
572
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
573
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
574
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
575
+ def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
576
+ path = 'b/{bucket}'
577
+ command = make_simple_command(:put, path, options)
578
+ command.request_representation = Google::Apis::StorageV1::Bucket::Representation
579
+ command.request_object = bucket_object
580
+ command.response_representation = Google::Apis::StorageV1::Bucket::Representation
581
+ command.response_class = Google::Apis::StorageV1::Bucket
582
+ command.params['bucket'] = bucket unless bucket.nil?
583
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
584
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
585
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
586
+ command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
587
+ command.query['projection'] = projection unless projection.nil?
588
+ command.query['fields'] = fields unless fields.nil?
589
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
590
+ command.query['userIp'] = user_ip unless user_ip.nil?
591
+ execute_or_queue_command(command, &block)
592
+ end
593
+
594
+ # Stop watching resources through this channel
595
+ # @param [Google::Apis::StorageV1::Channel] channel_object
596
+ # @param [String] fields
597
+ # Selector specifying which fields to include in a partial response.
598
+ # @param [String] quota_user
599
+ # Available to use for quota purposes for server-side applications. Can be any
600
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
601
+ # Overrides userIp if both are provided.
602
+ # @param [String] user_ip
603
+ # IP address of the site where the request originates. Use this if you want to
604
+ # enforce per-user limits.
605
+ # @param [Google::Apis::RequestOptions] options
606
+ # Request-specific options
607
+ #
608
+ # @yield [result, err] Result & error if block supplied
609
+ # @yieldparam result [NilClass] No result returned for this method
610
+ # @yieldparam err [StandardError] error object if request failed
611
+ #
612
+ # @return [void]
613
+ #
614
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
615
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
616
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
617
+ def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
618
+ path = 'channels/stop'
619
+ command = make_simple_command(:post, path, options)
620
+ command.request_representation = Google::Apis::StorageV1::Channel::Representation
621
+ command.request_object = channel_object
622
+ command.query['fields'] = fields unless fields.nil?
623
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
624
+ command.query['userIp'] = user_ip unless user_ip.nil?
625
+ execute_or_queue_command(command, &block)
626
+ end
627
+
628
+ # Permanently deletes the default object ACL entry for the specified entity on
629
+ # the specified bucket.
630
+ # @param [String] bucket
631
+ # Name of a bucket.
632
+ # @param [String] entity
633
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
634
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
635
+ # @param [String] fields
636
+ # Selector specifying which fields to include in a partial response.
637
+ # @param [String] quota_user
638
+ # Available to use for quota purposes for server-side applications. Can be any
639
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
640
+ # Overrides userIp if both are provided.
641
+ # @param [String] user_ip
642
+ # IP address of the site where the request originates. Use this if you want to
643
+ # enforce per-user limits.
644
+ # @param [Google::Apis::RequestOptions] options
645
+ # Request-specific options
646
+ #
647
+ # @yield [result, err] Result & error if block supplied
648
+ # @yieldparam result [NilClass] No result returned for this method
649
+ # @yieldparam err [StandardError] error object if request failed
650
+ #
651
+ # @return [void]
652
+ #
653
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
654
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
655
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
656
+ def delete_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
657
+ path = 'b/{bucket}/defaultObjectAcl/{entity}'
658
+ command = make_simple_command(:delete, path, options)
659
+ command.params['bucket'] = bucket unless bucket.nil?
660
+ command.params['entity'] = entity unless entity.nil?
661
+ command.query['fields'] = fields unless fields.nil?
662
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
663
+ command.query['userIp'] = user_ip unless user_ip.nil?
664
+ execute_or_queue_command(command, &block)
665
+ end
666
+
667
+ # Returns the default object ACL entry for the specified entity on the specified
668
+ # bucket.
669
+ # @param [String] bucket
670
+ # Name of a bucket.
671
+ # @param [String] entity
672
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
673
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
674
+ # @param [String] fields
675
+ # Selector specifying which fields to include in a partial response.
676
+ # @param [String] quota_user
677
+ # Available to use for quota purposes for server-side applications. Can be any
678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
679
+ # Overrides userIp if both are provided.
680
+ # @param [String] user_ip
681
+ # IP address of the site where the request originates. Use this if you want to
682
+ # enforce per-user limits.
683
+ # @param [Google::Apis::RequestOptions] options
684
+ # Request-specific options
685
+ #
686
+ # @yield [result, err] Result & error if block supplied
687
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
688
+ # @yieldparam err [StandardError] error object if request failed
689
+ #
690
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
691
+ #
692
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
693
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
694
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
695
+ def get_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
696
+ path = 'b/{bucket}/defaultObjectAcl/{entity}'
697
+ command = make_simple_command(:get, path, options)
698
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
699
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
700
+ command.params['bucket'] = bucket unless bucket.nil?
701
+ command.params['entity'] = entity unless entity.nil?
702
+ command.query['fields'] = fields unless fields.nil?
703
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
704
+ command.query['userIp'] = user_ip unless user_ip.nil?
705
+ execute_or_queue_command(command, &block)
706
+ end
707
+
708
+ # Creates a new default object ACL entry on the specified bucket.
709
+ # @param [String] bucket
710
+ # Name of a bucket.
711
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
712
+ # @param [String] fields
713
+ # Selector specifying which fields to include in a partial response.
714
+ # @param [String] quota_user
715
+ # Available to use for quota purposes for server-side applications. Can be any
716
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
717
+ # Overrides userIp if both are provided.
718
+ # @param [String] user_ip
719
+ # IP address of the site where the request originates. Use this if you want to
720
+ # enforce per-user limits.
721
+ # @param [Google::Apis::RequestOptions] options
722
+ # Request-specific options
723
+ #
724
+ # @yield [result, err] Result & error if block supplied
725
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
726
+ # @yieldparam err [StandardError] error object if request failed
727
+ #
728
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
729
+ #
730
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
731
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
732
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
733
+ def insert_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
734
+ path = 'b/{bucket}/defaultObjectAcl'
735
+ command = make_simple_command(:post, path, options)
736
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
737
+ command.request_object = object_access_control_object
738
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
739
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
740
+ command.params['bucket'] = bucket unless bucket.nil?
741
+ command.query['fields'] = fields unless fields.nil?
742
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
743
+ command.query['userIp'] = user_ip unless user_ip.nil?
744
+ execute_or_queue_command(command, &block)
745
+ end
746
+
747
+ # Retrieves default object ACL entries on the specified bucket.
748
+ # @param [String] bucket
749
+ # Name of a bucket.
750
+ # @param [String] if_metageneration_match
751
+ # If present, only return default ACL listing if the bucket's current
752
+ # metageneration matches this value.
753
+ # @param [String] if_metageneration_not_match
754
+ # If present, only return default ACL listing if the bucket's current
755
+ # metageneration does not match the given value.
756
+ # @param [String] fields
757
+ # Selector specifying which fields to include in a partial response.
758
+ # @param [String] quota_user
759
+ # Available to use for quota purposes for server-side applications. Can be any
760
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
761
+ # Overrides userIp if both are provided.
762
+ # @param [String] user_ip
763
+ # IP address of the site where the request originates. Use this if you want to
764
+ # enforce per-user limits.
765
+ # @param [Google::Apis::RequestOptions] options
766
+ # Request-specific options
767
+ #
768
+ # @yield [result, err] Result & error if block supplied
769
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
770
+ # @yieldparam err [StandardError] error object if request failed
771
+ #
772
+ # @return [Google::Apis::StorageV1::ObjectAccessControls]
773
+ #
774
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
775
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
776
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
777
+ def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
778
+ path = 'b/{bucket}/defaultObjectAcl'
779
+ command = make_simple_command(:get, path, options)
780
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
781
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControls
782
+ command.params['bucket'] = bucket unless bucket.nil?
783
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
784
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
785
+ command.query['fields'] = fields unless fields.nil?
786
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
787
+ command.query['userIp'] = user_ip unless user_ip.nil?
788
+ execute_or_queue_command(command, &block)
789
+ end
790
+
791
+ # Updates a default object ACL entry on the specified bucket. This method
792
+ # supports patch semantics.
793
+ # @param [String] bucket
794
+ # Name of a bucket.
795
+ # @param [String] entity
796
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
797
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
798
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
799
+ # @param [String] fields
800
+ # Selector specifying which fields to include in a partial response.
801
+ # @param [String] quota_user
802
+ # Available to use for quota purposes for server-side applications. Can be any
803
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
804
+ # Overrides userIp if both are provided.
805
+ # @param [String] user_ip
806
+ # IP address of the site where the request originates. Use this if you want to
807
+ # enforce per-user limits.
808
+ # @param [Google::Apis::RequestOptions] options
809
+ # Request-specific options
810
+ #
811
+ # @yield [result, err] Result & error if block supplied
812
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
813
+ # @yieldparam err [StandardError] error object if request failed
814
+ #
815
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
816
+ #
817
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
818
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
819
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
820
+ def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
821
+ path = 'b/{bucket}/defaultObjectAcl/{entity}'
822
+ command = make_simple_command(:patch, path, options)
823
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
824
+ command.request_object = object_access_control_object
825
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
826
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
827
+ command.params['bucket'] = bucket unless bucket.nil?
828
+ command.params['entity'] = entity unless entity.nil?
829
+ command.query['fields'] = fields unless fields.nil?
830
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
831
+ command.query['userIp'] = user_ip unless user_ip.nil?
832
+ execute_or_queue_command(command, &block)
833
+ end
834
+
835
+ # Updates a default object ACL entry on the specified bucket.
836
+ # @param [String] bucket
837
+ # Name of a bucket.
838
+ # @param [String] entity
839
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
840
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
841
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
842
+ # @param [String] fields
843
+ # Selector specifying which fields to include in a partial response.
844
+ # @param [String] quota_user
845
+ # Available to use for quota purposes for server-side applications. Can be any
846
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
847
+ # Overrides userIp if both are provided.
848
+ # @param [String] user_ip
849
+ # IP address of the site where the request originates. Use this if you want to
850
+ # enforce per-user limits.
851
+ # @param [Google::Apis::RequestOptions] options
852
+ # Request-specific options
853
+ #
854
+ # @yield [result, err] Result & error if block supplied
855
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
856
+ # @yieldparam err [StandardError] error object if request failed
857
+ #
858
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
859
+ #
860
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
861
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
862
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
863
+ def update_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
864
+ path = 'b/{bucket}/defaultObjectAcl/{entity}'
865
+ command = make_simple_command(:put, path, options)
866
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
867
+ command.request_object = object_access_control_object
868
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
869
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
870
+ command.params['bucket'] = bucket unless bucket.nil?
871
+ command.params['entity'] = entity unless entity.nil?
872
+ command.query['fields'] = fields unless fields.nil?
873
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
874
+ command.query['userIp'] = user_ip unless user_ip.nil?
875
+ execute_or_queue_command(command, &block)
876
+ end
877
+
878
+ # Permanently deletes the ACL entry for the specified entity on the specified
879
+ # object.
880
+ # @param [String] bucket
881
+ # Name of a bucket.
882
+ # @param [String] object
883
+ # Name of the object.
884
+ # @param [String] entity
885
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
886
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
887
+ # @param [String] generation
888
+ # If present, selects a specific revision of this object (as opposed to the
889
+ # latest version, the default).
890
+ # @param [String] fields
891
+ # Selector specifying which fields to include in a partial response.
892
+ # @param [String] quota_user
893
+ # Available to use for quota purposes for server-side applications. Can be any
894
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
895
+ # Overrides userIp if both are provided.
896
+ # @param [String] user_ip
897
+ # IP address of the site where the request originates. Use this if you want to
898
+ # enforce per-user limits.
899
+ # @param [Google::Apis::RequestOptions] options
900
+ # Request-specific options
901
+ #
902
+ # @yield [result, err] Result & error if block supplied
903
+ # @yieldparam result [NilClass] No result returned for this method
904
+ # @yieldparam err [StandardError] error object if request failed
905
+ #
906
+ # @return [void]
907
+ #
908
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
909
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
910
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
911
+ def delete_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
912
+ path = 'b/{bucket}/o/{object}/acl/{entity}'
913
+ command = make_simple_command(:delete, path, options)
914
+ command.params['bucket'] = bucket unless bucket.nil?
915
+ command.params['object'] = object unless object.nil?
916
+ command.params['entity'] = entity unless entity.nil?
917
+ command.query['generation'] = generation unless generation.nil?
918
+ command.query['fields'] = fields unless fields.nil?
919
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
920
+ command.query['userIp'] = user_ip unless user_ip.nil?
921
+ execute_or_queue_command(command, &block)
922
+ end
923
+
924
+ # Returns the ACL entry for the specified entity on the specified object.
925
+ # @param [String] bucket
926
+ # Name of a bucket.
927
+ # @param [String] object
928
+ # Name of the object.
929
+ # @param [String] entity
930
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
931
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
932
+ # @param [String] generation
933
+ # If present, selects a specific revision of this object (as opposed to the
934
+ # latest version, the default).
935
+ # @param [String] fields
936
+ # Selector specifying which fields to include in a partial response.
937
+ # @param [String] quota_user
938
+ # Available to use for quota purposes for server-side applications. Can be any
939
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
940
+ # Overrides userIp if both are provided.
941
+ # @param [String] user_ip
942
+ # IP address of the site where the request originates. Use this if you want to
943
+ # enforce per-user limits.
944
+ # @param [Google::Apis::RequestOptions] options
945
+ # Request-specific options
946
+ #
947
+ # @yield [result, err] Result & error if block supplied
948
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
949
+ # @yieldparam err [StandardError] error object if request failed
950
+ #
951
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
952
+ #
953
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
954
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
955
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
956
+ def get_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
957
+ path = 'b/{bucket}/o/{object}/acl/{entity}'
958
+ command = make_simple_command(:get, path, options)
959
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
960
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
961
+ command.params['bucket'] = bucket unless bucket.nil?
962
+ command.params['object'] = object unless object.nil?
963
+ command.params['entity'] = entity unless entity.nil?
964
+ command.query['generation'] = generation unless generation.nil?
965
+ command.query['fields'] = fields unless fields.nil?
966
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
967
+ command.query['userIp'] = user_ip unless user_ip.nil?
968
+ execute_or_queue_command(command, &block)
969
+ end
970
+
971
+ # Creates a new ACL entry on the specified object.
972
+ # @param [String] bucket
973
+ # Name of a bucket.
974
+ # @param [String] object
975
+ # Name of the object.
976
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
977
+ # @param [String] generation
978
+ # If present, selects a specific revision of this object (as opposed to the
979
+ # latest version, the default).
980
+ # @param [String] fields
981
+ # Selector specifying which fields to include in a partial response.
982
+ # @param [String] quota_user
983
+ # Available to use for quota purposes for server-side applications. Can be any
984
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
985
+ # Overrides userIp if both are provided.
986
+ # @param [String] user_ip
987
+ # IP address of the site where the request originates. Use this if you want to
988
+ # enforce per-user limits.
989
+ # @param [Google::Apis::RequestOptions] options
990
+ # Request-specific options
991
+ #
992
+ # @yield [result, err] Result & error if block supplied
993
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
994
+ # @yieldparam err [StandardError] error object if request failed
995
+ #
996
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
997
+ #
998
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
999
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1000
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1001
+ def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1002
+ path = 'b/{bucket}/o/{object}/acl'
1003
+ command = make_simple_command(:post, path, options)
1004
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1005
+ command.request_object = object_access_control_object
1006
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1007
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1008
+ command.params['bucket'] = bucket unless bucket.nil?
1009
+ command.params['object'] = object unless object.nil?
1010
+ command.query['generation'] = generation unless generation.nil?
1011
+ command.query['fields'] = fields unless fields.nil?
1012
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1013
+ command.query['userIp'] = user_ip unless user_ip.nil?
1014
+ execute_or_queue_command(command, &block)
1015
+ end
1016
+
1017
+ # Retrieves ACL entries on the specified object.
1018
+ # @param [String] bucket
1019
+ # Name of a bucket.
1020
+ # @param [String] object
1021
+ # Name of the object.
1022
+ # @param [String] generation
1023
+ # If present, selects a specific revision of this object (as opposed to the
1024
+ # latest version, the default).
1025
+ # @param [String] fields
1026
+ # Selector specifying which fields to include in a partial response.
1027
+ # @param [String] quota_user
1028
+ # Available to use for quota purposes for server-side applications. Can be any
1029
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1030
+ # Overrides userIp if both are provided.
1031
+ # @param [String] user_ip
1032
+ # IP address of the site where the request originates. Use this if you want to
1033
+ # enforce per-user limits.
1034
+ # @param [Google::Apis::RequestOptions] options
1035
+ # Request-specific options
1036
+ #
1037
+ # @yield [result, err] Result & error if block supplied
1038
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
1039
+ # @yieldparam err [StandardError] error object if request failed
1040
+ #
1041
+ # @return [Google::Apis::StorageV1::ObjectAccessControls]
1042
+ #
1043
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1044
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1045
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1046
+ def list_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1047
+ path = 'b/{bucket}/o/{object}/acl'
1048
+ command = make_simple_command(:get, path, options)
1049
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
1050
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControls
1051
+ command.params['bucket'] = bucket unless bucket.nil?
1052
+ command.params['object'] = object unless object.nil?
1053
+ command.query['generation'] = generation unless generation.nil?
1054
+ command.query['fields'] = fields unless fields.nil?
1055
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1056
+ command.query['userIp'] = user_ip unless user_ip.nil?
1057
+ execute_or_queue_command(command, &block)
1058
+ end
1059
+
1060
+ # Updates an ACL entry on the specified object. This method supports patch
1061
+ # semantics.
1062
+ # @param [String] bucket
1063
+ # Name of a bucket.
1064
+ # @param [String] object
1065
+ # Name of the object.
1066
+ # @param [String] entity
1067
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
1068
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
1069
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1070
+ # @param [String] generation
1071
+ # If present, selects a specific revision of this object (as opposed to the
1072
+ # latest version, the default).
1073
+ # @param [String] fields
1074
+ # Selector specifying which fields to include in a partial response.
1075
+ # @param [String] quota_user
1076
+ # Available to use for quota purposes for server-side applications. Can be any
1077
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1078
+ # Overrides userIp if both are provided.
1079
+ # @param [String] user_ip
1080
+ # IP address of the site where the request originates. Use this if you want to
1081
+ # enforce per-user limits.
1082
+ # @param [Google::Apis::RequestOptions] options
1083
+ # Request-specific options
1084
+ #
1085
+ # @yield [result, err] Result & error if block supplied
1086
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1087
+ # @yieldparam err [StandardError] error object if request failed
1088
+ #
1089
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
1090
+ #
1091
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1092
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1093
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1094
+ def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1095
+ path = 'b/{bucket}/o/{object}/acl/{entity}'
1096
+ command = make_simple_command(:patch, path, options)
1097
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1098
+ command.request_object = object_access_control_object
1099
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1100
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1101
+ command.params['bucket'] = bucket unless bucket.nil?
1102
+ command.params['object'] = object unless object.nil?
1103
+ command.params['entity'] = entity unless entity.nil?
1104
+ command.query['generation'] = generation unless generation.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
+ # Updates an ACL entry on the specified object.
1112
+ # @param [String] bucket
1113
+ # Name of a bucket.
1114
+ # @param [String] object
1115
+ # Name of the object.
1116
+ # @param [String] entity
1117
+ # The entity holding the permission. Can be user-userId, user-emailAddress,
1118
+ # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
1119
+ # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
1120
+ # @param [String] generation
1121
+ # If present, selects a specific revision of this object (as opposed to the
1122
+ # latest version, the default).
1123
+ # @param [String] fields
1124
+ # Selector specifying which fields to include in a partial response.
1125
+ # @param [String] quota_user
1126
+ # Available to use for quota purposes for server-side applications. Can be any
1127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1128
+ # Overrides userIp if both are provided.
1129
+ # @param [String] user_ip
1130
+ # IP address of the site where the request originates. Use this if you want to
1131
+ # enforce per-user limits.
1132
+ # @param [Google::Apis::RequestOptions] options
1133
+ # Request-specific options
1134
+ #
1135
+ # @yield [result, err] Result & error if block supplied
1136
+ # @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
1137
+ # @yieldparam err [StandardError] error object if request failed
1138
+ #
1139
+ # @return [Google::Apis::StorageV1::ObjectAccessControl]
1140
+ #
1141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1144
+ def update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1145
+ path = 'b/{bucket}/o/{object}/acl/{entity}'
1146
+ command = make_simple_command(:put, path, options)
1147
+ command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1148
+ command.request_object = object_access_control_object
1149
+ command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
1150
+ command.response_class = Google::Apis::StorageV1::ObjectAccessControl
1151
+ command.params['bucket'] = bucket unless bucket.nil?
1152
+ command.params['object'] = object unless object.nil?
1153
+ command.params['entity'] = entity unless entity.nil?
1154
+ command.query['generation'] = generation unless generation.nil?
1155
+ command.query['fields'] = fields unless fields.nil?
1156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1157
+ command.query['userIp'] = user_ip unless user_ip.nil?
1158
+ execute_or_queue_command(command, &block)
1159
+ end
1160
+
1161
+ # Concatenates a list of existing objects into a new object in the same bucket.
1162
+ # @param [String] destination_bucket
1163
+ # Name of the bucket in which to store the new object.
1164
+ # @param [String] destination_object
1165
+ # Name of the new object.
1166
+ # @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object
1167
+ # @param [String] destination_predefined_acl
1168
+ # Apply a predefined set of access controls to the destination object.
1169
+ # @param [String] if_generation_match
1170
+ # Makes the operation conditional on whether the object's current generation
1171
+ # matches the given value.
1172
+ # @param [String] if_metageneration_match
1173
+ # Makes the operation conditional on whether the object's current metageneration
1174
+ # matches the given value.
1175
+ # @param [String] fields
1176
+ # Selector specifying which fields to include in a partial response.
1177
+ # @param [String] quota_user
1178
+ # Available to use for quota purposes for server-side applications. Can be any
1179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1180
+ # Overrides userIp if both are provided.
1181
+ # @param [String] user_ip
1182
+ # IP address of the site where the request originates. Use this if you want to
1183
+ # enforce per-user limits.
1184
+ # @param [IO, String] download_dest
1185
+ # IO stream or filename to receive content download
1186
+ # @param [Google::Apis::RequestOptions] options
1187
+ # Request-specific options
1188
+ #
1189
+ # @yield [result, err] Result & error if block supplied
1190
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1191
+ # @yieldparam err [StandardError] error object if request failed
1192
+ #
1193
+ # @return [Google::Apis::StorageV1::Object]
1194
+ #
1195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1198
+ def compose(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1199
+ path = 'b/{destinationBucket}/o/{destinationObject}/compose'
1200
+ if download_dest.nil?
1201
+ command = make_simple_command(:post, path, options)
1202
+ else
1203
+ command = make_download_command(:post, path, options)
1204
+ command.download_dest = download_dest
1205
+ end
1206
+ command.request_representation = Google::Apis::StorageV1::ComposeRequest::Representation
1207
+ command.request_object = compose_request_object
1208
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1209
+ command.response_class = Google::Apis::StorageV1::Object
1210
+ command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
1211
+ command.params['destinationObject'] = destination_object unless destination_object.nil?
1212
+ command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
1213
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1214
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1215
+ command.query['fields'] = fields unless fields.nil?
1216
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1217
+ command.query['userIp'] = user_ip unless user_ip.nil?
1218
+ execute_or_queue_command(command, &block)
1219
+ end
1220
+
1221
+ # Copies a source object to a destination object. Optionally overrides metadata.
1222
+ # @param [String] source_bucket
1223
+ # Name of the bucket in which to find the source object.
1224
+ # @param [String] source_object
1225
+ # Name of the source object.
1226
+ # @param [String] destination_bucket
1227
+ # Name of the bucket in which to store the new object. Overrides the provided
1228
+ # object metadata's bucket value, if any.
1229
+ # @param [String] destination_object
1230
+ # Name of the new object. Required when the object metadata is not otherwise
1231
+ # provided. Overrides the object metadata's name value, if any.
1232
+ # @param [Google::Apis::StorageV1::Object] object_object
1233
+ # @param [String] destination_predefined_acl
1234
+ # Apply a predefined set of access controls to the destination object.
1235
+ # @param [String] if_generation_match
1236
+ # Makes the operation conditional on whether the destination object's current
1237
+ # generation matches the given value.
1238
+ # @param [String] if_generation_not_match
1239
+ # Makes the operation conditional on whether the destination object's current
1240
+ # generation does not match the given value.
1241
+ # @param [String] if_metageneration_match
1242
+ # Makes the operation conditional on whether the destination object's current
1243
+ # metageneration matches the given value.
1244
+ # @param [String] if_metageneration_not_match
1245
+ # Makes the operation conditional on whether the destination object's current
1246
+ # metageneration does not match the given value.
1247
+ # @param [String] if_source_generation_match
1248
+ # Makes the operation conditional on whether the source object's generation
1249
+ # matches the given value.
1250
+ # @param [String] if_source_generation_not_match
1251
+ # Makes the operation conditional on whether the source object's generation does
1252
+ # not match the given value.
1253
+ # @param [String] if_source_metageneration_match
1254
+ # Makes the operation conditional on whether the source object's current
1255
+ # metageneration matches the given value.
1256
+ # @param [String] if_source_metageneration_not_match
1257
+ # Makes the operation conditional on whether the source object's current
1258
+ # metageneration does not match the given value.
1259
+ # @param [String] projection
1260
+ # Set of properties to return. Defaults to noAcl, unless the object resource
1261
+ # specifies the acl property, when it defaults to full.
1262
+ # @param [String] source_generation
1263
+ # If present, selects a specific revision of the source object (as opposed to
1264
+ # the latest version, the default).
1265
+ # @param [String] fields
1266
+ # Selector specifying which fields to include in a partial response.
1267
+ # @param [String] quota_user
1268
+ # Available to use for quota purposes for server-side applications. Can be any
1269
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1270
+ # Overrides userIp if both are provided.
1271
+ # @param [String] user_ip
1272
+ # IP address of the site where the request originates. Use this if you want to
1273
+ # enforce per-user limits.
1274
+ # @param [IO, String] download_dest
1275
+ # IO stream or filename to receive content download
1276
+ # @param [Google::Apis::RequestOptions] options
1277
+ # Request-specific options
1278
+ #
1279
+ # @yield [result, err] Result & error if block supplied
1280
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1281
+ # @yieldparam err [StandardError] error object if request failed
1282
+ #
1283
+ # @return [Google::Apis::StorageV1::Object]
1284
+ #
1285
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1286
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1287
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1288
+ def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1289
+ path = 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}'
1290
+ if download_dest.nil?
1291
+ command = make_simple_command(:post, path, options)
1292
+ else
1293
+ command = make_download_command(:post, path, options)
1294
+ command.download_dest = download_dest
1295
+ end
1296
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
1297
+ command.request_object = object_object
1298
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1299
+ command.response_class = Google::Apis::StorageV1::Object
1300
+ command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
1301
+ command.params['sourceObject'] = source_object unless source_object.nil?
1302
+ command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
1303
+ command.params['destinationObject'] = destination_object unless destination_object.nil?
1304
+ command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
1305
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1306
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1307
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1308
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1309
+ command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
1310
+ command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
1311
+ command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
1312
+ command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
1313
+ command.query['projection'] = projection unless projection.nil?
1314
+ command.query['sourceGeneration'] = source_generation unless source_generation.nil?
1315
+ command.query['fields'] = fields unless fields.nil?
1316
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1317
+ command.query['userIp'] = user_ip unless user_ip.nil?
1318
+ execute_or_queue_command(command, &block)
1319
+ end
1320
+
1321
+ # Deletes an object and its metadata. Deletions are permanent if versioning is
1322
+ # not enabled for the bucket, or if the generation parameter is used.
1323
+ # @param [String] bucket
1324
+ # Name of the bucket in which the object resides.
1325
+ # @param [String] object
1326
+ # Name of the object.
1327
+ # @param [String] generation
1328
+ # If present, permanently deletes a specific revision of this object (as opposed
1329
+ # to the latest version, the default).
1330
+ # @param [String] if_generation_match
1331
+ # Makes the operation conditional on whether the object's current generation
1332
+ # matches the given value.
1333
+ # @param [String] if_generation_not_match
1334
+ # Makes the operation conditional on whether the object's current generation
1335
+ # does not match the given value.
1336
+ # @param [String] if_metageneration_match
1337
+ # Makes the operation conditional on whether the object's current metageneration
1338
+ # matches the given value.
1339
+ # @param [String] if_metageneration_not_match
1340
+ # Makes the operation conditional on whether the object's current metageneration
1341
+ # does not match the given value.
1342
+ # @param [String] fields
1343
+ # Selector specifying which fields to include in a partial response.
1344
+ # @param [String] quota_user
1345
+ # Available to use for quota purposes for server-side applications. Can be any
1346
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1347
+ # Overrides userIp if both are provided.
1348
+ # @param [String] user_ip
1349
+ # IP address of the site where the request originates. Use this if you want to
1350
+ # enforce per-user limits.
1351
+ # @param [Google::Apis::RequestOptions] options
1352
+ # Request-specific options
1353
+ #
1354
+ # @yield [result, err] Result & error if block supplied
1355
+ # @yieldparam result [NilClass] No result returned for this method
1356
+ # @yieldparam err [StandardError] error object if request failed
1357
+ #
1358
+ # @return [void]
1359
+ #
1360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1363
+ def delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1364
+ path = 'b/{bucket}/o/{object}'
1365
+ command = make_simple_command(:delete, path, options)
1366
+ command.params['bucket'] = bucket unless bucket.nil?
1367
+ command.params['object'] = object unless object.nil?
1368
+ command.query['generation'] = generation unless generation.nil?
1369
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1370
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1371
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1372
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1373
+ command.query['fields'] = fields unless fields.nil?
1374
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1375
+ command.query['userIp'] = user_ip unless user_ip.nil?
1376
+ execute_or_queue_command(command, &block)
1377
+ end
1378
+
1379
+ # Retrieves an object or its metadata.
1380
+ # @param [String] bucket
1381
+ # Name of the bucket in which the object resides.
1382
+ # @param [String] object
1383
+ # Name of the object.
1384
+ # @param [String] generation
1385
+ # If present, selects a specific revision of this object (as opposed to the
1386
+ # latest version, the default).
1387
+ # @param [String] if_generation_match
1388
+ # Makes the operation conditional on whether the object's generation matches the
1389
+ # given value.
1390
+ # @param [String] if_generation_not_match
1391
+ # Makes the operation conditional on whether the object's generation does not
1392
+ # match the given value.
1393
+ # @param [String] if_metageneration_match
1394
+ # Makes the operation conditional on whether the object's current metageneration
1395
+ # matches the given value.
1396
+ # @param [String] if_metageneration_not_match
1397
+ # Makes the operation conditional on whether the object's current metageneration
1398
+ # does not match the given value.
1399
+ # @param [String] projection
1400
+ # Set of properties to return. Defaults to noAcl.
1401
+ # @param [String] fields
1402
+ # Selector specifying which fields to include in a partial response.
1403
+ # @param [String] quota_user
1404
+ # Available to use for quota purposes for server-side applications. Can be any
1405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1406
+ # Overrides userIp if both are provided.
1407
+ # @param [String] user_ip
1408
+ # IP address of the site where the request originates. Use this if you want to
1409
+ # enforce per-user limits.
1410
+ # @param [IO, String] download_dest
1411
+ # IO stream or filename to receive content download
1412
+ # @param [Google::Apis::RequestOptions] options
1413
+ # Request-specific options
1414
+ #
1415
+ # @yield [result, err] Result & error if block supplied
1416
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1417
+ # @yieldparam err [StandardError] error object if request failed
1418
+ #
1419
+ # @return [Google::Apis::StorageV1::Object]
1420
+ #
1421
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1422
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1423
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1424
+ def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1425
+ path = 'b/{bucket}/o/{object}'
1426
+ if download_dest.nil?
1427
+ command = make_simple_command(:get, path, options)
1428
+ else
1429
+ command = make_download_command(:get, path, options)
1430
+ command.download_dest = download_dest
1431
+ end
1432
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1433
+ command.response_class = Google::Apis::StorageV1::Object
1434
+ command.params['bucket'] = bucket unless bucket.nil?
1435
+ command.params['object'] = object unless object.nil?
1436
+ command.query['generation'] = generation unless generation.nil?
1437
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1438
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1439
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1440
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1441
+ command.query['projection'] = projection unless projection.nil?
1442
+ command.query['fields'] = fields unless fields.nil?
1443
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1444
+ command.query['userIp'] = user_ip unless user_ip.nil?
1445
+ execute_or_queue_command(command, &block)
1446
+ end
1447
+
1448
+ # Stores a new object and metadata.
1449
+ # @param [String] bucket
1450
+ # Name of the bucket in which to store the new object. Overrides the provided
1451
+ # object metadata's bucket value, if any.
1452
+ # @param [Google::Apis::StorageV1::Object] object_object
1453
+ # @param [String] content_encoding
1454
+ # If set, sets the contentEncoding property of the final object to this value.
1455
+ # Setting this parameter is equivalent to setting the contentEncoding metadata
1456
+ # property. This can be useful when uploading an object with uploadType=media to
1457
+ # indicate the encoding of the content being uploaded.
1458
+ # @param [String] if_generation_match
1459
+ # Makes the operation conditional on whether the object's current generation
1460
+ # matches the given value.
1461
+ # @param [String] if_generation_not_match
1462
+ # Makes the operation conditional on whether the object's current generation
1463
+ # does not match the given value.
1464
+ # @param [String] if_metageneration_match
1465
+ # Makes the operation conditional on whether the object's current metageneration
1466
+ # matches the given value.
1467
+ # @param [String] if_metageneration_not_match
1468
+ # Makes the operation conditional on whether the object's current metageneration
1469
+ # does not match the given value.
1470
+ # @param [String] name
1471
+ # Name of the object. Required when the object metadata is not otherwise
1472
+ # provided. Overrides the object metadata's name value, if any.
1473
+ # @param [String] predefined_acl
1474
+ # Apply a predefined set of access controls to this object.
1475
+ # @param [String] projection
1476
+ # Set of properties to return. Defaults to noAcl, unless the object resource
1477
+ # specifies the acl property, when it defaults to full.
1478
+ # @param [String] fields
1479
+ # Selector specifying which fields to include in a partial response.
1480
+ # @param [String] quota_user
1481
+ # Available to use for quota purposes for server-side applications. Can be any
1482
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1483
+ # Overrides userIp if both are provided.
1484
+ # @param [String] user_ip
1485
+ # IP address of the site where the request originates. Use this if you want to
1486
+ # enforce per-user limits.
1487
+ # @param [IO, String] upload_source
1488
+ # IO stream or filename containing content to upload
1489
+ # @param [String] content_type
1490
+ # Content type of the uploaded content.
1491
+ # @param [Google::Apis::RequestOptions] options
1492
+ # Request-specific options
1493
+ #
1494
+ # @yield [result, err] Result & error if block supplied
1495
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1496
+ # @yieldparam err [StandardError] error object if request failed
1497
+ #
1498
+ # @return [Google::Apis::StorageV1::Object]
1499
+ #
1500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1503
+ def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
1504
+ path = 'b/{bucket}/o'
1505
+ if upload_source.nil?
1506
+ command = make_simple_command(:post, path, options)
1507
+ else
1508
+ command = make_upload_command(:post, path, options)
1509
+ command.upload_source = upload_source
1510
+ command.upload_content_type = content_type
1511
+ end
1512
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
1513
+ command.request_object = object_object
1514
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1515
+ command.response_class = Google::Apis::StorageV1::Object
1516
+ command.params['bucket'] = bucket unless bucket.nil?
1517
+ command.query['contentEncoding'] = content_encoding unless content_encoding.nil?
1518
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1519
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1520
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1521
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1522
+ command.query['name'] = name unless name.nil?
1523
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
1524
+ command.query['projection'] = projection unless projection.nil?
1525
+ command.query['fields'] = fields unless fields.nil?
1526
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1527
+ command.query['userIp'] = user_ip unless user_ip.nil?
1528
+ execute_or_queue_command(command, &block)
1529
+ end
1530
+
1531
+ # Retrieves a list of objects matching the criteria.
1532
+ # @param [String] bucket
1533
+ # Name of the bucket in which to look for objects.
1534
+ # @param [String] delimiter
1535
+ # Returns results in a directory-like mode. items will contain only objects
1536
+ # whose names, aside from the prefix, do not contain delimiter. Objects whose
1537
+ # names, aside from the prefix, contain delimiter will have their name,
1538
+ # truncated after the delimiter, returned in prefixes. Duplicate prefixes are
1539
+ # omitted.
1540
+ # @param [Fixnum] max_results
1541
+ # Maximum number of items plus prefixes to return. As duplicate prefixes are
1542
+ # omitted, fewer total results may be returned than requested. The default value
1543
+ # of this parameter is 1,000 items.
1544
+ # @param [String] page_token
1545
+ # A previously-returned page token representing part of the larger set of
1546
+ # results to view.
1547
+ # @param [String] prefix
1548
+ # Filter results to objects whose names begin with this prefix.
1549
+ # @param [String] projection
1550
+ # Set of properties to return. Defaults to noAcl.
1551
+ # @param [Boolean] versions
1552
+ # If true, lists all versions of an object as distinct results. The default is
1553
+ # false. For more information, see Object Versioning.
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # Overrides userIp if both are provided.
1560
+ # @param [String] user_ip
1561
+ # IP address of the site where the request originates. Use this if you want to
1562
+ # enforce per-user limits.
1563
+ # @param [Google::Apis::RequestOptions] options
1564
+ # Request-specific options
1565
+ #
1566
+ # @yield [result, err] Result & error if block supplied
1567
+ # @yieldparam result [Google::Apis::StorageV1::Objects] parsed result object
1568
+ # @yieldparam err [StandardError] error object if request failed
1569
+ #
1570
+ # @return [Google::Apis::StorageV1::Objects]
1571
+ #
1572
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1573
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1574
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1575
+ def list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1576
+ path = 'b/{bucket}/o'
1577
+ command = make_simple_command(:get, path, options)
1578
+ command.response_representation = Google::Apis::StorageV1::Objects::Representation
1579
+ command.response_class = Google::Apis::StorageV1::Objects
1580
+ command.params['bucket'] = bucket unless bucket.nil?
1581
+ command.query['delimiter'] = delimiter unless delimiter.nil?
1582
+ command.query['maxResults'] = max_results unless max_results.nil?
1583
+ command.query['pageToken'] = page_token unless page_token.nil?
1584
+ command.query['prefix'] = prefix unless prefix.nil?
1585
+ command.query['projection'] = projection unless projection.nil?
1586
+ command.query['versions'] = versions unless versions.nil?
1587
+ command.query['fields'] = fields unless fields.nil?
1588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1589
+ command.query['userIp'] = user_ip unless user_ip.nil?
1590
+ execute_or_queue_command(command, &block)
1591
+ end
1592
+
1593
+ # Updates an object's metadata. This method supports patch semantics.
1594
+ # @param [String] bucket
1595
+ # Name of the bucket in which the object resides.
1596
+ # @param [String] object
1597
+ # Name of the object.
1598
+ # @param [Google::Apis::StorageV1::Object] object_object
1599
+ # @param [String] generation
1600
+ # If present, selects a specific revision of this object (as opposed to the
1601
+ # latest version, the default).
1602
+ # @param [String] if_generation_match
1603
+ # Makes the operation conditional on whether the object's current generation
1604
+ # matches the given value.
1605
+ # @param [String] if_generation_not_match
1606
+ # Makes the operation conditional on whether the object's current generation
1607
+ # does not match the given value.
1608
+ # @param [String] if_metageneration_match
1609
+ # Makes the operation conditional on whether the object's current metageneration
1610
+ # matches the given value.
1611
+ # @param [String] if_metageneration_not_match
1612
+ # Makes the operation conditional on whether the object's current metageneration
1613
+ # does not match the given value.
1614
+ # @param [String] predefined_acl
1615
+ # Apply a predefined set of access controls to this object.
1616
+ # @param [String] projection
1617
+ # Set of properties to return. Defaults to full.
1618
+ # @param [String] fields
1619
+ # Selector specifying which fields to include in a partial response.
1620
+ # @param [String] quota_user
1621
+ # Available to use for quota purposes for server-side applications. Can be any
1622
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1623
+ # Overrides userIp if both are provided.
1624
+ # @param [String] user_ip
1625
+ # IP address of the site where the request originates. Use this if you want to
1626
+ # enforce per-user limits.
1627
+ # @param [Google::Apis::RequestOptions] options
1628
+ # Request-specific options
1629
+ #
1630
+ # @yield [result, err] Result & error if block supplied
1631
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1632
+ # @yieldparam err [StandardError] error object if request failed
1633
+ #
1634
+ # @return [Google::Apis::StorageV1::Object]
1635
+ #
1636
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1637
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1638
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1639
+ def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1640
+ path = 'b/{bucket}/o/{object}'
1641
+ command = make_simple_command(:patch, path, options)
1642
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
1643
+ command.request_object = object_object
1644
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1645
+ command.response_class = Google::Apis::StorageV1::Object
1646
+ command.params['bucket'] = bucket unless bucket.nil?
1647
+ command.params['object'] = object unless object.nil?
1648
+ command.query['generation'] = generation unless generation.nil?
1649
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1650
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1651
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1652
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1653
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
1654
+ command.query['projection'] = projection unless projection.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
+ # Rewrites a source object to a destination object. Optionally overrides
1662
+ # metadata.
1663
+ # @param [String] source_bucket
1664
+ # Name of the bucket in which to find the source object.
1665
+ # @param [String] source_object
1666
+ # Name of the source object.
1667
+ # @param [String] destination_bucket
1668
+ # Name of the bucket in which to store the new object. Overrides the provided
1669
+ # object metadata's bucket value, if any.
1670
+ # @param [String] destination_object
1671
+ # Name of the new object. Required when the object metadata is not otherwise
1672
+ # provided. Overrides the object metadata's name value, if any.
1673
+ # @param [Google::Apis::StorageV1::Object] object_object
1674
+ # @param [String] destination_predefined_acl
1675
+ # Apply a predefined set of access controls to the destination object.
1676
+ # @param [String] if_generation_match
1677
+ # Makes the operation conditional on whether the destination object's current
1678
+ # generation matches the given value.
1679
+ # @param [String] if_generation_not_match
1680
+ # Makes the operation conditional on whether the destination object's current
1681
+ # generation does not match the given value.
1682
+ # @param [String] if_metageneration_match
1683
+ # Makes the operation conditional on whether the destination object's current
1684
+ # metageneration matches the given value.
1685
+ # @param [String] if_metageneration_not_match
1686
+ # Makes the operation conditional on whether the destination object's current
1687
+ # metageneration does not match the given value.
1688
+ # @param [String] if_source_generation_match
1689
+ # Makes the operation conditional on whether the source object's generation
1690
+ # matches the given value.
1691
+ # @param [String] if_source_generation_not_match
1692
+ # Makes the operation conditional on whether the source object's generation does
1693
+ # not match the given value.
1694
+ # @param [String] if_source_metageneration_match
1695
+ # Makes the operation conditional on whether the source object's current
1696
+ # metageneration matches the given value.
1697
+ # @param [String] if_source_metageneration_not_match
1698
+ # Makes the operation conditional on whether the source object's current
1699
+ # metageneration does not match the given value.
1700
+ # @param [String] max_bytes_rewritten_per_call
1701
+ # The maximum number of bytes that will be rewritten per rewrite request. Most
1702
+ # callers shouldn't need to specify this parameter - it is primarily in place to
1703
+ # support testing. If specified the value must be an integral multiple of 1 MiB (
1704
+ # 1048576). Also, this only applies to requests where the source and destination
1705
+ # span locations and/or storage classes. Finally, this value must not change
1706
+ # across rewrite calls else you'll get an error that the rewriteToken is invalid.
1707
+ # @param [String] projection
1708
+ # Set of properties to return. Defaults to noAcl, unless the object resource
1709
+ # specifies the acl property, when it defaults to full.
1710
+ # @param [String] rewrite_token
1711
+ # Include this field (from the previous rewrite response) on each rewrite
1712
+ # request after the first one, until the rewrite response 'done' flag is true.
1713
+ # Calls that provide a rewriteToken can omit all other request fields, but if
1714
+ # included those fields must match the values provided in the first rewrite
1715
+ # request.
1716
+ # @param [String] source_generation
1717
+ # If present, selects a specific revision of the source object (as opposed to
1718
+ # the latest version, the default).
1719
+ # @param [String] fields
1720
+ # Selector specifying which fields to include in a partial response.
1721
+ # @param [String] quota_user
1722
+ # Available to use for quota purposes for server-side applications. Can be any
1723
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1724
+ # Overrides userIp if both are provided.
1725
+ # @param [String] user_ip
1726
+ # IP address of the site where the request originates. Use this if you want to
1727
+ # enforce per-user limits.
1728
+ # @param [Google::Apis::RequestOptions] options
1729
+ # Request-specific options
1730
+ #
1731
+ # @yield [result, err] Result & error if block supplied
1732
+ # @yieldparam result [Google::Apis::StorageV1::RewriteResponse] parsed result object
1733
+ # @yieldparam err [StandardError] error object if request failed
1734
+ #
1735
+ # @return [Google::Apis::StorageV1::RewriteResponse]
1736
+ #
1737
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1738
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1739
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1740
+ def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1741
+ path = 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}'
1742
+ command = make_simple_command(:post, path, options)
1743
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
1744
+ command.request_object = object_object
1745
+ command.response_representation = Google::Apis::StorageV1::RewriteResponse::Representation
1746
+ command.response_class = Google::Apis::StorageV1::RewriteResponse
1747
+ command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
1748
+ command.params['sourceObject'] = source_object unless source_object.nil?
1749
+ command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
1750
+ command.params['destinationObject'] = destination_object unless destination_object.nil?
1751
+ command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
1752
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1753
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1754
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1755
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1756
+ command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
1757
+ command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
1758
+ command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
1759
+ command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
1760
+ command.query['maxBytesRewrittenPerCall'] = max_bytes_rewritten_per_call unless max_bytes_rewritten_per_call.nil?
1761
+ command.query['projection'] = projection unless projection.nil?
1762
+ command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil?
1763
+ command.query['sourceGeneration'] = source_generation unless source_generation.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
+ # Updates an object's metadata.
1771
+ # @param [String] bucket
1772
+ # Name of the bucket in which the object resides.
1773
+ # @param [String] object
1774
+ # Name of the object.
1775
+ # @param [Google::Apis::StorageV1::Object] object_object
1776
+ # @param [String] generation
1777
+ # If present, selects a specific revision of this object (as opposed to the
1778
+ # latest version, the default).
1779
+ # @param [String] if_generation_match
1780
+ # Makes the operation conditional on whether the object's current generation
1781
+ # matches the given value.
1782
+ # @param [String] if_generation_not_match
1783
+ # Makes the operation conditional on whether the object's current generation
1784
+ # does not match the given value.
1785
+ # @param [String] if_metageneration_match
1786
+ # Makes the operation conditional on whether the object's current metageneration
1787
+ # matches the given value.
1788
+ # @param [String] if_metageneration_not_match
1789
+ # Makes the operation conditional on whether the object's current metageneration
1790
+ # does not match the given value.
1791
+ # @param [String] predefined_acl
1792
+ # Apply a predefined set of access controls to this object.
1793
+ # @param [String] projection
1794
+ # Set of properties to return. Defaults to full.
1795
+ # @param [String] fields
1796
+ # Selector specifying which fields to include in a partial response.
1797
+ # @param [String] quota_user
1798
+ # Available to use for quota purposes for server-side applications. Can be any
1799
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1800
+ # Overrides userIp if both are provided.
1801
+ # @param [String] user_ip
1802
+ # IP address of the site where the request originates. Use this if you want to
1803
+ # enforce per-user limits.
1804
+ # @param [IO, String] download_dest
1805
+ # IO stream or filename to receive content download
1806
+ # @param [Google::Apis::RequestOptions] options
1807
+ # Request-specific options
1808
+ #
1809
+ # @yield [result, err] Result & error if block supplied
1810
+ # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
1811
+ # @yieldparam err [StandardError] error object if request failed
1812
+ #
1813
+ # @return [Google::Apis::StorageV1::Object]
1814
+ #
1815
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1816
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1817
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1818
+ def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1819
+ path = 'b/{bucket}/o/{object}'
1820
+ if download_dest.nil?
1821
+ command = make_simple_command(:put, path, options)
1822
+ else
1823
+ command = make_download_command(:put, path, options)
1824
+ command.download_dest = download_dest
1825
+ end
1826
+ command.request_representation = Google::Apis::StorageV1::Object::Representation
1827
+ command.request_object = object_object
1828
+ command.response_representation = Google::Apis::StorageV1::Object::Representation
1829
+ command.response_class = Google::Apis::StorageV1::Object
1830
+ command.params['bucket'] = bucket unless bucket.nil?
1831
+ command.params['object'] = object unless object.nil?
1832
+ command.query['generation'] = generation unless generation.nil?
1833
+ command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
1834
+ command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
1835
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
1836
+ command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
1837
+ command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
1838
+ command.query['projection'] = projection unless projection.nil?
1839
+ command.query['fields'] = fields unless fields.nil?
1840
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1841
+ command.query['userIp'] = user_ip unless user_ip.nil?
1842
+ execute_or_queue_command(command, &block)
1843
+ end
1844
+
1845
+ # Watch for changes on all objects in a bucket.
1846
+ # @param [String] bucket
1847
+ # Name of the bucket in which to look for objects.
1848
+ # @param [Google::Apis::StorageV1::Channel] channel_object
1849
+ # @param [String] delimiter
1850
+ # Returns results in a directory-like mode. items will contain only objects
1851
+ # whose names, aside from the prefix, do not contain delimiter. Objects whose
1852
+ # names, aside from the prefix, contain delimiter will have their name,
1853
+ # truncated after the delimiter, returned in prefixes. Duplicate prefixes are
1854
+ # omitted.
1855
+ # @param [Fixnum] max_results
1856
+ # Maximum number of items plus prefixes to return. As duplicate prefixes are
1857
+ # omitted, fewer total results may be returned than requested. The default value
1858
+ # of this parameter is 1,000 items.
1859
+ # @param [String] page_token
1860
+ # A previously-returned page token representing part of the larger set of
1861
+ # results to view.
1862
+ # @param [String] prefix
1863
+ # Filter results to objects whose names begin with this prefix.
1864
+ # @param [String] projection
1865
+ # Set of properties to return. Defaults to noAcl.
1866
+ # @param [Boolean] versions
1867
+ # If true, lists all versions of an object as distinct results. The default is
1868
+ # false. For more information, see Object Versioning.
1869
+ # @param [String] fields
1870
+ # Selector specifying which fields to include in a partial response.
1871
+ # @param [String] quota_user
1872
+ # Available to use for quota purposes for server-side applications. Can be any
1873
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1874
+ # Overrides userIp if both are provided.
1875
+ # @param [String] user_ip
1876
+ # IP address of the site where the request originates. Use this if you want to
1877
+ # enforce per-user limits.
1878
+ # @param [Google::Apis::RequestOptions] options
1879
+ # Request-specific options
1880
+ #
1881
+ # @yield [result, err] Result & error if block supplied
1882
+ # @yieldparam result [Google::Apis::StorageV1::Channel] parsed result object
1883
+ # @yieldparam err [StandardError] error object if request failed
1884
+ #
1885
+ # @return [Google::Apis::StorageV1::Channel]
1886
+ #
1887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1890
+ def watch_all_object(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1891
+ path = 'b/{bucket}/o/watch'
1892
+ command = make_simple_command(:post, path, options)
1893
+ command.request_representation = Google::Apis::StorageV1::Channel::Representation
1894
+ command.request_object = channel_object
1895
+ command.response_representation = Google::Apis::StorageV1::Channel::Representation
1896
+ command.response_class = Google::Apis::StorageV1::Channel
1897
+ command.params['bucket'] = bucket unless bucket.nil?
1898
+ command.query['delimiter'] = delimiter unless delimiter.nil?
1899
+ command.query['maxResults'] = max_results unless max_results.nil?
1900
+ command.query['pageToken'] = page_token unless page_token.nil?
1901
+ command.query['prefix'] = prefix unless prefix.nil?
1902
+ command.query['projection'] = projection unless projection.nil?
1903
+ command.query['versions'] = versions unless versions.nil?
1904
+ command.query['fields'] = fields unless fields.nil?
1905
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1906
+ command.query['userIp'] = user_ip unless user_ip.nil?
1907
+ execute_or_queue_command(command, &block)
1908
+ end
1909
+
1910
+ protected
1911
+
1912
+ def apply_command_defaults(command)
1913
+ command.query['key'] = key unless key.nil?
1914
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1915
+ command.query['userIp'] = user_ip unless user_ip.nil?
1916
+ end
1917
+ end
1918
+ end
1919
+ end
1920
+ end