google-api-client 0.9.20 → 0.9.21

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