google-api-client 0.9.8 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -22,121 +22,121 @@ module Google
22
22
  module Apis
23
23
  module PubsubV1
24
24
 
25
- class SetIamPolicyRequest
25
+ class Binding
26
26
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
27
 
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
- class Policy
31
+ class ListTopicsResponse
32
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
33
 
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
- class Binding
37
+ class AcknowledgeRequest
38
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
39
 
40
40
  include Google::Apis::Core::JsonObjectSupport
41
41
  end
42
42
 
43
- class TestIamPermissionsRequest
43
+ class Empty
44
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
45
 
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
- class TestIamPermissionsResponse
49
+ class ListTopicSubscriptionsResponse
50
50
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
51
 
52
52
  include Google::Apis::Core::JsonObjectSupport
53
53
  end
54
54
 
55
- class Topic
55
+ class PullResponse
56
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
57
57
 
58
58
  include Google::Apis::Core::JsonObjectSupport
59
59
  end
60
60
 
61
- class PublishRequest
61
+ class ReceivedMessage
62
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
63
63
 
64
64
  include Google::Apis::Core::JsonObjectSupport
65
65
  end
66
66
 
67
- class Message
67
+ class PushConfig
68
68
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
69
 
70
70
  include Google::Apis::Core::JsonObjectSupport
71
71
  end
72
72
 
73
- class PublishResponse
73
+ class TestIamPermissionsResponse
74
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
75
75
 
76
76
  include Google::Apis::Core::JsonObjectSupport
77
77
  end
78
78
 
79
- class ListTopicsResponse
79
+ class PullRequest
80
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
81
81
 
82
82
  include Google::Apis::Core::JsonObjectSupport
83
83
  end
84
84
 
85
- class ListTopicSubscriptionsResponse
85
+ class ListSubscriptionsResponse
86
86
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
87
 
88
88
  include Google::Apis::Core::JsonObjectSupport
89
89
  end
90
90
 
91
- class Empty
91
+ class PublishRequest
92
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
93
 
94
94
  include Google::Apis::Core::JsonObjectSupport
95
95
  end
96
96
 
97
- class Subscription
97
+ class PublishResponse
98
98
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
99
 
100
100
  include Google::Apis::Core::JsonObjectSupport
101
101
  end
102
102
 
103
- class PushConfig
103
+ class Subscription
104
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
105
105
 
106
106
  include Google::Apis::Core::JsonObjectSupport
107
107
  end
108
108
 
109
- class ListSubscriptionsResponse
109
+ class TestIamPermissionsRequest
110
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
111
111
 
112
112
  include Google::Apis::Core::JsonObjectSupport
113
113
  end
114
114
 
115
- class ModifyAckDeadlineRequest
115
+ class Policy
116
116
  class Representation < Google::Apis::Core::JsonRepresentation; end
117
117
 
118
118
  include Google::Apis::Core::JsonObjectSupport
119
119
  end
120
120
 
121
- class AcknowledgeRequest
121
+ class Topic
122
122
  class Representation < Google::Apis::Core::JsonRepresentation; end
123
123
 
124
124
  include Google::Apis::Core::JsonObjectSupport
125
125
  end
126
126
 
127
- class PullRequest
127
+ class ModifyAckDeadlineRequest
128
128
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
129
 
130
130
  include Google::Apis::Core::JsonObjectSupport
131
131
  end
132
132
 
133
- class PullResponse
133
+ class SetIamPolicyRequest
134
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
135
135
 
136
136
  include Google::Apis::Core::JsonObjectSupport
137
137
  end
138
138
 
139
- class ReceivedMessage
139
+ class Message
140
140
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
141
 
142
142
  include Google::Apis::Core::JsonObjectSupport
@@ -148,166 +148,166 @@ module Google
148
148
  include Google::Apis::Core::JsonObjectSupport
149
149
  end
150
150
 
151
- class SetIamPolicyRequest
151
+ class Binding
152
152
  # @private
153
153
  class Representation < Google::Apis::Core::JsonRepresentation
154
- property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation
155
-
154
+ collection :members, as: 'members'
155
+ property :role, as: 'role'
156
156
  end
157
157
  end
158
158
 
159
- class Policy
159
+ class ListTopicsResponse
160
160
  # @private
161
161
  class Representation < Google::Apis::Core::JsonRepresentation
162
- property :version, as: 'version'
163
- collection :bindings, as: 'bindings', class: Google::Apis::PubsubV1::Binding, decorator: Google::Apis::PubsubV1::Binding::Representation
162
+ property :next_page_token, as: 'nextPageToken'
163
+ collection :topics, as: 'topics', class: Google::Apis::PubsubV1::Topic, decorator: Google::Apis::PubsubV1::Topic::Representation
164
164
 
165
- property :etag, :base64 => true, as: 'etag'
166
165
  end
167
166
  end
168
167
 
169
- class Binding
168
+ class AcknowledgeRequest
170
169
  # @private
171
170
  class Representation < Google::Apis::Core::JsonRepresentation
172
- property :role, as: 'role'
173
- collection :members, as: 'members'
171
+ collection :ack_ids, as: 'ackIds'
174
172
  end
175
173
  end
176
174
 
177
- class TestIamPermissionsRequest
175
+ class Empty
178
176
  # @private
179
177
  class Representation < Google::Apis::Core::JsonRepresentation
180
- collection :permissions, as: 'permissions'
181
178
  end
182
179
  end
183
180
 
184
- class TestIamPermissionsResponse
181
+ class ListTopicSubscriptionsResponse
185
182
  # @private
186
183
  class Representation < Google::Apis::Core::JsonRepresentation
187
- collection :permissions, as: 'permissions'
184
+ property :next_page_token, as: 'nextPageToken'
185
+ collection :subscriptions, as: 'subscriptions'
188
186
  end
189
187
  end
190
188
 
191
- class Topic
189
+ class PullResponse
192
190
  # @private
193
191
  class Representation < Google::Apis::Core::JsonRepresentation
194
- property :name, as: 'name'
192
+ collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1::ReceivedMessage, decorator: Google::Apis::PubsubV1::ReceivedMessage::Representation
193
+
195
194
  end
196
195
  end
197
196
 
198
- class PublishRequest
197
+ class ReceivedMessage
199
198
  # @private
200
199
  class Representation < Google::Apis::Core::JsonRepresentation
201
- collection :messages, as: 'messages', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation
200
+ property :message, as: 'message', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation
202
201
 
202
+ property :ack_id, as: 'ackId'
203
203
  end
204
204
  end
205
205
 
206
- class Message
206
+ class PushConfig
207
207
  # @private
208
208
  class Representation < Google::Apis::Core::JsonRepresentation
209
- property :data, :base64 => true, as: 'data'
209
+ property :push_endpoint, as: 'pushEndpoint'
210
210
  hash :attributes, as: 'attributes'
211
- property :message_id, as: 'messageId'
212
- property :publish_time, as: 'publishTime'
213
211
  end
214
212
  end
215
213
 
216
- class PublishResponse
214
+ class TestIamPermissionsResponse
217
215
  # @private
218
216
  class Representation < Google::Apis::Core::JsonRepresentation
219
- collection :message_ids, as: 'messageIds'
217
+ collection :permissions, as: 'permissions'
220
218
  end
221
219
  end
222
220
 
223
- class ListTopicsResponse
221
+ class PullRequest
224
222
  # @private
225
223
  class Representation < Google::Apis::Core::JsonRepresentation
226
- collection :topics, as: 'topics', class: Google::Apis::PubsubV1::Topic, decorator: Google::Apis::PubsubV1::Topic::Representation
224
+ property :return_immediately, as: 'returnImmediately'
225
+ property :max_messages, as: 'maxMessages'
226
+ end
227
+ end
228
+
229
+ class ListSubscriptionsResponse
230
+ # @private
231
+ class Representation < Google::Apis::Core::JsonRepresentation
232
+ collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1::Subscription, decorator: Google::Apis::PubsubV1::Subscription::Representation
227
233
 
228
234
  property :next_page_token, as: 'nextPageToken'
229
235
  end
230
236
  end
231
237
 
232
- class ListTopicSubscriptionsResponse
238
+ class PublishRequest
233
239
  # @private
234
240
  class Representation < Google::Apis::Core::JsonRepresentation
235
- collection :subscriptions, as: 'subscriptions'
236
- property :next_page_token, as: 'nextPageToken'
241
+ collection :messages, as: 'messages', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation
242
+
237
243
  end
