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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +14 -2
  4. data/Gemfile +4 -0
  5. data/MIGRATING.md +1 -1
  6. data/README.md +17 -3
  7. data/api_names.yaml +127 -14
  8. data/api_names_out.yaml +5442 -710
  9. data/bin/generate-api +16 -14
  10. data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +213 -2
  12. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +71 -0
  13. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +21 -42
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +15 -29
  16. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  17. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  18. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  19. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  20. data/generated/google/apis/admin_directory_v1.rb +25 -1
  21. data/generated/google/apis/admin_directory_v1/classes.rb +718 -0
  22. data/generated/google/apis/admin_directory_v1/representations.rb +244 -0
  23. data/generated/google/apis/admin_directory_v1/service.rb +1522 -509
  24. data/generated/google/apis/admin_reports_v1.rb +1 -1
  25. data/generated/google/apis/admin_reports_v1/service.rb +5 -10
  26. data/generated/google/apis/adsense_v1_4.rb +1 -1
  27. data/generated/google/apis/adsense_v1_4/classes.rb +6 -0
  28. data/generated/google/apis/adsense_v1_4/representations.rb +1 -0
  29. data/generated/google/apis/adsense_v1_4/service.rb +40 -78
  30. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  31. data/generated/google/apis/adsensehost_v4_1/service.rb +26 -52
  32. data/generated/google/apis/analytics_v3.rb +1 -1
  33. data/generated/google/apis/analytics_v3/classes.rb +11 -13
  34. data/generated/google/apis/analytics_v3/service.rb +84 -158
  35. data/generated/google/apis/androidenterprise_v1.rb +2 -2
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +276 -8
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +106 -0
  38. data/generated/google/apis/androidenterprise_v1/service.rb +715 -97
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +2 -2
  41. data/generated/google/apis/androidpublisher_v2/service.rb +55 -107
  42. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  43. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  44. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  45. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  46. data/generated/google/apis/appsactivity_v1.rb +1 -1
  47. data/generated/google/apis/appsactivity_v1/service.rb +1 -2
  48. data/generated/google/apis/appstate_v1.rb +1 -1
  49. data/generated/google/apis/appstate_v1/service.rb +6 -11
  50. data/generated/google/apis/autoscaler_v1beta2/service.rb +10 -20
  51. data/generated/google/apis/bigquery_v2.rb +4 -1
  52. data/generated/google/apis/bigquery_v2/classes.rb +231 -16
  53. data/generated/google/apis/bigquery_v2/representations.rb +62 -0
  54. data/generated/google/apis/bigquery_v2/service.rb +24 -45
  55. data/generated/google/apis/blogger_v3/service.rb +33 -66
  56. data/generated/google/apis/books_v1.rb +1 -1
  57. data/generated/google/apis/books_v1/classes.rb +441 -0
  58. data/generated/google/apis/books_v1/representations.rb +177 -0
  59. data/generated/google/apis/books_v1/service.rb +210 -90
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +34 -18
  62. data/generated/google/apis/calendar_v3/service.rb +118 -103
  63. data/generated/google/apis/civicinfo_v2.rb +1 -1
  64. data/generated/google/apis/civicinfo_v2/classes.rb +12 -3
  65. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +5 -10
  67. data/generated/google/apis/classroom_v1.rb +49 -0
  68. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  69. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  70. data/generated/google/apis/classroom_v1/service.rb +970 -0
  71. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  74. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  75. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  76. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  77. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  78. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  79. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  80. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +6 -12
  81. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +5 -2
  82. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +173 -249
  83. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +36 -68
  84. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +293 -80
  85. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  86. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  87. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  88. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  89. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  90. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  91. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  92. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  93. data/generated/google/apis/compute_beta.rb +49 -0
  94. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  95. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  96. data/generated/google/apis/compute_beta/service.rb +10154 -0
  97. data/generated/google/apis/compute_v1.rb +1 -1
  98. data/generated/google/apis/compute_v1/classes.rb +1305 -520
  99. data/generated/google/apis/compute_v1/representations.rb +122 -15
  100. data/generated/google/apis/compute_v1/service.rb +2202 -1085
  101. data/generated/google/apis/container_v1.rb +1 -1
  102. data/generated/google/apis/container_v1/classes.rb +56 -31
  103. data/generated/google/apis/container_v1/representations.rb +12 -0
  104. data/generated/google/apis/container_v1/service.rb +62 -41
  105. data/generated/google/apis/content_v2.rb +2 -2
  106. data/generated/google/apis/content_v2/classes.rb +2252 -56
  107. data/generated/google/apis/content_v2/representations.rb +917 -87
  108. data/generated/google/apis/content_v2/service.rb +680 -85
  109. data/generated/google/apis/coordinate_v1.rb +1 -1
  110. data/generated/google/apis/coordinate_v1/service.rb +16 -25
  111. data/generated/google/apis/customsearch_v1/service.rb +1 -2
  112. data/generated/google/apis/datastore_v1beta2.rb +1 -1
  113. data/generated/google/apis/datastore_v1beta2/service.rb +12 -18
  114. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  115. data/generated/google/apis/deploymentmanager_v2/classes.rb +1089 -0
  116. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  117. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2.rb +5 -2
  119. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +22 -3
  120. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +3 -0
  121. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +14 -27
  122. data/generated/google/apis/dfareporting_v2_1.rb +1 -1
  123. data/generated/google/apis/dfareporting_v2_1/classes.rb +29 -14
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +196 -389
  125. data/generated/google/apis/discovery_v1/classes.rb +7 -0
  126. data/generated/google/apis/discovery_v1/representations.rb +1 -0
  127. data/generated/google/apis/discovery_v1/service.rb +2 -4
  128. data/generated/google/apis/dns_v1.rb +4 -1
  129. data/generated/google/apis/dns_v1/service.rb +9 -18
  130. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  131. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +9 -2
  132. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +1 -0
  133. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -16
  134. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  135. data/generated/google/apis/doubleclicksearch_v2/classes.rb +15 -6
  136. data/generated/google/apis/doubleclicksearch_v2/representations.rb +1 -0
  137. data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -23
  138. data/generated/google/apis/drive_v2.rb +1 -1
  139. data/generated/google/apis/drive_v2/classes.rb +73 -30
  140. data/generated/google/apis/drive_v2/representations.rb +14 -0
  141. data/generated/google/apis/drive_v2/service.rb +139 -135
  142. data/generated/google/apis/drive_v3.rb +55 -0
  143. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  144. data/generated/google/apis/drive_v3/representations.rb +497 -0
  145. data/generated/google/apis/drive_v3/service.rb +1541 -0
  146. data/generated/google/apis/fitness_v1.rb +1 -1
  147. data/generated/google/apis/fitness_v1/service.rb +14 -27
  148. data/generated/google/apis/fusiontables_v2/service.rb +40 -73
  149. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  150. data/generated/google/apis/games_configuration_v1configuration/service.rb +14 -27
  151. data/generated/google/apis/games_management_v1management.rb +37 -0
  152. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  153. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  154. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  155. data/generated/google/apis/games_v1.rb +1 -1
  156. data/generated/google/apis/games_v1/classes.rb +39 -0
  157. data/generated/google/apis/games_v1/representations.rb +14 -0
  158. data/generated/google/apis/games_v1/service.rb +93 -109
  159. data/generated/google/apis/gan_v1beta1/service.rb +10 -20
  160. data/generated/google/apis/genomics_v1.rb +5 -3
  161. data/generated/google/apis/genomics_v1/classes.rb +519 -200
  162. data/generated/google/apis/genomics_v1/representations.rb +126 -13
  163. data/generated/google/apis/genomics_v1/service.rb +392 -236
  164. data/generated/google/apis/gmail_v1.rb +4 -1
  165. data/generated/google/apis/gmail_v1/service.rb +39 -71
  166. data/generated/google/apis/groupsmigration_v1/service.rb +2 -3
  167. data/generated/google/apis/groupssettings_v1/service.rb +3 -6
  168. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  169. data/generated/google/apis/identitytoolkit_v3/classes.rb +125 -0
  170. data/generated/google/apis/identitytoolkit_v3/representations.rb +37 -0
  171. data/generated/google/apis/identitytoolkit_v3/service.rb +44 -24
  172. data/generated/google/apis/kgsearch_v1.rb +32 -0
  173. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  174. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  175. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  176. data/generated/google/apis/licensing_v1.rb +1 -1
  177. data/generated/google/apis/licensing_v1/service.rb +7 -14
  178. data/generated/google/apis/logging_v1beta3.rb +16 -4
  179. data/generated/google/apis/logging_v1beta3/classes.rb +620 -46
  180. data/generated/google/apis/logging_v1beta3/representations.rb +144 -0
  181. data/generated/google/apis/logging_v1beta3/service.rb +435 -104
  182. data/generated/google/apis/manager_v1beta2.rb +3 -0
  183. data/generated/google/apis/manager_v1beta2/service.rb +8 -16
  184. data/generated/google/apis/mapsengine_v1.rb +1 -1
  185. data/generated/google/apis/mapsengine_v1/service.rb +85 -162
  186. data/generated/google/apis/mirror_v1.rb +1 -1
  187. data/generated/google/apis/mirror_v1/service.rb +28 -52
  188. data/generated/google/apis/oauth2_v2.rb +1 -1
  189. data/generated/google/apis/oauth2_v2/service.rb +4 -8
  190. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -2
  191. data/generated/google/apis/partners_v2.rb +32 -0
  192. data/generated/google/apis/partners_v2/classes.rb +942 -0
  193. data/generated/google/apis/partners_v2/representations.rb +402 -0
  194. data/generated/google/apis/partners_v2/service.rb +400 -0
  195. data/generated/google/apis/plus_domains_v1.rb +1 -1
  196. data/generated/google/apis/plus_domains_v1/classes.rb +207 -0
  197. data/generated/google/apis/plus_domains_v1/representations.rb +114 -0
  198. data/generated/google/apis/plus_domains_v1/service.rb +21 -41
  199. data/generated/google/apis/plus_v1.rb +1 -1
  200. data/generated/google/apis/plus_v1/classes.rb +207 -0
  201. data/generated/google/apis/plus_v1/representations.rb +114 -0
  202. data/generated/google/apis/plus_v1/service.rb +11 -56
  203. data/generated/google/apis/prediction_v1_6.rb +1 -1
  204. data/generated/google/apis/prediction_v1_6/service.rb +8 -16
  205. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  206. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  207. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  208. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  209. data/generated/google/apis/pubsub_v1.rb +37 -0
  210. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  211. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  212. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  213. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  214. data/generated/google/apis/pubsub_v1beta2/classes.rb +78 -283
  215. data/generated/google/apis/pubsub_v1beta2/representations.rb +1 -85
  216. data/generated/google/apis/pubsub_v1beta2/service.rb +79 -87
  217. data/generated/google/apis/qpx_express_v1/service.rb +1 -2
  218. data/generated/google/apis/replicapool_v1beta2.rb +3 -0
  219. data/generated/google/apis/replicapool_v1beta2/service.rb +12 -24
  220. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -1
  221. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +46 -2
  222. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +16 -0
  223. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +58 -18
  224. data/generated/google/apis/reseller_v1.rb +1 -1
  225. data/generated/google/apis/reseller_v1/classes.rb +19 -1
  226. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  227. data/generated/google/apis/reseller_v1/service.rb +16 -30
  228. data/generated/google/apis/resourceviews_v1beta2.rb +3 -0
  229. data/generated/google/apis/resourceviews_v1beta2/service.rb +16 -27
  230. data/generated/google/apis/script_v1.rb +61 -0
  231. data/generated/google/apis/script_v1/classes.rb +259 -0
  232. data/generated/google/apis/script_v1/representations.rb +106 -0
  233. data/generated/google/apis/script_v1/service.rb +98 -0
  234. data/generated/google/apis/site_verification_v1.rb +1 -1
  235. data/generated/google/apis/site_verification_v1/service.rb +8 -15
  236. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  237. data/generated/google/apis/sqladmin_v1beta4/classes.rb +186 -2
  238. data/generated/google/apis/sqladmin_v1beta4/representations.rb +70 -0
  239. data/generated/google/apis/sqladmin_v1beta4/service.rb +166 -75
  240. data/generated/google/apis/storage_v1.rb +5 -2
  241. data/generated/google/apis/storage_v1/classes.rb +47 -4
  242. data/generated/google/apis/storage_v1/representations.rb +18 -0
  243. data/generated/google/apis/storage_v1/service.rb +77 -94
  244. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  245. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  246. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  247. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  248. data/generated/google/apis/tagmanager_v1.rb +1 -1
  249. data/generated/google/apis/tagmanager_v1/classes.rb +189 -31
  250. data/generated/google/apis/tagmanager_v1/representations.rb +69 -15
  251. data/generated/google/apis/tagmanager_v1/service.rb +114 -275
  252. data/generated/google/apis/taskqueue_v1beta2/service.rb +8 -16
  253. data/generated/google/apis/tasks_v1/service.rb +14 -28
  254. data/generated/google/apis/translate_v2/service.rb +3 -6
  255. data/generated/google/apis/urlshortener_v1/service.rb +3 -6
  256. data/generated/google/apis/webmasters_v3.rb +3 -3
  257. data/generated/google/apis/webmasters_v3/classes.rb +4 -4
  258. data/generated/google/apis/webmasters_v3/service.rb +16 -30
  259. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  260. data/generated/google/apis/youtube_analytics_v1/classes.rb +6 -0
  261. data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -0
  262. data/generated/google/apis/youtube_analytics_v1/service.rb +16 -21
  263. data/generated/google/apis/youtube_v3.rb +1 -1
  264. data/generated/google/apis/youtube_v3/classes.rb +111 -78
  265. data/generated/google/apis/youtube_v3/representations.rb +2 -0
  266. data/generated/google/apis/youtube_v3/service.rb +78 -246
  267. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  268. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  269. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  270. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  271. data/google-api-client.gemspec +3 -3
  272. data/lib/google/api_client/auth/installed_app.rb +2 -2
  273. data/lib/google/api_client/auth/key_utils.rb +1 -0
  274. data/lib/google/api_client/auth/storage.rb +1 -0
  275. data/lib/google/api_client/auth/storages/file_store.rb +1 -0
  276. data/lib/google/api_client/auth/storages/redis_store.rb +1 -0
  277. data/lib/google/api_client/client_secrets.rb +4 -5
  278. data/lib/google/apis/core/api_command.rb +2 -2
  279. data/lib/google/apis/core/base_service.rb +1 -0
  280. data/lib/google/apis/core/batch.rb +25 -8
  281. data/lib/google/apis/core/download.rb +1 -1
  282. data/lib/google/apis/core/http_command.rb +24 -12
  283. data/lib/google/apis/core/multipart.rb +20 -6
  284. data/lib/google/apis/core/upload.rb +11 -4
  285. data/lib/google/apis/generator/annotator.rb +29 -10
  286. data/lib/google/apis/generator/helpers.rb +1 -1
  287. data/lib/google/apis/generator/templates/_method.tmpl +5 -6
  288. data/lib/google/apis/options.rb +7 -3
  289. data/lib/google/apis/version.rb +1 -1
  290. data/samples/calendar/calendar.rb +1 -1
  291. data/samples/drive/drive.rb +9 -2
  292. data/samples/pubsub/pubsub.rb +5 -6
  293. data/samples/translate/translate.rb +1 -5
  294. data/script/generate +20 -5
  295. data/spec/fixtures/files/child/.gitignore +0 -0
  296. data/spec/fixtures/files/invalid.json +1 -0
  297. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  298. data/spec/google/apis/core/batch_spec.rb +22 -8
  299. data/spec/google/apis/core/download_spec.rb +13 -0
  300. data/spec/google/apis/core/http_command_spec.rb +26 -9
  301. data/spec/google/apis/core/upload_spec.rb +65 -17
  302. data/spec/google/apis/options_spec.rb +8 -0
  303. data/spec/integration_tests/adsense_spec.rb +28 -0
  304. data/spec/integration_tests/pubsub_spec.rb +3 -3
  305. data/spec/spec_helper.rb +5 -1
  306. data/third_party/hurley_patches.rb +103 -0
  307. metadata +87 -7
