google-api-client 0.34.1 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (312) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +16 -3
  3. data/CHANGELOG.md +114 -0
  4. data/OVERVIEW.md +36 -0
  5. data/README.md +49 -1
  6. data/Rakefile +1 -1
  7. data/docs/api-keys.md +20 -0
  8. data/docs/auth.md +53 -0
  9. data/docs/client-secrets.md +69 -0
  10. data/docs/getting-started.md +340 -0
  11. data/docs/installation.md +0 -0
  12. data/docs/logging.md +34 -0
  13. data/docs/media-upload.md +25 -0
  14. data/docs/oauth-installed.md +191 -0
  15. data/docs/oauth-server.md +135 -0
  16. data/docs/oauth-web.md +280 -0
  17. data/docs/oauth.md +268 -0
  18. data/docs/pagination.md +29 -0
  19. data/docs/performance.md +25 -0
  20. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  21. data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
  22. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +9 -0
  23. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +1 -0
  24. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  25. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +9 -0
  26. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  27. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  28. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  29. data/generated/google/apis/androidpublisher_v3/classes.rb +93 -0
  30. data/generated/google/apis/androidpublisher_v3/representations.rb +49 -0
  31. data/generated/google/apis/appengine_v1.rb +1 -1
  32. data/generated/google/apis/appengine_v1beta.rb +1 -1
  33. data/generated/google/apis/appsmarket_v2.rb +1 -1
  34. data/generated/google/apis/bigquery_v2.rb +1 -1
  35. data/generated/google/apis/bigquery_v2/classes.rb +46 -4
  36. data/generated/google/apis/bigquery_v2/representations.rb +17 -0
  37. data/generated/google/apis/bigquery_v2/service.rb +1 -5
  38. data/generated/google/apis/bigqueryconnection_v1beta1.rb +1 -1
  39. data/generated/google/apis/bigqueryconnection_v1beta1/classes.rb +6 -5
  40. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  41. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +30 -4
  42. data/generated/google/apis/bigqueryreservation_v1.rb +1 -1
  43. data/generated/google/apis/bigqueryreservation_v1/classes.rb +0 -21
  44. data/generated/google/apis/bigqueryreservation_v1/representations.rb +0 -13
  45. data/generated/google/apis/bigqueryreservation_v1alpha2.rb +1 -1
  46. data/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb +116 -1
  47. data/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb +35 -0
  48. data/generated/google/apis/bigqueryreservation_v1alpha2/service.rb +71 -0
  49. data/generated/google/apis/bigqueryreservation_v1beta1.rb +1 -1
  50. data/generated/google/apis/bigqueryreservation_v1beta1/classes.rb +61 -77
  51. data/generated/google/apis/bigqueryreservation_v1beta1/representations.rb +16 -17
  52. data/generated/google/apis/bigqueryreservation_v1beta1/service.rb +112 -78
  53. data/generated/google/apis/bigtableadmin_v1.rb +1 -1
  54. data/generated/google/apis/bigtableadmin_v1/classes.rb +1 -1
  55. data/generated/google/apis/bigtableadmin_v2.rb +1 -1
  56. data/generated/google/apis/bigtableadmin_v2/classes.rb +1 -1
  57. data/generated/google/apis/bigtableadmin_v2/service.rb +1 -1
  58. data/generated/google/apis/{sqladmin_v1beta4.rb → billingbudgets_v1beta1.rb} +10 -13
  59. data/generated/google/apis/billingbudgets_v1beta1/classes.rb +392 -0
  60. data/generated/google/apis/billingbudgets_v1beta1/representations.rb +191 -0
  61. data/generated/google/apis/billingbudgets_v1beta1/service.rb +233 -0
  62. data/generated/google/apis/binaryauthorization_v1.rb +1 -1
  63. data/generated/google/apis/binaryauthorization_v1/classes.rb +6 -5
  64. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  65. data/generated/google/apis/binaryauthorization_v1beta1/classes.rb +6 -5
  66. data/generated/google/apis/books_v1.rb +1 -1
  67. data/generated/google/apis/books_v1/classes.rb +20 -0
  68. data/generated/google/apis/books_v1/representations.rb +3 -0
  69. data/generated/google/apis/calendar_v3.rb +1 -1
  70. data/generated/google/apis/calendar_v3/classes.rb +1 -1
  71. data/generated/google/apis/calendar_v3/service.rb +18 -30
  72. data/generated/google/apis/civicinfo_v2.rb +1 -1
  73. data/generated/google/apis/civicinfo_v2/classes.rb +0 -156
  74. data/generated/google/apis/civicinfo_v2/representations.rb +0 -58
  75. data/generated/google/apis/cloudasset_v1.rb +1 -1
  76. data/generated/google/apis/cloudasset_v1/classes.rb +6 -5
  77. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  78. data/generated/google/apis/cloudasset_v1beta1/classes.rb +6 -5
  79. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  80. data/generated/google/apis/cloudbilling_v1/classes.rb +17 -0
  81. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  82. data/generated/google/apis/cloudbuild_v1/classes.rb +8 -2
  83. data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
  84. data/generated/google/apis/cloudbuild_v1/service.rb +18 -18
  85. data/generated/google/apis/cloudbuild_v1alpha1.rb +1 -1
  86. data/generated/google/apis/cloudbuild_v1alpha1/classes.rb +8 -2
  87. data/generated/google/apis/cloudbuild_v1alpha1/representations.rb +1 -0
  88. data/generated/google/apis/cloudbuild_v1alpha1/service.rb +4 -1
  89. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  90. data/generated/google/apis/cloudfunctions_v1/classes.rb +13 -5
  91. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -0
  92. data/generated/google/apis/cloudfunctions_v1/service.rb +3 -1
  93. data/generated/google/apis/cloudiot_v1.rb +1 -1
  94. data/generated/google/apis/cloudiot_v1/classes.rb +6 -5
  95. data/generated/google/apis/cloudkms_v1.rb +1 -1
  96. data/generated/google/apis/cloudkms_v1/classes.rb +6 -5
  97. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1.rb +1 -1
  98. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb +6 -5
  99. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  100. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +6 -5
  101. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  102. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +6 -5
  103. data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
  104. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +6 -5
  105. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  106. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +6 -5
  107. data/generated/google/apis/cloudscheduler_v1.rb +1 -1
  108. data/generated/google/apis/cloudscheduler_v1/classes.rb +2 -1
  109. data/generated/google/apis/cloudscheduler_v1beta1.rb +1 -1
  110. data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +2 -1
  111. data/generated/google/apis/cloudsearch_v1.rb +8 -8
  112. data/generated/google/apis/cloudsearch_v1/classes.rb +5 -130
  113. data/generated/google/apis/cloudsearch_v1/representations.rb +0 -75
  114. data/generated/google/apis/cloudsearch_v1/service.rb +42 -7
  115. data/generated/google/apis/cloudtasks_v2.rb +1 -1
  116. data/generated/google/apis/cloudtasks_v2/classes.rb +212 -5
  117. data/generated/google/apis/cloudtasks_v2/representations.rb +50 -0
  118. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  119. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +6 -5
  120. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  121. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +6 -5
  122. data/generated/google/apis/commentanalyzer_v1alpha1.rb +1 -1
  123. data/generated/google/apis/commentanalyzer_v1alpha1/classes.rb +14 -19
  124. data/generated/google/apis/compute_alpha.rb +1 -1
  125. data/generated/google/apis/compute_alpha/classes.rb +75 -12
  126. data/generated/google/apis/compute_alpha/representations.rb +2 -0
  127. data/generated/google/apis/compute_beta.rb +1 -1
  128. data/generated/google/apis/compute_beta/classes.rb +54 -10
  129. data/generated/google/apis/compute_v1.rb +1 -1
  130. data/generated/google/apis/compute_v1/classes.rb +54 -10
  131. data/generated/google/apis/containeranalysis_v1alpha1.rb +1 -1
  132. data/generated/google/apis/containeranalysis_v1alpha1/classes.rb +6 -5
  133. data/generated/google/apis/containeranalysis_v1beta1.rb +1 -1
  134. data/generated/google/apis/containeranalysis_v1beta1/classes.rb +6 -5
  135. data/generated/google/apis/content_v2.rb +1 -1
  136. data/generated/google/apis/content_v2/classes.rb +13 -4
  137. data/generated/google/apis/content_v2_1.rb +1 -1
  138. data/generated/google/apis/content_v2_1/classes.rb +13 -4
  139. data/generated/google/apis/datacatalog_v1beta1.rb +35 -0
  140. data/generated/google/apis/datacatalog_v1beta1/classes.rb +1646 -0
  141. data/generated/google/apis/datacatalog_v1beta1/representations.rb +700 -0
  142. data/generated/google/apis/datacatalog_v1beta1/service.rb +1982 -0
  143. data/generated/google/apis/dataproc_v1.rb +1 -1
  144. data/generated/google/apis/dataproc_v1/classes.rb +75 -4
  145. data/generated/google/apis/dataproc_v1/representations.rb +22 -0
  146. data/generated/google/apis/dataproc_v1/service.rb +14 -7
  147. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  148. data/generated/google/apis/dataproc_v1beta2/classes.rb +2 -4
  149. data/generated/google/apis/dataproc_v1beta2/service.rb +14 -7
  150. data/generated/google/apis/dfareporting_v3_3.rb +1 -1
  151. data/generated/google/apis/dfareporting_v3_3/classes.rb +21 -1
  152. data/generated/google/apis/dfareporting_v3_3/service.rb +6 -6
  153. data/generated/google/apis/dfareporting_v3_4.rb +40 -0
  154. data/generated/google/apis/dfareporting_v3_4/classes.rb +12717 -0
  155. data/generated/google/apis/dfareporting_v3_4/representations.rb +4595 -0
  156. data/generated/google/apis/dfareporting_v3_4/service.rb +8685 -0
  157. data/generated/google/apis/dialogflow_v2.rb +1 -1
  158. data/generated/google/apis/dialogflow_v2/classes.rb +484 -1
  159. data/generated/google/apis/dialogflow_v2/representations.rb +220 -0
  160. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  161. data/generated/google/apis/dialogflow_v2beta1/classes.rb +497 -1
  162. data/generated/google/apis/dialogflow_v2beta1/representations.rb +221 -0
  163. data/generated/google/apis/dlp_v2.rb +1 -1
  164. data/generated/google/apis/dlp_v2/classes.rb +68 -25
  165. data/generated/google/apis/dlp_v2/representations.rb +9 -4
  166. data/generated/google/apis/dlp_v2/service.rb +1925 -193
  167. data/generated/google/apis/dns_v1beta2.rb +1 -1
  168. data/generated/google/apis/dns_v1beta2/classes.rb +47 -0
  169. data/generated/google/apis/dns_v1beta2/representations.rb +17 -0
  170. data/generated/google/apis/docs_v1.rb +1 -1
  171. data/generated/google/apis/docs_v1/classes.rb +4 -8
  172. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  173. data/generated/google/apis/doubleclickbidmanager_v1_1.rb +34 -0
  174. data/generated/google/apis/doubleclickbidmanager_v1_1/classes.rb +826 -0
  175. data/generated/google/apis/doubleclickbidmanager_v1_1/representations.rb +372 -0
  176. data/generated/google/apis/doubleclickbidmanager_v1_1/service.rb +371 -0
  177. data/generated/google/apis/drive_v3.rb +1 -1
  178. data/generated/google/apis/drive_v3/classes.rb +12 -3
  179. data/generated/google/apis/fcm_v1.rb +1 -1
  180. data/generated/google/apis/fcm_v1/classes.rb +15 -0
  181. data/generated/google/apis/fcm_v1/representations.rb +2 -0
  182. data/generated/google/apis/firebase_v1beta1.rb +1 -1
  183. data/generated/google/apis/firebase_v1beta1/classes.rb +3 -4
  184. data/generated/google/apis/firebase_v1beta1/service.rb +6 -6
  185. data/generated/google/apis/firebasehosting_v1beta1.rb +1 -1
  186. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +25 -0
  187. data/generated/google/apis/firebasehosting_v1beta1/representations.rb +15 -0
  188. data/generated/google/apis/firebasehosting_v1beta1/service.rb +47 -0
  189. data/generated/google/apis/firebaserules_v1.rb +1 -1
  190. data/generated/google/apis/firebaserules_v1/classes.rb +26 -0
  191. data/generated/google/apis/firebaserules_v1/representations.rb +15 -0
  192. data/generated/google/apis/genomics_v2alpha1.rb +1 -1
  193. data/generated/google/apis/genomics_v2alpha1/classes.rb +32 -0
  194. data/generated/google/apis/genomics_v2alpha1/representations.rb +16 -0
  195. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  196. data/generated/google/apis/healthcare_v1beta1/classes.rb +8 -7
  197. data/generated/google/apis/homegraph_v1.rb +1 -1
  198. data/generated/google/apis/homegraph_v1/classes.rb +15 -1
  199. data/generated/google/apis/homegraph_v1/representations.rb +2 -1
  200. data/generated/google/apis/iam_v1.rb +1 -1
  201. data/generated/google/apis/iam_v1/classes.rb +6 -5
  202. data/generated/google/apis/logging_v2.rb +1 -1
  203. data/generated/google/apis/logging_v2/classes.rb +18 -2
  204. data/generated/google/apis/logging_v2/representations.rb +2 -0
  205. data/generated/google/apis/ml_v1.rb +1 -1
  206. data/generated/google/apis/ml_v1/classes.rb +173 -97
  207. data/generated/google/apis/ml_v1/representations.rb +58 -0
  208. data/generated/google/apis/ml_v1/service.rb +37 -0
  209. data/generated/google/apis/monitoring_v3.rb +1 -1
  210. data/generated/google/apis/monitoring_v3/classes.rb +780 -6
  211. data/generated/google/apis/monitoring_v3/representations.rb +347 -0
  212. data/generated/google/apis/monitoring_v3/service.rb +382 -0
  213. data/generated/google/apis/pagespeedonline_v5.rb +1 -1
  214. data/generated/google/apis/pagespeedonline_v5/classes.rb +8 -0
  215. data/generated/google/apis/pagespeedonline_v5/representations.rb +1 -0
  216. data/generated/google/apis/policytroubleshooter_v1beta.rb +1 -1
  217. data/generated/google/apis/policytroubleshooter_v1beta/classes.rb +6 -5
  218. data/generated/google/apis/pubsub_v1.rb +1 -1
  219. data/generated/google/apis/pubsub_v1/classes.rb +8 -6
  220. data/generated/google/apis/pubsub_v1/service.rb +6 -7
  221. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  222. data/generated/google/apis/pubsub_v1beta2/classes.rb +6 -5
  223. data/generated/google/apis/recommender_v1beta1.rb +1 -1
  224. data/generated/google/apis/recommender_v1beta1/classes.rb +1 -1
  225. data/generated/google/apis/recommender_v1beta1/service.rb +10 -8
  226. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  227. data/generated/google/apis/remotebuildexecution_v1/classes.rb +33 -0
  228. data/generated/google/apis/remotebuildexecution_v1/representations.rb +15 -0
  229. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  230. data/generated/google/apis/remotebuildexecution_v1alpha/classes.rb +33 -0
  231. data/generated/google/apis/remotebuildexecution_v1alpha/representations.rb +15 -0
  232. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  233. data/generated/google/apis/remotebuildexecution_v2/classes.rb +33 -0
  234. data/generated/google/apis/remotebuildexecution_v2/representations.rb +15 -0
  235. data/generated/google/apis/run_v1.rb +1 -1
  236. data/generated/google/apis/run_v1/classes.rb +8 -169
  237. data/generated/google/apis/run_v1/representations.rb +0 -71
  238. data/generated/google/apis/run_v1/service.rb +229 -1207
  239. data/generated/google/apis/run_v1alpha1.rb +1 -1
  240. data/generated/google/apis/run_v1alpha1/classes.rb +9 -9
  241. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  242. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +6 -5
  243. data/generated/google/apis/securitycenter_v1.rb +1 -1
  244. data/generated/google/apis/securitycenter_v1/classes.rb +66 -11
  245. data/generated/google/apis/securitycenter_v1/representations.rb +19 -0
  246. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  247. data/generated/google/apis/securitycenter_v1beta1/classes.rb +16 -13
  248. data/generated/google/apis/servicebroker_v1.rb +1 -1
  249. data/generated/google/apis/servicebroker_v1/classes.rb +6 -5
  250. data/generated/google/apis/servicebroker_v1alpha1.rb +1 -1
  251. data/generated/google/apis/servicebroker_v1alpha1/classes.rb +6 -5
  252. data/generated/google/apis/servicebroker_v1beta1.rb +1 -1
  253. data/generated/google/apis/servicebroker_v1beta1/classes.rb +6 -5
  254. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  255. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +3 -2
  256. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  257. data/generated/google/apis/servicecontrol_v1/classes.rb +8 -1
  258. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -0
  259. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  260. data/generated/google/apis/servicemanagement_v1/classes.rb +12 -9
  261. data/generated/google/apis/servicemanagement_v1/service.rb +1 -9
  262. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  263. data/generated/google/apis/servicenetworking_v1/classes.rb +130 -13
  264. data/generated/google/apis/servicenetworking_v1/representations.rb +58 -0
  265. data/generated/google/apis/servicenetworking_v1/service.rb +42 -3
  266. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  267. data/generated/google/apis/servicenetworking_v1beta/classes.rb +3 -2
  268. data/generated/google/apis/serviceusage_v1.rb +1 -1
  269. data/generated/google/apis/serviceusage_v1/classes.rb +3 -2
  270. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  271. data/generated/google/apis/serviceusage_v1beta1/classes.rb +3 -2
  272. data/generated/google/apis/sheets_v4.rb +1 -1
  273. data/generated/google/apis/spanner_v1.rb +1 -1
  274. data/generated/google/apis/spanner_v1/classes.rb +70 -30
  275. data/generated/google/apis/spanner_v1/service.rb +270 -0
  276. data/generated/google/apis/speech_v1.rb +1 -1
  277. data/generated/google/apis/speech_v1/classes.rb +6 -0
  278. data/generated/google/apis/speech_v1/representations.rb +1 -0
  279. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  280. data/generated/google/apis/speech_v1p1beta1/classes.rb +6 -0
  281. data/generated/google/apis/speech_v1p1beta1/representations.rb +1 -0
  282. data/generated/google/apis/sql_v1beta4.rb +1 -1
  283. data/generated/google/apis/sql_v1beta4/service.rb +59 -10
  284. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  285. data/generated/google/apis/videointelligence_v1.rb +1 -1
  286. data/generated/google/apis/videointelligence_v1/classes.rb +112 -0
  287. data/generated/google/apis/videointelligence_v1/representations.rb +62 -0
  288. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  289. data/generated/google/apis/videointelligence_v1beta2/classes.rb +112 -0
  290. data/generated/google/apis/videointelligence_v1beta2/representations.rb +62 -0
  291. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  292. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +112 -0
  293. data/generated/google/apis/videointelligence_v1p1beta1/representations.rb +62 -0
  294. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  295. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +112 -0
  296. data/generated/google/apis/videointelligence_v1p2beta1/representations.rb +62 -0
  297. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  298. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +112 -0
  299. data/generated/google/apis/videointelligence_v1p3beta1/representations.rb +62 -0
  300. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  301. data/lib/google/apis/core/api_command.rb +3 -0
  302. data/lib/google/apis/core/http_command.rb +10 -8
  303. data/lib/google/apis/version.rb +1 -1
  304. data/rakelib/devsite/devsite_builder.rb +1 -1
  305. metadata +33 -11
  306. data/generated/google/apis/sqladmin_v1beta4/classes.rb +0 -2633
  307. data/generated/google/apis/sqladmin_v1beta4/representations.rb +0 -1110
  308. data/generated/google/apis/sqladmin_v1beta4/service.rb +0 -1793
  309. data/generated/google/apis/storage_v1beta1.rb +0 -40
  310. data/generated/google/apis/storage_v1beta1/classes.rb +0 -616
  311. data/generated/google/apis/storage_v1beta1/representations.rb +0 -249
  312. data/generated/google/apis/storage_v1beta1/service.rb +0 -1032
