Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
test_cases_connection.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/test_case.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_H
21
22#include "google/cloud/dialogflow_cx/internal/test_cases_retry_traits.h"
23#include "google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h"
24#include "google/cloud/backoff_policy.h"
25#include "google/cloud/future.h"
26#include "google/cloud/options.h"
27#include "google/cloud/polling_policy.h"
28#include "google/cloud/status_or.h"
29#include "google/cloud/stream_range.h"
30#include "google/cloud/version.h"
31#include <google/cloud/dialogflow/cx/v3/test_case.pb.h>
32#include <google/longrunning/operations.grpc.pb.h>
33#include <memory>
34#include <string>
35
36namespace google {
37namespace cloud {
38namespace dialogflow_cx {
39GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
40
41using TestCasesRetryPolicy = ::google::cloud::internal::TraitBasedRetryPolicy<
42 dialogflow_cx_internal::TestCasesRetryTraits>;
43
44using TestCasesLimitedTimeRetryPolicy =
45 ::google::cloud::internal::LimitedTimeRetryPolicy<
46 dialogflow_cx_internal::TestCasesRetryTraits>;
47
48using TestCasesLimitedErrorCountRetryPolicy =
49 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
50 dialogflow_cx_internal::TestCasesRetryTraits>;
51
52/**
53 * The `TestCasesConnection` object for `TestCasesClient`.
54 *
55 * This interface defines virtual methods for each of the user-facing overload
56 * sets in `TestCasesClient`. This allows users to inject custom behavior
57 * (e.g., with a Google Mock object) when writing tests that use objects of type
58 * `TestCasesClient`.
59 *
60 * To create a concrete instance, see `MakeTestCasesConnection()`.
61 *
62 * For mocking, see `dialogflow_cx_mocks::MockTestCasesConnection`.
63 */
65 public:
66 virtual ~TestCasesConnection() = 0;
67
68 virtual Options options() { return Options{}; }
69
70 virtual StreamRange<google::cloud::dialogflow::cx::v3::TestCase>
72 google::cloud::dialogflow::cx::v3::ListTestCasesRequest request);
73
75 google::cloud::dialogflow::cx::v3::BatchDeleteTestCasesRequest const&
76 request);
77
78 virtual StatusOr<google::cloud::dialogflow::cx::v3::TestCase> GetTestCase(
79 google::cloud::dialogflow::cx::v3::GetTestCaseRequest const& request);
80
81 virtual StatusOr<google::cloud::dialogflow::cx::v3::TestCase> CreateTestCase(
82 google::cloud::dialogflow::cx::v3::CreateTestCaseRequest const& request);
83
84 virtual StatusOr<google::cloud::dialogflow::cx::v3::TestCase> UpdateTestCase(
85 google::cloud::dialogflow::cx::v3::UpdateTestCaseRequest const& request);
86
87 virtual future<
88 StatusOr<google::cloud::dialogflow::cx::v3::RunTestCaseResponse>>
90 google::cloud::dialogflow::cx::v3::RunTestCaseRequest const& request);
91
92 virtual future<
93 StatusOr<google::cloud::dialogflow::cx::v3::BatchRunTestCasesResponse>>
95 google::cloud::dialogflow::cx::v3::BatchRunTestCasesRequest const&
96 request);
97
98 virtual StatusOr<google::cloud::dialogflow::cx::v3::CalculateCoverageResponse>
100 google::cloud::dialogflow::cx::v3::CalculateCoverageRequest const&
101 request);
102
103 virtual future<
104 StatusOr<google::cloud::dialogflow::cx::v3::ImportTestCasesResponse>>
106 google::cloud::dialogflow::cx::v3::ImportTestCasesRequest const& request);
107
108 virtual future<
109 StatusOr<google::cloud::dialogflow::cx::v3::ExportTestCasesResponse>>
111 google::cloud::dialogflow::cx::v3::ExportTestCasesRequest const& request);
112
113 virtual StreamRange<google::cloud::dialogflow::cx::v3::TestCaseResult>
115 google::cloud::dialogflow::cx::v3::ListTestCaseResultsRequest request);
116
117 virtual StatusOr<google::cloud::dialogflow::cx::v3::TestCaseResult>
119 google::cloud::dialogflow::cx::v3::GetTestCaseResultRequest const&
120 request);
121};
122
123/**
124 * A factory function to construct an object of type `TestCasesConnection`.
125 *
126 * The returned connection object should not be used directly; instead it
127 * should be passed as an argument to the constructor of TestCasesClient.
128 *
129 * The optional @p options argument may be used to configure aspects of the
130 * returned `TestCasesConnection`. Expected options are any of the types in
131 * the following option lists:
132 *
133 * - `google::cloud::CommonOptionList`
134 * - `google::cloud::GrpcOptionList`
135 * - `google::cloud::UnifiedCredentialsOptionList`
136 * - `google::cloud::dialogflow_cx::TestCasesPolicyOptionList`
137 *
138 * @note Unexpected options will be ignored. To log unexpected options instead,
139 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
140 *
141 * @param location Sets the prefix for the default `EndpointOption` value.
142 * @param options (optional) Configure the `TestCasesConnection` created by
143 * this function.
144 */
146 std::string const& location, Options options = {});
147
148/**
149 * A backwards-compatible version of the previous factory function. Unless
150 * the service also offers a global endpoint, the default value of the
151 * `EndpointOption` may be useless, in which case it must be overridden.
152 *
153 * @deprecated Please use the `location` overload instead.
154 */
156 Options options = {});
157
158GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
159} // namespace dialogflow_cx
160} // namespace cloud
161} // namespace google
162
163#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_H
The TestCasesConnection object for TestCasesClient.
Definition: test_cases_connection.h:64
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::BatchRunTestCasesResponse > > BatchRunTestCases(google::cloud::dialogflow::cx::v3::BatchRunTestCasesRequest const &request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::TestCase > CreateTestCase(google::cloud::dialogflow::cx::v3::CreateTestCaseRequest const &request)
virtual Options options()
Definition: test_cases_connection.h:68
virtual StatusOr< google::cloud::dialogflow::cx::v3::TestCase > UpdateTestCase(google::cloud::dialogflow::cx::v3::UpdateTestCaseRequest const &request)
virtual Status BatchDeleteTestCases(google::cloud::dialogflow::cx::v3::BatchDeleteTestCasesRequest const &request)
virtual StreamRange< google::cloud::dialogflow::cx::v3::TestCase > ListTestCases(google::cloud::dialogflow::cx::v3::ListTestCasesRequest request)
virtual StreamRange< google::cloud::dialogflow::cx::v3::TestCaseResult > ListTestCaseResults(google::cloud::dialogflow::cx::v3::ListTestCaseResultsRequest request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::CalculateCoverageResponse > CalculateCoverage(google::cloud::dialogflow::cx::v3::CalculateCoverageRequest const &request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::ExportTestCasesResponse > > ExportTestCases(google::cloud::dialogflow::cx::v3::ExportTestCasesRequest const &request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::ImportTestCasesResponse > > ImportTestCases(google::cloud::dialogflow::cx::v3::ImportTestCasesRequest const &request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::RunTestCaseResponse > > RunTestCase(google::cloud::dialogflow::cx::v3::RunTestCaseRequest const &request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::TestCase > GetTestCase(google::cloud::dialogflow::cx::v3::GetTestCaseRequest const &request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::TestCaseResult > GetTestCaseResult(google::cloud::dialogflow::cx::v3::GetTestCaseResultRequest const &request)
friend friend class future
Definition: agents_client.h:33
std::shared_ptr< TestCasesConnection > MakeTestCasesConnection(Options options={})
A backwards-compatible version of the previous factory function.
std::shared_ptr< TestCasesConnection > MakeTestCasesConnection(std::string const &location, Options options={})
A factory function to construct an object of type TestCasesConnection.