15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_ADMIN_CLIENT_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_ADMIN_CLIENT_H
18#include "google/cloud/pubsub/snapshot.h"
19#include "google/cloud/pubsub/topic_admin_connection.h"
20#include "google/cloud/pubsub/topic_builder.h"
21#include "google/cloud/pubsub/version.h"
28GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
31
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
65
66
67
68
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
96 internal::OptionsSpan span(
97 internal::MergeOptions(std::move(opts), options_));
102
103
104
105
106
107
108
109
111 internal::OptionsSpan span(
112 internal::MergeOptions(std::move(opts), options_));
113 return connection_->
GetTopic({std::move(topic)}
);
117
118
119
120
121
122
123
124
125
126
127
128
129
132 internal::OptionsSpan span(
133 internal::MergeOptions(std::move(opts), options_));
138
139
140
141
142
143
144
145
147 internal::OptionsSpan span(
148 internal::MergeOptions(std::move(opts), options_));
149 return connection_->
ListTopics({
"projects/" + project_id}
);
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
169 internal::OptionsSpan span(
170 internal::MergeOptions(std::move(opts), options_));
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
194 internal::OptionsSpan span(
195 internal::MergeOptions(std::move(opts), options_));
200
201
202
203
204
205
206
207
208
209
210
211
212
215 internal::OptionsSpan span(
216 internal::MergeOptions(std::move(opts), options_));
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
239 internal::OptionsSpan span(
240 internal::MergeOptions(std::move(opts), options_));
249GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Objects of this class identify a Cloud Pub/Sub subscription.
Definition: subscription.h:37
Performs topic admin operations in Cloud Pub/Sub.
Definition: topic_admin_client.h:59
StatusOr< google::pubsub::v1::Topic > CreateTopic(TopicBuilder builder, Options opts={})
Creates a new topic in Cloud Pub/Sub.
Definition: topic_admin_client.h:87
StatusOr< google::pubsub::v1::Topic > UpdateTopic(TopicBuilder builder, Options opts={})
Updates the configuration of an existing Cloud Pub/Sub topic.
Definition: topic_admin_client.h:130
ListTopicSnapshotsRange ListTopicSnapshots(Topic const &topic, Options opts={})
Lists all the subscription names for a given topic.
Definition: topic_admin_client.h:237
TopicAdminClient()=delete
The default constructor is deleted.
ListTopicSubscriptionsRange ListTopicSubscriptions(Topic const &topic, Options opts={})
Lists all the subscription names for a given topic.
Definition: topic_admin_client.h:213
StatusOr< google::pubsub::v1::Topic > GetTopic(Topic topic, Options opts={})
Gets information about an existing Cloud Pub/Sub topic.
Definition: topic_admin_client.h:110
ListTopicsRange ListTopics(std::string const &project_id, Options opts={})
Lists all the topics for a given project id.
Definition: topic_admin_client.h:146
TopicAdminClient(std::shared_ptr< TopicAdminConnection > connection, Options opts={})
StatusOr< google::pubsub::v1::Topic > CreateTopic(google::pubsub::v1::Topic request, Options opts={})
Create a new topic in Cloud Pub/Sub.
Definition: topic_admin_client.h:94
StatusOr< google::pubsub::v1::DetachSubscriptionResponse > DetachSubscription(Subscription subscription, Options opts={})
Detaches an existing subscription.
Definition: topic_admin_client.h:192
Status DeleteTopic(Topic topic, Options opts={})
Deletes an existing topic in Cloud Pub/Sub.
Definition: topic_admin_client.h:168
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 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 StatusOr< google::pubsub::v1::DetachSubscriptionResponse > DetachSubscription(DetachSubscriptionParams)
Defines the interface for TopicAdminClient::DetachSubscriptions()
Builds requests to create or update a Cloud Pub/Sub topic.
Definition: topic_builder.h:40
google::pubsub::v1::UpdateTopicRequest BuildUpdateRequest() &&
Build a protocol buffer message to update an existing topic.
google::pubsub::v1::Topic BuildCreateRequest() &&
Build a protocol buffer message to create a new topic.
Objects of this class identify a Cloud Pub/Sub topic.
Definition: topic.h:37
std::string FullName() const
Returns the fully qualified topic name as a string of the form: "projects/<project-id>/topics/<topic-...
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.