238
244
  end
239
245
 
240
- class Empty
246
+ class PublishResponse
241
247
  # @private
242
248
  class Representation < Google::Apis::Core::JsonRepresentation
249
+ collection :message_ids, as: 'messageIds'
243
250
  end
244
251
  end
245
252
 
246
253
  class Subscription
247
254
  # @private
248
255
  class Representation < Google::Apis::Core::JsonRepresentation
249
- property :name, as: 'name'
250
- property :topic, as: 'topic'
251
256
  property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation
252
257
 
253
258
  property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
259
+ property :name, as: 'name'
260
+ property :topic, as: 'topic'
254
261
  end
255
262
  end
256
263
 
257
- class PushConfig
264
+ class TestIamPermissionsRequest
258
265
  # @private
259
266
  class Representation < Google::Apis::Core::JsonRepresentation
260
- property :push_endpoint, as: 'pushEndpoint'
261
- hash :attributes, as: 'attributes'
267
+ collection :permissions, as: 'permissions'
262
268
  end
263
269
  end
264
270
 
265
- class ListSubscriptionsResponse
271
+ class Policy
266
272
  # @private
267
273
  class Representation < Google::Apis::Core::JsonRepresentation
268
- collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1::Subscription, decorator: Google::Apis::PubsubV1::Subscription::Representation
274
+ property :version, as: 'version'
275
+ collection :bindings, as: 'bindings', class: Google::Apis::PubsubV1::Binding, decorator: Google::Apis::PubsubV1::Binding::Representation
269
276
 
270
- property :next_page_token, as: 'nextPageToken'
277
+ property :etag, :base64 => true, as: 'etag'
271
278
  end
272
279
  end
273
280
 
274
- class ModifyAckDeadlineRequest
281
+ class Topic
275
282
  # @private
276
283
  class Representation < Google::Apis::Core::JsonRepresentation
277
- collection :ack_ids, as: 'ackIds'
278
- property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
284
+ property :name, as: 'name'
279
285
  end
280
286
  end
281
287
 
282
- class AcknowledgeRequest
288
+ class ModifyAckDeadlineRequest
283
289
  # @private
284
290
  class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
285
292
  collection :ack_ids, as: 'ackIds'
286
293
  end
287
294
  end
288
295
 
289
- class PullRequest
290
- # @private
291
- class Representation < Google::Apis::Core::JsonRepresentation
292
- property :return_immediately, as: 'returnImmediately'
293
- property :max_messages, as: 'maxMessages'
294
- end
295
- end
296
-
297
- class PullResponse
296
+ class SetIamPolicyRequest
298
297
  # @private
299
298
  class Representation < Google::Apis::Core::JsonRepresentation
300
- collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1::ReceivedMessage, decorator: Google::Apis::PubsubV1::ReceivedMessage::Representation
299
+ property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation
301
300
 
302
301
  end
303
302
  end
304
303
 
305
- class ReceivedMessage
304
+ class Message
306
305
  # @private
307
306
  class Representation < Google::Apis::Core::JsonRepresentation
308
- property :ack_id, as: 'ackId'
309
- property :message, as: 'message', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation
310
-
307
+ property :publish_time, as: 'publishTime'
308
+ property :data, :base64 => true, as: 'data'
309
+ hash :attributes, as: 'attributes'
310
+ property :message_id, as: 'messageId'
311
311
  end
312
312
  end
313
313
 
@@ -46,338 +46,346 @@ module Google
46
46
  super('https://pubsub.googleapis.com/', '')
47
47
  end
48
48
 
49
- # Sets the access control policy on the specified resource. Replaces any
50
- # existing policy.
51
- # @param [String] resource
52
- # REQUIRED: The resource for which the policy is being specified. `resource` is
53
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
54
- # disk*`. The format for the path specified in this value is resource specific
55
- # and is specified in the `setIamPolicy` documentation.
56
- # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
57
- # @param [String] fields
58
- # Selector specifying which fields to include in a partial response.
49
+ # Acknowledges the messages associated with the `ack_ids` in the
50
+ # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
51
+ # from the subscription.
52
+ # Acknowledging a message whose ack deadline has expired may succeed,
53
+ # but such a message may be redelivered later. Acknowledging a message more
54
+ # than once will not result in an error.
55
+ # @param [String] subscription
56
+ # The subscription whose message is being acknowledged.
57
+ # Format is `projects/`project`/subscriptions/`sub``.
58
+ # @param [Google::Apis::PubsubV1::AcknowledgeRequest] acknowledge_request_object
59
59
  # @param [String] quota_user
60
60
  # Available to use for quota purposes for server-side applications. Can be any
61
61
  # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
62
64
  # @param [Google::Apis::RequestOptions] options
63
65
  # Request-specific options
64
66
  #
65
67
  # @yield [result, err] Result & error if block supplied
66
- # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
68
+ # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
67
69
  # @yieldparam err [StandardError] error object if request failed
68
70
  #
69
- # @return [Google::Apis::PubsubV1::Policy]
71
+ # @return [Google::Apis::PubsubV1::Empty]
70
72
  #
71
73
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
74
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
75
  # @raise [Google::Apis::AuthorizationError] Authorization is required
74
- def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
75
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
76
- command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
77
- command.request_object = set_iam_policy_request_object
78
- command.response_representation = Google::Apis::PubsubV1::Policy::Representation
79
- command.response_class = Google::Apis::PubsubV1::Policy
80
- command.params['resource'] = resource unless resource.nil?
81
- command.query['fields'] = fields unless fields.nil?
76
+ def acknowledge_subscription(subscription, acknowledge_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'v1/{+subscription}:acknowledge', options)
78
+ command.request_representation = Google::Apis::PubsubV1::AcknowledgeRequest::Representation
79
+ command.request_object = acknowledge_request_object
80
+ command.response_representation = Google::Apis::PubsubV1::Empty::Representation
81
+ command.response_class = Google::Apis::PubsubV1::Empty
82
+ command.params['subscription'] = subscription unless subscription.nil?
82
83
  command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ command.query['fields'] = fields unless fields.nil?
83
85
  execute_or_queue_command(command, &block)
84
86
  end
85
87
 
86
- # Gets the access control policy for a `resource`. Returns an empty policy if
87
- # the resource exists and does not have a policy set.
88
- # @param [String] resource
89
- # REQUIRED: The resource for which the policy is being requested. `resource` is
90
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
91
- # disk*`. The format for the path specified in this value is resource specific
92
- # and is specified in the `getIamPolicy` documentation.
93
- # @param [String] fields
94
- # Selector specifying which fields to include in a partial response.
88
+ # Modifies the ack deadline for a specific message. This method is useful
89
+ # to indicate that more time is needed to process a message by the
90
+ # subscriber, or to make the message available for redelivery if the
91
+ # processing was interrupted. Note that this does not modify the
92
+ # subscription-level `ackDeadlineSeconds` used for subsequent messages.
93
+ # @param [String] subscription
94
+ # The name of the subscription.
95
+ # Format is `projects/`project`/subscriptions/`sub``.
96
+ # @param [Google::Apis::PubsubV1::ModifyAckDeadlineRequest] modify_ack_deadline_request_object
95
97
  # @param [String] quota_user
96
98
  # Available to use for quota purposes for server-side applications. Can be any
97
99
  # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
98
102
  # @param [Google::Apis::RequestOptions] options
99
103
  # Request-specific options
100
104
  #
101
105
  # @yield [result, err] Result & error if block supplied
102
- # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
106
+ # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
103
107
  # @yieldparam err [StandardError] error object if request failed
104
108
  #
105
- # @return [Google::Apis::PubsubV1::Policy]
109
+ # @return [Google::Apis::PubsubV1::Empty]
106
110
  #
107
111
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
112
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
113
  # @raise [Google::Apis::AuthorizationError] Authorization is required
