google-api-client 0.11.2 → 0.11.3

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