15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_ADMIN_CONNECTION_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_ADMIN_CONNECTION_H
18#include "google/cloud/pubsub/backoff_policy.h"
19#include "google/cloud/pubsub/connection_options.h"
20#include "google/cloud/pubsub/internal/publisher_stub.h"
21#include "google/cloud/pubsub/retry_policy.h"
22#include "google/cloud/pubsub/subscription.h"
23#include "google/cloud/pubsub/topic.h"
24#include "google/cloud/pubsub/version.h"
25#include "google/cloud/internal/non_constructible.h"
26#include "google/cloud/internal/pagination_range.h"
27#include "google/cloud/status_or.h"
28#include <google/pubsub/v1/pubsub.pb.h>
35GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
38
39
40
41
42
43
44
45
46using ListTopicsRange =
50
51
52
53
54
55
56
57
58using ListTopicSubscriptionsRange =
59 google::
cloud::internal::PaginationRange<std::string>;
62
63
64
65
66
67
68
69
70using ListTopicSnapshotsRange =
71 google::
cloud::internal::PaginationRange<std::string>;
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
151 virtual StatusOr<
google::pubsub::v1::DetachSubscriptionResponse>
166
167
168
169
170
171
172
173
174GOOGLE_CLOUD_CPP_DEPRECATED(
"use MakeTopicAdminConnection() instead")
176 std::initializer_list<internal::NonConstructible>);
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233GOOGLE_CLOUD_CPP_DEPRECATED(
234 "use the overload consuming google::cloud::Options instead")
236 ConnectionOptions
const& options,
237 std::unique_ptr<
pubsub::RetryPolicy
const> retry_policy = {},
238 std::unique_ptr<
pubsub::BackoffPolicy
const> backoff_policy = {});
240GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
243namespace pubsub_internal {
244GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
247 Options const& opts, std::shared_ptr<PublisherStub> stub);
249GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Objects of this class identify a Cloud Pub/Sub subscription.
Definition: subscription.h:37
A connection to Cloud Pub/Sub for topic-related administrative operations.
Definition: topic_admin_connection.h:91
virtual StatusOr< google::pubsub::v1::Topic > CreateTopic(CreateTopicParams)
Defines the interface for TopicAdminClient::CreateTopic()
virtual StatusOr< google::pubsub::v1::Topic > UpdateTopic(UpdateTopicParams)
Defines the interface for TopicAdminClient::UpdateTopic()
virtual Status DeleteTopic(DeleteTopicParams)
Defines the interface for TopicAdminClient::DeleteTopic()
virtual ListTopicSnapshotsRange ListTopicSnapshots(ListTopicSnapshotsParams)
Defines the interface for TopicAdminClient::ListTopicSnapshots()
virtual ~TopicAdminConnection()=0
virtual StatusOr< google::pubsub::v1::Topic > GetTopic(GetTopicParams)
Defines the interface for TopicAdminClient::GetTopic()
virtual ListTopicsRange ListTopics(ListTopicsParams)
Defines the interface for TopicAdminClient::ListTopics()
virtual ListTopicSubscriptionsRange ListTopicSubscriptions(ListTopicSubscriptionsParams)
Defines the interface for TopicAdminClient::ListTopicSubscriptions()
virtual Options options() const
Returns the options used to create the connection.
Definition: topic_admin_connection.h:162
virtual StatusOr< google::pubsub::v1::DetachSubscriptionResponse > DetachSubscription(DetachSubscriptionParams)
Defines the interface for TopicAdminClient::DetachSubscriptions()
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
std::shared_ptr< TopicAdminConnection > MakeTopicAdminConnection(Options opts={})
Creates a new TopicAdminConnection object to work with TopicAdminClient.
std::shared_ptr< TopicAdminConnection > MakeTopicAdminConnection(ConnectionOptions const &options, std::unique_ptr< pubsub::RetryPolicy const > retry_policy={}, std::unique_ptr< pubsub::BackoffPolicy const > backoff_policy={})
Creates a new TopicAdminConnection object to work with TopicAdminClient.
std::shared_ptr< TopicAdminConnection > MakeTopicAdminConnection(std::initializer_list< internal::NonConstructible >)
Creates a new TopicAdminConnection object to work with TopicAdminClient.
The namespace Google Cloud Platform C++ client libraries.
Wrap the arguments for CreateTopic()
Definition: topic_admin_connection.h:96
google::pubsub::v1::Topic topic
Definition: topic_admin_connection.h:97
Wrap the arguments for DeleteTopic()
Definition: topic_admin_connection.h:116
Topic topic
Definition: topic_admin_connection.h:117
Wrap the arguments for DetachSubscription()
Definition: topic_admin_connection.h:121
Subscription subscription
Definition: topic_admin_connection.h:122
Wrap the arguments for GetTopic()
Definition: topic_admin_connection.h:101
Topic topic
Definition: topic_admin_connection.h:102
Wrap the arguments for ListTopicSnapshots()
Definition: topic_admin_connection.h:131
std::string topic_full_name
Definition: topic_admin_connection.h:132
Wrap the arguments for ListTopicSubscriptions()
Definition: topic_admin_connection.h:126
std::string topic_full_name
Definition: topic_admin_connection.h:127
Wrap the arguments for ListTopics()
Definition: topic_admin_connection.h:111
std::string project_id
Definition: topic_admin_connection.h:112
Wrap the arguments for UpdateTopic()
Definition: topic_admin_connection.h:106
google::pubsub::v1::UpdateTopicRequest request
Definition: topic_admin_connection.h:107