|
20 | 20 | #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CLIENT_H |
21 | 21 |
|
22 | 22 | #include "google/cloud/ids/ids_connection.h" |
23 | | -#include "google/cloud/future.h" |
24 | | -#include "google/cloud/options.h" |
25 | | -#include "google/cloud/polling_policy.h" |
26 | | -#include "google/cloud/status_or.h" |
27 | | -#include "google/cloud/version.h" |
28 | | -#include <google/longrunning/operations.grpc.pb.h> |
29 | | -#include <map> |
30 | | -#include <memory> |
| 23 | +#include "google/cloud/ids/v1/ids_client.h" |
31 | 24 |
|
32 | 25 | namespace google { |
33 | 26 | namespace cloud { |
34 | 27 | namespace ids { |
35 | 28 | GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN |
36 | 29 |
|
37 | | -/// |
38 | | -/// The IDS Service |
39 | | -/// |
40 | | -/// @par Equality |
41 | | -/// |
42 | | -/// Instances of this class created via copy-construction or copy-assignment |
43 | | -/// always compare equal. Instances created with equal |
44 | | -/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare |
45 | | -/// equal share the same underlying resources. |
46 | | -/// |
47 | | -/// @par Performance |
48 | | -/// |
49 | | -/// Creating a new instance of this class is a relatively expensive operation, |
50 | | -/// new objects establish new connections to the service. In contrast, |
51 | | -/// copy-construction, move-construction, and the corresponding assignment |
52 | | -/// operations are relatively efficient as the copies share all underlying |
53 | | -/// resources. |
54 | | -/// |
55 | | -/// @par Thread Safety |
56 | | -/// |
57 | | -/// Concurrent access to different instances of this class, even if they compare |
58 | | -/// equal, is guaranteed to work. Two or more threads operating on the same |
59 | | -/// instance of this class is not guaranteed to work. Since copy-construction |
60 | | -/// and move-construction is a relatively efficient operation, consider using |
61 | | -/// such a copy when using this class from multiple threads. |
62 | | -/// |
63 | | -class IDSClient { |
64 | | - public: |
65 | | - explicit IDSClient(std::shared_ptr<IDSConnection> connection, |
66 | | - Options opts = {}); |
67 | | - ~IDSClient(); |
68 | | - |
69 | | - ///@{ |
70 | | - /// @name Copy and move support |
71 | | - IDSClient(IDSClient const&) = default; |
72 | | - IDSClient& operator=(IDSClient const&) = default; |
73 | | - IDSClient(IDSClient&&) = default; |
74 | | - IDSClient& operator=(IDSClient&&) = default; |
75 | | - ///@} |
76 | | - |
77 | | - ///@{ |
78 | | - /// @name Equality |
79 | | - friend bool operator==(IDSClient const& a, IDSClient const& b) { |
80 | | - return a.connection_ == b.connection_; |
81 | | - } |
82 | | - friend bool operator!=(IDSClient const& a, IDSClient const& b) { |
83 | | - return !(a == b); |
84 | | - } |
85 | | - ///@} |
86 | | - |
87 | | - /// |
88 | | - /// Lists Endpoints in a given project and location. |
89 | | - /// |
90 | | - /// @param parent Required. The parent, which owns this collection of |
91 | | - /// endpoints. |
92 | | - /// @param opts Optional. Override the class-level options, such as retry and |
93 | | - /// backoff policies. |
94 | | - /// @return |
95 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
96 | | - /// |
97 | | - /// [google.cloud.ids.v1.Endpoint]: |
98 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
99 | | - /// [google.cloud.ids.v1.ListEndpointsRequest]: |
100 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L158} |
101 | | - /// |
102 | | - StreamRange<google::cloud::ids::v1::Endpoint> ListEndpoints( |
103 | | - std::string const& parent, Options opts = {}); |
104 | | - |
105 | | - /// |
106 | | - /// Lists Endpoints in a given project and location. |
107 | | - /// |
108 | | - /// @param request |
109 | | - /// @googleapis_link{google::cloud::ids::v1::ListEndpointsRequest,google/cloud/ids/v1/ids.proto#L158} |
110 | | - /// @param opts Optional. Override the class-level options, such as retry and |
111 | | - /// backoff policies. |
112 | | - /// @return |
113 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
114 | | - /// |
115 | | - /// [google.cloud.ids.v1.Endpoint]: |
116 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
117 | | - /// [google.cloud.ids.v1.ListEndpointsRequest]: |
118 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L158} |
119 | | - /// |
120 | | - StreamRange<google::cloud::ids::v1::Endpoint> ListEndpoints( |
121 | | - google::cloud::ids::v1::ListEndpointsRequest request, Options opts = {}); |
122 | | - |
123 | | - /// |
124 | | - /// Gets details of a single Endpoint. |
125 | | - /// |
126 | | - /// @param name Required. The name of the endpoint to retrieve. |
127 | | - /// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` |
128 | | - /// @param opts Optional. Override the class-level options, such as retry and |
129 | | - /// backoff policies. |
130 | | - /// @return |
131 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
132 | | - /// |
133 | | - /// [google.cloud.ids.v1.Endpoint]: |
134 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
135 | | - /// [google.cloud.ids.v1.GetEndpointRequest]: |
136 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L199} |
137 | | - /// |
138 | | - StatusOr<google::cloud::ids::v1::Endpoint> GetEndpoint( |
139 | | - std::string const& name, Options opts = {}); |
140 | | - |
141 | | - /// |
142 | | - /// Gets details of a single Endpoint. |
143 | | - /// |
144 | | - /// @param request |
145 | | - /// @googleapis_link{google::cloud::ids::v1::GetEndpointRequest,google/cloud/ids/v1/ids.proto#L199} |
146 | | - /// @param opts Optional. Override the class-level options, such as retry and |
147 | | - /// backoff policies. |
148 | | - /// @return |
149 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
150 | | - /// |
151 | | - /// [google.cloud.ids.v1.Endpoint]: |
152 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
153 | | - /// [google.cloud.ids.v1.GetEndpointRequest]: |
154 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L199} |
155 | | - /// |
156 | | - StatusOr<google::cloud::ids::v1::Endpoint> GetEndpoint( |
157 | | - google::cloud::ids::v1::GetEndpointRequest const& request, |
158 | | - Options opts = {}); |
159 | | - |
160 | | - /// |
161 | | - /// Creates a new Endpoint in a given project and location. |
162 | | - /// |
163 | | - /// @param parent Required. The endpoint's parent. |
164 | | - /// @param endpoint Required. The endpoint to create. |
165 | | - /// @param endpoint_id Required. The endpoint identifier. This will be part |
166 | | - /// of the endpoint's |
167 | | - /// resource name. |
168 | | - /// This value must start with a lowercase letter followed by up to 62 |
169 | | - /// lowercase letters, numbers, or hyphens, and cannot end with a hyphen. |
170 | | - /// Values that do not match this pattern will trigger an INVALID_ARGUMENT |
171 | | - /// error. |
172 | | - /// @param opts Optional. Override the class-level options, such as retry and |
173 | | - /// backoff policies. |
174 | | - /// @return |
175 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
176 | | - /// |
177 | | - /// [google.cloud.ids.v1.CreateEndpointRequest]: |
178 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L210} |
179 | | - /// [google.cloud.ids.v1.Endpoint]: |
180 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
181 | | - /// |
182 | | - future<StatusOr<google::cloud::ids::v1::Endpoint>> CreateEndpoint( |
183 | | - std::string const& parent, |
184 | | - google::cloud::ids::v1::Endpoint const& endpoint, |
185 | | - std::string const& endpoint_id, Options opts = {}); |
186 | | - |
187 | | - /// |
188 | | - /// Creates a new Endpoint in a given project and location. |
189 | | - /// |
190 | | - /// @param request |
191 | | - /// @googleapis_link{google::cloud::ids::v1::CreateEndpointRequest,google/cloud/ids/v1/ids.proto#L210} |
192 | | - /// @param opts Optional. Override the class-level options, such as retry and |
193 | | - /// backoff policies. |
194 | | - /// @return |
195 | | - /// @googleapis_link{google::cloud::ids::v1::Endpoint,google/cloud/ids/v1/ids.proto#L81} |
196 | | - /// |
197 | | - /// [google.cloud.ids.v1.CreateEndpointRequest]: |
198 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L210} |
199 | | - /// [google.cloud.ids.v1.Endpoint]: |
200 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L81} |
201 | | - /// |
202 | | - future<StatusOr<google::cloud::ids::v1::Endpoint>> CreateEndpoint( |
203 | | - google::cloud::ids::v1::CreateEndpointRequest const& request, |
204 | | - Options opts = {}); |
205 | | - |
206 | | - /// |
207 | | - /// Deletes a single Endpoint. |
208 | | - /// |
209 | | - /// @param name Required. The name of the endpoint to delete. |
210 | | - /// @param opts Optional. Override the class-level options, such as retry and |
211 | | - /// backoff policies. |
212 | | - /// @return |
213 | | - /// @googleapis_link{google::cloud::ids::v1::OperationMetadata,google/cloud/ids/v1/ids.proto#L272} |
214 | | - /// |
215 | | - /// [google.cloud.ids.v1.DeleteEndpointRequest]: |
216 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L246} |
217 | | - /// [google.cloud.ids.v1.OperationMetadata]: |
218 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L272} |
219 | | - /// |
220 | | - future<StatusOr<google::cloud::ids::v1::OperationMetadata>> DeleteEndpoint( |
221 | | - std::string const& name, Options opts = {}); |
222 | | - |
223 | | - /// |
224 | | - /// Deletes a single Endpoint. |
225 | | - /// |
226 | | - /// @param request |
227 | | - /// @googleapis_link{google::cloud::ids::v1::DeleteEndpointRequest,google/cloud/ids/v1/ids.proto#L246} |
228 | | - /// @param opts Optional. Override the class-level options, such as retry and |
229 | | - /// backoff policies. |
230 | | - /// @return |
231 | | - /// @googleapis_link{google::cloud::ids::v1::OperationMetadata,google/cloud/ids/v1/ids.proto#L272} |
232 | | - /// |
233 | | - /// [google.cloud.ids.v1.DeleteEndpointRequest]: |
234 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L246} |
235 | | - /// [google.cloud.ids.v1.OperationMetadata]: |
236 | | - /// @googleapis_reference_link{google/cloud/ids/v1/ids.proto#L272} |
237 | | - /// |
238 | | - future<StatusOr<google::cloud::ids::v1::OperationMetadata>> DeleteEndpoint( |
239 | | - google::cloud::ids::v1::DeleteEndpointRequest const& request, |
240 | | - Options opts = {}); |
241 | | - |
242 | | - private: |
243 | | - std::shared_ptr<IDSConnection> connection_; |
244 | | - Options options_; |
245 | | -}; |
| 30 | +/// @deprecated Use ids_v1::IDSClient directly. |
| 31 | +using ::google::cloud::ids_v1::IDSClient; |
246 | 32 |
|
247 | 33 | GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END |
248 | 34 | } // namespace ids |
|
0 commit comments