@@ -1,249 +0,0 @@
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 StorageV1beta1
24
-
25
- class Bucket
26
- class Representation < Google::Apis::Core::JsonRepresentation; end
27
-
28
- class Owner
29
- class Representation < Google::Apis::Core::JsonRepresentation; end
30
-
31
- include Google::Apis::Core::JsonObjectSupport
32
- end
33
-
34
- class Website
35
- class Representation < Google::Apis::Core::JsonRepresentation; end
36
-
37
- include Google::Apis::Core::JsonObjectSupport
38
- end
39
-
40
- include Google::Apis::Core::JsonObjectSupport
41
- end
42
-
43
- class BucketAccessControl
44
- class Representation < Google::Apis::Core::JsonRepresentation; end
45
-
46
- include Google::Apis::Core::JsonObjectSupport
47
- end
48
-
49
- class BucketAccessControls
50
- class Representation < Google::Apis::Core::JsonRepresentation; end
51
-
52
- include Google::Apis::Core::JsonObjectSupport
53
- end
54
-
55
- class Buckets
56
- class Representation < Google::Apis::Core::JsonRepresentation; end
57
-
58
- include Google::Apis::Core::JsonObjectSupport
59
- end
60
-
61
- class Object
62
- class Representation < Google::Apis::Core::JsonRepresentation; end
63
-
64
- class Media
65
- class Representation < Google::Apis::Core::JsonRepresentation; end
66
-
67
- include Google::Apis::Core::JsonObjectSupport
68
- end
69
-
70
- class Owner
71
- class Representation < Google::Apis::Core::JsonRepresentation; end
72
-
73
- include Google::Apis::Core::JsonObjectSupport
74
- end
75
-
76
- include Google::Apis::Core::JsonObjectSupport
77
- end
78
-
79
- class ObjectAccessControl
80
- class Representation < Google::Apis::Core::JsonRepresentation; end
81
-
82
- include Google::Apis::Core::JsonObjectSupport
83
- end
84
-
85
- class ObjectAccessControls
86
- class Representation < Google::Apis::Core::JsonRepresentation; end
87
-
88
- include Google::Apis::Core::JsonObjectSupport
89
- end
90
-
91
- class Objects
92
- class Representation < Google::Apis::Core::JsonRepresentation; end
93
-
94
- include Google::Apis::Core::JsonObjectSupport
95
- end
96
-
97
- class Bucket
98
- # @private
99
- class Representation < Google::Apis::Core::JsonRepresentation
100
- collection :acl, as: 'acl', class: Google::Apis::StorageV1beta1::BucketAccessControl, decorator: Google::Apis::StorageV1beta1::BucketAccessControl::Representation
101
-
102
- collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1beta1::ObjectAccessControl, decorator: Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
103
-
104
- property :id, as: 'id'
105
- property :kind, as: 'kind'
106
- property :location, as: 'location'
107
- property :owner, as: 'owner', class: Google::Apis::StorageV1beta1::Bucket::Owner, decorator: Google::Apis::StorageV1beta1::Bucket::Owner::Representation
108
-
109
- property :project_id, :numeric_string => true, as: 'projectId'
110
- property :self_link, as: 'selfLink'
111
- property :time_created, as: 'timeCreated', type: DateTime
112
-
113
- property :website, as: 'website', class: Google::Apis::StorageV1beta1::Bucket::Website, decorator: Google::Apis::StorageV1beta1::Bucket::Website::Representation
114
-
115
- end
116
-
117
- class Owner
118
- # @private
119
- class Representation < Google::Apis::Core::JsonRepresentation
120
- property :entity, as: 'entity'
121
- property :entity_id, as: 'entityId'
122
- end
123
- end
124
-
125
- class Website
126
- # @private
127
- class Representation < Google::Apis::Core::JsonRepresentation
128
- property :main_page_suffix, as: 'mainPageSuffix'
129
- property :not_found_page, as: 'notFoundPage'
130
- end
131
- end
132
- end
133
-
134
- class BucketAccessControl
135
- # @private
136
- class Representation < Google::Apis::Core::JsonRepresentation
137
- property :bucket, as: 'bucket'
138
- property :domain, as: 'domain'
139
- property :email, as: 'email'
140
- property :entity, as: 'entity'
141
- property :entity_id, as: 'entityId'
142
- property :id, as: 'id'
143
- property :kind, as: 'kind'
144
- property :role, as: 'role'
145
- property :self_link, as: 'selfLink'
146
- end
147
- end
148
-
149
- class BucketAccessControls
150
- # @private
151
- class Representation < Google::Apis::Core::JsonRepresentation
152
- collection :items, as: 'items', class: Google::Apis::StorageV1beta1::BucketAccessControl, decorator: Google::Apis::StorageV1beta1::BucketAccessControl::Representation
153
-
154
- property :kind, as: 'kind'
155
- end
156
- end
157
-
158
- class Buckets
159
- # @private
160
- class Representation < Google::Apis::Core::JsonRepresentation
161
- collection :items, as: 'items', class: Google::Apis::StorageV1beta1::Bucket, decorator: Google::Apis::StorageV1beta1::Bucket::Representation
162
-
163
- property :kind, as: 'kind'
164
- property :next_page_token, as: 'nextPageToken'
165
- end
166
- end
167
-
168
- class Object
169
- # @private
170
- class Representation < Google::Apis::Core::JsonRepresentation
171
- collection :acl, as: 'acl', class: Google::Apis::StorageV1beta1::ObjectAccessControl, decorator: Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
172
-
173
- property :bucket, as: 'bucket'
174
- property :cache_control, as: 'cacheControl'
175
- property :content_disposition, as: 'contentDisposition'
176
- property :content_encoding, as: 'contentEncoding'
177
- property :content_language, as: 'contentLanguage'
178
- property :id, as: 'id'
179
- property :kind, as: 'kind'
180
- property :media, as: 'media', class: Google::Apis::StorageV1beta1::Object::Media, decorator: Google::Apis::StorageV1beta1::Object::Media::Representation
181
-
182
- hash :metadata, as: 'metadata'
183
- property :name, as: 'name'
184
- property :owner, as: 'owner', class: Google::Apis::StorageV1beta1::Object::Owner, decorator: Google::Apis::StorageV1beta1::Object::Owner::Representation
185
-
186
- property :self_link, as: 'selfLink'
187
- end
188
-
189
- class Media
190
- # @private
191
- class Representation < Google::Apis::Core::JsonRepresentation
192
- property :algorithm, as: 'algorithm'
193
- property :content_type, as: 'contentType'
194
- property :data, :base64 => true, as: 'data'
195
- property :hash_prop, as: 'hash'
196
- property :length, :numeric_string => true, as: 'length'
197
- property :link, as: 'link'
198
- property :time_created, as: 'timeCreated', type: DateTime
199
-
200
- end
201
- end
202
-
203
- class Owner
204
- # @private
205
- class Representation < Google::Apis::Core::JsonRepresentation
206
- property :entity, as: 'entity'
207
- property :entity_id, as: 'entityId'
208
- end
209
- end
210
- end
211
-
212
- class ObjectAccessControl
213
- # @private
214
- class Representation < Google::Apis::Core::JsonRepresentation
215
- property :bucket, as: 'bucket'
216
- property :domain, as: 'domain'
217
- property :email, as: 'email'
218
- property :entity, as: 'entity'
219
- property :entity_id, as: 'entityId'
220
- property :id, as: 'id'
221
- property :kind, as: 'kind'
222
- property :object, as: 'object'
223
- property :role, as: 'role'
224
- property :self_link, as: 'selfLink'
225
- end
226
- end
227
-
228
- class ObjectAccessControls
229
- # @private
230
- class Representation < Google::Apis::Core::JsonRepresentation
231
- collection :items, as: 'items', class: Google::Apis::StorageV1beta1::ObjectAccessControl, decorator: Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
232
-
233
- property :kind, as: 'kind'
234
- end
235
- end
236
-
237
- class Objects
238
- # @private
239
- class Representation < Google::Apis::Core::JsonRepresentation
240
- collection :items, as: 'items', class: Google::Apis::StorageV1beta1::Object, decorator: Google::Apis::StorageV1beta1::Object::Representation
241
-
242
- property :kind, as: 'kind'
243
- property :next_page_token, as: 'nextPageToken'
244
- collection :prefixes, as: 'prefixes'
245
- end
246
- end
247
- end
248
- end
249
- end
@@ -1,1032 +0,0 @@
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 StorageV1beta1
23
- # Cloud Storage JSON API
24
- #
25
- # Lets you store and retrieve potentially-large, immutable data objects.
26
- #
27
- # @example
28
- # require 'google/apis/storage_v1beta1'
29
- #
30
- # Storage = Google::Apis::StorageV1beta1 # 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
- # An opaque string that represents a user for quota purposes. Must not exceed 40
42
- # characters.
43
- attr_accessor :quota_user
44
-
45
- # @return [String]
46
- # Deprecated. Please use quotaUser instead.
47
- attr_accessor :user_ip
48
-
49
- def initialize
50
- super('https://www.googleapis.com/', 'storage/v1beta1/')
51
- @batch_path = 'batch/storage/v1beta1'
52
- end
53
-
54
- # Deletes the ACL entry for the specified entity on the specified bucket.
55
- # @param [String] bucket
56
- # Name of a bucket.
57
- # @param [String] entity
58
- # The entity holding the permission. Can be user-userId, user-emailAddress,
59
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
60
- # @param [String] fields
61
- # Selector specifying which fields to include in a partial response.
62
- # @param [String] quota_user
63
- # An opaque string that represents a user for quota purposes. Must not exceed 40
64
- # characters.
65
- # @param [String] user_ip
66
- # Deprecated. Please use quotaUser instead.
67
- # @param [Google::Apis::RequestOptions] options
68
- # Request-specific options
69
- #
70
- # @yield [result, err] Result & error if block supplied
71
- # @yieldparam result [NilClass] No result returned for this method
72
- # @yieldparam err [StandardError] error object if request failed
73
- #
74
- # @return [void]
75
- #
76
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
- # @raise [Google::Apis::AuthorizationError] Authorization is required
79
- def delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
80
- command = make_simple_command(:delete, 'b/{bucket}/acl/{entity}', options)
81
- command.params['bucket'] = bucket unless bucket.nil?
82
- command.params['entity'] = entity unless entity.nil?
83
- command.query['fields'] = fields unless fields.nil?
84
- command.query['quotaUser'] = quota_user unless quota_user.nil?
85
- command.query['userIp'] = user_ip unless user_ip.nil?
86
- execute_or_queue_command(command, &block)
87
- end
88
-
89
- # Returns the ACL entry for the specified entity on the specified bucket.
90
- # @param [String] bucket
91
- # Name of a bucket.
92
- # @param [String] entity
93
- # The entity holding the permission. Can be user-userId, user-emailAddress,
94
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
95
- # @param [String] fields
96
- # Selector specifying which fields to include in a partial response.
97
- # @param [String] quota_user
98
- # An opaque string that represents a user for quota purposes. Must not exceed 40
99
- # characters.
100
- # @param [String] user_ip
101
- # Deprecated. Please use quotaUser instead.
102
- # @param [Google::Apis::RequestOptions] options
103
- # Request-specific options
104
- #
105
- # @yield [result, err] Result & error if block supplied
106
- # @yieldparam result [Google::Apis::StorageV1beta1::BucketAccessControl] parsed result object
107
- # @yieldparam err [StandardError] error object if request failed
108
- #
109
- # @return [Google::Apis::StorageV1beta1::BucketAccessControl]
110
- #
111
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
112
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
113
- # @raise [Google::Apis::AuthorizationError] Authorization is required
114
- def get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
115
- command = make_simple_command(:get, 'b/{bucket}/acl/{entity}', options)
116
- command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
117
- command.response_class = Google::Apis::StorageV1beta1::BucketAccessControl
118
- command.params['bucket'] = bucket unless bucket.nil?
119
- command.params['entity'] = entity unless entity.nil?
120
- command.query['fields'] = fields unless fields.nil?
121
- command.query['quotaUser'] = quota_user unless quota_user.nil?
122
- command.query['userIp'] = user_ip unless user_ip.nil?
123
- execute_or_queue_command(command, &block)
124
- end
125
-
126
- # Creates a new ACL entry on the specified bucket.
127
- # @param [String] bucket
128
- # Name of a bucket.
129
- # @param [Google::Apis::StorageV1beta1::BucketAccessControl] bucket_access_control_object
130
- # @param [String] fields
131
- # Selector specifying which fields to include in a partial response.
132
- # @param [String] quota_user
133
- # An opaque string that represents a user for quota purposes. Must not exceed 40
134
- # characters.
135
- # @param [String] user_ip
136
- # Deprecated. Please use quotaUser instead.
137
- # @param [Google::Apis::RequestOptions] options
138
- # Request-specific options
139
- #
140
- # @yield [result, err] Result & error if block supplied
141
- # @yieldparam result [Google::Apis::StorageV1beta1::BucketAccessControl] parsed result object
142
- # @yieldparam err [StandardError] error object if request failed
143
- #
144
- # @return [Google::Apis::StorageV1beta1::BucketAccessControl]
145
- #
146
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
- # @raise [Google::Apis::AuthorizationError] Authorization is required
149
- def insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
150
- command = make_simple_command(:post, 'b/{bucket}/acl', options)
151
- command.request_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
152
- command.request_object = bucket_access_control_object
153
- command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
154
- command.response_class = Google::Apis::StorageV1beta1::BucketAccessControl
155
- command.params['bucket'] = bucket unless bucket.nil?
156
- command.query['fields'] = fields unless fields.nil?
157
- command.query['quotaUser'] = quota_user unless quota_user.nil?
158
- command.query['userIp'] = user_ip unless user_ip.nil?
159
- execute_or_queue_command(command, &block)
160
- end
161
-
162
- # Retrieves ACL entries on the specified bucket.
163
- # @param [String] bucket
164
- # Name of a bucket.
165
- # @param [String] fields
166
- # Selector specifying which fields to include in a partial response.
167
- # @param [String] quota_user
168
- # An opaque string that represents a user for quota purposes. Must not exceed 40
169
- # characters.
170
- # @param [String] user_ip
171
- # Deprecated. Please use quotaUser instead.
172
- # @param [Google::Apis::RequestOptions] options
173
- # Request-specific options
174
- #
175
- # @yield [result, err] Result & error if block supplied
176
- # @yieldparam result [Google::Apis::StorageV1beta1::BucketAccessControls] parsed result object
177
- # @yieldparam err [StandardError] error object if request failed
178
- #
179
- # @return [Google::Apis::StorageV1beta1::BucketAccessControls]
180
- #
181
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
- # @raise [Google::Apis::AuthorizationError] Authorization is required
184
- def list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
185
- command = make_simple_command(:get, 'b/{bucket}/acl', options)
186
- command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControls::Representation
187
- command.response_class = Google::Apis::StorageV1beta1::BucketAccessControls
188
- command.params['bucket'] = bucket unless bucket.nil?
189
- command.query['fields'] = fields unless fields.nil?
190
- command.query['quotaUser'] = quota_user unless quota_user.nil?
191
- command.query['userIp'] = user_ip unless user_ip.nil?
192
- execute_or_queue_command(command, &block)
193
- end
194
-
195
- # Updates an ACL entry on the specified bucket. This method supports patch
196
- # semantics.
197
- # @param [String] bucket
198
- # Name of a bucket.
199
- # @param [String] entity
200
- # The entity holding the permission. Can be user-userId, user-emailAddress,
201
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
202
- # @param [Google::Apis::StorageV1beta1::BucketAccessControl] bucket_access_control_object
203
- # @param [String] fields
204
- # Selector specifying which fields to include in a partial response.
205
- # @param [String] quota_user
206
- # An opaque string that represents a user for quota purposes. Must not exceed 40
207
- # characters.
208
- # @param [String] user_ip
209
- # Deprecated. Please use quotaUser instead.
210
- # @param [Google::Apis::RequestOptions] options
211
- # Request-specific options
212
- #
213
- # @yield [result, err] Result & error if block supplied
214
- # @yieldparam result [Google::Apis::StorageV1beta1::BucketAccessControl] parsed result object
215
- # @yieldparam err [StandardError] error object if request failed
216
- #
217
- # @return [Google::Apis::StorageV1beta1::BucketAccessControl]
218
- #
219
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
220
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
221
- # @raise [Google::Apis::AuthorizationError] Authorization is required
222
- def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
223
- command = make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options)
224
- command.request_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
225
- command.request_object = bucket_access_control_object
226
- command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
227
- command.response_class = Google::Apis::StorageV1beta1::BucketAccessControl
228
- command.params['bucket'] = bucket unless bucket.nil?
229
- command.params['entity'] = entity unless entity.nil?
230
- command.query['fields'] = fields unless fields.nil?
231
- command.query['quotaUser'] = quota_user unless quota_user.nil?
232
- command.query['userIp'] = user_ip unless user_ip.nil?
233
- execute_or_queue_command(command, &block)
234
- end
235
-
236
- # Updates an ACL entry on the specified bucket.
237
- # @param [String] bucket
238
- # Name of a bucket.
239
- # @param [String] entity
240
- # The entity holding the permission. Can be user-userId, user-emailAddress,
241
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
242
- # @param [Google::Apis::StorageV1beta1::BucketAccessControl] bucket_access_control_object
243
- # @param [String] fields
244
- # Selector specifying which fields to include in a partial response.
245
- # @param [String] quota_user
246
- # An opaque string that represents a user for quota purposes. Must not exceed 40
247
- # characters.
248
- # @param [String] user_ip
249
- # Deprecated. Please use quotaUser instead.
250
- # @param [Google::Apis::RequestOptions] options
251
- # Request-specific options
252
- #
253
- # @yield [result, err] Result & error if block supplied
254
- # @yieldparam result [Google::Apis::StorageV1beta1::BucketAccessControl] parsed result object
255
- # @yieldparam err [StandardError] error object if request failed
256
- #
257
- # @return [Google::Apis::StorageV1beta1::BucketAccessControl]
258
- #
259
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
- # @raise [Google::Apis::AuthorizationError] Authorization is required
262
- def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
263
- command = make_simple_command(:put, 'b/{bucket}/acl/{entity}', options)
264
- command.request_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
265
- command.request_object = bucket_access_control_object
266
- command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
267
- command.response_class = Google::Apis::StorageV1beta1::BucketAccessControl
268
- command.params['bucket'] = bucket unless bucket.nil?
269
- command.params['entity'] = entity unless entity.nil?
270
- command.query['fields'] = fields unless fields.nil?
271
- command.query['quotaUser'] = quota_user unless quota_user.nil?
272
- command.query['userIp'] = user_ip unless user_ip.nil?
273
- execute_or_queue_command(command, &block)
274
- end
275
-
276
- # Deletes an empty bucket.
277
- # @param [String] bucket
278
- # Name of a bucket.
279
- # @param [String] fields
280
- # Selector specifying which fields to include in a partial response.
281
- # @param [String] quota_user
282
- # An opaque string that represents a user for quota purposes. Must not exceed 40
283
- # characters.
284
- # @param [String] user_ip
285
- # Deprecated. Please use quotaUser instead.
286
- # @param [Google::Apis::RequestOptions] options
287
- # Request-specific options
288
- #
289
- # @yield [result, err] Result & error if block supplied
290
- # @yieldparam result [NilClass] No result returned for this method
291
- # @yieldparam err [StandardError] error object if request failed
292
- #
293
- # @return [void]
294
- #
295
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
296
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
297
- # @raise [Google::Apis::AuthorizationError] Authorization is required
298
- def delete_bucket(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
299
- command = make_simple_command(:delete, 'b/{bucket}', options)
300
- command.params['bucket'] = bucket unless bucket.nil?
301
- command.query['fields'] = fields unless fields.nil?
302
- command.query['quotaUser'] = quota_user unless quota_user.nil?
303
- command.query['userIp'] = user_ip unless user_ip.nil?
304
- execute_or_queue_command(command, &block)
305
- end
306
-
307
- # Returns metadata for the specified bucket.
308
- # @param [String] bucket
309
- # Name of a bucket.
310
- # @param [String] projection
311
- # Set of properties to return. Defaults to no_acl.
312
- # @param [String] fields
313
- # Selector specifying which fields to include in a partial response.
314
- # @param [String] quota_user
315
- # An opaque string that represents a user for quota purposes. Must not exceed 40
316
- # characters.
317
- # @param [String] user_ip
318
- # Deprecated. Please use quotaUser instead.
319
- # @param [Google::Apis::RequestOptions] options
320
- # Request-specific options
321
- #
322
- # @yield [result, err] Result & error if block supplied
323
- # @yieldparam result [Google::Apis::StorageV1beta1::Bucket] parsed result object
324
- # @yieldparam err [StandardError] error object if request failed
325
- #
326
- # @return [Google::Apis::StorageV1beta1::Bucket]
327
- #
328
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
329
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
330
- # @raise [Google::Apis::AuthorizationError] Authorization is required
331
- def get_bucket(bucket, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
332
- command = make_simple_command(:get, 'b/{bucket}', options)
333
- command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
334
- command.response_class = Google::Apis::StorageV1beta1::Bucket
335
- command.params['bucket'] = bucket unless bucket.nil?
336
- command.query['projection'] = projection unless projection.nil?
337
- command.query['fields'] = fields unless fields.nil?
338
- command.query['quotaUser'] = quota_user unless quota_user.nil?
339
- command.query['userIp'] = user_ip unless user_ip.nil?
340
- execute_or_queue_command(command, &block)
341
- end
342
-
343
- # Creates a new bucket.
344
- # @param [Google::Apis::StorageV1beta1::Bucket] bucket_object
345
- # @param [String] projection
346
- # Set of properties to return. Defaults to no_acl, unless the bucket resource
347
- # specifies acl or defaultObjectAcl properties, when it defaults to full.
348
- # @param [String] fields
349
- # Selector specifying which fields to include in a partial response.
350
- # @param [String] quota_user
351
- # An opaque string that represents a user for quota purposes. Must not exceed 40
352
- # characters.
353
- # @param [String] user_ip
354
- # Deprecated. Please use quotaUser instead.
355
- # @param [Google::Apis::RequestOptions] options
356
- # Request-specific options
357
- #
358
- # @yield [result, err] Result & error if block supplied
359
- # @yieldparam result [Google::Apis::StorageV1beta1::Bucket] parsed result object
360
- # @yieldparam err [StandardError] error object if request failed
361
- #
362
- # @return [Google::Apis::StorageV1beta1::Bucket]
363
- #
364
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
365
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
366
- # @raise [Google::Apis::AuthorizationError] Authorization is required
367
- def insert_bucket(bucket_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
368
- command = make_simple_command(:post, 'b', options)
369
- command.request_representation = Google::Apis::StorageV1beta1::Bucket::Representation
370
- command.request_object = bucket_object
371
- command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
372
- command.response_class = Google::Apis::StorageV1beta1::Bucket
373
- command.query['projection'] = projection unless projection.nil?
374
- command.query['fields'] = fields unless fields.nil?
375
- command.query['quotaUser'] = quota_user unless quota_user.nil?
376
- command.query['userIp'] = user_ip unless user_ip.nil?
377
- execute_or_queue_command(command, &block)
378
- end
379
-
380
- # Retrieves a list of buckets for a given project.
381
- # @param [Fixnum] project_id
382
- # A valid API project identifier.
383
- # @param [Fixnum] max_results
384
- # Maximum number of buckets to return.
385
- # @param [String] page_token
386
- # A previously-returned page token representing part of the larger set of
387
- # results to view.
388
- # @param [String] projection
389
- # Set of properties to return. Defaults to no_acl.
390
- # @param [String] fields
391
- # Selector specifying which fields to include in a partial response.
392
- # @param [String] quota_user
393
- # An opaque string that represents a user for quota purposes. Must not exceed 40
394
- # characters.
395
- # @param [String] user_ip
396
- # Deprecated. Please use quotaUser instead.
397
- # @param [Google::Apis::RequestOptions] options
398
- # Request-specific options
399
- #
400
- # @yield [result, err] Result & error if block supplied
401
- # @yieldparam result [Google::Apis::StorageV1beta1::Buckets] parsed result object
402
- # @yieldparam err [StandardError] error object if request failed
403
- #
404
- # @return [Google::Apis::StorageV1beta1::Buckets]
405
- #
406
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
- # @raise [Google::Apis::AuthorizationError] Authorization is required
409
- def list_buckets(project_id, max_results: nil, page_token: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
410
- command = make_simple_command(:get, 'b', options)
411
- command.response_representation = Google::Apis::StorageV1beta1::Buckets::Representation
412
- command.response_class = Google::Apis::StorageV1beta1::Buckets
413
- command.query['max-results'] = max_results unless max_results.nil?
414
- command.query['pageToken'] = page_token unless page_token.nil?
415
- command.query['projectId'] = project_id unless project_id.nil?
416
- command.query['projection'] = projection unless projection.nil?
417
- command.query['fields'] = fields unless fields.nil?
418
- command.query['quotaUser'] = quota_user unless quota_user.nil?
419
- command.query['userIp'] = user_ip unless user_ip.nil?
420
- execute_or_queue_command(command, &block)
421
- end
422
-
423
- # Updates a bucket. This method supports patch semantics.
424
- # @param [String] bucket
425
- # Name of a bucket.
426
- # @param [Google::Apis::StorageV1beta1::Bucket] bucket_object
427
- # @param [String] projection
428
- # Set of properties to return. Defaults to full.
429
- # @param [String] fields
430
- # Selector specifying which fields to include in a partial response.
431
- # @param [String] quota_user
432
- # An opaque string that represents a user for quota purposes. Must not exceed 40
433
- # characters.
434
- # @param [String] user_ip
435
- # Deprecated. Please use quotaUser instead.
436
- # @param [Google::Apis::RequestOptions] options
437
- # Request-specific options
438
- #
439
- # @yield [result, err] Result & error if block supplied
440
- # @yieldparam result [Google::Apis::StorageV1beta1::Bucket] parsed result object
441
- # @yieldparam err [StandardError] error object if request failed
442
- #
443
- # @return [Google::Apis::StorageV1beta1::Bucket]
444
- #
445
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
- # @raise [Google::Apis::AuthorizationError] Authorization is required
448
- def patch_bucket(bucket, bucket_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
449
- command = make_simple_command(:patch, 'b/{bucket}', options)
450
- command.request_representation = Google::Apis::StorageV1beta1::Bucket::Representation
451
- command.request_object = bucket_object
452
- command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
453
- command.response_class = Google::Apis::StorageV1beta1::Bucket
454
- command.params['bucket'] = bucket unless bucket.nil?
455
- command.query['projection'] = projection unless projection.nil?
456
- command.query['fields'] = fields unless fields.nil?
457
- command.query['quotaUser'] = quota_user unless quota_user.nil?
458
- command.query['userIp'] = user_ip unless user_ip.nil?
459
- execute_or_queue_command(command, &block)
460
- end
461
-
462
- # Updates a bucket.
463
- # @param [String] bucket
464
- # Name of a bucket.
465
- # @param [Google::Apis::StorageV1beta1::Bucket] bucket_object
466
- # @param [String] projection
467
- # Set of properties to return. Defaults to full.
468
- # @param [String] fields
469
- # Selector specifying which fields to include in a partial response.
470
- # @param [String] quota_user
471
- # An opaque string that represents a user for quota purposes. Must not exceed 40
472
- # characters.
473
- # @param [String] user_ip
474
- # Deprecated. Please use quotaUser instead.
475
- # @param [Google::Apis::RequestOptions] options
476
- # Request-specific options
477
- #
478
- # @yield [result, err] Result & error if block supplied
479
- # @yieldparam result [Google::Apis::StorageV1beta1::Bucket] parsed result object
480
- # @yieldparam err [StandardError] error object if request failed
481
- #
482
- # @return [Google::Apis::StorageV1beta1::Bucket]
483
- #
484
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
485
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
486
- # @raise [Google::Apis::AuthorizationError] Authorization is required
487
- def update_bucket(bucket, bucket_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
488
- command = make_simple_command(:put, 'b/{bucket}', options)
489
- command.request_representation = Google::Apis::StorageV1beta1::Bucket::Representation
490
- command.request_object = bucket_object
491
- command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
492
- command.response_class = Google::Apis::StorageV1beta1::Bucket
493
- command.params['bucket'] = bucket unless bucket.nil?
494
- command.query['projection'] = projection unless projection.nil?
495
- command.query['fields'] = fields unless fields.nil?
496
- command.query['quotaUser'] = quota_user unless quota_user.nil?
497
- command.query['userIp'] = user_ip unless user_ip.nil?
498
- execute_or_queue_command(command, &block)
499
- end
500
-
501
- # Deletes the ACL entry for the specified entity on the specified object.
502
- # @param [String] bucket
503
- # Name of a bucket.
504
- # @param [String] object
505
- # Name of the object.
506
- # @param [String] entity
507
- # The entity holding the permission. Can be user-userId, user-emailAddress,
508
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
509
- # @param [String] fields
510
- # Selector specifying which fields to include in a partial response.
511
- # @param [String] quota_user
512
- # An opaque string that represents a user for quota purposes. Must not exceed 40
513
- # characters.
514
- # @param [String] user_ip
515
- # Deprecated. Please use quotaUser instead.
516
- # @param [Google::Apis::RequestOptions] options
517
- # Request-specific options
518
- #
519
- # @yield [result, err] Result & error if block supplied
520
- # @yieldparam result [NilClass] No result returned for this method
521
- # @yieldparam err [StandardError] error object if request failed
522
- #
523
- # @return [void]
524
- #
525
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
526
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
527
- # @raise [Google::Apis::AuthorizationError] Authorization is required
528
- def delete_object_access_control(bucket, object, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
529
- command = make_simple_command(:delete, 'b/{bucket}/o/{object}/acl/{entity}', options)
530
- command.params['bucket'] = bucket unless bucket.nil?
531
- command.params['object'] = object unless object.nil?
532
- command.params['entity'] = entity unless entity.nil?
533
- command.query['fields'] = fields unless fields.nil?
534
- command.query['quotaUser'] = quota_user unless quota_user.nil?
535
- command.query['userIp'] = user_ip unless user_ip.nil?
536
- execute_or_queue_command(command, &block)
537
- end
538
-
539
- # Returns the ACL entry for the specified entity on the specified object.
540
- # @param [String] bucket
541
- # Name of a bucket.
542
- # @param [String] object
543
- # Name of the object.
544
- # @param [String] entity
545
- # The entity holding the permission. Can be user-userId, user-emailAddress,
546
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
547
- # @param [String] fields
548
- # Selector specifying which fields to include in a partial response.
549
- # @param [String] quota_user
550
- # An opaque string that represents a user for quota purposes. Must not exceed 40
551
- # characters.
552
- # @param [String] user_ip
553
- # Deprecated. Please use quotaUser instead.
554
- # @param [Google::Apis::RequestOptions] options
555
- # Request-specific options
556
- #
557
- # @yield [result, err] Result & error if block supplied
558
- # @yieldparam result [Google::Apis::StorageV1beta1::ObjectAccessControl] parsed result object
559
- # @yieldparam err [StandardError] error object if request failed
560
- #
561
- # @return [Google::Apis::StorageV1beta1::ObjectAccessControl]
562
- #
563
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
564
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
565
- # @raise [Google::Apis::AuthorizationError] Authorization is required
566
- def get_object_access_control(bucket, object, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
567
- command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options)
568
- command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
569
- command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
570
- command.params['bucket'] = bucket unless bucket.nil?
571
- command.params['object'] = object unless object.nil?
572
- command.params['entity'] = entity unless entity.nil?
573
- command.query['fields'] = fields unless fields.nil?
574
- command.query['quotaUser'] = quota_user unless quota_user.nil?
575
- command.query['userIp'] = user_ip unless user_ip.nil?
576
- execute_or_queue_command(command, &block)
577
- end
578
-
579
- # Creates a new ACL entry on the specified object.
580
- # @param [String] bucket
581
- # Name of a bucket.
582
- # @param [String] object
583
- # Name of the object.
584
- # @param [Google::Apis::StorageV1beta1::ObjectAccessControl] object_access_control_object
585
- # @param [String] fields
586
- # Selector specifying which fields to include in a partial response.
587
- # @param [String] quota_user
588
- # An opaque string that represents a user for quota purposes. Must not exceed 40
589
- # characters.
590
- # @param [String] user_ip
591
- # Deprecated. Please use quotaUser instead.
592
- # @param [Google::Apis::RequestOptions] options
593
- # Request-specific options
594
- #
595
- # @yield [result, err] Result & error if block supplied
596
- # @yieldparam result [Google::Apis::StorageV1beta1::ObjectAccessControl] parsed result object
597
- # @yieldparam err [StandardError] error object if request failed
598
- #
599
- # @return [Google::Apis::StorageV1beta1::ObjectAccessControl]
600
- #
601
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
602
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
603
- # @raise [Google::Apis::AuthorizationError] Authorization is required
604
- def insert_object_access_control(bucket, object, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
605
- command = make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options)
606
- command.request_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
607
- command.request_object = object_access_control_object
608
- command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
609
- command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
610
- command.params['bucket'] = bucket unless bucket.nil?
611
- command.params['object'] = object unless object.nil?
612
- command.query['fields'] = fields unless fields.nil?
613
- command.query['quotaUser'] = quota_user unless quota_user.nil?
614
- command.query['userIp'] = user_ip unless user_ip.nil?
615
- execute_or_queue_command(command, &block)
616
- end
617
-
618
- # Retrieves ACL entries on the specified object.
619
- # @param [String] bucket
620
- # Name of a bucket.
621
- # @param [String] object
622
- # Name of the object.
623
- # @param [String] fields
624
- # Selector specifying which fields to include in a partial response.
625
- # @param [String] quota_user
626
- # An opaque string that represents a user for quota purposes. Must not exceed 40
627
- # characters.
628
- # @param [String] user_ip
629
- # Deprecated. Please use quotaUser instead.
630
- # @param [Google::Apis::RequestOptions] options
631
- # Request-specific options
632
- #
633
- # @yield [result, err] Result & error if block supplied
634
- # @yieldparam result [Google::Apis::StorageV1beta1::ObjectAccessControls] parsed result object
635
- # @yieldparam err [StandardError] error object if request failed
636
- #
637
- # @return [Google::Apis::StorageV1beta1::ObjectAccessControls]
638
- #
639
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
640
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
641
- # @raise [Google::Apis::AuthorizationError] Authorization is required
642
- def list_object_access_controls(bucket, object, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
643
- command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options)
644
- command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControls::Representation
645
- command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControls
646
- command.params['bucket'] = bucket unless bucket.nil?
647
- command.params['object'] = object unless object.nil?
648
- command.query['fields'] = fields unless fields.nil?
649
- command.query['quotaUser'] = quota_user unless quota_user.nil?
650
- command.query['userIp'] = user_ip unless user_ip.nil?
651
- execute_or_queue_command(command, &block)
652
- end
653
-
654
- # Updates an ACL entry on the specified object. This method supports patch
655
- # semantics.
656
- # @param [String] bucket
657
- # Name of a bucket.
658
- # @param [String] object
659
- # Name of the object.
660
- # @param [String] entity
661
- # The entity holding the permission. Can be user-userId, user-emailAddress,
662
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
663
- # @param [Google::Apis::StorageV1beta1::ObjectAccessControl] object_access_control_object
664
- # @param [String] fields
665
- # Selector specifying which fields to include in a partial response.
666
- # @param [String] quota_user
667
- # An opaque string that represents a user for quota purposes. Must not exceed 40
668
- # characters.
669
- # @param [String] user_ip
670
- # Deprecated. Please use quotaUser instead.
671
- # @param [Google::Apis::RequestOptions] options
672
- # Request-specific options
673
- #
674
- # @yield [result, err] Result & error if block supplied
675
- # @yieldparam result [Google::Apis::StorageV1beta1::ObjectAccessControl] parsed result object
676
- # @yieldparam err [StandardError] error object if request failed
677
- #
678
- # @return [Google::Apis::StorageV1beta1::ObjectAccessControl]
679
- #
680
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
681
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
682
- # @raise [Google::Apis::AuthorizationError] Authorization is required
683
- def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
684
- command = make_simple_command(:patch, 'b/{bucket}/o/{object}/acl/{entity}', options)
685
- command.request_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
686
- command.request_object = object_access_control_object
687
- command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
688
- command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
689
- command.params['bucket'] = bucket unless bucket.nil?
690
- command.params['object'] = object unless object.nil?
691
- command.params['entity'] = entity unless entity.nil?
692
- command.query['fields'] = fields unless fields.nil?
693
- command.query['quotaUser'] = quota_user unless quota_user.nil?
694
- command.query['userIp'] = user_ip unless user_ip.nil?
695
- execute_or_queue_command(command, &block)
696
- end
697
-
698
- # Updates an ACL entry on the specified object.
699
- # @param [String] bucket
700
- # Name of a bucket.
701
- # @param [String] object
702
- # Name of the object.
703
- # @param [String] entity
704
- # The entity holding the permission. Can be user-userId, user-emailAddress,
705
- # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
706
- # @param [Google::Apis::StorageV1beta1::ObjectAccessControl] object_access_control_object
707
- # @param [String] fields
708
- # Selector specifying which fields to include in a partial response.
709
- # @param [String] quota_user
710
- # An opaque string that represents a user for quota purposes. Must not exceed 40
711
- # characters.
712
- # @param [String] user_ip
713
- # Deprecated. Please use quotaUser instead.
714
- # @param [Google::Apis::RequestOptions] options
715
- # Request-specific options
716
- #
717
- # @yield [result, err] Result & error if block supplied
718
- # @yieldparam result [Google::Apis::StorageV1beta1::ObjectAccessControl] parsed result object
719
- # @yieldparam err [StandardError] error object if request failed
720
- #
721
- # @return [Google::Apis::StorageV1beta1::ObjectAccessControl]
722
- #
723
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
724
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
725
- # @raise [Google::Apis::AuthorizationError] Authorization is required
726
- def update_object_access_control(bucket, object, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
727
- command = make_simple_command(:put, 'b/{bucket}/o/{object}/acl/{entity}', options)
728
- command.request_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
729
- command.request_object = object_access_control_object
730
- command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
731
- command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
732
- command.params['bucket'] = bucket unless bucket.nil?
733
- command.params['object'] = object unless object.nil?
734
- command.params['entity'] = entity unless entity.nil?
735
- command.query['fields'] = fields unless fields.nil?
736
- command.query['quotaUser'] = quota_user unless quota_user.nil?
737
- command.query['userIp'] = user_ip unless user_ip.nil?
738
- execute_or_queue_command(command, &block)
739
- end
740
-
741
- # Deletes data blobs and associated metadata.
742
- # @param [String] bucket
743
- # Name of the bucket in which the object resides.
744
- # @param [String] object
745
- # Name of the object.
746
- # @param [String] fields
747
- # Selector specifying which fields to include in a partial response.
748
- # @param [String] quota_user
749
- # An opaque string that represents a user for quota purposes. Must not exceed 40
750
- # characters.
751
- # @param [String] user_ip
752
- # Deprecated. Please use quotaUser instead.
753
- # @param [Google::Apis::RequestOptions] options
754
- # Request-specific options
755
- #
756
- # @yield [result, err] Result & error if block supplied
757
- # @yieldparam result [NilClass] No result returned for this method
758
- # @yieldparam err [StandardError] error object if request failed
759
- #
760
- # @return [void]
761
- #
762
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
763
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
764
- # @raise [Google::Apis::AuthorizationError] Authorization is required
765
- def delete_object(bucket, object, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
766
- command = make_simple_command(:delete, 'b/{bucket}/o/{object}', options)
767
- command.params['bucket'] = bucket unless bucket.nil?
768
- command.params['object'] = object unless object.nil?
769
- command.query['fields'] = fields unless fields.nil?
770
- command.query['quotaUser'] = quota_user unless quota_user.nil?
771
- command.query['userIp'] = user_ip unless user_ip.nil?
772
- execute_or_queue_command(command, &block)
773
- end
774
-
775
- # Retrieves objects or their associated metadata.
776
- # @param [String] bucket
777
- # Name of the bucket in which the object resides.
778
- # @param [String] object
779
- # Name of the object.
780
- # @param [String] projection
781
- # Set of properties to return. Defaults to no_acl.
782
- # @param [String] fields
783
- # Selector specifying which fields to include in a partial response.
784
- # @param [String] quota_user
785
- # An opaque string that represents a user for quota purposes. Must not exceed 40
786
- # characters.
787
- # @param [String] user_ip
788
- # Deprecated. Please use quotaUser instead.
789
- # @param [IO, String] download_dest
790
- # IO stream or filename to receive content download
791
- # @param [Google::Apis::RequestOptions] options
792
- # Request-specific options
793
- #
794
- # @yield [result, err] Result & error if block supplied
795
- # @yieldparam result [Google::Apis::StorageV1beta1::Object] parsed result object
796
- # @yieldparam err [StandardError] error object if request failed
797
- #
798
- # @return [Google::Apis::StorageV1beta1::Object]
799
- #
800
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
801
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
802
- # @raise [Google::Apis::AuthorizationError] Authorization is required
803
- def get_object(bucket, object, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
804
- if download_dest.nil?
805
- command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
806
- else
807
- command = make_download_command(:get, 'b/{bucket}/o/{object}', options)
808
- command.download_dest = download_dest
809
- end
810
- command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
811
- command.response_class = Google::Apis::StorageV1beta1::Object
812
- command.params['bucket'] = bucket unless bucket.nil?
813
- command.params['object'] = object unless object.nil?
814
- command.query['projection'] = projection unless projection.nil?
815
- command.query['fields'] = fields unless fields.nil?
816
- command.query['quotaUser'] = quota_user unless quota_user.nil?
817
- command.query['userIp'] = user_ip unless user_ip.nil?
818
- execute_or_queue_command(command, &block)
819
- end
820
-
821
- # Stores new data blobs and associated metadata.
822
- # @param [String] bucket
823
- # Name of the bucket in which to store the new object. Overrides the provided
824
- # object metadata's bucket value, if any.
825
- # @param [Google::Apis::StorageV1beta1::Object] object_object
826
- # @param [String] name
827
- # Name of the object. Required when the object metadata is not otherwise
828
- # provided. Overrides the object metadata's name value, if any.
829
- # @param [String] projection
830
- # Set of properties to return. Defaults to no_acl, unless the object resource
831
- # specifies the acl property, when it defaults to full.
832
- # @param [String] fields
833
- # Selector specifying which fields to include in a partial response.
834
- # @param [String] quota_user
835
- # An opaque string that represents a user for quota purposes. Must not exceed 40
836
- # characters.
837
- # @param [String] user_ip
838
- # Deprecated. Please use quotaUser instead.
839
- # @param [IO, String] upload_source
840
- # IO stream or filename containing content to upload
841
- # @param [String] content_type
842
- # Content type of the uploaded content.
843
- # @param [Google::Apis::RequestOptions] options
844
- # Request-specific options
845
- #
846
- # @yield [result, err] Result & error if block supplied
847
- # @yieldparam result [Google::Apis::StorageV1beta1::Object] parsed result object
848
- # @yieldparam err [StandardError] error object if request failed
849
- #
850
- # @return [Google::Apis::StorageV1beta1::Object]
851
- #
852
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
853
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
854
- # @raise [Google::Apis::AuthorizationError] Authorization is required
855
- def insert_object(bucket, object_object = nil, name: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
856
- if upload_source.nil?
857
- command = make_simple_command(:post, 'b/{bucket}/o', options)
858
- else
859
- command = make_upload_command(:post, 'b/{bucket}/o', options)
860
- command.upload_source = upload_source
861
- command.upload_content_type = content_type
862
- end
863
- command.request_representation = Google::Apis::StorageV1beta1::Object::Representation
864
- command.request_object = object_object
865
- command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
866
- command.response_class = Google::Apis::StorageV1beta1::Object
867
- command.params['bucket'] = bucket unless bucket.nil?
868
- command.query['name'] = name unless name.nil?
869
- command.query['projection'] = projection unless projection.nil?
870
- command.query['fields'] = fields unless fields.nil?
871
- command.query['quotaUser'] = quota_user unless quota_user.nil?
872
- command.query['userIp'] = user_ip unless user_ip.nil?
873
- execute_or_queue_command(command, &block)
874
- end
875
-
876
- # Retrieves a list of objects matching the criteria.
877
- # @param [String] bucket
878
- # Name of the bucket in which to look for objects.
879
- # @param [String] delimiter
880
- # Returns results in a directory-like mode. items will contain only objects
881
- # whose names, aside from the prefix, do not contain delimiter. Objects whose
882
- # names, aside from the prefix, contain delimiter will have their name,
883
- # truncated after the delimiter, returned in prefixes. Duplicate prefixes are
884
- # omitted.
885
- # @param [Fixnum] max_results
886
- # Maximum number of items plus prefixes to return. As duplicate prefixes are
887
- # omitted, fewer total results may be returned than requested.
888
- # @param [String] page_token
889
- # A previously-returned page token representing part of the larger set of
890
- # results to view.
891
- # @param [String] prefix
892
- # Filter results to objects whose names begin with this prefix.
893
- # @param [String] projection
894
- # Set of properties to return. Defaults to no_acl.
895
- # @param [String] fields
896
- # Selector specifying which fields to include in a partial response.
897
- # @param [String] quota_user
898
- # An opaque string that represents a user for quota purposes. Must not exceed 40
899
- # characters.
900
- # @param [String] user_ip
901
- # Deprecated. Please use quotaUser instead.
902
- # @param [Google::Apis::RequestOptions] options
903
- # Request-specific options
904
- #
905
- # @yield [result, err] Result & error if block supplied
906
- # @yieldparam result [Google::Apis::StorageV1beta1::Objects] parsed result object
907
- # @yieldparam err [StandardError] error object if request failed
908
- #
909
- # @return [Google::Apis::StorageV1beta1::Objects]
910
- #
911
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
912
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
913
- # @raise [Google::Apis::AuthorizationError] Authorization is required
914
- def list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
915
- command = make_simple_command(:get, 'b/{bucket}/o', options)
916
- command.response_representation = Google::Apis::StorageV1beta1::Objects::Representation
917
- command.response_class = Google::Apis::StorageV1beta1::Objects
918
- command.params['bucket'] = bucket unless bucket.nil?
919
- command.query['delimiter'] = delimiter unless delimiter.nil?
920
- command.query['max-results'] = max_results unless max_results.nil?
921
- command.query['pageToken'] = page_token unless page_token.nil?
922
- command.query['prefix'] = prefix unless prefix.nil?
923
- command.query['projection'] = projection unless projection.nil?
924
- command.query['fields'] = fields unless fields.nil?
925
- command.query['quotaUser'] = quota_user unless quota_user.nil?
926
- command.query['userIp'] = user_ip unless user_ip.nil?
927
- execute_or_queue_command(command, &block)
928
- end
929
-
930
- # Updates a data blob's associated metadata. This method supports patch
931
- # semantics.
932
- # @param [String] bucket
933
- # Name of the bucket in which the object resides.
934
- # @param [String] object
935
- # Name of the object.
936
- # @param [Google::Apis::StorageV1beta1::Object] object_object
937
- # @param [String] projection
938
- # Set of properties to return. Defaults to full.
939
- # @param [String] fields
940
- # Selector specifying which fields to include in a partial response.
941
- # @param [String] quota_user
942
- # An opaque string that represents a user for quota purposes. Must not exceed 40
943
- # characters.
944
- # @param [String] user_ip
945
- # Deprecated. Please use quotaUser instead.
946
- # @param [Google::Apis::RequestOptions] options
947
- # Request-specific options
948
- #
949
- # @yield [result, err] Result & error if block supplied
950
- # @yieldparam result [Google::Apis::StorageV1beta1::Object] parsed result object
951
- # @yieldparam err [StandardError] error object if request failed
952
- #
953
- # @return [Google::Apis::StorageV1beta1::Object]
954
- #
955
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
956
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
957
- # @raise [Google::Apis::AuthorizationError] Authorization is required
958
- def patch_object(bucket, object, object_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
959
- command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
960
- command.request_representation = Google::Apis::StorageV1beta1::Object::Representation
961
- command.request_object = object_object
962
- command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
963
- command.response_class = Google::Apis::StorageV1beta1::Object
964
- command.params['bucket'] = bucket unless bucket.nil?
965
- command.params['object'] = object unless object.nil?
966
- command.query['projection'] = projection unless projection.nil?
967
- command.query['fields'] = fields unless fields.nil?
968
- command.query['quotaUser'] = quota_user unless quota_user.nil?
969
- command.query['userIp'] = user_ip unless user_ip.nil?
970
- execute_or_queue_command(command, &block)
971
- end
972
-
973
- # Updates a data blob's associated metadata.
974
- # @param [String] bucket
975
- # Name of the bucket in which the object resides.
976
- # @param [String] object
977
- # Name of the object.
978
- # @param [Google::Apis::StorageV1beta1::Object] object_object
979
- # @param [String] projection
980
- # Set of properties to return. Defaults to full.
981
- # @param [String] fields
982
- # Selector specifying which fields to include in a partial response.
983
- # @param [String] quota_user
984
- # An opaque string that represents a user for quota purposes. Must not exceed 40
985
- # characters.
986
- # @param [String] user_ip
987
- # Deprecated. Please use quotaUser instead.
988
- # @param [IO, String] download_dest
989
- # IO stream or filename to receive content download
990
- # @param [Google::Apis::RequestOptions] options
991
- # Request-specific options
992
- #
993
- # @yield [result, err] Result & error if block supplied
994
- # @yieldparam result [Google::Apis::StorageV1beta1::Object] parsed result object
995
- # @yieldparam err [StandardError] error object if request failed
996
- #
997
- # @return [Google::Apis::StorageV1beta1::Object]
998
- #
999
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1000
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1001
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1002
- def update_object(bucket, object, object_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1003
- if download_dest.nil?
1004
- command = make_simple_command(:put, 'b/{bucket}/o/{object}', options)
1005
- else
1006
- command = make_download_command(:put, 'b/{bucket}/o/{object}', options)
1007
- command.download_dest = download_dest
1008
- end
1009
- command.request_representation = Google::Apis::StorageV1beta1::Object::Representation
1010
- command.request_object = object_object
1011
- command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
1012
- command.response_class = Google::Apis::StorageV1beta1::Object
1013
- command.params['bucket'] = bucket unless bucket.nil?
1014
- command.params['object'] = object unless object.nil?
1015
- command.query['projection'] = projection unless projection.nil?
1016
- command.query['fields'] = fields unless fields.nil?
1017
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1018
- command.query['userIp'] = user_ip unless user_ip.nil?
1019
- execute_or_queue_command(command, &block)
1020
- end
1021
-
1022
- protected
1023
-
1024
- def apply_command_defaults(command)
1025
- command.query['key'] = key unless key.nil?
1026
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1027
- command.query['userIp'] = user_ip unless user_ip.nil?
1028
- end
1029
- end
1030
- end
1031
- end
1032
- end