Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
environments_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/environment.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CLIENT_H
21
22#include "google/cloud/dialogflow_cx/environments_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
38/// [Environments][google.cloud.dialogflow.cx.v3.Environment].
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/// [google.cloud.dialogflow.cx.v3.Environment]:
64/// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
65///
67 public:
68 explicit EnvironmentsClient(
69 std::shared_ptr<EnvironmentsConnection> connection, Options opts = {});
71
72 ///@{
73 /// @name Copy and move support
74 EnvironmentsClient(EnvironmentsClient const&) = default;
78 ///@}
79
80 ///@{
81 /// @name Equality
82 friend bool operator==(EnvironmentsClient const& a,
83 EnvironmentsClient const& b) {
84 return a.connection_ == b.connection_;
85 }
86 friend bool operator!=(EnvironmentsClient const& a,
87 EnvironmentsClient const& b) {
88 return !(a == b);
89 }
90 ///@}
91
92 // clang-format off
93 ///
94 /// Returns the list of all environments in the specified
95 /// [Agent][google.cloud.dialogflow.cx.v3.Agent].
96 ///
97 /// @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all
98 /// environments for. Format: `projects/<Project ID>/locations/<Location
99 /// ID>/agents/<Agent ID>`.
100 /// @param opts Optional. Override the class-level options, such as retry and
101 /// backoff policies.
102 /// @return a [StreamRange](@ref google::cloud::StreamRange)
103 /// to iterate of the results. See the documentation of this type for
104 /// details. In brief, this class has `begin()` and `end()` member
105 /// functions returning a iterator class meeting the
106 /// [input iterator requirements]. The value type for this iterator is a
107 /// [`StatusOr`] as the iteration may fail even after some values are
108 /// retrieved successfully, for example, if there is a network disconnect.
109 /// An empty set of results does not indicate an error, it indicates
110 /// that there are no resources meeting the request criteria.
111 /// On a successful iteration the `StatusOr<T>` contains elements of type
112 /// [google.cloud.dialogflow.cx.v3.Environment], or rather,
113 /// the C++ class generated by Protobuf from that type. Please consult the
114 /// Protobuf documentation for details on the [Protobuf mapping rules].
115 ///
116 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
117 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
118 /// [Long Running Operation]: https://google.aip.dev/151
119 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
120 /// [`future`]: @ref google::cloud::future
121 /// [`StatusOr`]: @ref google::cloud::StatusOr
122 /// [`Status`]: @ref google::cloud::Status
123 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
124 /// [google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L276}
125 ///
126 // clang-format on
127 StreamRange<google::cloud::dialogflow::cx::v3::Environment> ListEnvironments(
128 std::string const& parent, Options opts = {});
129
130 // clang-format off
131 ///
132 /// Returns the list of all environments in the specified
133 /// [Agent][google.cloud.dialogflow.cx.v3.Agent].
134 ///
135 /// @param request Unary RPCs, such as the one wrapped by this
136 /// function, receive a single `request` proto message which includes all
137 /// the inputs for the RPC. In this case, the proto message is a
138 /// [google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest].
139 /// Proto messages are converted to C++ classes by Protobuf, using the
140 /// [Protobuf mapping rules].
141 /// @param opts Optional. Override the class-level options, such as retry and
142 /// backoff policies.
143 /// @return a [StreamRange](@ref google::cloud::StreamRange)
144 /// to iterate of the results. See the documentation of this type for
145 /// details. In brief, this class has `begin()` and `end()` member
146 /// functions returning a iterator class meeting the
147 /// [input iterator requirements]. The value type for this iterator is a
148 /// [`StatusOr`] as the iteration may fail even after some values are
149 /// retrieved successfully, for example, if there is a network disconnect.
150 /// An empty set of results does not indicate an error, it indicates
151 /// that there are no resources meeting the request criteria.
152 /// On a successful iteration the `StatusOr<T>` contains elements of type
153 /// [google.cloud.dialogflow.cx.v3.Environment], or rather,
154 /// the C++ class generated by Protobuf from that type. Please consult the
155 /// Protobuf documentation for details on the [Protobuf mapping rules].
156 ///
157 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
158 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
159 /// [Long Running Operation]: https://google.aip.dev/151
160 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
161 /// [`future`]: @ref google::cloud::future
162 /// [`StatusOr`]: @ref google::cloud::StatusOr
163 /// [`Status`]: @ref google::cloud::Status
164 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
165 /// [google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L276}
166 ///
167 // clang-format on
168 StreamRange<google::cloud::dialogflow::cx::v3::Environment> ListEnvironments(
169 google::cloud::dialogflow::cx::v3::ListEnvironmentsRequest request,
170 Options opts = {});
171
172 // clang-format off
173 ///
174 /// Retrieves the specified
175 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
176 ///
177 /// @param name Required. The name of the
178 /// [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format:
179 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
180 /// ID>/environments/<Environment ID>`.
181 /// @param opts Optional. Override the class-level options, such as retry and
182 /// backoff policies.
183 /// @return the result of the RPC. The response message type
184 /// ([google.cloud.dialogflow.cx.v3.Environment])
185 /// is mapped to a C++ class using the [Protobuf mapping rules].
186 /// If the request fails, the [`StatusOr`] contains the error details.
187 ///
188 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
189 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
190 /// [Long Running Operation]: https://google.aip.dev/151
191 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
192 /// [`future`]: @ref google::cloud::future
193 /// [`StatusOr`]: @ref google::cloud::StatusOr
194 /// [`Status`]: @ref google::cloud::Status
195 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
196 /// [google.cloud.dialogflow.cx.v3.GetEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L311}
197 ///
198 // clang-format on
199 StatusOr<google::cloud::dialogflow::cx::v3::Environment> GetEnvironment(
200 std::string const& name, Options opts = {});
201
202 // clang-format off
203 ///
204 /// Retrieves the specified
205 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
206 ///
207 /// @param request Unary RPCs, such as the one wrapped by this
208 /// function, receive a single `request` proto message which includes all
209 /// the inputs for the RPC. In this case, the proto message is a
210 /// [google.cloud.dialogflow.cx.v3.GetEnvironmentRequest].
211 /// Proto messages are converted to C++ classes by Protobuf, using the
212 /// [Protobuf mapping rules].
213 /// @param opts Optional. Override the class-level options, such as retry and
214 /// backoff policies.
215 /// @return the result of the RPC. The response message type
216 /// ([google.cloud.dialogflow.cx.v3.Environment])
217 /// is mapped to a C++ class using the [Protobuf mapping rules].
218 /// If the request fails, the [`StatusOr`] contains the error details.
219 ///
220 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
221 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
222 /// [Long Running Operation]: https://google.aip.dev/151
223 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
224 /// [`future`]: @ref google::cloud::future
225 /// [`StatusOr`]: @ref google::cloud::StatusOr
226 /// [`Status`]: @ref google::cloud::Status
227 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
228 /// [google.cloud.dialogflow.cx.v3.GetEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L311}
229 ///
230 // clang-format on
231 StatusOr<google::cloud::dialogflow::cx::v3::Environment> GetEnvironment(
232 google::cloud::dialogflow::cx::v3::GetEnvironmentRequest const& request,
233 Options opts = {});
234
235 // clang-format off
236 ///
237 /// Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the
238 /// specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
239 ///
240 /// This method is a [long-running
241 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
242 /// The returned `Operation` type has the following method-specific fields:
243 ///
244 /// - `metadata`: An empty [Struct
245 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
246 /// - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment]
247 ///
248 /// @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an
249 /// [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format:
250 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
251 /// @param environment Required. The environment to create.
252 /// @param opts Optional. Override the class-level options, such as retry and
253 /// backoff policies.
254 /// @return A [`future`] that becomes satisfied when the LRO
255 /// ([Long Running Operation]) completes or the polling policy in effect
256 /// for this call is exhausted. The future is satisfied with an error if
257 /// the LRO completes with an error or the polling policy is exhausted.
258 /// In this case the [`StatusOr`] returned by the future contains the
259 /// error. If the LRO completes successfully the value of the future
260 /// contains the LRO's result. For this RPC the result is a
261 /// [google.cloud.dialogflow.cx.v3.Environment] proto message.
262 /// The C++ class representing this message is created by Protobuf, using
263 /// the [Protobuf mapping rules].
264 ///
265 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
266 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
267 /// [Long Running Operation]: https://google.aip.dev/151
268 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
269 /// [`future`]: @ref google::cloud::future
270 /// [`StatusOr`]: @ref google::cloud::StatusOr
271 /// [`Status`]: @ref google::cloud::Status
272 /// [google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L326}
273 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
274 ///
275 // clang-format on
276 future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
278 std::string const& parent,
279 google::cloud::dialogflow::cx::v3::Environment const& environment,
280 Options opts = {});
281
282 // clang-format off
283 ///
284 /// Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the
285 /// specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
286 ///
287 /// This method is a [long-running
288 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
289 /// The returned `Operation` type has the following method-specific fields:
290 ///
291 /// - `metadata`: An empty [Struct
292 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
293 /// - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment]
294 ///
295 /// @param request Unary RPCs, such as the one wrapped by this
296 /// function, receive a single `request` proto message which includes all
297 /// the inputs for the RPC. In this case, the proto message is a
298 /// [google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest].
299 /// Proto messages are converted to C++ classes by Protobuf, using the
300 /// [Protobuf mapping rules].
301 /// @param opts Optional. Override the class-level options, such as retry and
302 /// backoff policies.
303 /// @return A [`future`] that becomes satisfied when the LRO
304 /// ([Long Running Operation]) completes or the polling policy in effect
305 /// for this call is exhausted. The future is satisfied with an error if
306 /// the LRO completes with an error or the polling policy is exhausted.
307 /// In this case the [`StatusOr`] returned by the future contains the
308 /// error. If the LRO completes successfully the value of the future
309 /// contains the LRO's result. For this RPC the result is a
310 /// [google.cloud.dialogflow.cx.v3.Environment] proto message.
311 /// The C++ class representing this message is created by Protobuf, using
312 /// the [Protobuf mapping rules].
313 ///
314 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
315 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
316 /// [Long Running Operation]: https://google.aip.dev/151
317 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
318 /// [`future`]: @ref google::cloud::future
319 /// [`StatusOr`]: @ref google::cloud::StatusOr
320 /// [`Status`]: @ref google::cloud::Status
321 /// [google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L326}
322 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
323 ///
324 // clang-format on
325 future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
327 google::cloud::dialogflow::cx::v3::CreateEnvironmentRequest const&
328 request,
329 Options opts = {});
330
331 // clang-format off
332 ///
333 /// Updates the specified
334 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
335 ///
336 /// This method is a [long-running
337 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
338 /// The returned `Operation` type has the following method-specific fields:
339 ///
340 /// - `metadata`: An empty [Struct
341 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
342 /// - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment]
343 ///
344 /// @param environment Required. The environment to update.
345 /// @param update_mask Required. The mask to control which fields get updated.
346 /// @param opts Optional. Override the class-level options, such as retry and
347 /// backoff policies.
348 /// @return A [`future`] that becomes satisfied when the LRO
349 /// ([Long Running Operation]) completes or the polling policy in effect
350 /// for this call is exhausted. The future is satisfied with an error if
351 /// the LRO completes with an error or the polling policy is exhausted.
352 /// In this case the [`StatusOr`] returned by the future contains the
353 /// error. If the LRO completes successfully the value of the future
354 /// contains the LRO's result. For this RPC the result is a
355 /// [google.cloud.dialogflow.cx.v3.Environment] proto message.
356 /// The C++ class representing this message is created by Protobuf, using
357 /// the [Protobuf mapping rules].
358 ///
359 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
360 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
361 /// [Long Running Operation]: https://google.aip.dev/151
362 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
363 /// [`future`]: @ref google::cloud::future
364 /// [`StatusOr`]: @ref google::cloud::StatusOr
365 /// [`Status`]: @ref google::cloud::Status
366 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
367 /// [google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L343}
368 ///
369 // clang-format on
370 future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
372 google::cloud::dialogflow::cx::v3::Environment const& environment,
373 google::protobuf::FieldMask const& update_mask, Options opts = {});
374
375 // clang-format off
376 ///
377 /// Updates the specified
378 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
379 ///
380 /// This method is a [long-running
381 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
382 /// The returned `Operation` type has the following method-specific fields:
383 ///
384 /// - `metadata`: An empty [Struct
385 /// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
386 /// - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment]
387 ///
388 /// @param request Unary RPCs, such as the one wrapped by this
389 /// function, receive a single `request` proto message which includes all
390 /// the inputs for the RPC. In this case, the proto message is a
391 /// [google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest].
392 /// Proto messages are converted to C++ classes by Protobuf, using the
393 /// [Protobuf mapping rules].
394 /// @param opts Optional. Override the class-level options, such as retry and
395 /// backoff policies.
396 /// @return A [`future`] that becomes satisfied when the LRO
397 /// ([Long Running Operation]) completes or the polling policy in effect
398 /// for this call is exhausted. The future is satisfied with an error if
399 /// the LRO completes with an error or the polling policy is exhausted.
400 /// In this case the [`StatusOr`] returned by the future contains the
401 /// error. If the LRO completes successfully the value of the future
402 /// contains the LRO's result. For this RPC the result is a
403 /// [google.cloud.dialogflow.cx.v3.Environment] proto message.
404 /// The C++ class representing this message is created by Protobuf, using
405 /// the [Protobuf mapping rules].
406 ///
407 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
408 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
409 /// [Long Running Operation]: https://google.aip.dev/151
410 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
411 /// [`future`]: @ref google::cloud::future
412 /// [`StatusOr`]: @ref google::cloud::StatusOr
413 /// [`Status`]: @ref google::cloud::Status
414 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
415 /// [google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L343}
416 ///
417 // clang-format on
418 future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
420 google::cloud::dialogflow::cx::v3::UpdateEnvironmentRequest const&
421 request,
422 Options opts = {});
423
424 // clang-format off
425 ///
426 /// Deletes the specified
427 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
428 ///
429 /// @param name Required. The name of the
430 /// [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format:
431 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
432 /// ID>/environments/<Environment ID>`.
433 /// @param opts Optional. Override the class-level options, such as retry and
434 /// backoff policies.
435 /// @return a [`Status`] object. If the request failed, the
436 /// status contains the details of the failure.
437 ///
438 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
439 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
440 /// [Long Running Operation]: https://google.aip.dev/151
441 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
442 /// [`future`]: @ref google::cloud::future
443 /// [`StatusOr`]: @ref google::cloud::StatusOr
444 /// [`Status`]: @ref google::cloud::Status
445 /// [google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L354}
446 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
447 ///
448 // clang-format on
449 Status DeleteEnvironment(std::string const& name, Options opts = {});
450
451 // clang-format off
452 ///
453 /// Deletes the specified
454 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
455 ///
456 /// @param request Unary RPCs, such as the one wrapped by this
457 /// function, receive a single `request` proto message which includes all
458 /// the inputs for the RPC. In this case, the proto message is a
459 /// [google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest].
460 /// Proto messages are converted to C++ classes by Protobuf, using the
461 /// [Protobuf mapping rules].
462 /// @param opts Optional. Override the class-level options, such as retry and
463 /// backoff policies.
464 /// @return a [`Status`] object. If the request failed, the
465 /// status contains the details of the failure.
466 ///
467 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
468 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
469 /// [Long Running Operation]: https://google.aip.dev/151
470 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
471 /// [`future`]: @ref google::cloud::future
472 /// [`StatusOr`]: @ref google::cloud::StatusOr
473 /// [`Status`]: @ref google::cloud::Status
474 /// [google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L354}
475 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
476 ///
477 // clang-format on
479 google::cloud::dialogflow::cx::v3::DeleteEnvironmentRequest const&
480 request,
481 Options opts = {});
482
483 // clang-format off
484 ///
485 /// Looks up the history of the specified
486 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
487 ///
488 /// @param name Required. Resource name of the environment to look up the history for.
489 /// Format:
490 /// @n
491 /// @code
492 /// projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>
493 /// @endcode
494 /// @param opts Optional. Override the class-level options, such as retry and
495 /// backoff policies.
496 /// @return a [StreamRange](@ref google::cloud::StreamRange)
497 /// to iterate of the results. See the documentation of this type for
498 /// details. In brief, this class has `begin()` and `end()` member
499 /// functions returning a iterator class meeting the
500 /// [input iterator requirements]. The value type for this iterator is a
501 /// [`StatusOr`] as the iteration may fail even after some values are
502 /// retrieved successfully, for example, if there is a network disconnect.
503 /// An empty set of results does not indicate an error, it indicates
504 /// that there are no resources meeting the request criteria.
505 /// On a successful iteration the `StatusOr<T>` contains elements of type
506 /// [google.cloud.dialogflow.cx.v3.Environment], or rather,
507 /// the C++ class generated by Protobuf from that type. Please consult the
508 /// Protobuf documentation for details on the [Protobuf mapping rules].
509 ///
510 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
511 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
512 /// [Long Running Operation]: https://google.aip.dev/151
513 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
514 /// [`future`]: @ref google::cloud::future
515 /// [`StatusOr`]: @ref google::cloud::StatusOr
516 /// [`Status`]: @ref google::cloud::Status
517 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
518 /// [google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L369}
519 ///
520 // clang-format on
521 StreamRange<google::cloud::dialogflow::cx::v3::Environment>
522 LookupEnvironmentHistory(std::string const& name, Options opts = {});
523
524 // clang-format off
525 ///
526 /// Looks up the history of the specified
527 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
528 ///
529 /// @param request Unary RPCs, such as the one wrapped by this
530 /// function, receive a single `request` proto message which includes all
531 /// the inputs for the RPC. In this case, the proto message is a
532 /// [google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest].
533 /// Proto messages are converted to C++ classes by Protobuf, using the
534 /// [Protobuf mapping rules].
535 /// @param opts Optional. Override the class-level options, such as retry and
536 /// backoff policies.
537 /// @return a [StreamRange](@ref google::cloud::StreamRange)
538 /// to iterate of the results. See the documentation of this type for
539 /// details. In brief, this class has `begin()` and `end()` member
540 /// functions returning a iterator class meeting the
541 /// [input iterator requirements]. The value type for this iterator is a
542 /// [`StatusOr`] as the iteration may fail even after some values are
543 /// retrieved successfully, for example, if there is a network disconnect.
544 /// An empty set of results does not indicate an error, it indicates
545 /// that there are no resources meeting the request criteria.
546 /// On a successful iteration the `StatusOr<T>` contains elements of type
547 /// [google.cloud.dialogflow.cx.v3.Environment], or rather,
548 /// the C++ class generated by Protobuf from that type. Please consult the
549 /// Protobuf documentation for details on the [Protobuf mapping rules].
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.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
559 /// [google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L369}
560 ///
561 // clang-format on
562 StreamRange<google::cloud::dialogflow::cx::v3::Environment>
564 google::cloud::dialogflow::cx::v3::LookupEnvironmentHistoryRequest
565 request,
566 Options opts = {});
567
568 // clang-format off
569 ///
570 /// Kicks off a continuous test under the specified
571 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
572 ///
573 /// This method is a [long-running
574 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
575 /// The returned `Operation` type has the following method-specific fields:
576 ///
577 /// - `metadata`:
578 /// [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata]
579 /// - `response`:
580 /// [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]
581 ///
582 /// @param request Unary RPCs, such as the one wrapped by this
583 /// function, receive a single `request` proto message which includes all
584 /// the inputs for the RPC. In this case, the proto message is a
585 /// [google.cloud.dialogflow.cx.v3.RunContinuousTestRequest].
586 /// Proto messages are converted to C++ classes by Protobuf, using the
587 /// [Protobuf mapping rules].
588 /// @param opts Optional. Override the class-level options, such as retry and
589 /// backoff policies.
590 /// @return A [`future`] that becomes satisfied when the LRO
591 /// ([Long Running Operation]) completes or the polling policy in effect
592 /// for this call is exhausted. The future is satisfied with an error if
593 /// the LRO completes with an error or the polling policy is exhausted.
594 /// In this case the [`StatusOr`] returned by the future contains the
595 /// error. If the LRO completes successfully the value of the future
596 /// contains the LRO's result. For this RPC the result is a
597 /// [google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] proto message.
598 /// The C++ class representing this message is created by Protobuf, using
599 /// the [Protobuf mapping rules].
600 ///
601 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
602 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
603 /// [Long Running Operation]: https://google.aip.dev/151
604 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
605 /// [`future`]: @ref google::cloud::future
606 /// [`StatusOr`]: @ref google::cloud::StatusOr
607 /// [`Status`]: @ref google::cloud::Status
608 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
609 /// [google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L462}
610 /// [google.cloud.dialogflow.cx.v3.RunContinuousTestRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L441}
611 /// [google.cloud.dialogflow.cx.v3.RunContinuousTestResponse]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L454}
612 ///
613 // clang-format on
614 future<StatusOr<google::cloud::dialogflow::cx::v3::RunContinuousTestResponse>>
616 google::cloud::dialogflow::cx::v3::RunContinuousTestRequest const&
617 request,
618 Options opts = {});
619
620 // clang-format off
621 ///
622 /// Fetches a list of continuous test results for a given environment.
623 ///
624 /// @param parent Required. The environment to list results for.
625 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
626 /// environments/<Environment ID>`.
627 /// @param opts Optional. Override the class-level options, such as retry and
628 /// backoff policies.
629 /// @return a [StreamRange](@ref google::cloud::StreamRange)
630 /// to iterate of the results. See the documentation of this type for
631 /// details. In brief, this class has `begin()` and `end()` member
632 /// functions returning a iterator class meeting the
633 /// [input iterator requirements]. The value type for this iterator is a
634 /// [`StatusOr`] as the iteration may fail even after some values are
635 /// retrieved successfully, for example, if there is a network disconnect.
636 /// An empty set of results does not indicate an error, it indicates
637 /// that there are no resources meeting the request criteria.
638 /// On a successful iteration the `StatusOr<T>` contains elements of type
639 /// [google.cloud.dialogflow.cx.v3.ContinuousTestResult], or rather,
640 /// the C++ class generated by Protobuf from that type. Please consult the
641 /// Protobuf documentation for details on the [Protobuf mapping rules].
642 ///
643 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
644 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
645 /// [Long Running Operation]: https://google.aip.dev/151
646 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
647 /// [`future`]: @ref google::cloud::future
648 /// [`StatusOr`]: @ref google::cloud::StatusOr
649 /// [`Status`]: @ref google::cloud::Status
650 /// [google.cloud.dialogflow.cx.v3.ContinuousTestResult]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L402}
651 /// [google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L469}
652 ///
653 // clang-format on
654 StreamRange<google::cloud::dialogflow::cx::v3::ContinuousTestResult>
655 ListContinuousTestResults(std::string const& parent, Options opts = {});
656
657 // clang-format off
658 ///
659 /// Fetches a list of continuous test results for a given environment.
660 ///
661 /// @param request Unary RPCs, such as the one wrapped by this
662 /// function, receive a single `request` proto message which includes all
663 /// the inputs for the RPC. In this case, the proto message is a
664 /// [google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest].
665 /// Proto messages are converted to C++ classes by Protobuf, using the
666 /// [Protobuf mapping rules].
667 /// @param opts Optional. Override the class-level options, such as retry and
668 /// backoff policies.
669 /// @return a [StreamRange](@ref google::cloud::StreamRange)
670 /// to iterate of the results. See the documentation of this type for
671 /// details. In brief, this class has `begin()` and `end()` member
672 /// functions returning a iterator class meeting the
673 /// [input iterator requirements]. The value type for this iterator is a
674 /// [`StatusOr`] as the iteration may fail even after some values are
675 /// retrieved successfully, for example, if there is a network disconnect.
676 /// An empty set of results does not indicate an error, it indicates
677 /// that there are no resources meeting the request criteria.
678 /// On a successful iteration the `StatusOr<T>` contains elements of type
679 /// [google.cloud.dialogflow.cx.v3.ContinuousTestResult], or rather,
680 /// the C++ class generated by Protobuf from that type. Please consult the
681 /// Protobuf documentation for details on the [Protobuf mapping rules].
682 ///
683 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
684 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
685 /// [Long Running Operation]: https://google.aip.dev/151
686 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
687 /// [`future`]: @ref google::cloud::future
688 /// [`StatusOr`]: @ref google::cloud::StatusOr
689 /// [`Status`]: @ref google::cloud::Status
690 /// [google.cloud.dialogflow.cx.v3.ContinuousTestResult]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L402}
691 /// [google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L469}
692 ///
693 // clang-format on
694 StreamRange<google::cloud::dialogflow::cx::v3::ContinuousTestResult>
696 google::cloud::dialogflow::cx::v3::ListContinuousTestResultsRequest
697 request,
698 Options opts = {});
699
700 // clang-format off
701 ///
702 /// Deploys a flow to the specified
703 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
704 ///
705 /// This method is a [long-running
706 /// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
707 /// The returned `Operation` type has the following method-specific fields:
708 ///
709 /// - `metadata`:
710 /// [DeployFlowMetadata][google.cloud.dialogflow.cx.v3.DeployFlowMetadata]
711 /// - `response`:
712 /// [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse]
713 ///
714 /// @param request Unary RPCs, such as the one wrapped by this
715 /// function, receive a single `request` proto message which includes all
716 /// the inputs for the RPC. In this case, the proto message is a
717 /// [google.cloud.dialogflow.cx.v3.DeployFlowRequest].
718 /// Proto messages are converted to C++ classes by Protobuf, using the
719 /// [Protobuf mapping rules].
720 /// @param opts Optional. Override the class-level options, such as retry and
721 /// backoff policies.
722 /// @return A [`future`] that becomes satisfied when the LRO
723 /// ([Long Running Operation]) completes or the polling policy in effect
724 /// for this call is exhausted. The future is satisfied with an error if
725 /// the LRO completes with an error or the polling policy is exhausted.
726 /// In this case the [`StatusOr`] returned by the future contains the
727 /// error. If the LRO completes successfully the value of the future
728 /// contains the LRO's result. For this RPC the result is a
729 /// [google.cloud.dialogflow.cx.v3.DeployFlowResponse] proto message.
730 /// The C++ class representing this message is created by Protobuf, using
731 /// the [Protobuf mapping rules].
732 ///
733 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
734 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
735 /// [Long Running Operation]: https://google.aip.dev/151
736 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
737 /// [`future`]: @ref google::cloud::future
738 /// [`StatusOr`]: @ref google::cloud::StatusOr
739 /// [`Status`]: @ref google::cloud::Status
740 /// [google.cloud.dialogflow.cx.v3.DeployFlowMetadata]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L538}
741 /// [google.cloud.dialogflow.cx.v3.DeployFlowRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L500}
742 /// [google.cloud.dialogflow.cx.v3.DeployFlowResponse]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L524}
743 /// [google.cloud.dialogflow.cx.v3.Environment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/environment.proto#L196}
744 ///
745 // clang-format on
746 future<StatusOr<google::cloud::dialogflow::cx::v3::DeployFlowResponse>>
748 google::cloud::dialogflow::cx::v3::DeployFlowRequest const& request,
749 Options opts = {});
750
751 private:
752 std::shared_ptr<EnvironmentsConnection> connection_;
753 Options options_;
754};
755
756GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
757} // namespace dialogflow_cx
758} // namespace cloud
759} // namespace google
760
761#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CLIENT_H
Service for managing Environments.
Definition: environments_client.h:66
StatusOr< google::cloud::dialogflow::cx::v3::Environment > GetEnvironment(google::cloud::dialogflow::cx::v3::GetEnvironmentRequest const &request, Options opts={})
Retrieves the specified Environment.
friend bool operator!=(EnvironmentsClient const &a, EnvironmentsClient const &b)
Definition: environments_client.h:86
EnvironmentsClient(EnvironmentsClient const &)=default
StreamRange< google::cloud::dialogflow::cx::v3::Environment > LookupEnvironmentHistory(std::string const &name, Options opts={})
Looks up the history of the specified Environment.
EnvironmentsClient(std::shared_ptr< EnvironmentsConnection > connection, Options opts={})
StreamRange< google::cloud::dialogflow::cx::v3::Environment > LookupEnvironmentHistory(google::cloud::dialogflow::cx::v3::LookupEnvironmentHistoryRequest request, Options opts={})
Looks up the history of the specified Environment.
StreamRange< google::cloud::dialogflow::cx::v3::Environment > ListEnvironments(google::cloud::dialogflow::cx::v3::ListEnvironmentsRequest request, Options opts={})
Returns the list of all environments in the specified [Agent][google.cloud.dialogflow....
EnvironmentsClient & operator=(EnvironmentsClient const &)=default
EnvironmentsClient(EnvironmentsClient &&)=default
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > UpdateEnvironment(google::cloud::dialogflow::cx::v3::UpdateEnvironmentRequest const &request, Options opts={})
Updates the specified Environment.
future< StatusOr< google::cloud::dialogflow::cx::v3::DeployFlowResponse > > DeployFlow(google::cloud::dialogflow::cx::v3::DeployFlowRequest const &request, Options opts={})
Deploys a flow to the specified Environment.
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > CreateEnvironment(google::cloud::dialogflow::cx::v3::CreateEnvironmentRequest const &request, Options opts={})
Creates an Environment in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
StreamRange< google::cloud::dialogflow::cx::v3::ContinuousTestResult > ListContinuousTestResults(std::string const &parent, Options opts={})
Fetches a list of continuous test results for a given environment.
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > CreateEnvironment(std::string const &parent, google::cloud::dialogflow::cx::v3::Environment const &environment, Options opts={})
Creates an Environment in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
Status DeleteEnvironment(google::cloud::dialogflow::cx::v3::DeleteEnvironmentRequest const &request, Options opts={})
Deletes the specified Environment.
future< StatusOr< google::cloud::dialogflow::cx::v3::RunContinuousTestResponse > > RunContinuousTest(google::cloud::dialogflow::cx::v3::RunContinuousTestRequest const &request, Options opts={})
Kicks off a continuous test under the specified Environment.
Status DeleteEnvironment(std::string const &name, Options opts={})
Deletes the specified Environment.
future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > UpdateEnvironment(google::cloud::dialogflow::cx::v3::Environment const &environment, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates the specified Environment.
StreamRange< google::cloud::dialogflow::cx::v3::ContinuousTestResult > ListContinuousTestResults(google::cloud::dialogflow::cx::v3::ListContinuousTestResultsRequest request, Options opts={})
Fetches a list of continuous test results for a given environment.
EnvironmentsClient & operator=(EnvironmentsClient &&)=default
StatusOr< google::cloud::dialogflow::cx::v3::Environment > GetEnvironment(std::string const &name, Options opts={})
Retrieves the specified Environment.
StreamRange< google::cloud::dialogflow::cx::v3::Environment > ListEnvironments(std::string const &parent, Options opts={})
Returns the list of all environments in the specified [Agent][google.cloud.dialogflow....
friend bool operator==(EnvironmentsClient const &a, EnvironmentsClient const &b)
Definition: environments_client.h:82
The EnvironmentsConnection object for EnvironmentsClient.
Definition: environments_connection.h:66
friend friend class future
Definition: agents_client.h:33