Dialogflow API C++ Client 2.8.0
A C++ Client Library for the Dialogflow API
Loading...
Searching...
No Matches
entity_types_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/entity_type.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CLIENT_H
21
22#include "google/cloud/dialogflow_cx/entity_types_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/// [EntityTypes][google.cloud.dialogflow.cx.v3.EntityType].
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.EntityType]:
63/// @googleapis_link_reference{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
64///
66 public:
67 explicit EntityTypesClient(std::shared_ptr<EntityTypesConnection> connection,
68 Options opts = {});
70
71 ///@{
72 /// @name Copy and move support
73 EntityTypesClient(EntityTypesClient const&) = default;
77 ///@}
78
79 ///@{
80 /// @name Equality
81 friend bool operator==(EntityTypesClient const& a,
82 EntityTypesClient const& b) {
83 return a.connection_ == b.connection_;
84 }
85 friend bool operator!=(EntityTypesClient const& a,
86 EntityTypesClient const& b) {
87 return !(a == b);
88 }
89 ///@}
90
91 ///
92 /// Returns the list of all entity types in the specified agent.
93 ///
94 /// @param parent Required. The agent to list all entity types for.
95 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
96 /// ID>`.
97 /// @param opts Optional. Override the class-level options, such as retry and
98 /// backoff policies.
99 /// @return
100 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
101 ///
102 /// [google.cloud.dialogflow.cx.v3.EntityType]:
103 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
104 /// [google.cloud.dialogflow.cx.v3.ListEntityTypesRequest]:
105 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L235}
106 ///
107 StreamRange<google::cloud::dialogflow::cx::v3::EntityType> ListEntityTypes(
108 std::string const& parent, Options opts = {});
109
110 ///
111 /// Returns the list of all entity types in the specified agent.
112 ///
113 /// @param request
114 /// @googleapis_link{google::cloud::dialogflow::cx::v3::ListEntityTypesRequest,google/cloud/dialogflow/cx/v3/entity_type.proto#L235}
115 /// @param opts Optional. Override the class-level options, such as retry and
116 /// backoff policies.
117 /// @return
118 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
119 ///
120 /// [google.cloud.dialogflow.cx.v3.EntityType]:
121 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
122 /// [google.cloud.dialogflow.cx.v3.ListEntityTypesRequest]:
123 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L235}
124 ///
125 StreamRange<google::cloud::dialogflow::cx::v3::EntityType> ListEntityTypes(
126 google::cloud::dialogflow::cx::v3::ListEntityTypesRequest request,
127 Options opts = {});
128
129 ///
130 /// Retrieves the specified entity type.
131 ///
132 /// @param name Required. The name of the entity type.
133 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
134 /// ID>/entityTypes/<Entity Type ID>`.
135 /// @param opts Optional. Override the class-level options, such as retry and
136 /// backoff policies.
137 /// @return
138 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
139 ///
140 /// [google.cloud.dialogflow.cx.v3.EntityType]:
141 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
142 /// [google.cloud.dialogflow.cx.v3.GetEntityTypeRequest]:
143 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L281}
144 ///
145 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> GetEntityType(
146 std::string const& name, Options opts = {});
147
148 ///
149 /// Retrieves the specified entity type.
150 ///
151 /// @param request
152 /// @googleapis_link{google::cloud::dialogflow::cx::v3::GetEntityTypeRequest,google/cloud/dialogflow/cx/v3/entity_type.proto#L281}
153 /// @param opts Optional. Override the class-level options, such as retry and
154 /// backoff policies.
155 /// @return
156 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
157 ///
158 /// [google.cloud.dialogflow.cx.v3.EntityType]:
159 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
160 /// [google.cloud.dialogflow.cx.v3.GetEntityTypeRequest]:
161 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L281}
162 ///
163 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> GetEntityType(
164 google::cloud::dialogflow::cx::v3::GetEntityTypeRequest const& request,
165 Options opts = {});
166
167 ///
168 /// Creates an entity type in the specified agent.
169 ///
170 /// Note: You should always train a flow prior to sending it queries. See the
171 /// [training
172 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
173 ///
174 /// @param parent Required. The agent to create a entity type for.
175 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
176 /// ID>`.
177 /// @param entity_type Required. The entity type to create.
178 /// @param opts Optional. Override the class-level options, such as retry and
179 /// backoff policies.
180 /// @return
181 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
182 ///
183 /// [google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest]:
184 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L309}
185 /// [google.cloud.dialogflow.cx.v3.EntityType]:
186 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
187 ///
188 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> CreateEntityType(
189 std::string const& parent,
190 google::cloud::dialogflow::cx::v3::EntityType const& entity_type,
191 Options opts = {});
192
193 ///
194 /// Creates an entity type in the specified agent.
195 ///
196 /// Note: You should always train a flow prior to sending it queries. See the
197 /// [training
198 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
199 ///
200 /// @param request
201 /// @googleapis_link{google::cloud::dialogflow::cx::v3::CreateEntityTypeRequest,google/cloud/dialogflow/cx/v3/entity_type.proto#L309}
202 /// @param opts Optional. Override the class-level options, such as retry and
203 /// backoff policies.
204 /// @return
205 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
206 ///
207 /// [google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest]:
208 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L309}
209 /// [google.cloud.dialogflow.cx.v3.EntityType]:
210 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
211 ///
212 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> CreateEntityType(
213 google::cloud::dialogflow::cx::v3::CreateEntityTypeRequest const& request,
214 Options opts = {});
215
216 ///
217 /// Updates the specified entity type.
218 ///
219 /// Note: You should always train a flow prior to sending it queries. See the
220 /// [training
221 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
222 ///
223 /// @param entity_type Required. The entity type to update.
224 /// @param update_mask The mask to control which fields get updated.
225 /// @param opts Optional. Override the class-level options, such as retry and
226 /// backoff policies.
227 /// @return
228 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
229 ///
230 /// [google.cloud.dialogflow.cx.v3.EntityType]:
231 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
232 /// [google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest]:
233 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L338}
234 ///
235 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> UpdateEntityType(
236 google::cloud::dialogflow::cx::v3::EntityType const& entity_type,
237 google::protobuf::FieldMask const& update_mask, Options opts = {});
238
239 ///
240 /// Updates the specified entity type.
241 ///
242 /// Note: You should always train a flow prior to sending it queries. See the
243 /// [training
244 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
245 ///
246 /// @param request
247 /// @googleapis_link{google::cloud::dialogflow::cx::v3::UpdateEntityTypeRequest,google/cloud/dialogflow/cx/v3/entity_type.proto#L338}
248 /// @param opts Optional. Override the class-level options, such as retry and
249 /// backoff policies.
250 /// @return
251 /// @googleapis_link{google::cloud::dialogflow::cx::v3::EntityType,google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
252 ///
253 /// [google.cloud.dialogflow.cx.v3.EntityType]:
254 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L128}
255 /// [google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest]:
256 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L338}
257 ///
258 StatusOr<google::cloud::dialogflow::cx::v3::EntityType> UpdateEntityType(
259 google::cloud::dialogflow::cx::v3::UpdateEntityTypeRequest const& request,
260 Options opts = {});
261
262 ///
263 /// Deletes the specified entity type.
264 ///
265 /// Note: You should always train a flow prior to sending it queries. See the
266 /// [training
267 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
268 ///
269 /// @param name Required. The name of the entity type to delete.
270 /// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
271 /// ID>/entityTypes/<Entity Type ID>`.
272 /// @param opts Optional. Override the class-level options, such as retry and
273 /// backoff policies.
274 ///
275 /// [google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest]:
276 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L361}
277 ///
278 Status DeleteEntityType(std::string const& name, Options opts = {});
279
280 ///
281 /// Deletes the specified entity type.
282 ///
283 /// Note: You should always train a flow prior to sending it queries. See the
284 /// [training
285 /// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
286 ///
287 /// @param request
288 /// @googleapis_link{google::cloud::dialogflow::cx::v3::DeleteEntityTypeRequest,google/cloud/dialogflow/cx/v3/entity_type.proto#L361}
289 /// @param opts Optional. Override the class-level options, such as retry and
290 /// backoff policies.
291 ///
292 /// [google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest]:
293 /// @googleapis_reference_link{google/cloud/dialogflow/cx/v3/entity_type.proto#L361}
294 ///
296 google::cloud::dialogflow::cx::v3::DeleteEntityTypeRequest const& request,
297 Options opts = {});
298
299 private:
300 std::shared_ptr<EntityTypesConnection> connection_;
301 Options options_;
302};
303
304GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
305} // namespace dialogflow_cx
306} // namespace cloud
307} // namespace google
308
309#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CLIENT_H
Service for managing EntityTypes.
Definition: entity_types_client.h:65
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > CreateEntityType(std::string const &parent, google::cloud::dialogflow::cx::v3::EntityType const &entity_type, Options opts={})
Creates an entity type in the specified agent.
Status DeleteEntityType(std::string const &name, Options opts={})
Deletes the specified entity type.
EntityTypesClient(EntityTypesClient const &)=default
StreamRange< google::cloud::dialogflow::cx::v3::EntityType > ListEntityTypes(google::cloud::dialogflow::cx::v3::ListEntityTypesRequest request, Options opts={})
Returns the list of all entity types in the specified agent.
friend bool operator!=(EntityTypesClient const &a, EntityTypesClient const &b)
Definition: entity_types_client.h:85
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > CreateEntityType(google::cloud::dialogflow::cx::v3::CreateEntityTypeRequest const &request, Options opts={})
Creates an entity type in the specified agent.
StreamRange< google::cloud::dialogflow::cx::v3::EntityType > ListEntityTypes(std::string const &parent, Options opts={})
Returns the list of all entity types in the specified agent.
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > GetEntityType(std::string const &name, Options opts={})
Retrieves the specified entity type.
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > UpdateEntityType(google::cloud::dialogflow::cx::v3::EntityType const &entity_type, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates the specified entity type.
EntityTypesClient(EntityTypesClient &&)=default
EntityTypesClient & operator=(EntityTypesClient &&)=default
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > UpdateEntityType(google::cloud::dialogflow::cx::v3::UpdateEntityTypeRequest const &request, Options opts={})
Updates the specified entity type.
Status DeleteEntityType(google::cloud::dialogflow::cx::v3::DeleteEntityTypeRequest const &request, Options opts={})
Deletes the specified entity type.
friend bool operator==(EntityTypesClient const &a, EntityTypesClient const &b)
Definition: entity_types_client.h:81
EntityTypesClient & operator=(EntityTypesClient const &)=default
StatusOr< google::cloud::dialogflow::cx::v3::EntityType > GetEntityType(google::cloud::dialogflow::cx::v3::GetEntityTypeRequest const &request, Options opts={})
Retrieves the specified entity type.
EntityTypesClient(std::shared_ptr< EntityTypesConnection > connection, Options opts={})
The EntityTypesConnection object for EntityTypesClient.
Definition: entity_types_connection.h:61
Definition: agents_client.h:33