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,37 @@
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/pubsub_v1/service.rb'
16
+ require 'google/apis/pubsub_v1/classes.rb'
17
+ require 'google/apis/pubsub_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Pub/Sub API
22
+ #
23
+ # Provides reliable, many-to-many, asynchronous messaging between applications.
24
+ #
25
+ # @see https://cloud.google.com/pubsub/docs
26
+ module PubsubV1
27
+ VERSION = 'V1'
28
+ REVISION = '20151103'
29
+
30
+ # View and manage your data across Google Cloud Platform services
31
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
32
+
33
+ # View and manage Pub/Sub topics and subscriptions
34
+ AUTH_PUBSUB = 'https://www.googleapis.com/auth/pubsub'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,614 @@
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 PubsubV1
24
+
25
+ # Request message for `SetIamPolicy` method.
26
+ class SetIamPolicyRequest
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Defines an Identity and Access Management (IAM) policy. It is used to specify
30
+ # access control policies for Cloud Platform resources. A `Policy` consists of a
31
+ # list of `bindings`. A `Binding` binds a list of `members` to a `role`, where
32
+ # the members can be user accounts, Google groups, Google domains, and service
33
+ # accounts. A `role` is a named list of permissions defined by IAM. **Example** `
34
+ # "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@example.com", "
35
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@
36
+ # appspot.gserviceaccount.com"] `, ` "role": "roles/viewer", "members": ["user:
37
+ # sean@example.com"] ` ] ` For a description of IAM and its features, see the [
38
+ # IAM developer's guide](https://cloud.google.com/iam).
39
+ # Corresponds to the JSON property `policy`
40
+ # @return [Google::Apis::PubsubV1::Policy]
41
+ attr_accessor :policy
42
+
43
+ def initialize(**args)
44
+ update!(**args)
45
+ end
46
+
47
+ # Update properties of this object
48
+ def update!(**args)
49
+ @policy = args[:policy] unless args[:policy].nil?
50
+ end
51
+ end
52
+
53
+ # Defines an Identity and Access Management (IAM) policy. It is used to specify
54
+ # access control policies for Cloud Platform resources. A `Policy` consists of a
55
+ # list of `bindings`. A `Binding` binds a list of `members` to a `role`, where
56
+ # the members can be user accounts, Google groups, Google domains, and service
57
+ # accounts. A `role` is a named list of permissions defined by IAM. **Example** `
58
+ # "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@example.com", "
59
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@
60
+ # appspot.gserviceaccount.com"] `, ` "role": "roles/viewer", "members": ["user:
61
+ # sean@example.com"] ` ] ` For a description of IAM and its features, see the [
62
+ # IAM developer's guide](https://cloud.google.com/iam).
63
+ class Policy
64
+ include Google::Apis::Core::Hashable
65
+
66
+ # Version of the `Policy`. The default version is 0.
67
+ # Corresponds to the JSON property `version`
68
+ # @return [Fixnum]
69
+ attr_accessor :version
70
+
71
+ # Associates a list of `members` to a `role`. Multiple `bindings` must not be
72
+ # specified for the same `role`. `bindings` with no members will result in an
73
+ # error.
74
+ # Corresponds to the JSON property `bindings`
75
+ # @return [Array<Google::Apis::PubsubV1::Binding>]
76
+ attr_accessor :bindings
77
+
78
+ # Can be used to perform a read-modify-write.
79
+ # Corresponds to the JSON property `etag`
80
+ # @return [String]
81
+ attr_accessor :etag
82
+
83
+ def initialize(**args)
84
+ update!(**args)
85
+ end
86
+
87
+ # Update properties of this object
88
+ def update!(**args)
89
+ @version = args[:version] unless args[:version].nil?
90
+ @bindings = args[:bindings] unless args[:bindings].nil?
91
+ @etag = args[:etag] unless args[:etag].nil?
92
+ end
93
+ end
94
+
95
+ # Associates `members` with a `role`.
96
+ class Binding
97
+ include Google::Apis::Core::Hashable
98
+
99
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
100
+ # , or `roles/owner`. Required
101
+ # Corresponds to the JSON property `role`
102
+ # @return [String]
103
+ attr_accessor :role
104
+
105
+ # Specifies the identities requesting access for a Cloud Platform resource. `
106
+ # members` can have the following formats: * `allUsers`: A special identifier
107
+ # that represents anyone who is on the internet; with or without a Google
108
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
109
+ # anyone who is authenticated with a Google account or a service account. * `
110
+ # user:`emailid``: An email address that represents a specific Google account.
111
+ # For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:`
112
+ # emailid``: An email address that represents a service account. For example, `
113
+ # my-other-app@appspot.gserviceaccount.com`. * `group:`emailid``: An email
114
+ # address that represents a Google group. For example, `admins@example.com`. * `
115
+ # domain:`domain``: A Google Apps domain name that represents all the users of
116
+ # that domain. For example, `google.com` or `example.com`.
117
+ # Corresponds to the JSON property `members`
118
+ # @return [Array<String>]
119
+ attr_accessor :members
120
+
121
+ def initialize(**args)
122
+ update!(**args)
123
+ end
124
+
125
+ # Update properties of this object
126
+ def update!(**args)
127
+ @role = args[:role] unless args[:role].nil?
128
+ @members = args[:members] unless args[:members].nil?
129
+ end
130
+ end
131
+
132
+ # Request message for `TestIamPermissions` method.
133
+ class TestIamPermissionsRequest
134
+ include Google::Apis::Core::Hashable
135
+
136
+ # The set of permissions to check for the `resource`. Permissions with wildcards
137
+ # (such as '*' or 'storage.*') are not allowed.
138
+ # Corresponds to the JSON property `permissions`
139
+ # @return [Array<String>]
140
+ attr_accessor :permissions
141
+
142
+ def initialize(**args)
143
+ update!(**args)
144
+ end
145
+
146
+ # Update properties of this object
147
+ def update!(**args)
148
+ @permissions = args[:permissions] unless args[:permissions].nil?
149
+ end
150
+ end
151
+
152
+ # Response message for `TestIamPermissions` method.
153
+ class TestIamPermissionsResponse
154
+ include Google::Apis::Core::Hashable
155
+
156
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
157
+ # Corresponds to the JSON property `permissions`
158
+ # @return [Array<String>]
159
+ attr_accessor :permissions
160
+
161
+ def initialize(**args)
162
+ update!(**args)
163
+ end
164
+
165
+ # Update properties of this object
166
+ def update!(**args)
167
+ @permissions = args[:permissions] unless args[:permissions].nil?
168
+ end
169
+ end
170
+
171
+ # A topic resource.
172
+ class Topic
173
+ include Google::Apis::Core::Hashable
174
+
175
+ # The name of the topic. It must have the format `"projects/`project`/topics/`
176
+ # topic`"`. ``topic`` must start with a letter, and contain only letters (`[A-Za-
177
+ # z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
178
+ # tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255
179
+ # characters in length, and it must not start with `"goog"`.
180
+ # Corresponds to the JSON property `name`
181
+ # @return [String]
182
+ attr_accessor :name
183
+
184
+ def initialize(**args)
185
+ update!(**args)
186
+ end
187
+
188
+ # Update properties of this object
189
+ def update!(**args)
190
+ @name = args[:name] unless args[:name].nil?
191
+ end
192
+ end
193
+
194
+ # Request for the Publish method.
195
+ class PublishRequest
196
+ include Google::Apis::Core::Hashable
197
+
198
+ # The messages to publish.
199
+ # Corresponds to the JSON property `messages`
200
+ # @return [Array<Google::Apis::PubsubV1::Message>]
201
+ attr_accessor :messages
202
+
203
+ def initialize(**args)
204
+ update!(**args)
205
+ end
206
+
207
+ # Update properties of this object
208
+ def update!(**args)
209
+ @messages = args[:messages] unless args[:messages].nil?
210
+ end
211
+ end
212
+
213
+ # A message data and its attributes. The message payload must not be empty; it
214
+ # must contain either a non-empty data field, or at least one attribute.
215
+ class Message
216
+ include Google::Apis::Core::Hashable
217
+
218
+ # The message payload. For JSON requests, the value of this field must be base64-
219
+ # encoded.
220
+ # Corresponds to the JSON property `data`
221
+ # @return [String]
222
+ attr_accessor :data
223
+
224
+ # Optional attributes for this message.
225
+ # Corresponds to the JSON property `attributes`
226
+ # @return [Hash<String,String>]
227
+ attr_accessor :attributes
228
+
229
+ # ID of this message, assigned by the server when the message is published.
230
+ # Guaranteed to be unique within the topic. This value may be read by a
231
+ # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
232
+ # delivery. It must not be populated by the publisher in a `Publish` call.
233
+ # Corresponds to the JSON property `messageId`
234
+ # @return [String]
235
+ attr_accessor :message_id
236
+
237
+ # The time at which the message was published, populated by the server when it
238
+ # receives the `Publish` call. It must not be populated by the publisher in a `
239
+ # Publish` call.
240
+ # Corresponds to the JSON property `publishTime`
241
+ # @return [String]
242
+ attr_accessor :publish_time
243
+
244
+ def initialize(**args)
245
+ update!(**args)
246
+ end
247
+
248
+ # Update properties of this object
249
+ def update!(**args)
250
+ @data = args[:data] unless args[:data].nil?
251
+ @attributes = args[:attributes] unless args[:attributes].nil?
252
+ @message_id = args[:message_id] unless args[:message_id].nil?
253
+ @publish_time = args[:publish_time] unless args[:publish_time].nil?
254
+ end
255
+ end
256
+
257
+ # Response for the `Publish` method.
258
+ class PublishResponse
259
+ include Google::Apis::Core::Hashable
260
+
261
+ # The server-assigned ID of each published message, in the same order as the
262
+ # messages in the request. IDs are guaranteed to be unique within the topic.
263
+ # Corresponds to the JSON property `messageIds`
264
+ # @return [Array<String>]
265
+ attr_accessor :message_ids
266
+
267
+ def initialize(**args)
268
+ update!(**args)
269
+ end
270
+
271
+ # Update properties of this object
272
+ def update!(**args)
273
+ @message_ids = args[:message_ids] unless args[:message_ids].nil?
274
+ end
275
+ end
276
+
277
+ # Response for the `ListTopics` method.
278
+ class ListTopicsResponse
279
+ include Google::Apis::Core::Hashable
280
+
281
+ # The resulting topics.
282
+ # Corresponds to the JSON property `topics`
283
+ # @return [Array<Google::Apis::PubsubV1::Topic>]
284
+ attr_accessor :topics
285
+
286
+ # If not empty, indicates that there may be more topics that match the request;
287
+ # this value should be passed in a new `ListTopicsRequest`.
288
+ # Corresponds to the JSON property `nextPageToken`
289
+ # @return [String]
290
+ attr_accessor :next_page_token
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @topics = args[:topics] unless args[:topics].nil?
299
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
300
+ end
301
+ end
302
+
303
+ # Response for the `ListTopicSubscriptions` method.
304
+ class ListTopicSubscriptionsResponse
305
+ include Google::Apis::Core::Hashable
306
+
307
+ # The names of the subscriptions that match the request.
308
+ # Corresponds to the JSON property `subscriptions`
309
+ # @return [Array<String>]
310
+ attr_accessor :subscriptions
311
+
312
+ # If not empty, indicates that there may be more subscriptions that match the
313
+ # request; this value should be passed in a new `ListTopicSubscriptionsRequest`
314
+ # to get more subscriptions.
315
+ # Corresponds to the JSON property `nextPageToken`
316
+ # @return [String]
317
+ attr_accessor :next_page_token
318
+
319
+ def initialize(**args)
320
+ update!(**args)
321
+ end
322
+
323
+ # Update properties of this object
324
+ def update!(**args)
325
+ @subscriptions = args[:subscriptions] unless args[:subscriptions].nil?
326
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
327
+ end
328
+ end
329
+
330
+ # A generic empty message that you can re-use to avoid defining duplicated empty
331
+ # messages in your APIs. A typical example is to use it as the request or the
332
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
333
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
334
+ # `Empty` is empty JSON object ````.
335
+ class Empty
336
+ include Google::Apis::Core::Hashable
337
+
338
+ def initialize(**args)
339
+ update!(**args)
340
+ end
341
+
342
+ # Update properties of this object
343
+ def update!(**args)
344
+ end
345
+ end
346
+
347
+ # A subscription resource.
348
+ class Subscription
349
+ include Google::Apis::Core::Hashable
350
+
351
+ # The name of the subscription. It must have the format `"projects/`project`/
352
+ # subscriptions/`subscription`"`. ``subscription`` must start with a letter, and
353
+ # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
354
+ # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%
355
+ # `). It must be between 3 and 255 characters in length, and it must not start
356
+ # with `"goog"`.
357
+ # Corresponds to the JSON property `name`
358
+ # @return [String]
359
+ attr_accessor :name
360
+
361
+ # The name of the topic from which this subscription is receiving messages. The
362
+ # value of this field will be `_deleted-topic_` if the topic has been deleted.
363
+ # Corresponds to the JSON property `topic`
364
+ # @return [String]
365
+ attr_accessor :topic
366
+
367
+ # Configuration for a push delivery endpoint.
368
+ # Corresponds to the JSON property `pushConfig`
369
+ # @return [Google::Apis::PubsubV1::PushConfig]
370
+ attr_accessor :push_config
371
+
372
+ # This value is the maximum time after a subscriber receives a message before
373
+ # the subscriber should acknowledge the message. After message delivery but
374
+ # before the ack deadline expires and before the message is acknowledged, it is
375
+ # an outstanding message and will not be delivered again during that time (on a
376
+ # best-effort basis). For pull delivery this value is used as the initial value
377
+ # for the ack deadline. To override this value for a given message, call `
378
+ # ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this
379
+ # value is also used to set the request timeout for the call to the push
380
+ # endpoint. If the subscriber never acknowledges the message, the Pub/Sub system
381
+ # will eventually redeliver the message. If this parameter is not set, the
382
+ # default value of 10 seconds is used.
383
+ # Corresponds to the JSON property `ackDeadlineSeconds`
384
+ # @return [Fixnum]
385
+ attr_accessor :ack_deadline_seconds
386
+
387
+ def initialize(**args)
388
+ update!(**args)
389
+ end
390
+
391
+ # Update properties of this object
392
+ def update!(**args)
393
+ @name = args[:name] unless args[:name].nil?
394
+ @topic = args[:topic] unless args[:topic].nil?
395
+ @push_config = args[:push_config] unless args[:push_config].nil?
396
+ @ack_deadline_seconds = args[:ack_deadline_seconds] unless args[:ack_deadline_seconds].nil?
397
+ end
398
+ end
399
+
400
+ # Configuration for a push delivery endpoint.
401
+ class PushConfig
402
+ include Google::Apis::Core::Hashable
403
+
404
+ # A URL locating the endpoint to which messages should be pushed. For example, a
405
+ # Webhook endpoint might use "https://example.com/push".
406
+ # Corresponds to the JSON property `pushEndpoint`
407
+ # @return [String]
408
+ attr_accessor :push_endpoint
409
+
410
+ # Endpoint configuration attributes. Every endpoint has a set of API supported
411
+ # attributes that can be used to control different aspects of the message
412
+ # delivery. The currently supported attribute is `x-goog-version`, which you can
413
+ # use to change the format of the push message. This attribute indicates the
414
+ # version of the data expected by the endpoint. This controls the shape of the
415
+ # envelope (i.e. its fields and metadata). The endpoint version is based on the
416
+ # version of the Pub/Sub API. If not present during the `CreateSubscription`
417
+ # call, it will default to the version of the API used to make such call. If not
418
+ # present during a `ModifyPushConfig` call, its value will not be changed. `
419
+ # GetSubscription` calls will always return a valid version, even if the
420
+ # subscription was created without this attribute. The possible values for this
421
+ # attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/
422
+ # Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub
423
+ # API.
424
+ # Corresponds to the JSON property `attributes`
425
+ # @return [Hash<String,String>]
426
+ attr_accessor :attributes
427
+
428
+ def initialize(**args)
429
+ update!(**args)
430
+ end
431
+
432
+ # Update properties of this object
433
+ def update!(**args)
434
+ @push_endpoint = args[:push_endpoint] unless args[:push_endpoint].nil?
435
+ @attributes = args[:attributes] unless args[:attributes].nil?
436
+ end
437
+ end
438
+
439
+ # Response for the `ListSubscriptions` method.
440
+ class ListSubscriptionsResponse
441
+ include Google::Apis::Core::Hashable
442
+
443
+ # The subscriptions that match the request.
444
+ # Corresponds to the JSON property `subscriptions`
445
+ # @return [Array<Google::Apis::PubsubV1::Subscription>]
446
+ attr_accessor :subscriptions
447
+
448
+ # If not empty, indicates that there may be more subscriptions that match the
449
+ # request; this value should be passed in a new `ListSubscriptionsRequest` to
450
+ # get more subscriptions.
451
+ # Corresponds to the JSON property `nextPageToken`
452
+ # @return [String]
453
+ attr_accessor :next_page_token
454
+
455
+ def initialize(**args)
456
+ update!(**args)
457
+ end
458
+
459
+ # Update properties of this object
460
+ def update!(**args)
461
+ @subscriptions = args[:subscriptions] unless args[:subscriptions].nil?
462
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
463
+ end
464
+ end
465
+
466
+ # Request for the ModifyAckDeadline method.
467
+ class ModifyAckDeadlineRequest
468
+ include Google::Apis::Core::Hashable
469
+
470
+ # List of acknowledgment IDs.
471
+ # Corresponds to the JSON property `ackIds`
472
+ # @return [Array<String>]
473
+ attr_accessor :ack_ids
474
+
475
+ # The new ack deadline with respect to the time this request was sent to the Pub/
476
+ # Sub system. Must be >= 0. For example, if the value is 10, the new ack
477
+ # deadline will expire 10 seconds after the `ModifyAckDeadline` call was made.
478
+ # Specifying zero may immediately make the message available for another pull
479
+ # request.
480
+ # Corresponds to the JSON property `ackDeadlineSeconds`
481
+ # @return [Fixnum]
482
+ attr_accessor :ack_deadline_seconds
483
+
484
+ def initialize(**args)
485
+ update!(**args)
486
+ end
487
+
488
+ # Update properties of this object
489
+ def update!(**args)
490
+ @ack_ids = args[:ack_ids] unless args[:ack_ids].nil?
491
+ @ack_deadline_seconds = args[:ack_deadline_seconds] unless args[:ack_deadline_seconds].nil?
492
+ end
493
+ end
494
+
495
+ # Request for the Acknowledge method.
496
+ class AcknowledgeRequest
497
+ include Google::Apis::Core::Hashable
498
+
499
+ # The acknowledgment ID for the messages being acknowledged that was returned by
500
+ # the Pub/Sub system in the `Pull` response. Must not be empty.
501
+ # Corresponds to the JSON property `ackIds`
502
+ # @return [Array<String>]
503
+ attr_accessor :ack_ids
504
+
505
+ def initialize(**args)
506
+ update!(**args)
507
+ end
508
+
509
+ # Update properties of this object
510
+ def update!(**args)
511
+ @ack_ids = args[:ack_ids] unless args[:ack_ids].nil?
512
+ end
513
+ end
514
+
515
+ # Request for the `Pull` method.
516
+ class PullRequest
517
+ include Google::Apis::Core::Hashable
518
+
519
+ # If this is specified as true the system will respond immediately even if it is
520
+ # not able to return a message in the `Pull` response. Otherwise the system is
521
+ # allowed to wait until at least one message is available rather than returning
522
+ # no messages. The client may cancel the request if it does not wish to wait any
523
+ # longer for the response.
524
+ # Corresponds to the JSON property `returnImmediately`
525
+ # @return [Boolean]
526
+ attr_accessor :return_immediately
527
+ alias_method :return_immediately?, :return_immediately
528
+
529
+ # The maximum number of messages returned for this request. The Pub/Sub system
530
+ # may return fewer than the number specified.
531
+ # Corresponds to the JSON property `maxMessages`
532
+ # @return [Fixnum]
533
+ attr_accessor :max_messages
534
+
535
+ def initialize(**args)
536
+ update!(**args)
537
+ end
538
+
539
+ # Update properties of this object
540
+ def update!(**args)
541
+ @return_immediately = args[:return_immediately] unless args[:return_immediately].nil?
542
+ @max_messages = args[:max_messages] unless args[:max_messages].nil?
543
+ end
544
+ end
545
+
546
+ # Response for the `Pull` method.
547
+ class PullResponse
548
+ include Google::Apis::Core::Hashable
549
+
550
+ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if
551
+ # there are no more available in the backlog. The Pub/Sub system may return
552
+ # fewer than the `maxMessages` requested even if there are more messages
553
+ # available in the backlog.
554
+ # Corresponds to the JSON property `receivedMessages`
555
+ # @return [Array<Google::Apis::PubsubV1::ReceivedMessage>]
556
+ attr_accessor :received_messages
557
+
558
+ def initialize(**args)
559
+ update!(**args)
560
+ end
561
+
562
+ # Update properties of this object
563
+ def update!(**args)
564
+ @received_messages = args[:received_messages] unless args[:received_messages].nil?
565
+ end
566
+ end
567
+
568
+ # A message and its corresponding acknowledgment ID.
569
+ class ReceivedMessage
570
+ include Google::Apis::Core::Hashable
571
+
572
+ # This ID can be used to acknowledge the received message.
573
+ # Corresponds to the JSON property `ackId`
574
+ # @return [String]
575
+ attr_accessor :ack_id
576
+
577
+ # A message data and its attributes. The message payload must not be empty; it
578
+ # must contain either a non-empty data field, or at least one attribute.
579
+ # Corresponds to the JSON property `message`
580
+ # @return [Google::Apis::PubsubV1::Message]
581
+ attr_accessor :message
582
+
583
+ def initialize(**args)
584
+ update!(**args)
585
+ end
586
+
587
+ # Update properties of this object
588
+ def update!(**args)
589
+ @ack_id = args[:ack_id] unless args[:ack_id].nil?
590
+ @message = args[:message] unless args[:message].nil?
591
+ end
592
+ end
593
+
594
+ # Request for the ModifyPushConfig method.
595
+ class ModifyPushConfigRequest
596
+ include Google::Apis::Core::Hashable
597
+
598
+ # Configuration for a push delivery endpoint.
599
+ # Corresponds to the JSON property `pushConfig`
600
+ # @return [Google::Apis::PubsubV1::PushConfig]
601
+ attr_accessor :push_config
602
+
603
+ def initialize(**args)
604
+ update!(**args)
605
+ end
606
+
607
+ # Update properties of this object
608
+ def update!(**args)
609
+ @push_config = args[:push_config] unless args[:push_config].nil?
610
+ end
611
+ end
612
+ end
613
+ end
614
+ end