Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
experiments_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/experiment.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CLIENT_H
21
22#include "google/cloud/dialogflow_cx/experiments_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 <memory>
29
30namespace google {
31namespace cloud {
32namespace dialogflow_cx {
33GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
34
35///
36/// Service for managing
37/// [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
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.Experiment]:
63/// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
64///
66 public:
67 explicit ExperimentsClient(std::shared_ptr<ExperimentsConnection> connection,
68 Options opts = {});
70
71 ///@{
72 /// @name Copy and move support
73 ExperimentsClient(ExperimentsClient const&) = default;
77 ///@}
78
79 ///@{
80 /// @name Equality
81 friend bool operator==(ExperimentsClient const& a,
82 ExperimentsClient const& b) {
83 return a.connection_ == b.connection_;
84 }
85 friend bool operator!=(ExperimentsClient const& a,
86 ExperimentsClient const& b) {
87 return !(a == b);
88 }
89 ///@}
90
91 // clang-format off
92 ///
93 /// Returns the list of all experiments in the specified
94 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
95 ///
96 /// @param parent Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to
97 /// list all environments for. Format:
98 /// @n
99 /// @code
100 /// projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>
101 /// @endcode
102 /// @param opts Optional. Override the class-level options, such as retry and
103 /// backoff policies.
104 /// @return a [StreamRange](@ref google::cloud::StreamRange)
105 /// to iterate of the results. See the documentation of this type for
106 /// details. In brief, this class has `begin()` and `end()` member
107 /// functions returning a iterator class meeting the
108 /// [input iterator requirements]. The value type for this iterator is a
109 /// [`StatusOr`] as the iteration may fail even after some values are
110 /// retrieved successfully, for example, if there is a network disconnect.
111 /// An empty set of results does not indicate an error, it indicates
112 /// that there are no resources meeting the request criteria.
113 /// On a successful iteration the `StatusOr<T>` contains elements of type
114 /// [google.cloud.dialogflow.cx.v3.Experiment], or rather,
115 /// the C++ class generated by Protobuf from that type. Please consult the
116 /// Protobuf documentation for details on the [Protobuf mapping rules].
117 ///
118 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
119 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
120 /// [Long Running Operation]: https://google.aip.dev/151
121 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
122 /// [`future`]: @ref google::cloud::future
123 /// [`StatusOr`]: @ref google::cloud::StatusOr
124 /// [`Status`]: @ref google::cloud::Status
125 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
126 /// [google.cloud.dialogflow.cx.v3.ListExperimentsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L405}
127 ///
128 // clang-format on
129 StreamRange<google::cloud::dialogflow::cx::v3::Experiment> ListExperiments(
130 std::string const& parent, Options opts = {});
131
132 // clang-format off
133 ///
134 /// Returns the list of all experiments in the specified
135 /// [Environment][google.cloud.dialogflow.cx.v3.Environment].
136 ///
137 /// @param request Unary RPCs, such as the one wrapped by this
138 /// function, receive a single `request` proto message which includes all
139 /// the inputs for the RPC. In this case, the proto message is a
140 /// [google.cloud.dialogflow.cx.v3.ListExperimentsRequest].
141 /// Proto messages are converted to C++ classes by Protobuf, using the
142 /// [Protobuf mapping rules].
143 /// @param opts Optional. Override the class-level options, such as retry and
144 /// backoff policies.
145 /// @return a [StreamRange](@ref google::cloud::StreamRange)
146 /// to iterate of the results. See the documentation of this type for
147 /// details. In brief, this class has `begin()` and `end()` member
148 /// functions returning a iterator class meeting the
149 /// [input iterator requirements]. The value type for this iterator is a
150 /// [`StatusOr`] as the iteration may fail even after some values are
151 /// retrieved successfully, for example, if there is a network disconnect.
152 /// An empty set of results does not indicate an error, it indicates
153 /// that there are no resources meeting the request criteria.
154 /// On a successful iteration the `StatusOr<T>` contains elements of type
155 /// [google.cloud.dialogflow.cx.v3.Experiment], or rather,
156 /// the C++ class generated by Protobuf from that type. Please consult the
157 /// Protobuf documentation for details on the [Protobuf mapping rules].
158 ///
159 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
160 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
161 /// [Long Running Operation]: https://google.aip.dev/151
162 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
163 /// [`future`]: @ref google::cloud::future
164 /// [`StatusOr`]: @ref google::cloud::StatusOr
165 /// [`Status`]: @ref google::cloud::Status
166 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
167 /// [google.cloud.dialogflow.cx.v3.ListExperimentsRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L405}
168 ///
169 // clang-format on
170 StreamRange<google::cloud::dialogflow::cx::v3::Experiment> ListExperiments(
171 google::cloud::dialogflow::cx::v3::ListExperimentsRequest request,
172 Options opts = {});
173
174 // clang-format off
175 ///
176 /// Retrieves the specified
177 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
178 ///
179 /// @param name Required. The name of the
180 /// [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format:
181 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
182 /// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
183 /// @param opts Optional. Override the class-level options, such as retry and
184 /// backoff policies.
185 /// @return the result of the RPC. The response message type
186 /// ([google.cloud.dialogflow.cx.v3.Experiment])
187 /// is mapped to a C++ class using the [Protobuf mapping rules].
188 /// If the request fails, the [`StatusOr`] contains the error details.
189 ///
190 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
191 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
192 /// [Long Running Operation]: https://google.aip.dev/151
193 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
194 /// [`future`]: @ref google::cloud::future
195 /// [`StatusOr`]: @ref google::cloud::StatusOr
196 /// [`Status`]: @ref google::cloud::Status
197 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
198 /// [google.cloud.dialogflow.cx.v3.GetExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L441}
199 ///
200 // clang-format on
201 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> GetExperiment(
202 std::string const& name, Options opts = {});
203
204 // clang-format off
205 ///
206 /// Retrieves the specified
207 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
208 ///
209 /// @param request Unary RPCs, such as the one wrapped by this
210 /// function, receive a single `request` proto message which includes all
211 /// the inputs for the RPC. In this case, the proto message is a
212 /// [google.cloud.dialogflow.cx.v3.GetExperimentRequest].
213 /// Proto messages are converted to C++ classes by Protobuf, using the
214 /// [Protobuf mapping rules].
215 /// @param opts Optional. Override the class-level options, such as retry and
216 /// backoff policies.
217 /// @return the result of the RPC. The response message type
218 /// ([google.cloud.dialogflow.cx.v3.Experiment])
219 /// is mapped to a C++ class using the [Protobuf mapping rules].
220 /// If the request fails, the [`StatusOr`] contains the error details.
221 ///
222 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
223 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
224 /// [Long Running Operation]: https://google.aip.dev/151
225 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
226 /// [`future`]: @ref google::cloud::future
227 /// [`StatusOr`]: @ref google::cloud::StatusOr
228 /// [`Status`]: @ref google::cloud::Status
229 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
230 /// [google.cloud.dialogflow.cx.v3.GetExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L441}
231 ///
232 // clang-format on
233 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> GetExperiment(
234 google::cloud::dialogflow::cx::v3::GetExperimentRequest const& request,
235 Options opts = {});
236
237 // clang-format off
238 ///
239 /// Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the
240 /// specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
241 ///
242 /// @param parent Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an
243 /// [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format:
244 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
245 /// ID>/environments/<Environment ID>`.
246 /// @param experiment Required. The experiment to create.
247 /// @param opts Optional. Override the class-level options, such as retry and
248 /// backoff policies.
249 /// @return the result of the RPC. The response message type
250 /// ([google.cloud.dialogflow.cx.v3.Experiment])
251 /// is mapped to a C++ class using the [Protobuf mapping rules].
252 /// If the request fails, the [`StatusOr`] contains the error details.
253 ///
254 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
255 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
256 /// [Long Running Operation]: https://google.aip.dev/151
257 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
258 /// [`future`]: @ref google::cloud::future
259 /// [`StatusOr`]: @ref google::cloud::StatusOr
260 /// [`Status`]: @ref google::cloud::Status
261 /// [google.cloud.dialogflow.cx.v3.CreateExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L456}
262 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
263 ///
264 // clang-format on
265 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> CreateExperiment(
266 std::string const& parent,
267 google::cloud::dialogflow::cx::v3::Experiment const& experiment,
268 Options opts = {});
269
270 // clang-format off
271 ///
272 /// Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the
273 /// specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
274 ///
275 /// @param request Unary RPCs, such as the one wrapped by this
276 /// function, receive a single `request` proto message which includes all
277 /// the inputs for the RPC. In this case, the proto message is a
278 /// [google.cloud.dialogflow.cx.v3.CreateExperimentRequest].
279 /// Proto messages are converted to C++ classes by Protobuf, using the
280 /// [Protobuf mapping rules].
281 /// @param opts Optional. Override the class-level options, such as retry and
282 /// backoff policies.
283 /// @return the result of the RPC. The response message type
284 /// ([google.cloud.dialogflow.cx.v3.Experiment])
285 /// is mapped to a C++ class using the [Protobuf mapping rules].
286 /// If the request fails, the [`StatusOr`] contains the error details.
287 ///
288 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
289 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
290 /// [Long Running Operation]: https://google.aip.dev/151
291 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
292 /// [`future`]: @ref google::cloud::future
293 /// [`StatusOr`]: @ref google::cloud::StatusOr
294 /// [`Status`]: @ref google::cloud::Status
295 /// [google.cloud.dialogflow.cx.v3.CreateExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L456}
296 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
297 ///
298 // clang-format on
299 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> CreateExperiment(
300 google::cloud::dialogflow::cx::v3::CreateExperimentRequest const& request,
301 Options opts = {});
302
303 // clang-format off
304 ///
305 /// Updates the specified
306 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
307 ///
308 /// @param experiment Required. The experiment to update.
309 /// @param update_mask Required. The mask to control which fields get updated.
310 /// @param opts Optional. Override the class-level options, such as retry and
311 /// backoff policies.
312 /// @return the result of the RPC. The response message type
313 /// ([google.cloud.dialogflow.cx.v3.Experiment])
314 /// is mapped to a C++ class using the [Protobuf mapping rules].
315 /// If the request fails, the [`StatusOr`] contains the error details.
316 ///
317 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
318 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
319 /// [Long Running Operation]: https://google.aip.dev/151
320 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
321 /// [`future`]: @ref google::cloud::future
322 /// [`StatusOr`]: @ref google::cloud::StatusOr
323 /// [`Status`]: @ref google::cloud::Status
324 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
325 /// [google.cloud.dialogflow.cx.v3.UpdateExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L474}
326 ///
327 // clang-format on
328 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> UpdateExperiment(
329 google::cloud::dialogflow::cx::v3::Experiment const& experiment,
330 google::protobuf::FieldMask const& update_mask, Options opts = {});
331
332 // clang-format off
333 ///
334 /// Updates the specified
335 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
336 ///
337 /// @param request Unary RPCs, such as the one wrapped by this
338 /// function, receive a single `request` proto message which includes all
339 /// the inputs for the RPC. In this case, the proto message is a
340 /// [google.cloud.dialogflow.cx.v3.UpdateExperimentRequest].
341 /// Proto messages are converted to C++ classes by Protobuf, using the
342 /// [Protobuf mapping rules].
343 /// @param opts Optional. Override the class-level options, such as retry and
344 /// backoff policies.
345 /// @return the result of the RPC. The response message type
346 /// ([google.cloud.dialogflow.cx.v3.Experiment])
347 /// is mapped to a C++ class using the [Protobuf mapping rules].
348 /// If the request fails, the [`StatusOr`] contains the error details.
349 ///
350 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
351 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
352 /// [Long Running Operation]: https://google.aip.dev/151
353 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
354 /// [`future`]: @ref google::cloud::future
355 /// [`StatusOr`]: @ref google::cloud::StatusOr
356 /// [`Status`]: @ref google::cloud::Status
357 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
358 /// [google.cloud.dialogflow.cx.v3.UpdateExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L474}
359 ///
360 // clang-format on
361 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> UpdateExperiment(
362 google::cloud::dialogflow::cx::v3::UpdateExperimentRequest const& request,
363 Options opts = {});
364
365 // clang-format off
366 ///
367 /// Deletes the specified
368 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
369 ///
370 /// @param name Required. The name of the
371 /// [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format:
372 /// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
373 /// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
374 /// @param opts Optional. Override the class-level options, such as retry and
375 /// backoff policies.
376 /// @return a [`Status`] object. If the request failed, the
377 /// status contains the details of the failure.
378 ///
379 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
380 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
381 /// [Long Running Operation]: https://google.aip.dev/151
382 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
383 /// [`future`]: @ref google::cloud::future
384 /// [`StatusOr`]: @ref google::cloud::StatusOr
385 /// [`Status`]: @ref google::cloud::Status
386 /// [google.cloud.dialogflow.cx.v3.DeleteExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L485}
387 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
388 ///
389 // clang-format on
390 Status DeleteExperiment(std::string const& name, Options opts = {});
391
392 // clang-format off
393 ///
394 /// Deletes the specified
395 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
396 ///
397 /// @param request Unary RPCs, such as the one wrapped by this
398 /// function, receive a single `request` proto message which includes all
399 /// the inputs for the RPC. In this case, the proto message is a
400 /// [google.cloud.dialogflow.cx.v3.DeleteExperimentRequest].
401 /// Proto messages are converted to C++ classes by Protobuf, using the
402 /// [Protobuf mapping rules].
403 /// @param opts Optional. Override the class-level options, such as retry and
404 /// backoff policies.
405 /// @return a [`Status`] object. If the request failed, the
406 /// status contains the details of the failure.
407 ///
408 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
409 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
410 /// [Long Running Operation]: https://google.aip.dev/151
411 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
412 /// [`future`]: @ref google::cloud::future
413 /// [`StatusOr`]: @ref google::cloud::StatusOr
414 /// [`Status`]: @ref google::cloud::Status
415 /// [google.cloud.dialogflow.cx.v3.DeleteExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L485}
416 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
417 ///
418 // clang-format on
420 google::cloud::dialogflow::cx::v3::DeleteExperimentRequest const& request,
421 Options opts = {});
422
423 // clang-format off
424 ///
425 /// Starts the specified
426 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only
427 /// changes the state of experiment from PENDING to RUNNING.
428 ///
429 /// @param name Required. Resource name of the experiment to start.
430 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
431 /// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
432 /// @param opts Optional. Override the class-level options, such as retry and
433 /// backoff policies.
434 /// @return the result of the RPC. The response message type
435 /// ([google.cloud.dialogflow.cx.v3.Experiment])
436 /// is mapped to a C++ class using the [Protobuf mapping rules].
437 /// If the request fails, the [`StatusOr`] contains the error details.
438 ///
439 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
440 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
441 /// [Long Running Operation]: https://google.aip.dev/151
442 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
443 /// [`future`]: @ref google::cloud::future
444 /// [`StatusOr`]: @ref google::cloud::StatusOr
445 /// [`Status`]: @ref google::cloud::Status
446 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
447 /// [google.cloud.dialogflow.cx.v3.StartExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L500}
448 ///
449 // clang-format on
450 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> StartExperiment(
451 std::string const& name, Options opts = {});
452
453 // clang-format off
454 ///
455 /// Starts the specified
456 /// [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only
457 /// changes the state of experiment from PENDING to RUNNING.
458 ///
459 /// @param request Unary RPCs, such as the one wrapped by this
460 /// function, receive a single `request` proto message which includes all
461 /// the inputs for the RPC. In this case, the proto message is a
462 /// [google.cloud.dialogflow.cx.v3.StartExperimentRequest].
463 /// Proto messages are converted to C++ classes by Protobuf, using the
464 /// [Protobuf mapping rules].
465 /// @param opts Optional. Override the class-level options, such as retry and
466 /// backoff policies.
467 /// @return the result of the RPC. The response message type
468 /// ([google.cloud.dialogflow.cx.v3.Experiment])
469 /// is mapped to a C++ class using the [Protobuf mapping rules].
470 /// If the request fails, the [`StatusOr`] contains the error details.
471 ///
472 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
473 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
474 /// [Long Running Operation]: https://google.aip.dev/151
475 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
476 /// [`future`]: @ref google::cloud::future
477 /// [`StatusOr`]: @ref google::cloud::StatusOr
478 /// [`Status`]: @ref google::cloud::Status
479 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
480 /// [google.cloud.dialogflow.cx.v3.StartExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L500}
481 ///
482 // clang-format on
483 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> StartExperiment(
484 google::cloud::dialogflow::cx::v3::StartExperimentRequest const& request,
485 Options opts = {});
486
487 // clang-format off
488 ///
489 /// Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
490 /// This rpc only changes the state of experiment from RUNNING to DONE.
491 ///
492 /// @param name Required. Resource name of the experiment to stop.
493 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
494 /// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
495 /// @param opts Optional. Override the class-level options, such as retry and
496 /// backoff policies.
497 /// @return the result of the RPC. The response message type
498 /// ([google.cloud.dialogflow.cx.v3.Experiment])
499 /// is mapped to a C++ class using the [Protobuf mapping rules].
500 /// If the request fails, the [`StatusOr`] contains the error details.
501 ///
502 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
503 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
504 /// [Long Running Operation]: https://google.aip.dev/151
505 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
506 /// [`future`]: @ref google::cloud::future
507 /// [`StatusOr`]: @ref google::cloud::StatusOr
508 /// [`Status`]: @ref google::cloud::Status
509 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
510 /// [google.cloud.dialogflow.cx.v3.StopExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L514}
511 ///
512 // clang-format on
513 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> StopExperiment(
514 std::string const& name, Options opts = {});
515
516 // clang-format off
517 ///
518 /// Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
519 /// This rpc only changes the state of experiment from RUNNING to DONE.
520 ///
521 /// @param request Unary RPCs, such as the one wrapped by this
522 /// function, receive a single `request` proto message which includes all
523 /// the inputs for the RPC. In this case, the proto message is a
524 /// [google.cloud.dialogflow.cx.v3.StopExperimentRequest].
525 /// Proto messages are converted to C++ classes by Protobuf, using the
526 /// [Protobuf mapping rules].
527 /// @param opts Optional. Override the class-level options, such as retry and
528 /// backoff policies.
529 /// @return the result of the RPC. The response message type
530 /// ([google.cloud.dialogflow.cx.v3.Experiment])
531 /// is mapped to a C++ class using the [Protobuf mapping rules].
532 /// If the request fails, the [`StatusOr`] contains the error details.
533 ///
534 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
535 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
536 /// [Long Running Operation]: https://google.aip.dev/151
537 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
538 /// [`future`]: @ref google::cloud::future
539 /// [`StatusOr`]: @ref google::cloud::StatusOr
540 /// [`Status`]: @ref google::cloud::Status
541 /// [google.cloud.dialogflow.cx.v3.Experiment]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L116}
542 /// [google.cloud.dialogflow.cx.v3.StopExperimentRequest]: @googleapis_reference_link{google/cloud/dialogflow/cx/v3/experiment.proto#L514}
543 ///
544 // clang-format on
545 StatusOr<google::cloud::dialogflow::cx::v3::Experiment> StopExperiment(
546 google::cloud::dialogflow::cx::v3::StopExperimentRequest const& request,
547 Options opts = {});
548
549 private:
550 std::shared_ptr<ExperimentsConnection> connection_;
551 Options options_;
552};
553
554GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
555} // namespace dialogflow_cx
556} // namespace cloud
557} // namespace google
558
559#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CLIENT_H
Service for managing Experiments.
Definition: experiments_client.h:65
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > CreateExperiment(std::string const &parent, google::cloud::dialogflow::cx::v3::Experiment const &experiment, Options opts={})
Creates an Experiment in the specified [Environment][google.cloud.dialogflow.cx.v3....
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > StartExperiment(std::string const &name, Options opts={})
Starts the specified Experiment.
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > StopExperiment(google::cloud::dialogflow::cx::v3::StopExperimentRequest const &request, Options opts={})
Stops the specified Experiment.
Status DeleteExperiment(google::cloud::dialogflow::cx::v3::DeleteExperimentRequest const &request, Options opts={})
Deletes the specified Experiment.
StreamRange< google::cloud::dialogflow::cx::v3::Experiment > ListExperiments(google::cloud::dialogflow::cx::v3::ListExperimentsRequest request, Options opts={})
Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow....
StreamRange< google::cloud::dialogflow::cx::v3::Experiment > ListExperiments(std::string const &parent, Options opts={})
Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow....
friend bool operator!=(ExperimentsClient const &a, ExperimentsClient const &b)
Definition: experiments_client.h:85
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > CreateExperiment(google::cloud::dialogflow::cx::v3::CreateExperimentRequest const &request, Options opts={})
Creates an Experiment in the specified [Environment][google.cloud.dialogflow.cx.v3....
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > StopExperiment(std::string const &name, Options opts={})
Stops the specified Experiment.
ExperimentsClient(ExperimentsClient &&)=default
ExperimentsClient & operator=(ExperimentsClient const &)=default
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > StartExperiment(google::cloud::dialogflow::cx::v3::StartExperimentRequest const &request, Options opts={})
Starts the specified Experiment.
ExperimentsClient(ExperimentsClient const &)=default
ExperimentsClient(std::shared_ptr< ExperimentsConnection > connection, Options opts={})
Status DeleteExperiment(std::string const &name, Options opts={})
Deletes the specified Experiment.
ExperimentsClient & operator=(ExperimentsClient &&)=default
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > UpdateExperiment(google::cloud::dialogflow::cx::v3::Experiment const &experiment, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates the specified Experiment.
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > GetExperiment(google::cloud::dialogflow::cx::v3::GetExperimentRequest const &request, Options opts={})
Retrieves the specified Experiment.
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > GetExperiment(std::string const &name, Options opts={})
Retrieves the specified Experiment.
friend bool operator==(ExperimentsClient const &a, ExperimentsClient const &b)
Definition: experiments_client.h:81
StatusOr< google::cloud::dialogflow::cx::v3::Experiment > UpdateExperiment(google::cloud::dialogflow::cx::v3::UpdateExperimentRequest const &request, Options opts={})
Updates the specified Experiment.
The ExperimentsConnection object for ExperimentsClient.
Definition: experiments_connection.h:61
Definition: agents_client.h:33