@@ -0,0 +1,370 @@
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 StoragetransferV1
24
+
25
+ class GoogleServiceAccount
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+ end
28
+
29
+ class TransferJob
30
+ class Representation < Google::Apis::Core::JsonRepresentation; end
31
+ end
32
+
33
+ class TransferSpec
34
+ class Representation < Google::Apis::Core::JsonRepresentation; end
35
+ end
36
+
37
+ class GcsData
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+ end
40
+
41
+ class AwsS3Data
42
+ class Representation < Google::Apis::Core::JsonRepresentation; end
43
+ end
44
+
45
+ class AwsAccessKey
46
+ class Representation < Google::Apis::Core::JsonRepresentation; end
47
+ end
48
+
49
+ class HttpData
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+ end
52
+
53
+ class ObjectConditions
54
+ class Representation < Google::Apis::Core::JsonRepresentation; end
55
+ end
56
+
57
+ class TransferOptions
58
+ class Representation < Google::Apis::Core::JsonRepresentation; end
59
+ end
60
+
61
+ class Schedule
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+ end
64
+
65
+ class Date
66
+ class Representation < Google::Apis::Core::JsonRepresentation; end
67
+ end
68
+
69
+ class TimeOfDay
70
+ class Representation < Google::Apis::Core::JsonRepresentation; end
71
+ end
72
+
73
+ class UpdateTransferJobRequest
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class ListTransferJobsResponse
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class PauseTransferOperationRequest
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class Empty
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+ end
88
+
89
+ class ResumeTransferOperationRequest
90
+ class Representation < Google::Apis::Core::JsonRepresentation; end
91
+ end
92
+
93
+ class Operation
94
+ class Representation < Google::Apis::Core::JsonRepresentation; end
95
+ end
96
+
97
+ class Status
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+ end
100
+
101
+ class ListOperationsResponse
102
+ class Representation < Google::Apis::Core::JsonRepresentation; end
103
+ end
104
+
105
+ class TransferOperation
106
+ class Representation < Google::Apis::Core::JsonRepresentation; end
107
+ end
108
+
109
+ class TransferCounters
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+ end
112
+
113
+ class ErrorSummary
114
+ class Representation < Google::Apis::Core::JsonRepresentation; end
115
+ end
116
+
117
+ class ErrorLogEntry
118
+ class Representation < Google::Apis::Core::JsonRepresentation; end
119
+ end
120
+
121
+ class GoogleServiceAccount
122
+ # @private
123
+ class Representation < Google::Apis::Core::JsonRepresentation
124
+ property :account_email, as: 'accountEmail'
125
+ end
126
+ end
127
+
128
+ class TransferJob
129
+ # @private
130
+ class Representation < Google::Apis::Core::JsonRepresentation
131
+ property :name, as: 'name'
132
+ property :description, as: 'description'
133
+ property :project_id, as: 'projectId'
134
+ property :transfer_spec, as: 'transferSpec', class: Google::Apis::StoragetransferV1::TransferSpec, decorator: Google::Apis::StoragetransferV1::TransferSpec::Representation
135
+
136
+ property :schedule, as: 'schedule', class: Google::Apis::StoragetransferV1::Schedule, decorator: Google::Apis::StoragetransferV1::Schedule::Representation
137
+
138
+ property :status, as: 'status'
139
+ property :creation_time, as: 'creationTime'
140
+ property :last_modification_time, as: 'lastModificationTime'
141
+ property :deletion_time, as: 'deletionTime'
142
+ end
143
+ end
144
+
145
+ class TransferSpec
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ property :gcs_data_source, as: 'gcsDataSource', class: Google::Apis::StoragetransferV1::GcsData, decorator: Google::Apis::StoragetransferV1::GcsData::Representation
149
+
150
+ property :aws_s3_data_source, as: 'awsS3DataSource', class: Google::Apis::StoragetransferV1::AwsS3Data, decorator: Google::Apis::StoragetransferV1::AwsS3Data::Representation
151
+
152
+ property :http_data_source, as: 'httpDataSource', class: Google::Apis::StoragetransferV1::HttpData, decorator: Google::Apis::StoragetransferV1::HttpData::Representation
153
+
154
+ property :gcs_data_sink, as: 'gcsDataSink', class: Google::Apis::StoragetransferV1::GcsData, decorator: Google::Apis::StoragetransferV1::GcsData::Representation
155
+
156
+ property :object_conditions, as: 'objectConditions', class: Google::Apis::StoragetransferV1::ObjectConditions, decorator: Google::Apis::StoragetransferV1::ObjectConditions::Representation
157
+
158
+ property :transfer_options, as: 'transferOptions', class: Google::Apis::StoragetransferV1::TransferOptions, decorator: Google::Apis::StoragetransferV1::TransferOptions::Representation
159
+
160
+ end
161
+ end
162
+
163
+ class GcsData
164
+ # @private
165
+ class Representation < Google::Apis::Core::JsonRepresentation
166
+ property :bucket_name, as: 'bucketName'
167
+ end
168
+ end
169
+
170
+ class AwsS3Data
171
+ # @private
172
+ class Representation < Google::Apis::Core::JsonRepresentation
173
+ property :bucket_name, as: 'bucketName'
174
+ property :aws_access_key, as: 'awsAccessKey', class: Google::Apis::StoragetransferV1::AwsAccessKey, decorator: Google::Apis::StoragetransferV1::AwsAccessKey::Representation
175
+
176
+ end
177
+ end
178
+
179
+ class AwsAccessKey
180
+ # @private
181
+ class Representation < Google::Apis::Core::JsonRepresentation
182
+ property :access_key_id, as: 'accessKeyId'
183
+ property :secret_access_key, as: 'secretAccessKey'
184
+ end
185
+ end
186
+
187
+ class HttpData
188
+ # @private
189
+ class Representation < Google::Apis::Core::JsonRepresentation
190
+ property :list_url, as: 'listUrl'
191
+ end
192
+ end
193
+
194
+ class ObjectConditions
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ property :min_time_elapsed_since_last_modification, as: 'minTimeElapsedSinceLastModification'
198
+ property :max_time_elapsed_since_last_modification, as: 'maxTimeElapsedSinceLastModification'
199
+ collection :include_prefixes, as: 'includePrefixes'
200
+ collection :exclude_prefixes, as: 'excludePrefixes'
201
+ end
202
+ end
203
+
204
+ class TransferOptions
205
+ # @private
206
+ class Representation < Google::Apis::Core::JsonRepresentation
207
+ property :overwrite_objects_already_existing_in_sink, as: 'overwriteObjectsAlreadyExistingInSink'
208
+ property :delete_objects_unique_in_sink, as: 'deleteObjectsUniqueInSink'
209
+ property :delete_objects_from_source_after_transfer, as: 'deleteObjectsFromSourceAfterTransfer'
210
+ end
211
+ end
212
+
213
+ class Schedule
214
+ # @private
215
+ class Representation < Google::Apis::Core::JsonRepresentation
216
+ property :schedule_start_date, as: 'scheduleStartDate', class: Google::Apis::StoragetransferV1::Date, decorator: Google::Apis::StoragetransferV1::Date::Representation
217
+
218
+ property :schedule_end_date, as: 'scheduleEndDate', class: Google::Apis::StoragetransferV1::Date, decorator: Google::Apis::StoragetransferV1::Date::Representation
219
+
220
+ property :start_time_of_day, as: 'startTimeOfDay', class: Google::Apis::StoragetransferV1::TimeOfDay, decorator: Google::Apis::StoragetransferV1::TimeOfDay::Representation
221
+
222
+ end
223
+ end
224
+
225
+ class Date
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ property :year, as: 'year'
229
+ property :month, as: 'month'
230
+ property :day, as: 'day'
231
+ end
232
+ end
233
+
234
+ class TimeOfDay
235
+ # @private
236
+ class Representation < Google::Apis::Core::JsonRepresentation
237
+ property :hours, as: 'hours'
238
+ property :minutes, as: 'minutes'
239
+ property :seconds, as: 'seconds'
240
+ property :nanos, as: 'nanos'
241
+ end
242
+ end
243
+
244
+ class UpdateTransferJobRequest
245
+ # @private
246
+ class Representation < Google::Apis::Core::JsonRepresentation
247
+ property :project_id, as: 'projectId'
248
+ property :transfer_job, as: 'transferJob', class: Google::Apis::StoragetransferV1::TransferJob, decorator: Google::Apis::StoragetransferV1::TransferJob::Representation
249
+
250
+ property :update_transfer_job_field_mask, as: 'updateTransferJobFieldMask'
251
+ end
252
+ end
253
+
254
+ class ListTransferJobsResponse
255
+ # @private
256
+ class Representation < Google::Apis::Core::JsonRepresentation
257
+ collection :transfer_jobs, as: 'transferJobs', class: Google::Apis::StoragetransferV1::TransferJob, decorator: Google::Apis::StoragetransferV1::TransferJob::Representation
258
+
259
+ property :next_page_token, as: 'nextPageToken'
260
+ end
261
+ end
262
+
263
+ class PauseTransferOperationRequest
264
+ # @private
265
+ class Representation < Google::Apis::Core::JsonRepresentation
266
+ end
267
+ end
268
+
269
+ class Empty
270
+ # @private
271
+ class Representation < Google::Apis::Core::JsonRepresentation
272
+ end
273
+ end
274
+
275
+ class ResumeTransferOperationRequest
276
+ # @private
277
+ class Representation < Google::Apis::Core::JsonRepresentation
278
+ end
279
+ end
280
+
281
+ class Operation
282
+ # @private
283
+ class Representation < Google::Apis::Core::JsonRepresentation
284
+ property :name, as: 'name'
285
+ hash :metadata, as: 'metadata'
286
+ property :done, as: 'done'
287
+ property :error, as: 'error', class: Google::Apis::StoragetransferV1::Status, decorator: Google::Apis::StoragetransferV1::Status::Representation
288
+
289
+ hash :response, as: 'response'
290
+ end
291
+ end
292
+
293
+ class Status
294
+ # @private
295
+ class Representation < Google::Apis::Core::JsonRepresentation
296
+ property :code, as: 'code'
297
+ property :message, as: 'message'
298
+ collection :details, as: 'details'
299
+ end
300
+ end
301
+
302
+ class ListOperationsResponse
303
+ # @private
304
+ class Representation < Google::Apis::Core::JsonRepresentation
305
+ collection :operations, as: 'operations', class: Google::Apis::StoragetransferV1::Operation, decorator: Google::Apis::StoragetransferV1::Operation::Representation
306
+
307
+ property :next_page_token, as: 'nextPageToken'
308
+ end
309
+ end
310
+
311
+ class TransferOperation
312
+ # @private
313
+ class Representation < Google::Apis::Core::JsonRepresentation
314
+ property :name, as: 'name'
315
+ property :project_id, as: 'projectId'
316
+ property :transfer_spec, as: 'transferSpec', class: Google::Apis::StoragetransferV1::TransferSpec, decorator: Google::Apis::StoragetransferV1::TransferSpec::Representation
317
+
318
+ property :start_time, as: 'startTime'
319
+ property :end_time, as: 'endTime'
320
+ property :status, as: 'status'
321
+ property :counters, as: 'counters', class: Google::Apis::StoragetransferV1::TransferCounters, decorator: Google::Apis::StoragetransferV1::TransferCounters::Representation
322
+
323
+ collection :error_breakdowns, as: 'errorBreakdowns', class: Google::Apis::StoragetransferV1::ErrorSummary, decorator: Google::Apis::StoragetransferV1::ErrorSummary::Representation
324
+
325
+ property :transfer_job_name, as: 'transferJobName'
326
+ end
327
+ end
328
+
329
+ class TransferCounters
330
+ # @private
331
+ class Representation < Google::Apis::Core::JsonRepresentation
332
+ property :objects_found_from_source, as: 'objectsFoundFromSource'
333
+ property :bytes_found_from_source, as: 'bytesFoundFromSource'
334
+ property :objects_found_only_from_sink, as: 'objectsFoundOnlyFromSink'
335
+ property :bytes_found_only_from_sink, as: 'bytesFoundOnlyFromSink'
336
+ property :objects_from_source_skipped_by_sync, as: 'objectsFromSourceSkippedBySync'
337
+ property :bytes_from_source_skipped_by_sync, as: 'bytesFromSourceSkippedBySync'
338
+ property :objects_copied_to_sink, as: 'objectsCopiedToSink'
339
+ property :bytes_copied_to_sink, as: 'bytesCopiedToSink'
340
+ property :objects_deleted_from_source, as: 'objectsDeletedFromSource'
341
+ property :bytes_deleted_from_source, as: 'bytesDeletedFromSource'
342
+ property :objects_deleted_from_sink, as: 'objectsDeletedFromSink'
343
+ property :bytes_deleted_from_sink, as: 'bytesDeletedFromSink'
344
+ property :objects_from_source_failed, as: 'objectsFromSourceFailed'
345
+ property :bytes_from_source_failed, as: 'bytesFromSourceFailed'
346
+ property :objects_failed_to_delete_from_sink, as: 'objectsFailedToDeleteFromSink'
347
+ property :bytes_failed_to_delete_from_sink, as: 'bytesFailedToDeleteFromSink'
348
+ end
349
+ end
350
+
351
+ class ErrorSummary
352
+ # @private
353
+ class Representation < Google::Apis::Core::JsonRepresentation
354
+ property :error_code, as: 'errorCode'
355
+ property :error_count, as: 'errorCount'
356
+ collection :error_log_entries, as: 'errorLogEntries', class: Google::Apis::StoragetransferV1::ErrorLogEntry, decorator: Google::Apis::StoragetransferV1::ErrorLogEntry::Representation
357
+
358
+ end
359
+ end
360
+
361
+ class ErrorLogEntry
362
+ # @private
363
+ class Representation < Google::Apis::Core::JsonRepresentation
364
+ property :url, as: 'url'
365
+ collection :error_details, as: 'errorDetails'
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
@@ -0,0 +1,473 @@
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 StoragetransferV1
23
+ # Google Storage Transfer API
24
+ #
25
+ # Transfers data from external data sources to a Google Cloud Storage bucket or
26
+ # between Google Cloud Storage buckets.
27
+ #
28
+ # @example
29
+ # require 'google/apis/storagetransfer_v1'
30
+ #
31
+ # Storagetransfer = Google::Apis::StoragetransferV1 # Alias the module
32
+ # service = Storagetransfer::StoragetransferService.new
33
+ #
34
+ # @see https://cloud.google.com/storage/transfer
35
+ class StoragetransferService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://storagetransfer.googleapis.com/', '')
48
+ end
49
+
50
+ # Returns the Google service account that is used by Storage Transfer Service to
51
+ # access buckets in the project where transfers run or in other projects. Each
52
+ # Google service account is associated with one Google Developers Console
53
+ # project. Users should add this service account to the Google Cloud Storage
54
+ # bucket ACLs to grant access to Storage Transfer Service. This service account
55
+ # is created and owned by Storage Transfer Service and can only be used by
56
+ # Storage Transfer Service.
57
+ # @param [String] project_id
58
+ # The ID of the Google Developers Console project that the Google service
59
+ # account is associated with. Required.
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::StoragetransferV1::GoogleServiceAccount] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::StoragetransferV1::GoogleServiceAccount]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def get_google_service_account(project_id, fields: nil, quota_user: nil, options: nil, &block)
78
+ command = make_simple_command(:get, 'v1/googleServiceAccounts/{projectId}', options)
79
+ command.response_representation = Google::Apis::StoragetransferV1::GoogleServiceAccount::Representation
80
+ command.response_class = Google::Apis::StoragetransferV1::GoogleServiceAccount
81
+ command.params['projectId'] = project_id unless project_id.nil?
82
+ command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
87
+ # Returns the Google service account that is used by Storage Transfer Service to
88
+ # access buckets in the project where transfers run or in other projects. Each
89
+ # Google service account is associated with one Google Developers Console
90
+ # project. Users should add this service account to the Google Cloud Storage
91
+ # bucket ACLs to grant access to Storage Transfer Service. This service account
92
+ # is created and owned by Storage Transfer Service and can only be used by
93
+ # Storage Transfer Service.
94
+ # @param [String] project_id
95
+ # The ID of the Google Developers Console project that the Google service
96
+ # account is associated with. Required.
97
+ # @param [String] fields
98
+ # Selector specifying which fields to include in a partial response.
99
+ # @param [String] quota_user
100
+ # Available to use for quota purposes for server-side applications. Can be any
101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
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::StoragetransferV1::GoogleServiceAccount] parsed result object
107
+ # @yieldparam err [StandardError] error object if request failed
108
+ #
109
+ # @return [Google::Apis::StoragetransferV1::GoogleServiceAccount]
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_google_service_account_v1(project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
115
+ command = make_simple_command(:get, 'v1:getGoogleServiceAccount', options)
116
+ command.response_representation = Google::Apis::StoragetransferV1::GoogleServiceAccount::Representation
117
+ command.response_class = Google::Apis::StoragetransferV1::GoogleServiceAccount
118
+ command.query['projectId'] = project_id unless project_id.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Creates a transfer job that runs periodically.
125
+ # @param [Google::Apis::StoragetransferV1::TransferJob] transfer_job_object
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::StoragetransferV1::TransferJob] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::StoragetransferV1::TransferJob]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def create_transfer_job(transfer_job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:post, 'v1/transferJobs', options)
145
+ command.request_representation = Google::Apis::StoragetransferV1::TransferJob::Representation
146
+ command.request_object = transfer_job_object
147
+ command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation
148
+ command.response_class = Google::Apis::StoragetransferV1::TransferJob
149
+ command.query['fields'] = fields unless fields.nil?
150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
151
+ execute_or_queue_command(command, &block)
152
+ end
153
+
154
+ # Updates a transfer job. Updating a job's transfer spec does not affect
155
+ # transfer operations that are running already. Updating the scheduling of a job
156
+ # is not allowed.
157
+ # @param [String] job_name
158
+ # The name of job to update. Required.
159
+ # @param [Google::Apis::StoragetransferV1::UpdateTransferJobRequest] update_transfer_job_request_object
160
+ # @param [String] fields
161
+ # Selector specifying which fields to include in a partial response.
162
+ # @param [String] quota_user
163
+ # Available to use for quota purposes for server-side applications. Can be any
164
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
165
+ # @param [Google::Apis::RequestOptions] options
166
+ # Request-specific options
167
+ #
168
+ # @yield [result, err] Result & error if block supplied
169
+ # @yieldparam result [Google::Apis::StoragetransferV1::TransferJob] parsed result object
170
+ # @yieldparam err [StandardError] error object if request failed
171
+ #
172
+ # @return [Google::Apis::StoragetransferV1::TransferJob]
173
+ #
174
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
175
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
176
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
177
+ def patch_transfer_job(job_name, update_transfer_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
178
+ command = make_simple_command(:patch, 'v1/{+jobName}', options)
179
+ command.request_representation = Google::Apis::StoragetransferV1::UpdateTransferJobRequest::Representation
180
+ command.request_object = update_transfer_job_request_object
181
+ command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation
182
+ command.response_class = Google::Apis::StoragetransferV1::TransferJob
183
+ command.params['jobName'] = job_name unless job_name.nil?
184
+ command.query['fields'] = fields unless fields.nil?
185
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
186
+ execute_or_queue_command(command, &block)
187
+ end
188
+
189
+ # Gets a transfer job.
190
+ # @param [String] job_name
191
+ # The job to get. Required.
192
+ # @param [String] project_id
193
+ # The ID of the Google Developers Console project that owns the job. Required.
194
+ # @param [String] fields
195
+ # Selector specifying which fields to include in a partial response.
196
+ # @param [String] quota_user
197
+ # Available to use for quota purposes for server-side applications. Can be any
198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # @param [Google::Apis::RequestOptions] options
200
+ # Request-specific options
201
+ #
202
+ # @yield [result, err] Result & error if block supplied
203
+ # @yieldparam result [Google::Apis::StoragetransferV1::TransferJob] parsed result object
204
+ # @yieldparam err [StandardError] error object if request failed
205
+ #
206
+ # @return [Google::Apis::StoragetransferV1::TransferJob]
207
+ #
208
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
211
+ def get_transfer_job(job_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
212
+ command = make_simple_command(:get, 'v1/{+jobName}', options)
213
+ command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation
214
+ command.response_class = Google::Apis::StoragetransferV1::TransferJob
215
+ command.params['jobName'] = job_name unless job_name.nil?
216
+ command.query['projectId'] = project_id unless project_id.nil?
217
+ command.query['fields'] = fields unless fields.nil?
218
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
219
+ execute_or_queue_command(command, &block)
220
+ end
221
+
222
+ # Lists transfer jobs.
223
+ # @param [String] filter
224
+ # A list of query parameters specified as JSON text in the form of `"`project_id`
225
+ # ":"my_project_id", "`job_names`":["jobid1","jobid2",...], "`job_statuses`":["
226
+ # status1","status2",...]`. Since `job_names` and `job_statuses` support
227
+ # multiple values, their values must be specified with array notation. `
228
+ # project_id` is required. `job_names` and `job_statuses` are optional. The
229
+ # valid values for `job_statuses` are case-insensitive: `ENABLED`, `DISABLED`,
230
+ # and `DELETED`.
231
+ # @param [Fixnum] page_size
232
+ # The list page size. The max allowed value is 256.
233
+ # @param [String] page_token
234
+ # The list page token.
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::StoragetransferV1::ListTransferJobsResponse] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::StoragetransferV1::ListTransferJobsResponse]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def list_transfer_jobs(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:get, 'v1/transferJobs', options)
254
+ command.response_representation = Google::Apis::StoragetransferV1::ListTransferJobsResponse::Representation
255
+ command.response_class = Google::Apis::StoragetransferV1::ListTransferJobsResponse
256
+ command.query['filter'] = filter unless filter.nil?
257
+ command.query['pageSize'] = page_size unless page_size.nil?
258
+ command.query['pageToken'] = page_token unless page_token.nil?
259
+ command.query['fields'] = fields unless fields.nil?
260
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
261
+ execute_or_queue_command(command, &block)
262
+ end
263
+
264
+ # Pauses a transfer operation.
265
+ # @param [String] name
266
+ # The name of the transfer operation. Required.
267
+ # @param [Google::Apis::StoragetransferV1::PauseTransferOperationRequest] pause_transfer_operation_request_object
268
+ # @param [String] fields
269
+ # Selector specifying which fields to include in a partial response.
270
+ # @param [String] quota_user
271
+ # Available to use for quota purposes for server-side applications. Can be any
272
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
273
+ # @param [Google::Apis::RequestOptions] options
274
+ # Request-specific options
275
+ #
276
+ # @yield [result, err] Result & error if block supplied
277
+ # @yieldparam result [Google::Apis::StoragetransferV1::Empty] parsed result object
278
+ # @yieldparam err [StandardError] error object if request failed
279
+ #
280
+ # @return [Google::Apis::StoragetransferV1::Empty]
281
+ #
282
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
283
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
284
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
285
+ def pause_transfer_operation(name, pause_transfer_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
286
+ command = make_simple_command(:post, 'v1/{+name}:pause', options)
287
+ command.request_representation = Google::Apis::StoragetransferV1::PauseTransferOperationRequest::Representation
288
+ command.request_object = pause_transfer_operation_request_object
289
+ command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation
290
+ command.response_class = Google::Apis::StoragetransferV1::Empty
291
+ command.params['name'] = name unless name.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # Resumes a transfer operation that is paused.
298
+ # @param [String] name
299
+ # The name of the transfer operation. Required.
300
+ # @param [Google::Apis::StoragetransferV1::ResumeTransferOperationRequest] resume_transfer_operation_request_object
301
+ # @param [String] fields
302
+ # Selector specifying which fields to include in a partial response.
303
+ # @param [String] quota_user
304
+ # Available to use for quota purposes for server-side applications. Can be any
305
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
306
+ # @param [Google::Apis::RequestOptions] options
307
+ # Request-specific options
308
+ #
309
+ # @yield [result, err] Result & error if block supplied
310
+ # @yieldparam result [Google::Apis::StoragetransferV1::Empty] parsed result object
311
+ # @yieldparam err [StandardError] error object if request failed
312
+ #
313
+ # @return [Google::Apis::StoragetransferV1::Empty]
314
+ #
315
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
316
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
317
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
318
+ def resume_transfer_operation(name, resume_transfer_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
319
+ command = make_simple_command(:post, 'v1/{+name}:resume', options)
320
+ command.request_representation = Google::Apis::StoragetransferV1::ResumeTransferOperationRequest::Representation
321
+ command.request_object = resume_transfer_operation_request_object
322
+ command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation
323
+ command.response_class = Google::Apis::StoragetransferV1::Empty
324
+ command.params['name'] = name unless name.nil?
325
+ command.query['fields'] = fields unless fields.nil?
326
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
327
+ execute_or_queue_command(command, &block)
328
+ end
329
+
330
+ # Gets the latest state of a long-running operation. Clients can use this method
331
+ # to poll the operation result at intervals as recommended by the API service.
332
+ # @param [String] name
333
+ # The name of the operation resource.
334
+ # @param [String] fields
335
+ # Selector specifying which fields to include in a partial response.
336
+ # @param [String] quota_user
337
+ # Available to use for quota purposes for server-side applications. Can be any
338
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
339
+ # @param [Google::Apis::RequestOptions] options
340
+ # Request-specific options
341
+ #
342
+ # @yield [result, err] Result & error if block supplied
343
+ # @yieldparam result [Google::Apis::StoragetransferV1::Operation] parsed result object
344
+ # @yieldparam err [StandardError] error object if request failed
345
+ #
346
+ # @return [Google::Apis::StoragetransferV1::Operation]
347
+ #
348
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
349
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
350
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
351
+ def get_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block)
352
+ command = make_simple_command(:get, 'v1/{+name}', options)
353
+ command.response_representation = Google::Apis::StoragetransferV1::Operation::Representation
354
+ command.response_class = Google::Apis::StoragetransferV1::Operation
355
+ command.params['name'] = name unless name.nil?
356
+ command.query['fields'] = fields unless fields.nil?
357
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
358
+ execute_or_queue_command(command, &block)
359
+ end
360
+
361
+ # Lists operations that match the specified filter in the request. If the server
362
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
363
+ # binding below allows API services to override the binding to use different
364
+ # resource name schemes, such as `users/*/operations`.
365
+ # @param [String] name
366
+ # The value `transferOperations`.
367
+ # @param [String] filter
368
+ # The standard list filter.
369
+ # @param [Fixnum] page_size
370
+ # The standard list page size.
371
+ # @param [String] page_token
372
+ # The standard list page token.
373
+ # @param [String] fields
374
+ # Selector specifying which fields to include in a partial response.
375
+ # @param [String] quota_user
376
+ # Available to use for quota purposes for server-side applications. Can be any
377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::StoragetransferV1::ListOperationsResponse] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::StoragetransferV1::ListOperationsResponse]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def list_transfer_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
391
+ command = make_simple_command(:get, 'v1/{+name}', options)
392
+ command.response_representation = Google::Apis::StoragetransferV1::ListOperationsResponse::Representation
393
+ command.response_class = Google::Apis::StoragetransferV1::ListOperationsResponse
394
+ command.params['name'] = name unless name.nil?
395
+ command.query['filter'] = filter unless filter.nil?
396
+ command.query['pageSize'] = page_size unless page_size.nil?
397
+ command.query['pageToken'] = page_token unless page_token.nil?
398
+ command.query['fields'] = fields unless fields.nil?
399
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
400
+ execute_or_queue_command(command, &block)
401
+ end
402
+
403
+ # Cancels a transfer. Use the get method to check whether the cancellation
404
+ # succeeded or whether the operation completed despite cancellation.
405
+ # @param [String] name
406
+ # The name of the operation resource to be cancelled.
407
+ # @param [String] fields
408
+ # Selector specifying which fields to include in a partial response.
409
+ # @param [String] quota_user
410
+ # Available to use for quota purposes for server-side applications. Can be any
411
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
412
+ # @param [Google::Apis::RequestOptions] options
413
+ # Request-specific options
414
+ #
415
+ # @yield [result, err] Result & error if block supplied
416
+ # @yieldparam result [Google::Apis::StoragetransferV1::Empty] parsed result object
417
+ # @yieldparam err [StandardError] error object if request failed
418
+ #
419
+ # @return [Google::Apis::StoragetransferV1::Empty]
420
+ #
421
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
422
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
423
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
424
+ def cancel_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block)
425
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
426
+ command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation
427
+ command.response_class = Google::Apis::StoragetransferV1::Empty
428
+ command.params['name'] = name unless name.nil?
429
+ command.query['fields'] = fields unless fields.nil?
430
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
431
+ execute_or_queue_command(command, &block)
432
+ end
433
+
434
+ # This method is not supported and the server returns `UNIMPLEMENTED`.
435
+ # @param [String] name
436
+ # The name of the operation resource to be deleted.
437
+ # @param [String] fields
438
+ # Selector specifying which fields to include in a partial response.
439
+ # @param [String] quota_user
440
+ # Available to use for quota purposes for server-side applications. Can be any
441
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
442
+ # @param [Google::Apis::RequestOptions] options
443
+ # Request-specific options
444
+ #
445
+ # @yield [result, err] Result & error if block supplied
446
+ # @yieldparam result [Google::Apis::StoragetransferV1::Empty] parsed result object
447
+ # @yieldparam err [StandardError] error object if request failed
448
+ #
449
+ # @return [Google::Apis::StoragetransferV1::Empty]
450
+ #
451
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
452
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
453
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
454
+ def delete_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block)
455
+ command = make_simple_command(:delete, 'v1/{+name}', options)
456
+ command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation
457
+ command.response_class = Google::Apis::StoragetransferV1::Empty
458
+ command.params['name'] = name unless name.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ protected
465
+
466
+ def apply_command_defaults(command)
467
+ command.query['key'] = key unless key.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ end
470
+ end
471
+ end
472
+ end
473
+ end