110
- def get_project_topic_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
111
- command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
112
- command.response_representation = Google::Apis::PubsubV1::Policy::Representation
113
- command.response_class = Google::Apis::PubsubV1::Policy
114
- command.params['resource'] = resource unless resource.nil?
115
- command.query['fields'] = fields unless fields.nil?
114
+ def modify_subscription_ack_deadline(subscription, modify_ack_deadline_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
115
+ command = make_simple_command(:post, 'v1/{+subscription}:modifyAckDeadline', options)
116
+ command.request_representation = Google::Apis::PubsubV1::ModifyAckDeadlineRequest::Representation
117
+ command.request_object = modify_ack_deadline_request_object
118
+ command.response_representation = Google::Apis::PubsubV1::Empty::Representation
119
+ command.response_class = Google::Apis::PubsubV1::Empty
120
+ command.params['subscription'] = subscription unless subscription.nil?
116
121
  command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ command.query['fields'] = fields unless fields.nil?
117
123
  execute_or_queue_command(command, &block)
118
124
  end
119
125
 
120
- # Returns permissions that a caller has on the specified resource.
126
+ # Gets the access control policy for a resource.
127
+ # Returns an empty policy if the resource exists and does not have a policy
128
+ # set.
121
129
  # @param [String] resource
122
- # REQUIRED: The resource for which the policy detail is being requested. `
123
- # resource` is usually specified as a path, such as `projects/*project*/zones/*
124
- # zone*/disks/*disk*`. The format for the path specified in this value is
125
- # resource specific and is specified in the `testIamPermissions` documentation.
126
- # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
127
- # @param [String] fields
128
- # Selector specifying which fields to include in a partial response.
130
+ # REQUIRED: The resource for which the policy is being requested.
131
+ # See the operation documentation for the appropriate value for this field.
129
132
  # @param [String] quota_user
130
133
  # Available to use for quota purposes for server-side applications. Can be any
131
134
  # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
132
137
  # @param [Google::Apis::RequestOptions] options
133
138
  # Request-specific options
134
139
  #
135
140
  # @yield [result, err] Result & error if block supplied
136
- # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object
141
+ # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
137
142
  # @yieldparam err [StandardError] error object if request failed
138
143
  #
139
- # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse]
144
+ # @return [Google::Apis::PubsubV1::Policy]
140
145
  #
141
146
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
142
147
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
143
148
  # @raise [Google::Apis::AuthorizationError] Authorization is required
144
- def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
145
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
146
- command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
147
- command.request_object = test_iam_permissions_request_object
148
- command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
149
- command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
149
+ def get_project_subscription_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block)
150
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
151
+ command.response_representation = Google::Apis::PubsubV1::Policy::Representation
152
+ command.response_class = Google::Apis::PubsubV1::Policy
150
153
  command.params['resource'] = resource unless resource.nil?
151
- command.query['fields'] = fields unless fields.nil?
152
154
  command.query['quotaUser'] = quota_user unless quota_user.nil?
155
+ command.query['fields'] = fields unless fields.nil?
153
156
  execute_or_queue_command(command, &block)
154
157
  end
155
158
 
156
- # Creates the given topic with the given name.
157
- # @param [String] name
158
- # The name of the topic. It must have the format `"projects/`project`/topics/`
159
- # topic`"`. ``topic`` must start with a letter, and contain only letters (`[A-Za-
160
- # z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
161
- # tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255
162
- # characters in length, and it must not start with `"goog"`.
163
- # @param [Google::Apis::PubsubV1::Topic] topic_object
164
- # @param [String] fields
165
- # Selector specifying which fields to include in a partial response.
159
+ # Gets the configuration details of a subscription.
160
+ # @param [String] subscription
161
+ # The name of the subscription to get.
162
+ # Format is `projects/`project`/subscriptions/`sub``.
166
163
  # @param [String] quota_user
167
164
  # Available to use for quota purposes for server-side applications. Can be any
168
165
  # arbitrary string assigned to a user, but should not exceed 40 characters.
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
169
168
  # @param [Google::Apis::RequestOptions] options
170
169
  # Request-specific options
171
170
  #
172
171
  # @yield [result, err] Result & error if block supplied
173
- # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
172
+ # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object
174
173
  # @yieldparam err [StandardError] error object if request failed
175
174
  #
176
- # @return [Google::Apis::PubsubV1::Topic]
175
+ # @return [Google::Apis::PubsubV1::Subscription]
177
176
  #
178
177
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
179
178
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
180
179
  # @raise [Google::Apis::AuthorizationError] Authorization is required
181
- def create_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block)
182
- command = make_simple_command(:put, 'v1/{+name}', options)
183
- command.request_representation = Google::Apis::PubsubV1::Topic::Representation
184
- command.request_object = topic_object
185
- command.response_representation = Google::Apis::PubsubV1::Topic::Representation
186
- command.response_class = Google::Apis::PubsubV1::Topic
187
- command.params['name'] = name unless name.nil?
188
- command.query['fields'] = fields unless fields.nil?
180
+ def get_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block)
181
+ command = make_simple_command(:get, 'v1/{+subscription}', options)
182
+ command.response_representation = Google::Apis::PubsubV1::Subscription::Representation
183
+ command.response_class = Google::Apis::PubsubV1::Subscription
184
+ command.params['subscription'] = subscription unless subscription.nil?
189
185
  command.query['quotaUser'] = quota_user unless quota_user.nil?
186
+ command.query['fields'] = fields unless fields.nil?
190
187
  execute_or_queue_command(command, &block)
191
188
  end
192
189
 
193
- # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does
194
- # not exist. The message payload must not be empty; it must contain either a non-
195
- # empty data field, or at least one attribute.
196
- # @param [String] topic
197
- # The messages in the request will be published on this topic.
198
- # @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object
199
- # @param [String] fields
200
- # Selector specifying which fields to include in a partial response.
190
+ # Returns permissions that a caller has on the specified resource.
191
+ # If the resource does not exist, this will return an empty set of
192
+ # permissions, not a NOT_FOUND error.
193
+ # Note: This operation is designed to be used for building permission-aware
194
+ # UIs and command-line tools, not for authorization checking. This operation
195
+ # may "fail open" without warning.
196
+ # @param [String] resource
197
+ # REQUIRED: The resource for which the policy detail is being requested.
198
+ # See the operation documentation for the appropriate value for this field.
199
+ # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
201
200
  # @param [String] quota_user
202
201
  # Available to use for quota purposes for server-side applications. Can be any
203
202
  # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
204
205
  # @param [Google::Apis::RequestOptions] options
205
206
  # Request-specific options
206
207
  #
207
208
  # @yield [result, err] Result & error if block supplied
208
- # @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object
209
+ # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object
209
210
  # @yieldparam err [StandardError] error object if request failed
210
211
  #
211
- # @return [Google::Apis::PubsubV1::PublishResponse]
212
+ # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse]
212
213
  #
213
214
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
214
215
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
215
216
  # @raise [Google::Apis::AuthorizationError] Authorization is required
216
- def publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
217
- command = make_simple_command(:post, 'v1/{+topic}:publish', options)
218
- command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation
219
- command.request_object = publish_request_object
220
- command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation
221
- command.response_class = Google::Apis::PubsubV1::PublishResponse
222
- command.params['topic'] = topic unless topic.nil?
223
- command.query['fields'] = fields unless fields.nil?
217
+ def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
218
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
219
+ command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
220
+ command.request_object = test_iam_permissions_request_object
221
+ command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
222
+ command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
223
+ command.params['resource'] = resource unless resource.nil?
224
224
  command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ command.query['fields'] = fields unless fields.nil?
225
226
  execute_or_queue_command(command, &block)
226
227
  end
227
228
 
228
- # Gets the configuration of a topic.
229
- # @param [String] topic
230
- # The name of the topic to get.
231
- # @param [String] fields
232
- # Selector specifying which fields to include in a partial response.
229
+ # Modifies the `PushConfig` for a specified subscription.
230
+ # This may be used to change a push subscription to a pull one (signified by
231
+ # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
232
+ # attributes of a push subscription. Messages will accumulate for delivery
233
+ # continuously through the call regardless of changes to the `PushConfig`.
234
+ # @param [String] subscription
235
+ # The name of the subscription.
236
+ # Format is `projects/`project`/subscriptions/`sub``.
237
+ # @param [Google::Apis::PubsubV1::ModifyPushConfigRequest] modify_push_config_request_object
233
238
  # @param [String] quota_user
234
239
  # Available to use for quota purposes for server-side applications. Can be any
235
240
  # arbitrary string assigned to a user, but should not exceed 40 characters.
241
+ # @param [String] fields
242
+ # Selector specifying which fields to include in a partial response.
236
243
  # @param [Google::Apis::RequestOptions] options
237
244
  # Request-specific options
238
245
  #
239
246
  # @yield [result, err] Result & error if block supplied
240
- # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
247
+ # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
241
248
  # @yieldparam err [StandardError] error object if request failed
242
249
  #
243
- # @return [Google::Apis::PubsubV1::Topic]
250
+ # @return [Google::Apis::PubsubV1::Empty]
244
251
  #
