google-apis-pubsub_v1beta2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-pubsub_v1beta2.rb +15 -0
- data/lib/google/apis/pubsub_v1beta2.rb +39 -0
- data/lib/google/apis/pubsub_v1beta2/classes.rb +813 -0
- data/lib/google/apis/pubsub_v1beta2/gem_version.rb +28 -0
- data/lib/google/apis/pubsub_v1beta2/representations.rb +358 -0
- data/lib/google/apis/pubsub_v1beta2/service.rb +793 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module PubsubV1beta2
|
18
|
+
# Version of the google-apis-pubsub_v1beta2 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.1.1"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20201110"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,358 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module PubsubV1beta2
|
24
|
+
|
25
|
+
class AcknowledgeRequest
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class Binding
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Empty
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Expr
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class ListSubscriptionsResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class ListTopicSubscriptionsResponse
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class ListTopicsResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class ModifyAckDeadlineRequest
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class ModifyPushConfigRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class OidcToken
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class Policy
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class PublishRequest
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class PublishResponse
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class PubsubMessage
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class PullRequest
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class PullResponse
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class PushConfig
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class ReceivedMessage
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class SetIamPolicyRequest
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
|
+
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
137
|
+
end
|
138
|
+
|
139
|
+
class Subscription
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
|
+
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
143
|
+
end
|
144
|
+
|
145
|
+
class TestIamPermissionsRequest
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
147
|
+
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
149
|
+
end
|
150
|
+
|
151
|
+
class TestIamPermissionsResponse
|
152
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
153
|
+
|
154
|
+
include Google::Apis::Core::JsonObjectSupport
|
155
|
+
end
|
156
|
+
|
157
|
+
class Topic
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
159
|
+
|
160
|
+
include Google::Apis::Core::JsonObjectSupport
|
161
|
+
end
|
162
|
+
|
163
|
+
class AcknowledgeRequest
|
164
|
+
# @private
|
165
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
166
|
+
collection :ack_ids, as: 'ackIds'
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
class Binding
|
171
|
+
# @private
|
172
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
173
|
+
property :condition, as: 'condition', class: Google::Apis::PubsubV1beta2::Expr, decorator: Google::Apis::PubsubV1beta2::Expr::Representation
|
174
|
+
|
175
|
+
collection :members, as: 'members'
|
176
|
+
property :role, as: 'role'
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
class Empty
|
181
|
+
# @private
|
182
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class Expr
|
187
|
+
# @private
|
188
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
189
|
+
property :description, as: 'description'
|
190
|
+
property :expression, as: 'expression'
|
191
|
+
property :location, as: 'location'
|
192
|
+
property :title, as: 'title'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class ListSubscriptionsResponse
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :next_page_token, as: 'nextPageToken'
|
200
|
+
collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1beta2::Subscription, decorator: Google::Apis::PubsubV1beta2::Subscription::Representation
|
201
|
+
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
class ListTopicSubscriptionsResponse
|
206
|
+
# @private
|
207
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
208
|
+
property :next_page_token, as: 'nextPageToken'
|
209
|
+
collection :subscriptions, as: 'subscriptions'
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
class ListTopicsResponse
|
214
|
+
# @private
|
215
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
216
|
+
property :next_page_token, as: 'nextPageToken'
|
217
|
+
collection :topics, as: 'topics', class: Google::Apis::PubsubV1beta2::Topic, decorator: Google::Apis::PubsubV1beta2::Topic::Representation
|
218
|
+
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class ModifyAckDeadlineRequest
|
223
|
+
# @private
|
224
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
225
|
+
property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
|
226
|
+
property :ack_id, as: 'ackId'
|
227
|
+
collection :ack_ids, as: 'ackIds'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
class ModifyPushConfigRequest
|
232
|
+
# @private
|
233
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
234
|
+
property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1beta2::PushConfig, decorator: Google::Apis::PubsubV1beta2::PushConfig::Representation
|
235
|
+
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
class OidcToken
|
240
|
+
# @private
|
241
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
242
|
+
property :audience, as: 'audience'
|
243
|
+
property :service_account_email, as: 'serviceAccountEmail'
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
class Policy
|
248
|
+
# @private
|
249
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
250
|
+
collection :bindings, as: 'bindings', class: Google::Apis::PubsubV1beta2::Binding, decorator: Google::Apis::PubsubV1beta2::Binding::Representation
|
251
|
+
|
252
|
+
property :etag, :base64 => true, as: 'etag'
|
253
|
+
property :version, as: 'version'
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
class PublishRequest
|
258
|
+
# @private
|
259
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
260
|
+
collection :messages, as: 'messages', class: Google::Apis::PubsubV1beta2::PubsubMessage, decorator: Google::Apis::PubsubV1beta2::PubsubMessage::Representation
|
261
|
+
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
class PublishResponse
|
266
|
+
# @private
|
267
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
268
|
+
collection :message_ids, as: 'messageIds'
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
class PubsubMessage
|
273
|
+
# @private
|
274
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
275
|
+
hash :attributes, as: 'attributes'
|
276
|
+
property :data, :base64 => true, as: 'data'
|
277
|
+
property :message_id, as: 'messageId'
|
278
|
+
property :publish_time, as: 'publishTime'
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
class PullRequest
|
283
|
+
# @private
|
284
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
285
|
+
property :max_messages, as: 'maxMessages'
|
286
|
+
property :return_immediately, as: 'returnImmediately'
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
class PullResponse
|
291
|
+
# @private
|
292
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
293
|
+
collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1beta2::ReceivedMessage, decorator: Google::Apis::PubsubV1beta2::ReceivedMessage::Representation
|
294
|
+
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
class PushConfig
|
299
|
+
# @private
|
300
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
301
|
+
hash :attributes, as: 'attributes'
|
302
|
+
property :oidc_token, as: 'oidcToken', class: Google::Apis::PubsubV1beta2::OidcToken, decorator: Google::Apis::PubsubV1beta2::OidcToken::Representation
|
303
|
+
|
304
|
+
property :push_endpoint, as: 'pushEndpoint'
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
class ReceivedMessage
|
309
|
+
# @private
|
310
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
311
|
+
property :ack_id, as: 'ackId'
|
312
|
+
property :message, as: 'message', class: Google::Apis::PubsubV1beta2::PubsubMessage, decorator: Google::Apis::PubsubV1beta2::PubsubMessage::Representation
|
313
|
+
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
class SetIamPolicyRequest
|
318
|
+
# @private
|
319
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
320
|
+
property :policy, as: 'policy', class: Google::Apis::PubsubV1beta2::Policy, decorator: Google::Apis::PubsubV1beta2::Policy::Representation
|
321
|
+
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class Subscription
|
326
|
+
# @private
|
327
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
328
|
+
property :ack_deadline_seconds, as: 'ackDeadlineSeconds'
|
329
|
+
property :name, as: 'name'
|
330
|
+
property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1beta2::PushConfig, decorator: Google::Apis::PubsubV1beta2::PushConfig::Representation
|
331
|
+
|
332
|
+
property :topic, as: 'topic'
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
class TestIamPermissionsRequest
|
337
|
+
# @private
|
338
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
339
|
+
collection :permissions, as: 'permissions'
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
class TestIamPermissionsResponse
|
344
|
+
# @private
|
345
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
346
|
+
collection :permissions, as: 'permissions'
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
class Topic
|
351
|
+
# @private
|
352
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
353
|
+
property :name, as: 'name'
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
@@ -0,0 +1,793 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module PubsubV1beta2
|
23
|
+
# Cloud Pub/Sub API
|
24
|
+
#
|
25
|
+
# Provides reliable, many-to-many, asynchronous messaging between applications.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/pubsub_v1beta2'
|
29
|
+
#
|
30
|
+
# Pubsub = Google::Apis::PubsubV1beta2 # Alias the module
|
31
|
+
# service = Pubsub::PubsubService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/pubsub/docs
|
34
|
+
class PubsubService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://pubsub.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-pubsub_v1beta2',
|
48
|
+
client_version: Google::Apis::PubsubV1beta2::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Acknowledges the messages associated with the `ack_ids` in the `
|
53
|
+
# AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from
|
54
|
+
# the subscription. Acknowledging a message whose ack deadline has expired may
|
55
|
+
# succeed, but such a message may be redelivered later. Acknowledging a message
|
56
|
+
# more than once will not result in an error.
|
57
|
+
# @param [String] subscription
|
58
|
+
# The subscription whose message is being acknowledged.
|
59
|
+
# @param [Google::Apis::PubsubV1beta2::AcknowledgeRequest] acknowledge_request_object
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
66
|
+
# Request-specific options
|
67
|
+
#
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
69
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
71
|
+
#
|
72
|
+
# @return [Google::Apis::PubsubV1beta2::Empty]
|
73
|
+
#
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
77
|
+
def acknowledge_subscription(subscription, acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
78
|
+
command = make_simple_command(:post, 'v1beta2/{+subscription}:acknowledge', options)
|
79
|
+
command.request_representation = Google::Apis::PubsubV1beta2::AcknowledgeRequest::Representation
|
80
|
+
command.request_object = acknowledge_request_object
|
81
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation
|
82
|
+
command.response_class = Google::Apis::PubsubV1beta2::Empty
|
83
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
85
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
86
|
+
execute_or_queue_command(command, &block)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Creates a subscription to a given topic. If the subscription already exists,
|
90
|
+
# returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `
|
91
|
+
# NOT_FOUND`. If the name is not provided in the request, the server will assign
|
92
|
+
# a random name for this subscription on the same project as the topic. Note
|
93
|
+
# that for REST API requests, you must specify a name.
|
94
|
+
# @param [String] name
|
95
|
+
# The name of the subscription. It must have the format `"projects/`project`/
|
96
|
+
# subscriptions/`subscription`"`. ``subscription`` must start with a letter, and
|
97
|
+
# contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
98
|
+
# underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%
|
99
|
+
# `). It must be between 3 and 255 characters in length, and it must not start
|
100
|
+
# with `"goog"`.
|
101
|
+
# @param [Google::Apis::PubsubV1beta2::Subscription] subscription_object
|
102
|
+
# @param [String] fields
|
103
|
+
# Selector specifying which fields to include in a partial response.
|
104
|
+
# @param [String] quota_user
|
105
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
106
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
107
|
+
# @param [Google::Apis::RequestOptions] options
|
108
|
+
# Request-specific options
|
109
|
+
#
|
110
|
+
# @yield [result, err] Result & error if block supplied
|
111
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Subscription] parsed result object
|
112
|
+
# @yieldparam err [StandardError] error object if request failed
|
113
|
+
#
|
114
|
+
# @return [Google::Apis::PubsubV1beta2::Subscription]
|
115
|
+
#
|
116
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
117
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
118
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
119
|
+
def create_project_subscription(name, subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
120
|
+
command = make_simple_command(:put, 'v1beta2/{+name}', options)
|
121
|
+
command.request_representation = Google::Apis::PubsubV1beta2::Subscription::Representation
|
122
|
+
command.request_object = subscription_object
|
123
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Subscription::Representation
|
124
|
+
command.response_class = Google::Apis::PubsubV1beta2::Subscription
|
125
|
+
command.params['name'] = name unless name.nil?
|
126
|
+
command.query['fields'] = fields unless fields.nil?
|
127
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
128
|
+
execute_or_queue_command(command, &block)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deletes an existing subscription. All pending messages in the subscription are
|
132
|
+
# immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`.
|
133
|
+
# After a subscription is deleted, a new one may be created with the same name,
|
134
|
+
# but the new one has no association with the old subscription, or its topic
|
135
|
+
# unless the same topic is specified.
|
136
|
+
# @param [String] subscription
|
137
|
+
# The subscription to delete.
|
138
|
+
# @param [String] fields
|
139
|
+
# Selector specifying which fields to include in a partial response.
|
140
|
+
# @param [String] quota_user
|
141
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
142
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
143
|
+
# @param [Google::Apis::RequestOptions] options
|
144
|
+
# Request-specific options
|
145
|
+
#
|
146
|
+
# @yield [result, err] Result & error if block supplied
|
147
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object
|
148
|
+
# @yieldparam err [StandardError] error object if request failed
|
149
|
+
#
|
150
|
+
# @return [Google::Apis::PubsubV1beta2::Empty]
|
151
|
+
#
|
152
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
153
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
154
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
155
|
+
def delete_project_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block)
|
156
|
+
command = make_simple_command(:delete, 'v1beta2/{+subscription}', options)
|
157
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation
|
158
|
+
command.response_class = Google::Apis::PubsubV1beta2::Empty
|
159
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
160
|
+
command.query['fields'] = fields unless fields.nil?
|
161
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
162
|
+
execute_or_queue_command(command, &block)
|
163
|
+
end
|
164
|
+
|
165
|
+
# Gets the configuration details of a subscription.
|
166
|
+
# @param [String] subscription
|
167
|
+
# The name of the subscription to get.
|
168
|
+
# @param [String] fields
|
169
|
+
# Selector specifying which fields to include in a partial response.
|
170
|
+
# @param [String] quota_user
|
171
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
172
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
173
|
+
# @param [Google::Apis::RequestOptions] options
|
174
|
+
# Request-specific options
|
175
|
+
#
|
176
|
+
# @yield [result, err] Result & error if block supplied
|
177
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Subscription] parsed result object
|
178
|
+
# @yieldparam err [StandardError] error object if request failed
|
179
|
+
#
|
180
|
+
# @return [Google::Apis::PubsubV1beta2::Subscription]
|
181
|
+
#
|
182
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
183
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
184
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
185
|
+
def get_project_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block)
|
186
|
+
command = make_simple_command(:get, 'v1beta2/{+subscription}', options)
|
187
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Subscription::Representation
|
188
|
+
command.response_class = Google::Apis::PubsubV1beta2::Subscription
|
189
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
190
|
+
command.query['fields'] = fields unless fields.nil?
|
191
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
192
|
+
execute_or_queue_command(command, &block)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Gets the access control policy for a resource. Returns an empty policy if the
|
196
|
+
# resource exists and does not have a policy set.
|
197
|
+
# @param [String] resource
|
198
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
199
|
+
# operation documentation for the appropriate value for this field.
|
200
|
+
# @param [Fixnum] options_requested_policy_version
|
201
|
+
# Optional. The policy format version to be returned. Valid values are 0, 1, and
|
202
|
+
# 3. Requests specifying an invalid value will be rejected. Requests for
|
203
|
+
# policies with any conditional bindings must specify version 3. Policies
|
204
|
+
# without any conditional bindings may specify any valid value or leave the
|
205
|
+
# field unset. To learn which resources support conditions in their IAM policies,
|
206
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
207
|
+
# resource-policies).
|
208
|
+
# @param [String] fields
|
209
|
+
# Selector specifying which fields to include in a partial response.
|
210
|
+
# @param [String] quota_user
|
211
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
212
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
213
|
+
# @param [Google::Apis::RequestOptions] options
|
214
|
+
# Request-specific options
|
215
|
+
#
|
216
|
+
# @yield [result, err] Result & error if block supplied
|
217
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object
|
218
|
+
# @yieldparam err [StandardError] error object if request failed
|
219
|
+
#
|
220
|
+
# @return [Google::Apis::PubsubV1beta2::Policy]
|
221
|
+
#
|
222
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
223
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
224
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
225
|
+
def get_project_subscription_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
226
|
+
command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
|
227
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation
|
228
|
+
command.response_class = Google::Apis::PubsubV1beta2::Policy
|
229
|
+
command.params['resource'] = resource unless resource.nil?
|
230
|
+
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
231
|
+
command.query['fields'] = fields unless fields.nil?
|
232
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
233
|
+
execute_or_queue_command(command, &block)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Lists matching subscriptions.
|
237
|
+
# @param [String] project
|
238
|
+
# The name of the cloud project that subscriptions belong to.
|
239
|
+
# @param [Fixnum] page_size
|
240
|
+
# Maximum number of subscriptions to return.
|
241
|
+
# @param [String] page_token
|
242
|
+
# The value returned by the last `ListSubscriptionsResponse`; indicates that
|
243
|
+
# this is a continuation of a prior `ListSubscriptions` call, and that the
|
244
|
+
# system should return the next page of data.
|
245
|
+
# @param [String] fields
|
246
|
+
# Selector specifying which fields to include in a partial response.
|
247
|
+
# @param [String] quota_user
|
248
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
249
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
250
|
+
# @param [Google::Apis::RequestOptions] options
|
251
|
+
# Request-specific options
|
252
|
+
#
|
253
|
+
# @yield [result, err] Result & error if block supplied
|
254
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::ListSubscriptionsResponse] parsed result object
|
255
|
+
# @yieldparam err [StandardError] error object if request failed
|
256
|
+
#
|
257
|
+
# @return [Google::Apis::PubsubV1beta2::ListSubscriptionsResponse]
|
258
|
+
#
|
259
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
260
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
261
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
262
|
+
def list_project_subscriptions(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
263
|
+
command = make_simple_command(:get, 'v1beta2/{+project}/subscriptions', options)
|
264
|
+
command.response_representation = Google::Apis::PubsubV1beta2::ListSubscriptionsResponse::Representation
|
265
|
+
command.response_class = Google::Apis::PubsubV1beta2::ListSubscriptionsResponse
|
266
|
+
command.params['project'] = project unless project.nil?
|
267
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
268
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
269
|
+
command.query['fields'] = fields unless fields.nil?
|
270
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
271
|
+
execute_or_queue_command(command, &block)
|
272
|
+
end
|
273
|
+
|
274
|
+
# Modifies the ack deadline for a specific message. This method is useful to
|
275
|
+
# indicate that more time is needed to process a message by the subscriber, or
|
276
|
+
# to make the message available for redelivery if the processing was interrupted.
|
277
|
+
# Note that this does not modify the subscription-level `ackDeadlineSeconds`
|
278
|
+
# used for subsequent messages.
|
279
|
+
# @param [String] subscription
|
280
|
+
# The name of the subscription.
|
281
|
+
# @param [Google::Apis::PubsubV1beta2::ModifyAckDeadlineRequest] modify_ack_deadline_request_object
|
282
|
+
# @param [String] fields
|
283
|
+
# Selector specifying which fields to include in a partial response.
|
284
|
+
# @param [String] quota_user
|
285
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
286
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
287
|
+
# @param [Google::Apis::RequestOptions] options
|
288
|
+
# Request-specific options
|
289
|
+
#
|
290
|
+
# @yield [result, err] Result & error if block supplied
|
291
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object
|
292
|
+
# @yieldparam err [StandardError] error object if request failed
|
293
|
+
#
|
294
|
+
# @return [Google::Apis::PubsubV1beta2::Empty]
|
295
|
+
#
|
296
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
297
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
298
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
299
|
+
def modify_subscription_ack_deadline(subscription, modify_ack_deadline_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
300
|
+
command = make_simple_command(:post, 'v1beta2/{+subscription}:modifyAckDeadline', options)
|
301
|
+
command.request_representation = Google::Apis::PubsubV1beta2::ModifyAckDeadlineRequest::Representation
|
302
|
+
command.request_object = modify_ack_deadline_request_object
|
303
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation
|
304
|
+
command.response_class = Google::Apis::PubsubV1beta2::Empty
|
305
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
306
|
+
command.query['fields'] = fields unless fields.nil?
|
307
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
308
|
+
execute_or_queue_command(command, &block)
|
309
|
+
end
|
310
|
+
|
311
|
+
# Modifies the `PushConfig` for a specified subscription. This may be used to
|
312
|
+
# change a push subscription to a pull one (signified by an empty `PushConfig`)
|
313
|
+
# or vice versa, or change the endpoint URL and other attributes of a push
|
314
|
+
# subscription. Messages will accumulate for delivery continuously through the
|
315
|
+
# call regardless of changes to the `PushConfig`.
|
316
|
+
# @param [String] subscription
|
317
|
+
# The name of the subscription.
|
318
|
+
# @param [Google::Apis::PubsubV1beta2::ModifyPushConfigRequest] modify_push_config_request_object
|
319
|
+
# @param [String] fields
|
320
|
+
# Selector specifying which fields to include in a partial response.
|
321
|
+
# @param [String] quota_user
|
322
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
323
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
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::PubsubV1beta2::Empty] parsed result object
|
329
|
+
# @yieldparam err [StandardError] error object if request failed
|
330
|
+
#
|
331
|
+
# @return [Google::Apis::PubsubV1beta2::Empty]
|
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 modify_subscription_push_config(subscription, modify_push_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
337
|
+
command = make_simple_command(:post, 'v1beta2/{+subscription}:modifyPushConfig', options)
|
338
|
+
command.request_representation = Google::Apis::PubsubV1beta2::ModifyPushConfigRequest::Representation
|
339
|
+
command.request_object = modify_push_config_request_object
|
340
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation
|
341
|
+
command.response_class = Google::Apis::PubsubV1beta2::Empty
|
342
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
343
|
+
command.query['fields'] = fields unless fields.nil?
|
344
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
345
|
+
execute_or_queue_command(command, &block)
|
346
|
+
end
|
347
|
+
|
348
|
+
# Pulls messages from the server. Returns an empty list if there are no messages
|
349
|
+
# available in the backlog. The server may return `UNAVAILABLE` if there are too
|
350
|
+
# many concurrent pull requests pending for the given subscription.
|
351
|
+
# @param [String] subscription
|
352
|
+
# The subscription from which messages should be pulled.
|
353
|
+
# @param [Google::Apis::PubsubV1beta2::PullRequest] pull_request_object
|
354
|
+
# @param [String] fields
|
355
|
+
# Selector specifying which fields to include in a partial response.
|
356
|
+
# @param [String] quota_user
|
357
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
358
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
359
|
+
# @param [Google::Apis::RequestOptions] options
|
360
|
+
# Request-specific options
|
361
|
+
#
|
362
|
+
# @yield [result, err] Result & error if block supplied
|
363
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::PullResponse] parsed result object
|
364
|
+
# @yieldparam err [StandardError] error object if request failed
|
365
|
+
#
|
366
|
+
# @return [Google::Apis::PubsubV1beta2::PullResponse]
|
367
|
+
#
|
368
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
369
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
370
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
371
|
+
def pull_subscription(subscription, pull_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
372
|
+
command = make_simple_command(:post, 'v1beta2/{+subscription}:pull', options)
|
373
|
+
command.request_representation = Google::Apis::PubsubV1beta2::PullRequest::Representation
|
374
|
+
command.request_object = pull_request_object
|
375
|
+
command.response_representation = Google::Apis::PubsubV1beta2::PullResponse::Representation
|
376
|
+
command.response_class = Google::Apis::PubsubV1beta2::PullResponse
|
377
|
+
command.params['subscription'] = subscription unless subscription.nil?
|
378
|
+
command.query['fields'] = fields unless fields.nil?
|
379
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
380
|
+
execute_or_queue_command(command, &block)
|
381
|
+
end
|
382
|
+
|
383
|
+
# Sets the access control policy on the specified resource. Replaces any
|
384
|
+
# existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
|
385
|
+
# PERMISSION_DENIED` errors.
|
386
|
+
# @param [String] resource
|
387
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
388
|
+
# operation documentation for the appropriate value for this field.
|
389
|
+
# @param [Google::Apis::PubsubV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
|
390
|
+
# @param [String] fields
|
391
|
+
# Selector specifying which fields to include in a partial response.
|
392
|
+
# @param [String] quota_user
|
393
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
394
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
395
|
+
# @param [Google::Apis::RequestOptions] options
|
396
|
+
# Request-specific options
|
397
|
+
#
|
398
|
+
# @yield [result, err] Result & error if block supplied
|
399
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object
|
400
|
+
# @yieldparam err [StandardError] error object if request failed
|
401
|
+
#
|
402
|
+
# @return [Google::Apis::PubsubV1beta2::Policy]
|
403
|
+
#
|
404
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
405
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
406
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
407
|
+
def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
408
|
+
command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
|
409
|
+
command.request_representation = Google::Apis::PubsubV1beta2::SetIamPolicyRequest::Representation
|
410
|
+
command.request_object = set_iam_policy_request_object
|
411
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation
|
412
|
+
command.response_class = Google::Apis::PubsubV1beta2::Policy
|
413
|
+
command.params['resource'] = resource unless resource.nil?
|
414
|
+
command.query['fields'] = fields unless fields.nil?
|
415
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
416
|
+
execute_or_queue_command(command, &block)
|
417
|
+
end
|
418
|
+
|
419
|
+
# Returns permissions that a caller has on the specified resource. If the
|
420
|
+
# resource does not exist, this will return an empty set of permissions, not a `
|
421
|
+
# NOT_FOUND` error. Note: This operation is designed to be used for building
|
422
|
+
# permission-aware UIs and command-line tools, not for authorization checking.
|
423
|
+
# This operation may "fail open" without warning.
|
424
|
+
# @param [String] resource
|
425
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
426
|
+
# operation documentation for the appropriate value for this field.
|
427
|
+
# @param [Google::Apis::PubsubV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
|
428
|
+
# @param [String] fields
|
429
|
+
# Selector specifying which fields to include in a partial response.
|
430
|
+
# @param [String] quota_user
|
431
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
432
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
433
|
+
# @param [Google::Apis::RequestOptions] options
|
434
|
+
# Request-specific options
|
435
|
+
#
|
436
|
+
# @yield [result, err] Result & error if block supplied
|
437
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] parsed result object
|
438
|
+
# @yieldparam err [StandardError] error object if request failed
|
439
|
+
#
|
440
|
+
# @return [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse]
|
441
|
+
#
|
442
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
443
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
444
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
445
|
+
def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
446
|
+
command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
|
447
|
+
command.request_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsRequest::Representation
|
448
|
+
command.request_object = test_iam_permissions_request_object
|
449
|
+
command.response_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse::Representation
|
450
|
+
command.response_class = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse
|
451
|
+
command.params['resource'] = resource unless resource.nil?
|
452
|
+
command.query['fields'] = fields unless fields.nil?
|
453
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
454
|
+
execute_or_queue_command(command, &block)
|
455
|
+
end
|
456
|
+
|
457
|
+
# Creates the given topic with the given name.
|
458
|
+
# @param [String] name
|
459
|
+
# The name of the topic. It must have the format `"projects/`project`/topics/`
|
460
|
+
# topic`"`. ``topic`` must start with a letter, and contain only letters (`[A-Za-
|
461
|
+
# z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
|
462
|
+
# tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255
|
463
|
+
# characters in length, and it must not start with `"goog"`.
|
464
|
+
# @param [Google::Apis::PubsubV1beta2::Topic] topic_object
|
465
|
+
# @param [String] fields
|
466
|
+
# Selector specifying which fields to include in a partial response.
|
467
|
+
# @param [String] quota_user
|
468
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
469
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
470
|
+
# @param [Google::Apis::RequestOptions] options
|
471
|
+
# Request-specific options
|
472
|
+
#
|
473
|
+
# @yield [result, err] Result & error if block supplied
|
474
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Topic] parsed result object
|
475
|
+
# @yieldparam err [StandardError] error object if request failed
|
476
|
+
#
|
477
|
+
# @return [Google::Apis::PubsubV1beta2::Topic]
|
478
|
+
#
|
479
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
480
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
481
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
482
|
+
def create_project_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
483
|
+
command = make_simple_command(:put, 'v1beta2/{+name}', options)
|
484
|
+
command.request_representation = Google::Apis::PubsubV1beta2::Topic::Representation
|
485
|
+
command.request_object = topic_object
|
486
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Topic::Representation
|
487
|
+
command.response_class = Google::Apis::PubsubV1beta2::Topic
|
488
|
+
command.params['name'] = name unless name.nil?
|
489
|
+
command.query['fields'] = fields unless fields.nil?
|
490
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
491
|
+
execute_or_queue_command(command, &block)
|
492
|
+
end
|
493
|
+
|
494
|
+
# Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does
|
495
|
+
# not exist. After a topic is deleted, a new topic may be created with the same
|
496
|
+
# name; this is an entirely new topic with none of the old configuration or
|
497
|
+
# subscriptions. Existing subscriptions to this topic are not deleted, but their
|
498
|
+
# `topic` field is set to `_deleted-topic_`.
|
499
|
+
# @param [String] topic
|
500
|
+
# Name of the topic to delete.
|
501
|
+
# @param [String] fields
|
502
|
+
# Selector specifying which fields to include in a partial response.
|
503
|
+
# @param [String] quota_user
|
504
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
505
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
506
|
+
# @param [Google::Apis::RequestOptions] options
|
507
|
+
# Request-specific options
|
508
|
+
#
|
509
|
+
# @yield [result, err] Result & error if block supplied
|
510
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object
|
511
|
+
# @yieldparam err [StandardError] error object if request failed
|
512
|
+
#
|
513
|
+
# @return [Google::Apis::PubsubV1beta2::Empty]
|
514
|
+
#
|
515
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
516
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
517
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
518
|
+
def delete_project_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
519
|
+
command = make_simple_command(:delete, 'v1beta2/{+topic}', options)
|
520
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation
|
521
|
+
command.response_class = Google::Apis::PubsubV1beta2::Empty
|
522
|
+
command.params['topic'] = topic unless topic.nil?
|
523
|
+
command.query['fields'] = fields unless fields.nil?
|
524
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
525
|
+
execute_or_queue_command(command, &block)
|
526
|
+
end
|
527
|
+
|
528
|
+
# Gets the configuration of a topic.
|
529
|
+
# @param [String] topic
|
530
|
+
# The name of the topic to get.
|
531
|
+
# @param [String] fields
|
532
|
+
# Selector specifying which fields to include in a partial response.
|
533
|
+
# @param [String] quota_user
|
534
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
535
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
536
|
+
# @param [Google::Apis::RequestOptions] options
|
537
|
+
# Request-specific options
|
538
|
+
#
|
539
|
+
# @yield [result, err] Result & error if block supplied
|
540
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Topic] parsed result object
|
541
|
+
# @yieldparam err [StandardError] error object if request failed
|
542
|
+
#
|
543
|
+
# @return [Google::Apis::PubsubV1beta2::Topic]
|
544
|
+
#
|
545
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
546
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
547
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
548
|
+
def get_project_topic(topic, fields: nil, quota_user: nil, options: nil, &block)
|
549
|
+
command = make_simple_command(:get, 'v1beta2/{+topic}', options)
|
550
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Topic::Representation
|
551
|
+
command.response_class = Google::Apis::PubsubV1beta2::Topic
|
552
|
+
command.params['topic'] = topic unless topic.nil?
|
553
|
+
command.query['fields'] = fields unless fields.nil?
|
554
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
555
|
+
execute_or_queue_command(command, &block)
|
556
|
+
end
|
557
|
+
|
558
|
+
# Gets the access control policy for a resource. Returns an empty policy if the
|
559
|
+
# resource exists and does not have a policy set.
|
560
|
+
# @param [String] resource
|
561
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
562
|
+
# operation documentation for the appropriate value for this field.
|
563
|
+
# @param [Fixnum] options_requested_policy_version
|
564
|
+
# Optional. The policy format version to be returned. Valid values are 0, 1, and
|
565
|
+
# 3. Requests specifying an invalid value will be rejected. Requests for
|
566
|
+
# policies with any conditional bindings must specify version 3. Policies
|
567
|
+
# without any conditional bindings may specify any valid value or leave the
|
568
|
+
# field unset. To learn which resources support conditions in their IAM policies,
|
569
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
570
|
+
# resource-policies).
|
571
|
+
# @param [String] fields
|
572
|
+
# Selector specifying which fields to include in a partial response.
|
573
|
+
# @param [String] quota_user
|
574
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
575
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
576
|
+
# @param [Google::Apis::RequestOptions] options
|
577
|
+
# Request-specific options
|
578
|
+
#
|
579
|
+
# @yield [result, err] Result & error if block supplied
|
580
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object
|
581
|
+
# @yieldparam err [StandardError] error object if request failed
|
582
|
+
#
|
583
|
+
# @return [Google::Apis::PubsubV1beta2::Policy]
|
584
|
+
#
|
585
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
586
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
587
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
588
|
+
def get_project_topic_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
589
|
+
command = make_simple_command(:get, 'v1beta2/{+resource}:getIamPolicy', options)
|
590
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation
|
591
|
+
command.response_class = Google::Apis::PubsubV1beta2::Policy
|
592
|
+
command.params['resource'] = resource unless resource.nil?
|
593
|
+
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
594
|
+
command.query['fields'] = fields unless fields.nil?
|
595
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
596
|
+
execute_or_queue_command(command, &block)
|
597
|
+
end
|
598
|
+
|
599
|
+
# Lists matching topics.
|
600
|
+
# @param [String] project
|
601
|
+
# The name of the cloud project that topics belong to.
|
602
|
+
# @param [Fixnum] page_size
|
603
|
+
# Maximum number of topics to return.
|
604
|
+
# @param [String] page_token
|
605
|
+
# The value returned by the last `ListTopicsResponse`; indicates that this is a
|
606
|
+
# continuation of a prior `ListTopics` call, and that the system should return
|
607
|
+
# the next page of data.
|
608
|
+
# @param [String] fields
|
609
|
+
# Selector specifying which fields to include in a partial response.
|
610
|
+
# @param [String] quota_user
|
611
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
612
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
613
|
+
# @param [Google::Apis::RequestOptions] options
|
614
|
+
# Request-specific options
|
615
|
+
#
|
616
|
+
# @yield [result, err] Result & error if block supplied
|
617
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::ListTopicsResponse] parsed result object
|
618
|
+
# @yieldparam err [StandardError] error object if request failed
|
619
|
+
#
|
620
|
+
# @return [Google::Apis::PubsubV1beta2::ListTopicsResponse]
|
621
|
+
#
|
622
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
623
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
624
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
625
|
+
def list_project_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
626
|
+
command = make_simple_command(:get, 'v1beta2/{+project}/topics', options)
|
627
|
+
command.response_representation = Google::Apis::PubsubV1beta2::ListTopicsResponse::Representation
|
628
|
+
command.response_class = Google::Apis::PubsubV1beta2::ListTopicsResponse
|
629
|
+
command.params['project'] = project unless project.nil?
|
630
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
631
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
632
|
+
command.query['fields'] = fields unless fields.nil?
|
633
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
634
|
+
execute_or_queue_command(command, &block)
|
635
|
+
end
|
636
|
+
|
637
|
+
# Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does
|
638
|
+
# not exist. The message payload must not be empty; it must contain either a non-
|
639
|
+
# empty data field, or at least one attribute.
|
640
|
+
# @param [String] topic
|
641
|
+
# The messages in the request will be published on this topic.
|
642
|
+
# @param [Google::Apis::PubsubV1beta2::PublishRequest] publish_request_object
|
643
|
+
# @param [String] fields
|
644
|
+
# Selector specifying which fields to include in a partial response.
|
645
|
+
# @param [String] quota_user
|
646
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
647
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
648
|
+
# @param [Google::Apis::RequestOptions] options
|
649
|
+
# Request-specific options
|
650
|
+
#
|
651
|
+
# @yield [result, err] Result & error if block supplied
|
652
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::PublishResponse] parsed result object
|
653
|
+
# @yieldparam err [StandardError] error object if request failed
|
654
|
+
#
|
655
|
+
# @return [Google::Apis::PubsubV1beta2::PublishResponse]
|
656
|
+
#
|
657
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
658
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
659
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
660
|
+
def publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
661
|
+
command = make_simple_command(:post, 'v1beta2/{+topic}:publish', options)
|
662
|
+
command.request_representation = Google::Apis::PubsubV1beta2::PublishRequest::Representation
|
663
|
+
command.request_object = publish_request_object
|
664
|
+
command.response_representation = Google::Apis::PubsubV1beta2::PublishResponse::Representation
|
665
|
+
command.response_class = Google::Apis::PubsubV1beta2::PublishResponse
|
666
|
+
command.params['topic'] = topic unless topic.nil?
|
667
|
+
command.query['fields'] = fields unless fields.nil?
|
668
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
669
|
+
execute_or_queue_command(command, &block)
|
670
|
+
end
|
671
|
+
|
672
|
+
# Sets the access control policy on the specified resource. Replaces any
|
673
|
+
# existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
|
674
|
+
# PERMISSION_DENIED` errors.
|
675
|
+
# @param [String] resource
|
676
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
677
|
+
# operation documentation for the appropriate value for this field.
|
678
|
+
# @param [Google::Apis::PubsubV1beta2::SetIamPolicyRequest] set_iam_policy_request_object
|
679
|
+
# @param [String] fields
|
680
|
+
# Selector specifying which fields to include in a partial response.
|
681
|
+
# @param [String] quota_user
|
682
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
683
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
684
|
+
# @param [Google::Apis::RequestOptions] options
|
685
|
+
# Request-specific options
|
686
|
+
#
|
687
|
+
# @yield [result, err] Result & error if block supplied
|
688
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object
|
689
|
+
# @yieldparam err [StandardError] error object if request failed
|
690
|
+
#
|
691
|
+
# @return [Google::Apis::PubsubV1beta2::Policy]
|
692
|
+
#
|
693
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
694
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
695
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
696
|
+
def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
697
|
+
command = make_simple_command(:post, 'v1beta2/{+resource}:setIamPolicy', options)
|
698
|
+
command.request_representation = Google::Apis::PubsubV1beta2::SetIamPolicyRequest::Representation
|
699
|
+
command.request_object = set_iam_policy_request_object
|
700
|
+
command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation
|
701
|
+
command.response_class = Google::Apis::PubsubV1beta2::Policy
|
702
|
+
command.params['resource'] = resource unless resource.nil?
|
703
|
+
command.query['fields'] = fields unless fields.nil?
|
704
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
705
|
+
execute_or_queue_command(command, &block)
|
706
|
+
end
|
707
|
+
|
708
|
+
# Returns permissions that a caller has on the specified resource. If the
|
709
|
+
# resource does not exist, this will return an empty set of permissions, not a `
|
710
|
+
# NOT_FOUND` error. Note: This operation is designed to be used for building
|
711
|
+
# permission-aware UIs and command-line tools, not for authorization checking.
|
712
|
+
# This operation may "fail open" without warning.
|
713
|
+
# @param [String] resource
|
714
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
715
|
+
# operation documentation for the appropriate value for this field.
|
716
|
+
# @param [Google::Apis::PubsubV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object
|
717
|
+
# @param [String] fields
|
718
|
+
# Selector specifying which fields to include in a partial response.
|
719
|
+
# @param [String] quota_user
|
720
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
721
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
722
|
+
# @param [Google::Apis::RequestOptions] options
|
723
|
+
# Request-specific options
|
724
|
+
#
|
725
|
+
# @yield [result, err] Result & error if block supplied
|
726
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] parsed result object
|
727
|
+
# @yieldparam err [StandardError] error object if request failed
|
728
|
+
#
|
729
|
+
# @return [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse]
|
730
|
+
#
|
731
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
732
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
733
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
734
|
+
def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
735
|
+
command = make_simple_command(:post, 'v1beta2/{+resource}:testIamPermissions', options)
|
736
|
+
command.request_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsRequest::Representation
|
737
|
+
command.request_object = test_iam_permissions_request_object
|
738
|
+
command.response_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse::Representation
|
739
|
+
command.response_class = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse
|
740
|
+
command.params['resource'] = resource unless resource.nil?
|
741
|
+
command.query['fields'] = fields unless fields.nil?
|
742
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
743
|
+
execute_or_queue_command(command, &block)
|
744
|
+
end
|
745
|
+
|
746
|
+
# Lists the name of the subscriptions for this topic.
|
747
|
+
# @param [String] topic
|
748
|
+
# The name of the topic that subscriptions are attached to.
|
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 that
|
754
|
+
# the system should return the next page of data.
|
755
|
+
# @param [String] fields
|
756
|
+
# Selector specifying which fields to include in a partial response.
|
757
|
+
# @param [String] quota_user
|
758
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
759
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
760
|
+
# @param [Google::Apis::RequestOptions] options
|
761
|
+
# Request-specific options
|
762
|
+
#
|
763
|
+
# @yield [result, err] Result & error if block supplied
|
764
|
+
# @yieldparam result [Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse] parsed result object
|
765
|
+
# @yieldparam err [StandardError] error object if request failed
|
766
|
+
#
|
767
|
+
# @return [Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse]
|
768
|
+
#
|
769
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
770
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
771
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
772
|
+
def list_project_topic_subscriptions(topic, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
773
|
+
command = make_simple_command(:get, 'v1beta2/{+topic}/subscriptions', options)
|
774
|
+
command.response_representation = Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse::Representation
|
775
|
+
command.response_class = Google::Apis::PubsubV1beta2::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?
|
779
|
+
command.query['fields'] = fields unless fields.nil?
|
780
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
781
|
+
execute_or_queue_command(command, &block)
|
782
|
+
end
|
783
|
+
|
784
|
+
protected
|
785
|
+
|
786
|
+
def apply_command_defaults(command)
|
787
|
+
command.query['key'] = key unless key.nil?
|
788
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
789
|
+
end
|
790
|
+
end
|
791
|
+
end
|
792
|
+
end
|
793
|
+
end
|