Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
versions_client.h
1// Copyright 2022 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// https://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// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/cloud/dialogflow/cx/v3/version.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CLIENT_H
21
22#include "google/cloud/dialogflow_cx/versions_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 <memory>
30
31namespace google {
32namespace cloud {
33namespace dialogflow_cx {
34GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
35
36///
37/// Service for managing [Versions][google.cloud.dialogflow.cx.v3.Version].
38///
39/// @par Equality
40///
41/// Instances of this class created via copy-construction or copy-assignment
42/// always compare equal. Instances created with equal
43/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
44/// equal share the same underlying resources.
45///
46/// @par Performance
47///
48/// Creating a new instance of this class is a relatively expensive operation,
49/// new objects establish new connections to the service. In contrast,
50/// copy-construction, move-construction, and the corresponding assignment
51/// operations are relatively efficient as the copies share all underlying
52/// resources.
53///
54/// @par Thread Safety
55///
56/// Concurrent access to different instances of this class, even if they compare
57/// equal, is guaranteed to work. Two or more threads operating on the same
58/// instance of this class is not guaranteed to work. Since copy-construction
59/// and move-construction is a relatively efficient operation, consider using
60/// such a copy when using this class from multiple threads.
61///
62/// [google.cloud.dialogflow.cx.v3.Version]:
63/// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
64///
65class VersionsClient {
66 public:
67 explicit VersionsClient(std::shared_ptr<VersionsConnection> connection,
68 Options opts = {});
70
71 ///@{
72 /// @name Copy and move support
73 VersionsClient(VersionsClient const&) = default;
74 VersionsClient& operator=(VersionsClient const&) = default;
75 VersionsClient(VersionsClient&&) = default;
77 ///@}
78
79 ///@{
80 /// @name Equality
81 friend bool operator==(VersionsClient const& a, VersionsClient const& b) {
82 return a.connection_ == b.connection_;
83 }
84 friend bool operator!=(VersionsClient const& a, VersionsClient const& b) {
85 return !(a == b);
86 }
87 ///@}
88
89 // clang-format off
90 ///
91 /// Returns the list of all versions in the specified
92 /// [Flow][google.cloud.dialogflow.cx.v3.Flow].
93 ///
94 /// @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all
95 /// versions for. Format: `projects/<Project ID>/locations/<Location
96 /// ID>/agents/<Agent ID>/flows/<Flow ID>`.
97 /// @param opts Optional. Override the class-level options, such as retry and
98 /// backoff policies.
99 /// @return a [StreamRange](@ref google::cloud::StreamRange)
100 /// to iterate of the results. See the documentation of this type for
101 /// details. In brief, this class has `begin()` and `end()` member
102 /// functions returning a iterator class meeting the
103 /// [input iterator requirements]. The value type for this iterator is a
104 /// [`StatusOr`] as the iteration may fail even after some values are
105 /// retrieved successfully, for example, if there is a network disconnect.
106 /// An empty set of results does not indicate an error, it indicates
107 /// that there are no resources meeting the request criteria.
108 /// On a successful iteration the `StatusOr<T>` contains elements of type
109 /// [google.cloud.dialogflow.cx.v3.Version], or rather,
110 /// the C++ class generated by Protobuf from that type. Please consult the
111 /// Protobuf documentation for details on the [Protobuf mapping rules].
112 ///
113 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
114 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
115 /// [Long Running Operation]: https://google.aip.dev/151
116 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
117 /// [`future`]: @ref google::cloud::future
118 /// [`StatusOr`]: @ref google::cloud::StatusOr
119 /// [`Status`]: @ref google::cloud::Status
120 /// [google.cloud.dialogflow.cx.v3.Flow]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/flow.proto#L251}
121 /// [google.cloud.dialogflow.cx.v3.ListVersionsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L195}
122 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
123 ///
124 // clang-format on
125 StreamRange<google::cloud::dialogflow::cx::v3::Version> ListVersions(
126 std::string const& parent, Options opts = {});
127
128 // clang-format off
129 ///
130 /// Returns the list of all versions in the specified
131 /// [Flow][google.cloud.dialogflow.cx.v3.Flow].
132 ///
133 /// @param request Unary RPCs, such as the one wrapped by this
134 /// function, receive a single `request` proto message which includes all
135 /// the inputs for the RPC. In this case, the proto message is a
136 /// [google.cloud.dialogflow.cx.v3.ListVersionsRequest].
137 /// Proto messages are converted to C++ classes by Protobuf, using the
138 /// [Protobuf mapping rules].
139 /// @param opts Optional. Override the class-level options, such as retry and
140 /// backoff policies.
141 /// @return a [StreamRange](@ref google::cloud::StreamRange)
142 /// to iterate of the results. See the documentation of this type for
143 /// details. In brief, this class has `begin()` and `end()` member
144 /// functions returning a iterator class meeting the
145 /// [input iterator requirements]. The value type for this iterator is a
146 /// [`StatusOr`] as the iteration may fail even after some values are
147 /// retrieved successfully, for example, if there is a network disconnect.
148 /// An empty set of results does not indicate an error, it indicates
149 /// that there are no resources meeting the request criteria.
150 /// On a successful iteration the `StatusOr<T>` contains elements of type
151 /// [google.cloud.dialogflow.cx.v3.Version], or rather,
152 /// the C++ class generated by Protobuf from that type. Please consult the
153 /// Protobuf documentation for details on the [Protobuf mapping rules].
154 ///
155 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
156 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
157 /// [Long Running Operation]: https://google.aip.dev/151
158 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
159 /// [`future`]: @ref google::cloud::future
160 /// [`StatusOr`]: @ref google::cloud::StatusOr
161 /// [`Status`]: @ref google::cloud::Status
162 /// [google.cloud.dialogflow.cx.v3.Flow]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/flow.proto#L251}
163 /// [google.cloud.dialogflow.cx.v3.ListVersionsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L195}
164 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
165 ///
166 // clang-format on
167 StreamRange<google::cloud::dialogflow::cx::v3::Version> ListVersions(
168 google::cloud::dialogflow::cx::v3::ListVersionsRequest request,
169 Options opts = {});
170
171 // clang-format off
172 ///
173 /// Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version].
174 ///
175 /// @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version].
176 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
177 /// ID>/flows/<Flow ID>/versions/<Version ID>`.
178 /// @param opts Optional. Override the class-level options, such as retry and
179 /// backoff policies.
180 /// @return the result of the RPC. The response message type
181 /// ([google.cloud.dialogflow.cx.v3.Version])
182 /// is mapped to a C++ class using the [Protobuf mapping rules].
183 /// If the request fails, the [`StatusOr`] contains the error details.
184 ///
185 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
186 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
187 /// [Long Running Operation]: https://google.aip.dev/151
188 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
189 /// [`future`]: @ref google::cloud::future
190 /// [`StatusOr`]: @ref google::cloud::StatusOr
191 /// [`Status`]: @ref google::cloud::Status
192 /// [google.cloud.dialogflow.cx.v3.GetVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L229}
193 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
194 ///
195 // clang-format on
196 StatusOr<google::cloud::dialogflow::cx::v3::Version> GetVersion(
197 std::string const& name, Options opts = {});
198
199 // clang-format off
200 ///
201 /// Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version].
202 ///
203 /// @param request Unary RPCs, such as the one wrapped by this
204 /// function, receive a single `request` proto message which includes all
205 /// the inputs for the RPC. In this case, the proto message is a
206 /// [google.cloud.dialogflow.cx.v3.GetVersionRequest].
207 /// Proto messages are converted to C++ classes by Protobuf, using the
208 /// [Protobuf mapping rules].
209 /// @param opts Optional. Override the class-level options, such as retry and
210 /// backoff policies.
211 /// @return the result of the RPC. The response message type
212 /// ([google.cloud.dialogflow.cx.v3.Version])
213 /// is mapped to a C++ class using the [Protobuf mapping rules].
214 /// If the request fails, the [`StatusOr`] contains the error details.
215 ///
216 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
217 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
218 /// [Long Running Operation]: https://google.aip.dev/151
219 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
220 /// [`future`]: @ref google::cloud::future
221 /// [`StatusOr`]: @ref google::cloud::StatusOr
222 /// [`Status`]: @ref google::cloud::Status
223 /// [google.cloud.dialogflow.cx.v3.GetVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L229}
224 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
225 ///
226 // clang-format on
227 StatusOr<google::cloud::dialogflow::cx::v3::Version> GetVersion(
228 google::cloud::dialogflow::cx::v3::GetVersionRequest const& request,
229 Options opts = {});
230
231 // clang-format off
232 ///
233 /// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
234 /// [Flow][google.cloud.dialogflow.cx.v3.Flow].
235 ///
236 /// This method is a [long-running
237 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
238 /// The returned `Operation` type has the following method-specific fields:
239 ///
240 /// - `metadata`:
241 /// [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
242 /// - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
243 ///
244 /// @param parent Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an
245 /// [Version][google.cloud.dialogflow.cx.v3.Version] for. Format:
246 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
247 /// ID>/flows/<Flow ID>`.
248 /// @param version Required. The version to create.
249 /// @param opts Optional. Override the class-level options, such as retry and
250 /// backoff policies.
251 /// @return A [`future`] that becomes satisfied when the LRO
252 /// ([Long Running Operation]) completes or the polling policy in effect
253 /// for this call is exhausted. The future is satisfied with an error if
254 /// the LRO completes with an error or the polling policy is exhausted.
255 /// In this case the [`StatusOr`] returned by the future contains the
256 /// error. If the LRO completes successfully the value of the future
257 /// contains the LRO's result. For this RPC the result is a
258 /// [google.cloud.dialogflow.cx.v3.Version] proto message.
259 /// The C++ class representing this message is created by Protobuf, using
260 /// the [Protobuf mapping rules].
261 ///
262 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
263 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
264 /// [Long Running Operation]: https://google.aip.dev/151
265 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
266 /// [`future`]: @ref google::cloud::future
267 /// [`StatusOr`]: @ref google::cloud::StatusOr
268 /// [`Status`]: @ref google::cloud::Status
269 /// [google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L138}
270 /// [google.cloud.dialogflow.cx.v3.CreateVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L243}
271 /// [google.cloud.dialogflow.cx.v3.Flow]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/flow.proto#L251}
272 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
273 ///
274 // clang-format on
275 future<StatusOr<google::cloud::dialogflow::cx::v3::Version>> CreateVersion(
276 std::string const& parent,
277 google::cloud::dialogflow::cx::v3::Version const& version,
278 Options opts = {});
279
280 // clang-format off
281 ///
282 /// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
283 /// [Flow][google.cloud.dialogflow.cx.v3.Flow].
284 ///
285 /// This method is a [long-running
286 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
287 /// The returned `Operation` type has the following method-specific fields:
288 ///
289 /// - `metadata`:
290 /// [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
291 /// - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
292 ///
293 /// @param request Unary RPCs, such as the one wrapped by this
294 /// function, receive a single `request` proto message which includes all
295 /// the inputs for the RPC. In this case, the proto message is a
296 /// [google.cloud.dialogflow.cx.v3.CreateVersionRequest].
297 /// Proto messages are converted to C++ classes by Protobuf, using the
298 /// [Protobuf mapping rules].
299 /// @param opts Optional. Override the class-level options, such as retry and
300 /// backoff policies.
301 /// @return A [`future`] that becomes satisfied when the LRO
302 /// ([Long Running Operation]) completes or the polling policy in effect
303 /// for this call is exhausted. The future is satisfied with an error if
304 /// the LRO completes with an error or the polling policy is exhausted.
305 /// In this case the [`StatusOr`] returned by the future contains the
306 /// error. If the LRO completes successfully the value of the future
307 /// contains the LRO's result. For this RPC the result is a
308 /// [google.cloud.dialogflow.cx.v3.Version] proto message.
309 /// The C++ class representing this message is created by Protobuf, using
310 /// the [Protobuf mapping rules].
311 ///
312 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
313 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
314 /// [Long Running Operation]: https://google.aip.dev/151
315 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
316 /// [`future`]: @ref google::cloud::future
317 /// [`StatusOr`]: @ref google::cloud::StatusOr
318 /// [`Status`]: @ref google::cloud::Status
319 /// [google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L138}
320 /// [google.cloud.dialogflow.cx.v3.CreateVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L243}
321 /// [google.cloud.dialogflow.cx.v3.Flow]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/flow.proto#L251}
322 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
323 ///
324 // clang-format on
325 future<StatusOr<google::cloud::dialogflow::cx::v3::Version>> CreateVersion(
326 google::cloud::dialogflow::cx::v3::CreateVersionRequest const& request,
327 Options opts = {});
328
329 // clang-format off
330 ///
331 /// Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version].
332 ///
333 /// @param version Required. The version to update.
334 /// @param update_mask Required. The mask to control which fields get updated. Currently only
335 /// `description` and `display_name` can be updated.
336 /// @param opts Optional. Override the class-level options, such as retry and
337 /// backoff policies.
338 /// @return the result of the RPC. The response message type
339 /// ([google.cloud.dialogflow.cx.v3.Version])
340 /// is mapped to a C++ class using the [Protobuf mapping rules].
341 /// If the request fails, the [`StatusOr`] contains the error details.
342 ///
343 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
344 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
345 /// [Long Running Operation]: https://google.aip.dev/151
346 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
347 /// [`future`]: @ref google::cloud::future
348 /// [`StatusOr`]: @ref google::cloud::StatusOr
349 /// [`Status`]: @ref google::cloud::Status
350 /// [google.cloud.dialogflow.cx.v3.UpdateVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L261}
351 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
352 ///
353 // clang-format on
354 StatusOr<google::cloud::dialogflow::cx::v3::Version> UpdateVersion(
355 google::cloud::dialogflow::cx::v3::Version const& version,
356 google::protobuf::FieldMask const& update_mask, Options opts = {});
357
358 // clang-format off
359 ///
360 /// Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version].
361 ///
362 /// @param request Unary RPCs, such as the one wrapped by this
363 /// function, receive a single `request` proto message which includes all
364 /// the inputs for the RPC. In this case, the proto message is a
365 /// [google.cloud.dialogflow.cx.v3.UpdateVersionRequest].
366 /// Proto messages are converted to C++ classes by Protobuf, using the
367 /// [Protobuf mapping rules].
368 /// @param opts Optional. Override the class-level options, such as retry and
369 /// backoff policies.
370 /// @return the result of the RPC. The response message type
371 /// ([google.cloud.dialogflow.cx.v3.Version])
372 /// is mapped to a C++ class using the [Protobuf mapping rules].
373 /// If the request fails, the [`StatusOr`] contains the error details.
374 ///
375 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
376 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
377 /// [Long Running Operation]: https://google.aip.dev/151
378 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
379 /// [`future`]: @ref google::cloud::future
380 /// [`StatusOr`]: @ref google::cloud::StatusOr
381 /// [`Status`]: @ref google::cloud::Status
382 /// [google.cloud.dialogflow.cx.v3.UpdateVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L261}
383 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
384 ///
385 // clang-format on
386 StatusOr<google::cloud::dialogflow::cx::v3::Version> UpdateVersion(
387 google::cloud::dialogflow::cx::v3::UpdateVersionRequest const& request,
388 Options opts = {});
389
390 // clang-format off
391 ///
392 /// Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version].
393 ///
394 /// @param name Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]
395 /// to delete. Format: `projects/<Project ID>/locations/<Location
396 /// ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
397 /// @param opts Optional. Override the class-level options, such as retry and
398 /// backoff policies.
399 /// @return a [`Status`] object. If the request failed, the
400 /// status contains the details of the failure.
401 ///
402 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
403 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
404 /// [Long Running Operation]: https://google.aip.dev/151
405 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
406 /// [`future`]: @ref google::cloud::future
407 /// [`StatusOr`]: @ref google::cloud::StatusOr
408 /// [`Status`]: @ref google::cloud::Status
409 /// [google.cloud.dialogflow.cx.v3.DeleteVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L273}
410 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
411 ///
412 // clang-format on
413 Status DeleteVersion(std::string const& name, Options opts = {});
414
415 // clang-format off
416 ///
417 /// Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version].
418 ///
419 /// @param request Unary RPCs, such as the one wrapped by this
420 /// function, receive a single `request` proto message which includes all
421 /// the inputs for the RPC. In this case, the proto message is a
422 /// [google.cloud.dialogflow.cx.v3.DeleteVersionRequest].
423 /// Proto messages are converted to C++ classes by Protobuf, using the
424 /// [Protobuf mapping rules].
425 /// @param opts Optional. Override the class-level options, such as retry and
426 /// backoff policies.
427 /// @return a [`Status`] object. If the request failed, the
428 /// status contains the details of the failure.
429 ///
430 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
431 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
432 /// [Long Running Operation]: https://google.aip.dev/151
433 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
434 /// [`future`]: @ref google::cloud::future
435 /// [`StatusOr`]: @ref google::cloud::StatusOr
436 /// [`Status`]: @ref google::cloud::Status
437 /// [google.cloud.dialogflow.cx.v3.DeleteVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L273}
438 /// [google.cloud.dialogflow.cx.v3.Version]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L148}
439 ///
440 // clang-format on
442 google::cloud::dialogflow::cx::v3::DeleteVersionRequest const& request,
443 Options opts = {});
444
445 // clang-format off
446 ///
447 /// Loads resources in the specified version to the draft flow.
448 ///
449 /// This method is a [long-running
450 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
451 /// The returned `Operation` type has the following method-specific fields:
452 ///
453 /// - `metadata`: An empty [Struct
454 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
455 /// - `response`: An [Empty
456 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
457 ///
458 /// @param name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded
459 /// to draft flow. Format: `projects/<Project ID>/locations/<Location
460 /// ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
461 /// @param opts Optional. Override the class-level options, such as retry and
462 /// backoff policies.
463 /// @return A [`future`] that becomes satisfied when the LRO
464 /// ([Long Running Operation]) completes or the polling policy in effect
465 /// for this call is exhausted. The future is satisfied with an error if
466 /// the LRO completes with an error or the polling policy is exhausted.
467 /// In this case the [`StatusOr`] returned by the future contains the
468 /// error. If the LRO completes successfully the value of the future
469 /// contains the LRO's result. For this RPC the result is a
470 /// [google.protobuf.Struct] proto message.
471 /// The C++ class representing this message is created by Protobuf, using
472 /// the [Protobuf mapping rules].
473 ///
474 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
475 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
476 /// [Long Running Operation]: https://google.aip.dev/151
477 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
478 /// [`future`]: @ref google::cloud::future
479 /// [`StatusOr`]: @ref google::cloud::StatusOr
480 /// [`Status`]: @ref google::cloud::Status
481 /// [google.cloud.dialogflow.cx.v3.LoadVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L287}
482 /// [google.protobuf.Struct]: @googleapis_reference_link{google/protobuf/struct.proto#L51}
483 ///
484 // clang-format on
485 future<StatusOr<google::protobuf::Struct>> LoadVersion(
486 std::string const& name, Options opts = {});
487
488 // clang-format off
489 ///
490 /// Loads resources in the specified version to the draft flow.
491 ///
492 /// This method is a [long-running
493 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
494 /// The returned `Operation` type has the following method-specific fields:
495 ///
496 /// - `metadata`: An empty [Struct
497 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
498 /// - `response`: An [Empty
499 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
500 ///
501 /// @param request Unary RPCs, such as the one wrapped by this
502 /// function, receive a single `request` proto message which includes all
503 /// the inputs for the RPC. In this case, the proto message is a
504 /// [google.cloud.dialogflow.cx.v3.LoadVersionRequest].
505 /// Proto messages are converted to C++ classes by Protobuf, using the
506 /// [Protobuf mapping rules].
507 /// @param opts Optional. Override the class-level options, such as retry and
508 /// backoff policies.
509 /// @return A [`future`] that becomes satisfied when the LRO
510 /// ([Long Running Operation]) completes or the polling policy in effect
511 /// for this call is exhausted. The future is satisfied with an error if
512 /// the LRO completes with an error or the polling policy is exhausted.
513 /// In this case the [`StatusOr`] returned by the future contains the
514 /// error. If the LRO completes successfully the value of the future
515 /// contains the LRO's result. For this RPC the result is a
516 /// [google.protobuf.Struct] proto message.
517 /// The C++ class representing this message is created by Protobuf, using
518 /// the [Protobuf mapping rules].
519 ///
520 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
521 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
522 /// [Long Running Operation]: https://google.aip.dev/151
523 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
524 /// [`future`]: @ref google::cloud::future
525 /// [`StatusOr`]: @ref google::cloud::StatusOr
526 /// [`Status`]: @ref google::cloud::Status
527 /// [google.cloud.dialogflow.cx.v3.LoadVersionRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L287}
528 /// [google.protobuf.Struct]: @googleapis_reference_link{google/protobuf/struct.proto#L51}
529 ///
530 // clang-format on
531 future<StatusOr<google::protobuf::Struct>> LoadVersion(
532 google::cloud::dialogflow::cx::v3::LoadVersionRequest const& request,
533 Options opts = {});
534
535 // clang-format off
536 ///
537 /// Compares the specified base version with target version.
538 ///
539 /// @param base_version Required. Name of the base flow version to compare with the target version.
540 /// Use version ID `0` to indicate the draft version of the specified flow.
541 /// @n
542 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/
543 /// <Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
544 /// @param opts Optional. Override the class-level options, such as retry and
545 /// backoff policies.
546 /// @return the result of the RPC. The response message type
547 /// ([google.cloud.dialogflow.cx.v3.CompareVersionsResponse])
548 /// is mapped to a C++ class using the [Protobuf mapping rules].
549 /// If the request fails, the [`StatusOr`] contains the error details.
550 ///
551 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
552 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
553 /// [Long Running Operation]: https://google.aip.dev/151
554 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
555 /// [`future`]: @ref google::cloud::future
556 /// [`StatusOr`]: @ref google::cloud::StatusOr
557 /// [`Status`]: @ref google::cloud::Status
558 /// [google.cloud.dialogflow.cx.v3.CompareVersionsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L307}
559 /// [google.cloud.dialogflow.cx.v3.CompareVersionsResponse]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L343}
560 ///
561 // clang-format on
562 StatusOr<google::cloud::dialogflow::cx::v3::CompareVersionsResponse>
563 CompareVersions(std::string const& base_version, Options opts = {});
564
565 // clang-format off
566 ///
567 /// Compares the specified base version with target version.
568 ///
569 /// @param request Unary RPCs, such as the one wrapped by this
570 /// function, receive a single `request` proto message which includes all
571 /// the inputs for the RPC. In this case, the proto message is a
572 /// [google.cloud.dialogflow.cx.v3.CompareVersionsRequest].
573 /// Proto messages are converted to C++ classes by Protobuf, using the
574 /// [Protobuf mapping rules].
575 /// @param opts Optional. Override the class-level options, such as retry and
576 /// backoff policies.
577 /// @return the result of the RPC. The response message type
578 /// ([google.cloud.dialogflow.cx.v3.CompareVersionsResponse])
579 /// is mapped to a C++ class using the [Protobuf mapping rules].
580 /// If the request fails, the [`StatusOr`] contains the error details.
581 ///
582 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
583 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
584 /// [Long Running Operation]: https://google.aip.dev/151
585 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
586 /// [`future`]: @ref google::cloud::future
587 /// [`StatusOr`]: @ref google::cloud::StatusOr
588 /// [`Status`]: @ref google::cloud::Status
589 /// [google.cloud.dialogflow.cx.v3.CompareVersionsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L307}
590 /// [google.cloud.dialogflow.cx.v3.CompareVersionsResponse]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/version.proto#L343}
591 ///
592 // clang-format on
593 StatusOr<google::cloud::dialogflow::cx::v3::CompareVersionsResponse>
595 google::cloud::dialogflow::cx::v3::CompareVersionsRequest const& request,
596 Options opts = {});
597
598 private:
599 std::shared_ptr<VersionsConnection> connection_;
600 Options options_;
601};
602
603GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
604} // namespace dialogflow_cx
605} // namespace cloud
606} // namespace google
607
608#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CLIENT_H
Service for managing Versions.
Definition: versions_client.h:65
StatusOr< google::cloud::dialogflow::cx::v3::Version > UpdateVersion(google::cloud::dialogflow::cx::v3::UpdateVersionRequest const &request, Options opts={})
Updates the specified Version.
StatusOr< google::cloud::dialogflow::cx::v3::Version > GetVersion(google::cloud::dialogflow::cx::v3::GetVersionRequest const &request, Options opts={})
Retrieves the specified Version.
StreamRange< google::cloud::dialogflow::cx::v3::Version > ListVersions(std::string const &parent, Options opts={})
Returns the list of all versions in the specified Flow.
friend bool operator==(VersionsClient const &a, VersionsClient const &b)
Definition: versions_client.h:81
Status DeleteVersion(std::string const &name, Options opts={})
Deletes the specified Version.
VersionsClient(std::shared_ptr< VersionsConnection > connection, Options opts={})
StatusOr< google::cloud::dialogflow::cx::v3::Version > UpdateVersion(google::cloud::dialogflow::cx::v3::Version const &version, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates the specified Version.
future< StatusOr< google::protobuf::Struct > > LoadVersion(google::cloud::dialogflow::cx::v3::LoadVersionRequest const &request, Options opts={})
Loads resources in the specified version to the draft flow.
VersionsClient & operator=(VersionsClient &&)=default
future< StatusOr< google::cloud::dialogflow::cx::v3::Version > > CreateVersion(google::cloud::dialogflow::cx::v3::CreateVersionRequest const &request, Options opts={})
Creates a Version in the specified Flow.
future< StatusOr< google::protobuf::Struct > > LoadVersion(std::string const &name, Options opts={})
Loads resources in the specified version to the draft flow.
StatusOr< google::cloud::dialogflow::cx::v3::Version > GetVersion(std::string const &name, Options opts={})
Retrieves the specified Version.
VersionsClient & operator=(VersionsClient const &)=default
Status DeleteVersion(google::cloud::dialogflow::cx::v3::DeleteVersionRequest const &request, Options opts={})
Deletes the specified Version.
VersionsClient(VersionsClient const &)=default
VersionsClient(VersionsClient &&)=default
future< StatusOr< google::cloud::dialogflow::cx::v3::Version > > CreateVersion(std::string const &parent, google::cloud::dialogflow::cx::v3::Version const &version, Options opts={})
Creates a Version in the specified Flow.
StatusOr< google::cloud::dialogflow::cx::v3::CompareVersionsResponse > CompareVersions(std::string const &base_version, Options opts={})
Compares the specified base version with target version.
StatusOr< google::cloud::dialogflow::cx::v3::CompareVersionsResponse > CompareVersions(google::cloud::dialogflow::cx::v3::CompareVersionsRequest const &request, Options opts={})
Compares the specified base version with target version.
StreamRange< google::cloud::dialogflow::cx::v3::Version > ListVersions(google::cloud::dialogflow::cx::v3::ListVersionsRequest request, Options opts={})
Returns the list of all versions in the specified Flow.
friend bool operator!=(VersionsClient const &a, VersionsClient const &b)
Definition: versions_client.h:84
The VersionsConnection object for VersionsClient.
Definition: versions_connection.h:65
friend friend class future
Definition: agents_client.h:33