245
252
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
246
253
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
247
254
  # @raise [Google::Apis::AuthorizationError] Authorization is required
248
- def get_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
249
- command = make_simple_command(:get, 'v1/{+topic}', options)
250
- command.response_representation = Google::Apis::PubsubV1::Topic::Representation
251
- command.response_class = Google::Apis::PubsubV1::Topic
252
- command.params['topic'] = topic unless topic.nil?
253
- command.query['fields'] = fields unless fields.nil?
255
+ def modify_subscription_push_config(subscription, modify_push_config_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
256
+ command = make_simple_command(:post, 'v1/{+subscription}:modifyPushConfig', options)
257
+ command.request_representation = Google::Apis::PubsubV1::ModifyPushConfigRequest::Representation
258
+ command.request_object = modify_push_config_request_object
259
+ command.response_representation = Google::Apis::PubsubV1::Empty::Representation
260
+ command.response_class = Google::Apis::PubsubV1::Empty
261
+ command.params['subscription'] = subscription unless subscription.nil?
254
262
  command.query['quotaUser'] = quota_user unless quota_user.nil?
263
+ command.query['fields'] = fields unless fields.nil?
255
264
  execute_or_queue_command(command, &block)
256
265
  end
257
266
 
258
- # Lists matching topics.
259
- # @param [String] project
260
- # The name of the cloud project that topics belong to.
261
- # @param [Fixnum] page_size
262
- # Maximum number of topics to return.
263
- # @param [String] page_token
264
- # The value returned by the last `ListTopicsResponse`; indicates that this is a
265
- # continuation of a prior `ListTopics` call, and that the system should return
266
- # the next page of data.
267
- # @param [String] fields
268
- # Selector specifying which fields to include in a partial response.
267
+ # Deletes an existing subscription. All messages retained in the subscription
268
+ # are immediately dropped. Calls to `Pull` after deletion will return
269
+ # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
270
+ # the same name, but the new one has no association with the old
271
+ # subscription or its topic unless the same topic is specified.
272
+ # @param [String] subscription
273
+ # The subscription to delete.
274
+ # Format is `projects/`project`/subscriptions/`sub``.
269
275
  # @param [String] quota_user
270
276
  # Available to use for quota purposes for server-side applications. Can be any
271
277
  # arbitrary string assigned to a user, but should not exceed 40 characters.
278
+ # @param [String] fields
279
+ # Selector specifying which fields to include in a partial response.
272
280
  # @param [Google::Apis::RequestOptions] options
273
281
  # Request-specific options
274
282
  #
275
283
  # @yield [result, err] Result & error if block supplied
276
- # @yieldparam result [Google::Apis::PubsubV1::ListTopicsResponse] parsed result object
284
+ # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
277
285
  # @yieldparam err [StandardError] error object if request failed
278
286
  #
279
- # @return [Google::Apis::PubsubV1::ListTopicsResponse]
287
+ # @return [Google::Apis::PubsubV1::Empty]
280
288
  #
281
289
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
282
290
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
283
291
  # @raise [Google::Apis::AuthorizationError] Authorization is required
284
- def list_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
285
- command = make_simple_command(:get, 'v1/{+project}/topics', options)
286
- command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation
287
- command.response_class = Google::Apis::PubsubV1::ListTopicsResponse
288
- command.params['project'] = project unless project.nil?
289
- command.query['pageSize'] = page_size unless page_size.nil?
290
- command.query['pageToken'] = page_token unless page_token.nil?
291
- command.query['fields'] = fields unless fields.nil?
292
+ def delete_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block)
293
+ command = make_simple_command(:delete, 'v1/{+subscription}', options)
294
+ command.response_representation = Google::Apis::PubsubV1::Empty::Representation
295
+ command.response_class = Google::Apis::PubsubV1::Empty
296
+ command.params['subscription'] = subscription unless subscription.nil?
292
297
  command.query['quotaUser'] = quota_user unless quota_user.nil?
298
+ command.query['fields'] = fields unless fields.nil?
293
299
  execute_or_queue_command(command, &block)
294
300
  end
295
301
 
296
- # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does
297
- # not exist. After a topic is deleted, a new topic may be created with the same
298
- # name; this is an entirely new topic with none of the old configuration or
299
- # subscriptions. Existing subscriptions to this topic are not deleted, but their
300
- # `topic` field is set to `_deleted-topic_`.
301
- # @param [String] topic
302
- # Name of the topic to delete.
303
- # @param [String] fields
304
- # Selector specifying which fields to include in a partial response.
302
+ # Pulls messages from the server. Returns an empty list if there are no
303
+ # messages available in the backlog. The server may return `UNAVAILABLE` if
304
+ # there are too many concurrent pull requests pending for the given
305
+ # subscription.
306
+ # @param [String] subscription
307
+ # The subscription from which messages should be pulled.
308
+ # Format is `projects/`project`/subscriptions/`sub``.
309
+ # @param [Google::Apis::PubsubV1::PullRequest] pull_request_object
305
310
  # @param [String] quota_user
306
311
  # Available to use for quota purposes for server-side applications. Can be any
307
312
  # arbitrary string assigned to a user, but should not exceed 40 characters.
313
+ # @param [String] fields
314
+ # Selector specifying which fields to include in a partial response.
308
315
  # @param [Google::Apis::RequestOptions] options
309
316
  # Request-specific options
310
317
  #
311
318
  # @yield [result, err] Result & error if block supplied
312
- # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
319
+ # @yieldparam result [Google::Apis::PubsubV1::PullResponse] parsed result object
313
320
  # @yieldparam err [StandardError] error object if request failed
314
321
  #
315
- # @return [Google::Apis::PubsubV1::Empty]
322
+ # @return [Google::Apis::PubsubV1::PullResponse]
316
323
  #
317
324
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
325
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
326
  # @raise [Google::Apis::AuthorizationError] Authorization is required
