15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIPTION_ADMIN_CLIENT_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIPTION_ADMIN_CLIENT_H
18#include "google/cloud/pubsub/snapshot_builder.h"
19#include "google/cloud/pubsub/subscription_admin_connection.h"
20#include "google/cloud/pubsub/subscription_builder.h"
21#include "google/cloud/pubsub/version.h"
29GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
67
68
69
70
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
100 internal::OptionsSpan span(
101 internal::MergeOptions(std::move(opts), options_));
107
108
109
110
111
112
113
114
117 internal::OptionsSpan span(
118 internal::MergeOptions(std::move(opts), options_));
123
124
125
126
127
128
129
130
131
132
133
134
135
136
140 internal::OptionsSpan span(
141 internal::MergeOptions(std::move(opts), options_));
147
148
149
150
151
152
153
154
157 internal::OptionsSpan span(
158 internal::MergeOptions(std::move(opts), options_));
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
179 internal::OptionsSpan span(
180 internal::MergeOptions(std::move(opts), options_));
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
205 internal::OptionsSpan span(
206 internal::MergeOptions(std::move(opts), options_));
212
213
214
215
216
217
218
219
220
221
222
223
227 internal::OptionsSpan span(
228 internal::MergeOptions(std::move(opts), options_));
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
255 internal::OptionsSpan span(
256 internal::MergeOptions(std::move(opts), options_));
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
279 internal::OptionsSpan span(
280 internal::MergeOptions(std::move(opts), options_));
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
304 internal::OptionsSpan span(
305 internal::MergeOptions(std::move(opts), options_));
311
312
313
314
315
316
317
318
319
320
321
322 ListSnapshotsRange
ListSnapshots(std::string
const& project_id,
324 internal::OptionsSpan span(
325 internal::MergeOptions(std::move(opts), options_));
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
347 internal::OptionsSpan span(
348 internal::MergeOptions(std::move(opts), options_));
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369 StatusOr<
google::pubsub::v1::SeekResponse>
Seek(
371 std::chrono::system_clock::time_point timestamp,
Options opts
= {});
374
375
376
377
378
379
380
381
382
383
384
385
386 StatusOr<
google::pubsub::v1::SeekResponse>
Seek(
395GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Helper class to create google::pubsub::v1::PushConfig protos.
Definition: subscription_builder.h:44
google::pubsub::v1::ModifyPushConfigRequest BuildModifyPushConfig(Subscription const &subscription) &&
Build a protocol buffer message to update an existing push config.
Build a request to create a Cloud Pub/Sub snapshot.
Definition: snapshot_builder.h:41
google::pubsub::v1::UpdateSnapshotRequest BuildUpdateRequest(Snapshot const &snapshot) &&
Build a protocol buffer message to update an existing snapshot.
google::pubsub::v1::CreateSnapshotRequest BuildCreateRequest(Subscription const &subscription, Snapshot const &snapshot) &&
Build a protocol buffer message to create snapshots with application-assigned ids.
SnapshotBuilder()=default
google::pubsub::v1::CreateSnapshotRequest BuildCreateRequest(Subscription const &subscription) &&
Build a protocol buffer message to create snapshots with server-assigned ids.
Objects of this class identify a Cloud Pub/Sub snapshot.
Definition: snapshot.h:37
Performs subscription administrative operations in Cloud Pub/Sub.
Definition: subscription_admin_client.h:60
StatusOr< google::pubsub::v1::Subscription > UpdateSubscription(Subscription const &subscription, SubscriptionBuilder builder, Options opts={})
Updates an existing subscription in Cloud Pub/Sub.
Definition: subscription_admin_client.h:137
SubscriptionAdminClient(std::shared_ptr< SubscriptionAdminConnection > connection, Options opts={})
ListSubscriptionsRange ListSubscriptions(std::string const &project_id, Options opts={})
Lists all the subscriptions for a given project id.
Definition: subscription_admin_client.h:155
StatusOr< google::pubsub::v1::Subscription > GetSubscription(Subscription subscription, Options opts={})
Gets the metadata for an existing Cloud Pub/Sub subscription.
Definition: subscription_admin_client.h:115
StatusOr< google::pubsub::v1::Subscription > CreateSubscription(Topic const &topic, Subscription const &subscription, SubscriptionBuilder builder={}, Options opts={})
Creates a new subscription in Cloud Pub/Sub.
Definition: subscription_admin_client.h:97
Status ModifyPushSubscription(Subscription const &subscription, PushConfigBuilder builder, Options opts={})
Modifies an existing subscription's push configuration.
Definition: subscription_admin_client.h:203
StatusOr< google::pubsub::v1::SeekResponse > Seek(Subscription const &subscription, Snapshot const &snapshot, Options opts={})
Seeks a subscription to its state at snapshot.
Status DeleteSnapshot(Snapshot const &snapshot, Options opts={})
Deletes a snapshot.
Definition: subscription_admin_client.h:346
StatusOr< google::pubsub::v1::Snapshot > GetSnapshot(Snapshot const &snapshot, Options opts={})
Gets information about an existing snapshot.
Definition: subscription_admin_client.h:277
StatusOr< google::pubsub::v1::Snapshot > CreateSnapshot(Subscription const &subscription, SnapshotBuilder builder={}, Options opts={})
Creates a new snapshot for a subscription with a server-assigned name.
Definition: subscription_admin_client.h:224
StatusOr< google::pubsub::v1::Snapshot > UpdateSnapshot(Snapshot const &snapshot, SnapshotBuilder builder, Options opts={})
Updates an existing snapshot.
Definition: subscription_admin_client.h:302
SubscriptionAdminClient()=delete
The default constructor is deleted.
StatusOr< google::pubsub::v1::Snapshot > CreateSnapshot(Subscription const &subscription, Snapshot const &snapshot, SnapshotBuilder builder={}, Options opts={})
Creates a new snapshot for a subscription with a given name.
Definition: subscription_admin_client.h:252
Status DeleteSubscription(Subscription subscription, Options opts={})
Deletes an existing subscription in Cloud Pub/Sub.
Definition: subscription_admin_client.h:178
StatusOr< google::pubsub::v1::SeekResponse > Seek(Subscription const &subscription, std::chrono::system_clock::time_point timestamp, Options opts={})
Seeks a subscription to its state at timestamp.
ListSnapshotsRange ListSnapshots(std::string const &project_id, Options opts={})
Lists all the snapshots for a given project id.
Definition: subscription_admin_client.h:322
A connection to Cloud Pub/Sub for subscription-related administrative operations.
Definition: subscription_admin_connection.h:82
virtual StatusOr< google::pubsub::v1::Snapshot > CreateSnapshot(CreateSnapshotParams)
Defines the interface for SnapshotAdminClient::CreateSnapshot()
virtual StatusOr< google::pubsub::v1::Subscription > GetSubscription(GetSubscriptionParams)
Defines the interface for SubscriptionAdminClient::GetSubscription()
virtual StatusOr< google::pubsub::v1::Snapshot > GetSnapshot(GetSnapshotParams)
Defines the interface for SnapshotAdminClient::GetSnapshot()
virtual Status DeleteSubscription(DeleteSubscriptionParams)
Defines the interface for SubscriptionAdminClient::DeleteSubscription()
virtual Status DeleteSnapshot(DeleteSnapshotParams)
Defines the interface for SnapshotAdminClient::DeleteSnapshot()
virtual StatusOr< google::pubsub::v1::Subscription > CreateSubscription(CreateSubscriptionParams)
Defines the interface for SubscriptionAdminClient::CreateSubscription()
virtual Status ModifyPushConfig(ModifyPushConfigParams)
Defines the interface for SubscriptionAdminClient::ModifyPushConfig()
virtual StatusOr< google::pubsub::v1::Subscription > UpdateSubscription(UpdateSubscriptionParams)
Defines the interface for SubscriptionAdminClient::UpdateSubscription()
virtual ListSnapshotsRange ListSnapshots(ListSnapshotsParams)
Defines the interface for SubscriptionAdminClient::ListSnapshots()
virtual StatusOr< google::pubsub::v1::Snapshot > UpdateSnapshot(UpdateSnapshotParams)
Defines the interface for SnapshotAdminClient::UpdateSnapshot()
virtual ListSubscriptionsRange ListSubscriptions(ListSubscriptionsParams)
Defines the interface for SubscriptionAdminClient::ListSubscriptions()
Create a Cloud Pub/Sub subscription configuration.
Definition: subscription_builder.h:317
google::pubsub::v1::Subscription BuildCreateRequest(Topic const &topic, Subscription const &subscription) &&
Build a protocol buffer message to create a new subscription.
SubscriptionBuilder()=default
google::pubsub::v1::UpdateSubscriptionRequest BuildUpdateRequest(Subscription const &subscription) &&
Build a protocol buffer message to update an existing subscription.
Objects of this class identify a Cloud Pub/Sub subscription.
Definition: subscription.h:37
Objects of this class identify a Cloud Pub/Sub topic.
Definition: topic.h:37
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.