google-api-client 0.10.0 → 0.10.1

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