320
- def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
321
- command = make_simple_command(:delete, 'v1/{+topic}', options)
322
- command.response_representation = Google::Apis::PubsubV1::Empty::Representation
323
- command.response_class = Google::Apis::PubsubV1::Empty
324
- command.params['topic'] = topic unless topic.nil?
325
- command.query['fields'] = fields unless fields.nil?
327
+ def pull_subscription(subscription, pull_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
328
+ command = make_simple_command(:post, 'v1/{+subscription}:pull', options)
329
+ command.request_representation = Google::Apis::PubsubV1::PullRequest::Representation
330
+ command.request_object = pull_request_object
331
+ command.response_representation = Google::Apis::PubsubV1::PullResponse::Representation
332
+ command.response_class = Google::Apis::PubsubV1::PullResponse
333
+ command.params['subscription'] = subscription unless subscription.nil?
326
334
  command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ command.query['fields'] = fields unless fields.nil?
327
336
  execute_or_queue_command(command, &block)
328
337
  end
329
338
 
330
- # Lists the name of the subscriptions for this topic.
331
- # @param [String] topic
332
- # The name of the topic that subscriptions are attached to.
333
- # @param [Fixnum] page_size
334
- # Maximum number of subscription names to return.
339
+ # Lists matching subscriptions.
340
+ # @param [String] project
341
+ # The name of the cloud project that subscriptions belong to.
342
+ # Format is `projects/`project``.
335
343
  # @param [String] page_token
336
- # The value returned by the last `ListTopicSubscriptionsResponse`; indicates
337
- # that this is a continuation of a prior `ListTopicSubscriptions` call, and that
338
- # the system should return the next page of data.
339
- # @param [String] fields
340
- # Selector specifying which fields to include in a partial response.
344
+ # The value returned by the last `ListSubscriptionsResponse`; indicates that
345
+ # this is a continuation of a prior `ListSubscriptions` call, and that the
346
+ # system should return the next page of data.
347
+ # @param [Fixnum] page_size
348
+ # Maximum number of subscriptions to return.
341
349
  # @param [String] quota_user
342
350
  # Available to use for quota purposes for server-side applications. Can be any
343
351
  # arbitrary string assigned to a user, but should not exceed 40 characters.
352
+ # @param [String] fields
353
+ # Selector specifying which fields to include in a partial response.
344
354
  # @param [Google::Apis::RequestOptions] options
345
355
  # Request-specific options
346
356
  #
347
357
  # @yield [result, err] Result & error if block supplied
348
- # @yieldparam result [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] parsed result object
358
+ # @yieldparam result [Google::Apis::PubsubV1::ListSubscriptionsResponse] parsed result object
349
359
  # @yieldparam err [StandardError] error object if request failed
350
360
  #
351
- # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse]
361
+ # @return [Google::Apis::PubsubV1::ListSubscriptionsResponse]
352
362
  #
353
363
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
354
364
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
355
365
  # @raise [Google::Apis::AuthorizationError] Authorization is required
356
- def list_topic_subscriptions(topic, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
357
- command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options)
358
- command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation
359
- command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse
360
- command.params['topic'] = topic unless topic.nil?
361
- command.query['pageSize'] = page_size unless page_size.nil?
366
+ def list_subscriptions(project, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
367
+ command = make_simple_command(:get, 'v1/{+project}/subscriptions', options)
368
+ command.response_representation = Google::Apis::PubsubV1::ListSubscriptionsResponse::Representation
369
+ command.response_class = Google::Apis::PubsubV1::ListSubscriptionsResponse
370
+ command.params['project'] = project unless project.nil?
362
371
  command.query['pageToken'] = page_token unless page_token.nil?
363
- command.query['fields'] = fields unless fields.nil?
372
+ command.query['pageSize'] = page_size unless page_size.nil?
364
373
  command.query['quotaUser'] = quota_user unless quota_user.nil?
374
+ command.query['fields'] = fields unless fields.nil?
365
375
  execute_or_queue_command(command, &block)
366
376
  end
367
377
 
368
378
  # Sets the access control policy on the specified resource. Replaces any
369
379
  # existing policy.
370
380
  # @param [String] resource
371
- # REQUIRED: The resource for which the policy is being specified. `resource` is
372
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
373
- # disk*`. The format for the path specified in this value is resource specific
374
- # and is specified in the `setIamPolicy` documentation.
381
+ # REQUIRED: The resource for which the policy is being specified.
382
+ # See the operation documentation for the appropriate value for this field.
375
383
  # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
376
- # @param [String] fields
377
- # Selector specifying which fields to include in a partial response.
378
384
  # @param [String] quota_user
379
385
  # Available to use for quota purposes for server-side applications. Can be any
380
386
  # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [String] fields
388
+ # Selector specifying which fields to include in a partial response.
381
389
  # @param [Google::Apis::RequestOptions] options
382
390
  # Request-specific options
383
391
  #
@@ -390,64 +398,114 @@ module Google
390
398
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
391
399
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
392
400
  # @raise [Google::Apis::AuthorizationError] Authorization is required
393
- def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
401
+ def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
394
402
  command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
395
403
  command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
396
404
  command.request_object = set_iam_policy_request_object
397
405
  command.response_representation = Google::Apis::PubsubV1::Policy::Representation
398
406
  command.response_class = Google::Apis::PubsubV1::Policy
399
407
  command.params['resource'] = resource unless resource.nil?
400
- command.query['fields'] = fields unless fields.nil?
401
408
  command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ command.query['fields'] = fields unless fields.nil?
402
410
  execute_or_queue_command(command, &block)
403
411
  end
404
412
 
405
- # Gets the access control policy for a `resource`. Returns an empty policy if
406
- # the resource exists and does not have a policy set.
407
- # @param [String] resource
408
- # REQUIRED: The resource for which the policy is being requested. `resource` is
409
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
410
- # disk*`. The format for the path specified in this value is resource specific
411
- # and is specified in the `getIamPolicy` documentation.
412
- # @param [String] fields
413
- # Selector specifying which fields to include in a partial response.
413
+ # Creates a subscription to a given topic.
414
+ # If the subscription already exists, returns `ALREADY_EXISTS`.
415
+ # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
416
+ # If the name is not provided in the request, the server will assign a random
417
+ # name for this subscription on the same project as the topic, conforming
418
+ # to the
419
+ # [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
420
+ # The generated name is populated in the returned Subscription object.
421
+ # Note that for REST API requests, you must specify a name in the request.
422
+ # @param [String] name
423
+ # The name of the subscription. It must have the format
424
+ # `"projects/`project`/subscriptions/`subscription`"`. ``subscription`` must
425
+ # start with a letter, and contain only letters (`[A-Za-z]`), numbers
426
+ # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
427
+ # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
428
+ # in length, and it must not start with `"goog"`.
429
+ # @param [Google::Apis::PubsubV1::Subscription] subscription_object
414
430
  # @param [String] quota_user
415
431
  # Available to use for quota purposes for server-side applications. Can be any
416
432
  # arbitrary string assigned to a user, but should not exceed 40 characters.
433
+ # @param [String] fields
434
+ # Selector specifying which fields to include in a partial response.
417
435
  # @param [Google::Apis::RequestOptions] options
418
436
  # Request-specific options
419
437
  #
420
438
  # @yield [result, err] Result & error if block supplied
421
- # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
439
+ # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object
422
440
  # @yieldparam err [StandardError] error object if request failed
423
441
  #
424
- # @return [Google::Apis::PubsubV1::Policy]
442
+ # @return [Google::Apis::PubsubV1::Subscription]
425
443
  #
426
444
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
427
445
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
428
446
  # @raise [Google::Apis::AuthorizationError] Authorization is required
429
- def get_project_subscription_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
430
- command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
447
+ def create_subscription(name, subscription_object = nil, quota_user: nil, fields: nil, options: nil, &block)
448
+ command = make_simple_command(:put, 'v1/{+name}', options)
449
+ command.request_representation = Google::Apis::PubsubV1::Subscription::Representation
450
+ command.request_object = subscription_object
451
+ command.response_representation = Google::Apis::PubsubV1::Subscription::Representation
452
+ command.response_class = Google::Apis::PubsubV1::Subscription
453
+ command.params['name'] = name unless name.nil?
454
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
455
+ command.query['fields'] = fields unless fields.nil?
456
+ execute_or_queue_command(command, &block)
457
+ end
458
+
459
+ # Sets the access control policy on the specified resource. Replaces any
460
+ # existing policy.
461
+ # @param [String] resource
462
+ # REQUIRED: The resource for which the policy is being specified.
463
+ # See the operation documentation for the appropriate value for this field.
464
+ # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
465
+ # @param [String] quota_user
466
+ # Available to use for quota purposes for server-side applications. Can be any
467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
468
+ # @param [String] fields
469
+ # Selector specifying which fields to include in a partial response.
470
+ # @param [Google::Apis::RequestOptions] options
471
+ # Request-specific options
472
+ #
473
+ # @yield [result, err] Result & error if block supplied
474
+ # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
475
+ # @yieldparam err [StandardError] error object if request failed
476
+ #
477
+ # @return [Google::Apis::PubsubV1::Policy]
478
+ #
479
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
482
+ def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
483
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
484
+ command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
485
+ command.request_object = set_iam_policy_request_object
431
486
  command.response_representation = Google::Apis::PubsubV1::Policy::Representation
432
487
  command.response_class = Google::Apis::PubsubV1::Policy
433
488
  command.params['resource'] = resource unless resource.nil?
434
- command.query['fields'] = fields unless fields.nil?
435
489
  command.query['quotaUser'] = quota_user unless quota_user.nil?
490
+ command.query['fields'] = fields unless fields.nil?
436
491
  execute_or_queue_command(command, &block)
437
492
  end
438
493
 
439
494
  # Returns permissions that a caller has on the specified resource.
495
+ # If the resource does not exist, this will return an empty set of
496
+ # permissions, not a NOT_FOUND error.
497
+ # Note: This operation is designed to be used for building permission-aware
498
+ # UIs and command-line tools, not for authorization checking. This operation
499
+ # may "fail open" without warning.
440
500
  # @param [String] resource
441
- # REQUIRED: The resource for which the policy detail is being requested. `
442
- # resource` is usually specified as a path, such as `projects/*project*/zones/*
443
- # zone*/disks/*disk*`. The format for the path specified in this value is
444
- # resource specific and is specified in the `testIamPermissions` documentation.
501
+ # REQUIRED: The resource for which the policy detail is being requested.
502
+ # See the operation documentation for the appropriate value for this field.
445
503
  # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
446
- # @param [String] fields
447
- # Selector specifying which fields to include in a partial response.
448
504
  # @param [String] quota_user
449
505
  # Available to use for quota purposes for server-side applications. Can be any
450
506
  # arbitrary string assigned to a user, but should not exceed 40 characters.
507
+ # @param [String] fields
508
+ # Selector specifying which fields to include in a partial response.
451
509
  # @param [Google::Apis::RequestOptions] options
452
510
  # Request-specific options
453
511
  #
@@ -460,302 +518,373 @@ module Google
460
518
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
461
519
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
462
520
  # @raise [Google::Apis::AuthorizationError] Authorization is required
463
- def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
521
+ def test_snapshot_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
464
522
  command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
465
523
  command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
466
524
  command.request_object = test_iam_permissions_request_object
467
525
  command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
468
526
  command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
469
527
  command.params['resource'] = resource unless resource.nil?
470
- command.query['fields'] = fields unless fields.nil?
471
528
  command.query['quotaUser'] = quota_user unless quota_user.nil?
529
+ command.query['fields'] = fields unless fields.nil?
472
530
  execute_or_queue_command(command, &block)
473
531
  end
474
532
 
475
- # Creates a subscription to a given topic. If the subscription already exists,
476
- # returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `
477
- # NOT_FOUND`. If the name is not provided in the request, the server will assign
478
- # a random name for this subscription on the same project as the topic.
479
- # @param [String] name
480
- # The name of the subscription. It must have the format `"projects/`project`/
481
- # subscriptions/`subscription`"`. ``subscription`` must start with a letter, and
482
- # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
483
- # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%
484
- # `). It must be between 3 and 255 characters in length, and it must not start
485
- # with `"goog"`.
486
- # @param [Google::Apis::PubsubV1::Subscription] subscription_object
487
- # @param [String] fields
488
- # Selector specifying which fields to include in a partial response.
533
+ # Gets the access control policy for a resource.
534
+ # Returns an empty policy if the resource exists and does not have a policy
535
+ # set.
536
+ # @param [String] resource
537
+ # REQUIRED: The resource for which the policy is being requested.
538
+ # See the operation documentation for the appropriate value for this field.
489
539
  # @param [String] quota_user
490
540
  # Available to use for quota purposes for server-side applications. Can be any
491
541
  # arbitrary string assigned to a user, but should not exceed 40 characters.
542
+ # @param [String] fields
543
+ # Selector specifying which fields to include in a partial response.
492
544
  # @param [Google::Apis::RequestOptions] options
493
545
  # Request-specific options
494
546
  #
495
547
  # @yield [result, err] Result & error if block supplied
496
- # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object
548
+ # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
497
549
  # @yieldparam err [StandardError] error object if request failed
498
550
  #
499
- # @return [Google::Apis::PubsubV1::Subscription]
551
+ # @return [Google::Apis::PubsubV1::Policy]
500
552
  #
501
553
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
502
554
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
503
555
  # @raise [Google::Apis::AuthorizationError] Authorization is required
504
- def create_subscription(name, subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block)
505
- command = make_simple_command(:put, 'v1/{+name}', options)
506
- command.request_representation = Google::Apis::PubsubV1::Subscription::Representation
507
- command.request_object = subscription_object
508
- command.response_representation = Google::Apis::PubsubV1::Subscription::Representation
509
- command.response_class = Google::Apis::PubsubV1::Subscription
510
- command.params['name'] = name unless name.nil?
511
- command.query['fields'] = fields unless fields.nil?
556
+ def get_project_snapshot_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block)
557
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
558
+ command.response_representation = Google::Apis::PubsubV1::Policy::Representation
559
+ command.response_class = Google::Apis::PubsubV1::Policy
560
+ command.params['resource'] = resource unless resource.nil?
512
561
  command.query['quotaUser'] = quota_user unless quota_user.nil?
562
+ command.query['fields'] = fields unless fields.nil?
513
563
  execute_or_queue_command(command, &block)
514
564
  end
515
565
 
516
- # Gets the configuration details of a subscription.
517
- # @param [String] subscription
518
- # The name of the subscription to get.
519
- # @param [String] fields
520
- # Selector specifying which fields to include in a partial response.
566
+ # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
567
+ # does not exist. After a topic is deleted, a new topic may be created with
568
+ # the same name; this is an entirely new topic with none of the old
569
+ # configuration or subscriptions. Existing subscriptions to this topic are
570
+ # not deleted, but their `topic` field is set to `_deleted-topic_`.
571
+ # @param [String] topic
572
+ # Name of the topic to delete.
573
+ # Format is `projects/`project`/topics/`topic``.
521
574
  # @param [String] quota_user
522
575
  # Available to use for quota purposes for server-side applications. Can be any
523
576
  # arbitrary string assigned to a user, but should not exceed 40 characters.
577
+ # @param [String] fields
578
+ # Selector specifying which fields to include in a partial response.
524
579
  # @param [Google::Apis::RequestOptions] options
525
580
  # Request-specific options
526
581
  #
527
582
  # @yield [result, err] Result & error if block supplied
528
- # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object
583
+ # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
529
584
  # @yieldparam err [StandardError] error object if request failed
530
585
  #
531
- # @return [Google::Apis::PubsubV1::Subscription]
586
+ # @return [Google::Apis::PubsubV1::Empty]
532
587
  #
533
588
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
534
589
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
535
590
  # @raise [Google::Apis::AuthorizationError] Authorization is required
536
- def get_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block)
537
- command = make_simple_command(:get, 'v1/{+subscription}', options)
538
- command.response_representation = Google::Apis::PubsubV1::Subscription::Representation
539
- command.response_class = Google::Apis::PubsubV1::Subscription
540
- command.params['subscription'] = subscription unless subscription.nil?
541
- command.query['fields'] = fields unless fields.nil?
591
+ def delete_topic(topic, quota_user: nil, fields: nil, options: nil, &block)
592
+ command = make_simple_command(:delete, 'v1/{+topic}', options)
593
+ command.response_representation = Google::Apis::PubsubV1::Empty::Representation
594
+ command.response_class = Google::Apis::PubsubV1::Empty
595
+ command.params['topic'] = topic unless topic.nil?
542
596
  command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ command.query['fields'] = fields unless fields.nil?
