Dialogflow API C++ Client 2.13.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
environments_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/environment.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_H
21
22#include "google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h"
23#include "google/cloud/dialogflow_cx/internal/environments_retry_traits.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/environment.pb.h>
32#include <google/longrunning/operations.grpc.pb.h>
33#include <google/protobuf/struct.pb.h>
34#include <memory>
35#include <string>
36
37namespace google {
38namespace cloud {
39namespace dialogflow_cx {
40GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
41
42using EnvironmentsRetryPolicy =
43 ::google::cloud::internal::TraitBasedRetryPolicy<
44 dialogflow_cx_internal::EnvironmentsRetryTraits>;
45
46using EnvironmentsLimitedTimeRetryPolicy =
47 ::google::cloud::internal::LimitedTimeRetryPolicy<
48 dialogflow_cx_internal::EnvironmentsRetryTraits>;
49
50using EnvironmentsLimitedErrorCountRetryPolicy =
51 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
52 dialogflow_cx_internal::EnvironmentsRetryTraits>;
53
54/**
55 * The `EnvironmentsConnection` object for `EnvironmentsClient`.
56 *
57 * This interface defines virtual methods for each of the user-facing overload
58 * sets in `EnvironmentsClient`. This allows users to inject custom behavior
59 * (e.g., with a Google Mock object) when writing tests that use objects of type
60 * `EnvironmentsClient`.
61 *
62 * To create a concrete instance, see `MakeEnvironmentsConnection()`.
63 *
64 * For mocking, see `dialogflow_cx_mocks::MockEnvironmentsConnection`.
65 */
67 public:
68 virtual ~EnvironmentsConnection() = 0;
69
70 virtual Options options() { return Options{}; }
71
72 virtual StreamRange<google::cloud::dialogflow::cx::v3::Environment>
74 google::cloud::dialogflow::cx::v3::ListEnvironmentsRequest request);
75
76 virtual StatusOr<google::cloud::dialogflow::cx::v3::Environment>
78 google::cloud::dialogflow::cx::v3::GetEnvironmentRequest const& request);
79
80 virtual future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
82 google::cloud::dialogflow::cx::v3::CreateEnvironmentRequest const&
83 request);
84
85 virtual future<StatusOr<google::cloud::dialogflow::cx::v3::Environment>>
87 google::cloud::dialogflow::cx::v3::UpdateEnvironmentRequest const&
88 request);
89
91 google::cloud::dialogflow::cx::v3::DeleteEnvironmentRequest const&
92 request);
93
94 virtual StreamRange<google::cloud::dialogflow::cx::v3::Environment>
96 google::cloud::dialogflow::cx::v3::LookupEnvironmentHistoryRequest
97 request);
98
99 virtual future<
100 StatusOr<google::cloud::dialogflow::cx::v3::RunContinuousTestResponse>>
102 google::cloud::dialogflow::cx::v3::RunContinuousTestRequest const&
103 request);
104
105 virtual StreamRange<google::cloud::dialogflow::cx::v3::ContinuousTestResult>
107 google::cloud::dialogflow::cx::v3::ListContinuousTestResultsRequest
108 request);
109
110 virtual future<
111 StatusOr<google::cloud::dialogflow::cx::v3::DeployFlowResponse>>
113 google::cloud::dialogflow::cx::v3::DeployFlowRequest const& request);
114};
115
116/**
117 * A factory function to construct an object of type `EnvironmentsConnection`.
118 *
119 * The returned connection object should not be used directly; instead it
120 * should be passed as an argument to the constructor of EnvironmentsClient.
121 *
122 * The optional @p options argument may be used to configure aspects of the
123 * returned `EnvironmentsConnection`. Expected options are any of the types in
124 * the following option lists:
125 *
126 * - `google::cloud::CommonOptionList`
127 * - `google::cloud::GrpcOptionList`
128 * - `google::cloud::UnifiedCredentialsOptionList`
129 * - `google::cloud::dialogflow_cx::EnvironmentsPolicyOptionList`
130 *
131 * @note Unexpected options will be ignored. To log unexpected options instead,
132 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
133 *
134 * @param location Sets the prefix for the default `EndpointOption` value.
135 * @param options (optional) Configure the `EnvironmentsConnection` created by
136 * this function.
137 */
139 std::string const& location, Options options = {});
140
141/**
142 * A backwards-compatible version of the previous factory function. Unless
143 * the service also offers a global endpoint, the default value of the
144 * `EndpointOption` may be useless, in which case it must be overridden.
145 *
146 * @deprecated Please use the `location` overload instead.
147 */
149 Options options = {});
150
151GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
152} // namespace dialogflow_cx
153} // namespace cloud
154} // namespace google
155
156#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_H
The EnvironmentsConnection object for EnvironmentsClient.
Definition: environments_connection.h:66
virtual StreamRange< google::cloud::dialogflow::cx::v3::ContinuousTestResult > ListContinuousTestResults(google::cloud::dialogflow::cx::v3::ListContinuousTestResultsRequest request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > CreateEnvironment(google::cloud::dialogflow::cx::v3::CreateEnvironmentRequest const &request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::DeployFlowResponse > > DeployFlow(google::cloud::dialogflow::cx::v3::DeployFlowRequest const &request)
virtual StreamRange< google::cloud::dialogflow::cx::v3::Environment > ListEnvironments(google::cloud::dialogflow::cx::v3::ListEnvironmentsRequest request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::Environment > > UpdateEnvironment(google::cloud::dialogflow::cx::v3::UpdateEnvironmentRequest const &request)
virtual Status DeleteEnvironment(google::cloud::dialogflow::cx::v3::DeleteEnvironmentRequest const &request)
virtual future< StatusOr< google::cloud::dialogflow::cx::v3::RunContinuousTestResponse > > RunContinuousTest(google::cloud::dialogflow::cx::v3::RunContinuousTestRequest const &request)
virtual Options options()
Definition: environments_connection.h:70
virtual StreamRange< google::cloud::dialogflow::cx::v3::Environment > LookupEnvironmentHistory(google::cloud::dialogflow::cx::v3::LookupEnvironmentHistoryRequest request)
virtual StatusOr< google::cloud::dialogflow::cx::v3::Environment > GetEnvironment(google::cloud::dialogflow::cx::v3::GetEnvironmentRequest const &request)
friend friend class future
Definition: agents_client.h:33
std::shared_ptr< EnvironmentsConnection > MakeEnvironmentsConnection(Options options={})
A backwards-compatible version of the previous factory function.
std::shared_ptr< EnvironmentsConnection > MakeEnvironmentsConnection(std::string const &location, Options options={})
A factory function to construct an object of type EnvironmentsConnection.