543
598
  execute_or_queue_command(command, &block)
544
599
  end
545
600
 
546
- # Lists matching subscriptions.
601
+ # Lists matching topics.
547
602
  # @param [String] project
548
- # The name of the cloud project that subscriptions belong to.
549
- # @param [Fixnum] page_size
550
- # Maximum number of subscriptions to return.
603
+ # The name of the cloud project that topics belong to.
604
+ # Format is `projects/`project``.
551
605
  # @param [String] page_token
552
- # The value returned by the last `ListSubscriptionsResponse`; indicates that
553
- # this is a continuation of a prior `ListSubscriptions` call, and that the
554
- # system should return the next page of data.
555
- # @param [String] fields
556
- # Selector specifying which fields to include in a partial response.
606
+ # The value returned by the last `ListTopicsResponse`; indicates that this is
607
+ # a continuation of a prior `ListTopics` call, and that the system should
608
+ # return the next page of data.
609
+ # @param [Fixnum] page_size
610
+ # Maximum number of topics to return.
557
611
  # @param [String] quota_user
558
612
  # Available to use for quota purposes for server-side applications. Can be any
559
613
  # arbitrary string assigned to a user, but should not exceed 40 characters.
614
+ # @param [String] fields
615
+ # Selector specifying which fields to include in a partial response.
560
616
  # @param [Google::Apis::RequestOptions] options
561
617
  # Request-specific options
562
618
  #
563
619
  # @yield [result, err] Result & error if block supplied
564
- # @yieldparam result [Google::Apis::PubsubV1::ListSubscriptionsResponse] parsed result object
620
+ # @yieldparam result [Google::Apis::PubsubV1::ListTopicsResponse] parsed result object
565
621
  # @yieldparam err [StandardError] error object if request failed
566
622
  #
567
- # @return [Google::Apis::PubsubV1::ListSubscriptionsResponse]
623
+ # @return [Google::Apis::PubsubV1::ListTopicsResponse]
568
624
  #
569
625
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
570
626
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
571
627
  # @raise [Google::Apis::AuthorizationError] Authorization is required
572
- def list_subscriptions(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
573
- command = make_simple_command(:get, 'v1/{+project}/subscriptions', options)
574
- command.response_representation = Google::Apis::PubsubV1::ListSubscriptionsResponse::Representation
575
- command.response_class = Google::Apis::PubsubV1::ListSubscriptionsResponse
628
+ def list_topics(project, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
629
+ command = make_simple_command(:get, 'v1/{+project}/topics', options)
630
+ command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation
631
+ command.response_class = Google::Apis::PubsubV1::ListTopicsResponse
576
632
  command.params['project'] = project unless project.nil?
577
- command.query['pageSize'] = page_size unless page_size.nil?
578
633
  command.query['pageToken'] = page_token unless page_token.nil?
579
- command.query['fields'] = fields unless fields.nil?
634
+ command.query['pageSize'] = page_size unless page_size.nil?
580
635
  command.query['quotaUser'] = quota_user unless quota_user.nil?
636
+ command.query['fields'] = fields unless fields.nil?
581
637
  execute_or_queue_command(command, &block)
582
638
  end
583
639
 
584
- # Deletes an existing subscription. All pending messages in the subscription are
585
- # immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`.
586
- # After a subscription is deleted, a new one may be created with the same name,
587
- # but the new one has no association with the old subscription, or its topic
588
- # unless the same topic is specified.
589
- # @param [String] subscription
590
- # The subscription to delete.
591
- # @param [String] fields
592
- # Selector specifying which fields to include in a partial response.
640
+ # Sets the access control policy on the specified resource. Replaces any
641
+ # existing policy.
642
+ # @param [String] resource
643
+ # REQUIRED: The resource for which the policy is being specified.
644
+ # See the operation documentation for the appropriate value for this field.
645
+ # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object
593
646
  # @param [String] quota_user
594
647
  # Available to use for quota purposes for server-side applications. Can be any
595
648
  # arbitrary string assigned to a user, but should not exceed 40 characters.
649
+ # @param [String] fields
650
+ # Selector specifying which fields to include in a partial response.
596
651
  # @param [Google::Apis::RequestOptions] options
597
652
  # Request-specific options
598
653
  #
599
654
  # @yield [result, err] Result & error if block supplied
600
- # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
655
+ # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
601
656
  # @yieldparam err [StandardError] error object if request failed
602
657
  #
603
- # @return [Google::Apis::PubsubV1::Empty]
658
+ # @return [Google::Apis::PubsubV1::Policy]
604
659
  #
605
660
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
661
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
662
  # @raise [Google::Apis::AuthorizationError] Authorization is required
608
- def delete_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block)
609
- command = make_simple_command(:delete, 'v1/{+subscription}', options)
610
- command.response_representation = Google::Apis::PubsubV1::Empty::Representation
611
- command.response_class = Google::Apis::PubsubV1::Empty
612
- command.params['subscription'] = subscription unless subscription.nil?
613
- command.query['fields'] = fields unless fields.nil?
663
+ def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
664
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
665
+ command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation
666
+ command.request_object = set_iam_policy_request_object
667
+ command.response_representation = Google::Apis::PubsubV1::Policy::Representation
668
+ command.response_class = Google::Apis::PubsubV1::Policy
669
+ command.params['resource'] = resource unless resource.nil?
614
670
  command.query['quotaUser'] = quota_user unless quota_user.nil?
671
+ command.query['fields'] = fields unless fields.nil?
615
672
  execute_or_queue_command(command, &block)
616
673
  end
617
674
 
618
- # Modifies the ack deadline for a specific message. This method is useful to
619
- # indicate that more time is needed to process a message by the subscriber, or
620
- # to make the message available for redelivery if the processing was interrupted.
621
- # @param [String] subscription
622
- # The name of the subscription.
623
- # @param [Google::Apis::PubsubV1::ModifyAckDeadlineRequest] modify_ack_deadline_request_object
624
- # @param [String] fields
625
- # Selector specifying which fields to include in a partial response.
675
+ # Creates the given topic with the given name.
676
+ # @param [String] name
677
+ # The name of the topic. It must have the format
678
+ # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter,
679
+ # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
680
+ # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
681
+ # signs (`%`). It must be between 3 and 255 characters in length, and it
682
+ # must not start with `"goog"`.
683
+ # @param [Google::Apis::PubsubV1::Topic] topic_object
626
684
  # @param [String] quota_user
627
685
  # Available to use for quota purposes for server-side applications. Can be any
628
686
  # arbitrary string assigned to a user, but should not exceed 40 characters.
687
+ # @param [String] fields
688
+ # Selector specifying which fields to include in a partial response.
629
689
  # @param [Google::Apis::RequestOptions] options
630
690
  # Request-specific options
631
691
  #
632
692
  # @yield [result, err] Result & error if block supplied
633
- # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
693
+ # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
634
694
  # @yieldparam err [StandardError] error object if request failed
635
695
  #
636
- # @return [Google::Apis::PubsubV1::Empty]
696
+ # @return [Google::Apis::PubsubV1::Topic]
637
697
  #
638
698
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
639
699
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
640
700
  # @raise [Google::Apis::AuthorizationError] Authorization is required
641
- def modify_subscription_ack_deadline(subscription, modify_ack_deadline_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
642
- command = make_simple_command(:post, 'v1/{+subscription}:modifyAckDeadline', options)
643
- command.request_representation = Google::Apis::PubsubV1::ModifyAckDeadlineRequest::Representation
644
- command.request_object = modify_ack_deadline_request_object
645
- command.response_representation = Google::Apis::PubsubV1::Empty::Representation
646
- command.response_class = Google::Apis::PubsubV1::Empty
647
- command.params['subscription'] = subscription unless subscription.nil?
648
- command.query['fields'] = fields unless fields.nil?
701
+ def create_topic(name, topic_object = nil, quota_user: nil, fields: nil, options: nil, &block)
702
+ command = make_simple_command(:put, 'v1/{+name}', options)
703
+ command.request_representation = Google::Apis::PubsubV1::Topic::Representation
704
+ command.request_object = topic_object
705
+ command.response_representation = Google::Apis::PubsubV1::Topic::Representation
706
+ command.response_class = Google::Apis::PubsubV1::Topic
707
+ command.params['name'] = name unless name.nil?
649
708
  command.query['quotaUser'] = quota_user unless quota_user.nil?
709
+ command.query['fields'] = fields unless fields.nil?
650
710
  execute_or_queue_command(command, &block)
651
711
  end
652
712
 
653
- # Acknowledges the messages associated with the `ack_ids` in the `
654
- # AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from
655
- # the subscription. Acknowledging a message whose ack deadline has expired may
656
- # succeed, but such a message may be redelivered later. Acknowledging a message
657
- # more than once will not result in an error.
658
- # @param [String] subscription
659
- # The subscription whose message is being acknowledged.
660
- # @param [Google::Apis::PubsubV1::AcknowledgeRequest] acknowledge_request_object
661
- # @param [String] fields
662
- # Selector specifying which fields to include in a partial response.
713
+ # Gets the access control policy for a resource.
714
+ # Returns an empty policy if the resource exists and does not have a policy
715
+ # set.
716
+ # @param [String] resource
717
+ # REQUIRED: The resource for which the policy is being requested.
718
+ # See the operation documentation for the appropriate value for this field.
663
719
  # @param [String] quota_user
664
720
  # Available to use for quota purposes for server-side applications. Can be any
665
721
  # arbitrary string assigned to a user, but should not exceed 40 characters.
722
+ # @param [String] fields
723
+ # Selector specifying which fields to include in a partial response.
666
724
  # @param [Google::Apis::RequestOptions] options
667
725
  # Request-specific options
668
726
  #
669
727
  # @yield [result, err] Result & error if block supplied
670
- # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
728
+ # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object
671
729
  # @yieldparam err [StandardError] error object if request failed
672
730
  #
673
- # @return [Google::Apis::PubsubV1::Empty]
731
+ # @return [Google::Apis::PubsubV1::Policy]
674
732
  #
675
733
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
676
734
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
677
735
  # @raise [Google::Apis::AuthorizationError] Authorization is required
678
- def acknowledge_subscription(subscription, acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
679
- command = make_simple_command(:post, 'v1/{+subscription}:acknowledge', options)
680
- command.request_representation = Google::Apis::PubsubV1::AcknowledgeRequest::Representation
681
- command.request_object = acknowledge_request_object
682
- command.response_representation = Google::Apis::PubsubV1::Empty::Representation
683
- command.response_class = Google::Apis::PubsubV1::Empty
684
- command.params['subscription'] = subscription unless subscription.nil?
685
- command.query['fields'] = fields unless fields.nil?
736
+ def get_project_topic_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block)
737
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
738
+ command.response_representation = Google::Apis::PubsubV1::Policy::Representation
739
+ command.response_class = Google::Apis::PubsubV1::Policy
740
+ command.params['resource'] = resource unless resource.nil?
686
741
  command.query['quotaUser'] = quota_user unless quota_user.nil?
742
+ command.query['fields'] = fields unless fields.nil?
687
743
  execute_or_queue_command(command, &block)
688
744
  end
689
745
 
690
- # Pulls messages from the server. Returns an empty list if there are no messages
691
- # available in the backlog. The server may return `UNAVAILABLE` if there are too
692
- # many concurrent pull requests pending for the given subscription.
693
- # @param [String] subscription
694
- # The subscription from which messages should be pulled.
695
- # @param [Google::Apis::PubsubV1::PullRequest] pull_request_object
746
+ # Gets the configuration of a topic.
747
+ # @param [String] topic
748
+ # The name of the topic to get.
749
+ # Format is `projects/`project`/topics/`topic``.
750
+ # @param [String] quota_user
751
+ # Available to use for quota purposes for server-side applications. Can be any
752
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
696
753
  # @param [String] fields
697
754
  # Selector specifying which fields to include in a partial response.
755
+ # @param [Google::Apis::RequestOptions] options
756
+ # Request-specific options
757
+ #
758
+ # @yield [result, err] Result & error if block supplied
759
+ # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object
760
+ # @yieldparam err [StandardError] error object if request failed
761
+ #
762
+ # @return [Google::Apis::PubsubV1::Topic]
763
+ #
764
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
765
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
766
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
767
+ def get_topic(topic, quota_user: nil, fields: nil, options: nil, &block)
768
+ command = make_simple_command(:get, 'v1/{+topic}', options)
769
+ command.response_representation = Google::Apis::PubsubV1::Topic::Representation
770
+ command.response_class = Google::Apis::PubsubV1::Topic
771
+ command.params['topic'] = topic unless topic.nil?
772
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
773
+ command.query['fields'] = fields unless fields.nil?
774
+ execute_or_queue_command(command, &block)
775
+ end
776
+
777
+ # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
778
+ # does not exist. The message payload must not be empty; it must contain
779
+ # either a non-empty data field, or at least one attribute.
780
+ # @param [String] topic
781
+ # The messages in the request will be published on this topic.
782
+ # Format is `projects/`project`/topics/`topic``.
783
+ # @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object
698
784
  # @param [String] quota_user
699
785
  # Available to use for quota purposes for server-side applications. Can be any
700
786
  # arbitrary string assigned to a user, but should not exceed 40 characters.
787
+ # @param [String] fields
788
+ # Selector specifying which fields to include in a partial response.
701
789
  # @param [Google::Apis::RequestOptions] options
702
790
  # Request-specific options
703
791
  #
704
792
  # @yield [result, err] Result & error if block supplied
705
- # @yieldparam result [Google::Apis::PubsubV1::PullResponse] parsed result object
793
+ # @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object
706
794
  # @yieldparam err [StandardError] error object if request failed
707
795
  #
708
- # @return [Google::Apis::PubsubV1::PullResponse]
796
+ # @return [Google::Apis::PubsubV1::PublishResponse]
709
797
  #
710
798
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
799
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
800
  # @raise [Google::Apis::AuthorizationError] Authorization is required
713
- def pull_subscription(subscription, pull_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
714
- command = make_simple_command(:post, 'v1/{+subscription}:pull', options)
715
- command.request_representation = Google::Apis::PubsubV1::PullRequest::Representation
716
- command.request_object = pull_request_object
717
- command.response_representation = Google::Apis::PubsubV1::PullResponse::Representation
718
- command.response_class = Google::Apis::PubsubV1::PullResponse
719
- command.params['subscription'] = subscription unless subscription.nil?
720
- command.query['fields'] = fields unless fields.nil?
801
+ def publish_topic(topic, publish_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
802
+ command = make_simple_command(:post, 'v1/{+topic}:publish', options)
803
+ command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation
804
+ command.request_object = publish_request_object
805
+ command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation
806
+ command.response_class = Google::Apis::PubsubV1::PublishResponse
807
+ command.params['topic'] = topic unless topic.nil?
721
808
  command.query['quotaUser'] = quota_user unless quota_user.nil?
809
+ command.query['fields'] = fields unless fields.nil?
722
810
  execute_or_queue_command(command, &block)
723
811
  end
724
812
 
725
- # Modifies the `PushConfig` for a specified subscription. This may be used to
726
- # change a push subscription to a pull one (signified by an empty `PushConfig`)
727
- # or vice versa, or change the endpoint URL and other attributes of a push
728
- # subscription. Messages will accumulate for delivery continuously through the
729
- # call regardless of changes to the `PushConfig`.
730
- # @param [String] subscription
731
- # The name of the subscription.
732
- # @param [Google::Apis::PubsubV1::ModifyPushConfigRequest] modify_push_config_request_object
813
+ # Returns permissions that a caller has on the specified resource.
814
+ # If the resource does not exist, this will return an empty set of
815
+ # permissions, not a NOT_FOUND error.
816
+ # Note: This operation is designed to be used for building permission-aware
817
+ # UIs and command-line tools, not for authorization checking. This operation
818
+ # may "fail open" without warning.
819
+ # @param [String] resource
820
+ # REQUIRED: The resource for which the policy detail is being requested.
821
+ # See the operation documentation for the appropriate value for this field.
822
+ # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
823
+ # @param [String] quota_user
824
+ # Available to use for quota purposes for server-side applications. Can be any
825
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
733
826
  # @param [String] fields
734
827
  # Selector specifying which fields to include in a partial response.
828
+ # @param [Google::Apis::RequestOptions] options
829
+ # Request-specific options
830
+ #
831
+ # @yield [result, err] Result & error if block supplied
832
+ # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object
833
+ # @yieldparam err [StandardError] error object if request failed
834
+ #
835
+ # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse]
836
+ #
837
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
838
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
839
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
840
+ def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
841
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
842
+ command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation
843
+ command.request_object = test_iam_permissions_request_object
844
+ command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation
845
+ command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse
846
+ command.params['resource'] = resource unless resource.nil?
847
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
848
+ command.query['fields'] = fields unless fields.nil?
849
+ execute_or_queue_command(command, &block)
850
+ end
851
+
852
+ # Lists the name of the subscriptions for this topic.
853
+ # @param [String] topic
854
+ # The name of the topic that subscriptions are attached to.
855
+ # Format is `projects/`project`/topics/`topic``.
856
+ # @param [String] page_token
857
+ # The value returned by the last `ListTopicSubscriptionsResponse`; indicates
858
+ # that this is a continuation of a prior `ListTopicSubscriptions` call, and
859
+ # that the system should return the next page of data.
860
+ # @param [Fixnum] page_size
861
+ # Maximum number of subscription names to return.
735
862
  # @param [String] quota_user
736
863
  # Available to use for quota purposes for server-side applications. Can be any
737
864
  # arbitrary string assigned to a user, but should not exceed 40 characters.
865
+ # @param [String] fields
866
+ # Selector specifying which fields to include in a partial response.
738
867
  # @param [Google::Apis::RequestOptions] options
739
868
  # Request-specific options
740
869
  #
741
870
  # @yield [result, err] Result & error if block supplied
742
- # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
871
+ # @yieldparam result [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] parsed result object
743
872
  # @yieldparam err [StandardError] error object if request failed
744
873
  #
745
- # @return [Google::Apis::PubsubV1::Empty]
874
+ # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse]
746
875
  #
747
876
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
748
877
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
749
878
  # @raise [Google::Apis::AuthorizationError] Authorization is required
750
- def modify_subscription_push_config(subscription, modify_push_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
751
- command = make_simple_command(:post, 'v1/{+subscription}:modifyPushConfig', options)
752
- command.request_representation = Google::Apis::PubsubV1::ModifyPushConfigRequest::Representation
753
- command.request_object = modify_push_config_request_object
754
- command.response_representation = Google::Apis::PubsubV1::Empty::Representation
755
- command.response_class = Google::Apis::PubsubV1::Empty
756
- command.params['subscription'] = subscription unless subscription.nil?
757
- command.query['fields'] = fields unless fields.nil?
879
+ def list_topic_subscriptions(topic, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
880
+ command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options)
881
+ command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation
882
+ command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse
883
+ command.params['topic'] = topic unless topic.nil?
884
+ command.query['pageToken'] = page_token unless page_token.nil?
885
+ command.query['pageSize'] = page_size unless page_size.nil?
758
886
  command.query['quotaUser'] = quota_user unless quota_user.nil?
887
+ command.query['fields'] = fields unless fields.nil?
759
888
  execute_or_queue_command(command, &block)
760
889
  end
761
890