Debian Codegraph @

dialogflow/cx/apiv3beta1/cxpb/intent_grpc.pb.go

raw
1 // Copyright 2025 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 // http://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 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/dialogflow/cx/v3beta1/intent.proto
20
21 package cxpb
22
23 import (
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 context "context"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
29 emptypb "google.golang.org/protobuf/types/known/emptypb"
30 )
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the grpc package it is being compiled against.
34 // Requires gRPC-Go v1.32.0 or later.
35 const _ = grpc.SupportPackageIsVersion7
36
37 const (
38 Intents_ListIntents_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/ListIntents"
39 Intents_GetIntent_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/GetIntent"
40 Intents_CreateIntent_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/CreateIntent"
41 Intents_UpdateIntent_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/UpdateIntent"
42 Intents_DeleteIntent_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/DeleteIntent"
43 Intents_ImportIntents_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/ImportIntents"
44 Intents_ExportIntents_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Intents/ExportIntents"
45 )
46
47 // IntentsClient is the client API for Intents service.
48 //
49 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
50 type IntentsClient interface {
51 // Returns the list of all intents in the specified agent.
52 ListIntents(ctx context.Context, in *ListIntentsRequest, opts ...grpc.CallOption) (*ListIntentsResponse, error)
53 // Retrieves the specified intent.
54 GetIntent(ctx context.Context, in *GetIntentRequest, opts ...grpc.CallOption) (*Intent, error)
55 // Creates an intent in the specified agent.
56 //
57 // Note: You should always train a flow prior to sending it queries. See the
58 // [training
59 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
60 CreateIntent(ctx context.Context, in *CreateIntentRequest, opts ...grpc.CallOption) (*Intent, error)
61 // Updates the specified intent.
62 //
63 // Note: You should always train a flow prior to sending it queries. See the
64 // [training
65 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
66 UpdateIntent(ctx context.Context, in *UpdateIntentRequest, opts ...grpc.CallOption) (*Intent, error)
67 // Deletes the specified intent.
68 //
69 // Note: You should always train a flow prior to sending it queries. See the
70 // [training
71 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
72 DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
73 // Imports the specified intents into the agent.
74 //
75 // This method is a [long-running
76 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
77 // The returned `Operation` type has the following method-specific fields:
78 //
79 // - `metadata`:
80 // [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
81 // - `response`:
82 // [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
83 ImportIntents(ctx context.Context, in *ImportIntentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
84 // Exports the selected intents.
85 //
86 // This method is a [long-running
87 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
88 // The returned `Operation` type has the following method-specific fields:
89 //
90 // - `metadata`:
91 // [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
92 // - `response`:
93 // [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
94 ExportIntents(ctx context.Context, in *ExportIntentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
95 }
96
97 type intentsClient struct {
98 cc grpc.ClientConnInterface
99 }
100
101 func NewIntentsClient(cc grpc.ClientConnInterface) IntentsClient {
102 return &intentsClient{cc}
103 }
104
105 func (c *intentsClient) ListIntents(ctx context.Context, in *ListIntentsRequest, opts ...grpc.CallOption) (*ListIntentsResponse, error) {
106 out := new(ListIntentsResponse)
107 err := c.cc.Invoke(ctx, Intents_ListIntents_FullMethodName, in, out, opts...)
108 if err != nil {
109 return nil, err
110 }
111 return out, nil
112 }
113
114 func (c *intentsClient) GetIntent(ctx context.Context, in *GetIntentRequest, opts ...grpc.CallOption) (*Intent, error) {
115 out := new(Intent)
116 err := c.cc.Invoke(ctx, Intents_GetIntent_FullMethodName, in, out, opts...)
117 if err != nil {
118 return nil, err
119 }
120 return out, nil
121 }
122
123 func (c *intentsClient) CreateIntent(ctx context.Context, in *CreateIntentRequest, opts ...grpc.CallOption) (*Intent, error) {
124 out := new(Intent)
125 err := c.cc.Invoke(ctx, Intents_CreateIntent_FullMethodName, in, out, opts...)
126 if err != nil {
127 return nil, err
128 }
129 return out, nil
130 }
131
132 func (c *intentsClient) UpdateIntent(ctx context.Context, in *UpdateIntentRequest, opts ...grpc.CallOption) (*Intent, error) {
133 out := new(Intent)
134 err := c.cc.Invoke(ctx, Intents_UpdateIntent_FullMethodName, in, out, opts...)
135 if err != nil {
136 return nil, err
137 }
138 return out, nil
139 }
140
141 func (c *intentsClient) DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
142 out := new(emptypb.Empty)
143 err := c.cc.Invoke(ctx, Intents_DeleteIntent_FullMethodName, in, out, opts...)
144 if err != nil {
145 return nil, err
146 }
147 return out, nil
148 }
149
150 func (c *intentsClient) ImportIntents(ctx context.Context, in *ImportIntentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
151 out := new(longrunningpb.Operation)
152 err := c.cc.Invoke(ctx, Intents_ImportIntents_FullMethodName, in, out, opts...)
153 if err != nil {
154 return nil, err
155 }
156 return out, nil
157 }
158
159 func (c *intentsClient) ExportIntents(ctx context.Context, in *ExportIntentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
160 out := new(longrunningpb.Operation)
161 err := c.cc.Invoke(ctx, Intents_ExportIntents_FullMethodName, in, out, opts...)
162 if err != nil {
163 return nil, err
164 }
165 return out, nil
166 }
167
168 // IntentsServer is the server API for Intents service.
169 // All implementations should embed UnimplementedIntentsServer
170 // for forward compatibility
171 type IntentsServer interface {
172 // Returns the list of all intents in the specified agent.
173 ListIntents(context.Context, *ListIntentsRequest) (*ListIntentsResponse, error)
174 // Retrieves the specified intent.
175 GetIntent(context.Context, *GetIntentRequest) (*Intent, error)
176 // Creates an intent in the specified agent.
177 //
178 // Note: You should always train a flow prior to sending it queries. See the
179 // [training
180 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
181 CreateIntent(context.Context, *CreateIntentRequest) (*Intent, error)
182 // Updates the specified intent.
183 //
184 // Note: You should always train a flow prior to sending it queries. See the
185 // [training
186 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
187 UpdateIntent(context.Context, *UpdateIntentRequest) (*Intent, error)
188 // Deletes the specified intent.
189 //
190 // Note: You should always train a flow prior to sending it queries. See the
191 // [training
192 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
193 DeleteIntent(context.Context, *DeleteIntentRequest) (*emptypb.Empty, error)
194 // Imports the specified intents into the agent.
195 //
196 // This method is a [long-running
197 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
198 // The returned `Operation` type has the following method-specific fields:
199 //
200 // - `metadata`:
201 // [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
202 // - `response`:
203 // [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
204 ImportIntents(context.Context, *ImportIntentsRequest) (*longrunningpb.Operation, error)
205 // Exports the selected intents.
206 //
207 // This method is a [long-running
208 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
209 // The returned `Operation` type has the following method-specific fields:
210 //
211 // - `metadata`:
212 // [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
213 // - `response`:
214 // [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
215 ExportIntents(context.Context, *ExportIntentsRequest) (*longrunningpb.Operation, error)
216 }
217
218 // UnimplementedIntentsServer should be embedded to have forward compatible implementations.
219 type UnimplementedIntentsServer struct {
220 }
221
222 func (UnimplementedIntentsServer) ListIntents(context.Context, *ListIntentsRequest) (*ListIntentsResponse, error) {
223 return nil, status.Errorf(codes.Unimplemented, "method ListIntents not implemented")
224 }
225 func (UnimplementedIntentsServer) GetIntent(context.Context, *GetIntentRequest) (*Intent, error) {
226 return nil, status.Errorf(codes.Unimplemented, "method GetIntent not implemented")
227 }
228 func (UnimplementedIntentsServer) CreateIntent(context.Context, *CreateIntentRequest) (*Intent, error) {
229 return nil, status.Errorf(codes.Unimplemented, "method CreateIntent not implemented")
230 }
231 func (UnimplementedIntentsServer) UpdateIntent(context.Context, *UpdateIntentRequest) (*Intent, error) {
232 return nil, status.Errorf(codes.Unimplemented, "method UpdateIntent not implemented")
233 }
234 func (UnimplementedIntentsServer) DeleteIntent(context.Context, *DeleteIntentRequest) (*emptypb.Empty, error) {
235 return nil, status.Errorf(codes.Unimplemented, "method DeleteIntent not implemented")
236 }
237 func (UnimplementedIntentsServer) ImportIntents(context.Context, *ImportIntentsRequest) (*longrunningpb.Operation, error) {
238 return nil, status.Errorf(codes.Unimplemented, "method ImportIntents not implemented")
239 }
240 func (UnimplementedIntentsServer) ExportIntents(context.Context, *ExportIntentsRequest) (*longrunningpb.Operation, error) {
241 return nil, status.Errorf(codes.Unimplemented, "method ExportIntents not implemented")
242 }
243
244 // UnsafeIntentsServer may be embedded to opt out of forward compatibility for this service.
245 // Use of this interface is not recommended, as added methods to IntentsServer will
246 // result in compilation errors.
247 type UnsafeIntentsServer interface {
248 mustEmbedUnimplementedIntentsServer()
249 }
250
251 func RegisterIntentsServer(s grpc.ServiceRegistrar, srv IntentsServer) {
252 s.RegisterService(&Intents_ServiceDesc, srv)
253 }
254
255 func _Intents_ListIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
256 in := new(ListIntentsRequest)
257 if err := dec(in); err != nil {
258 return nil, err
259 }
260 if interceptor == nil {
261 return srv.(IntentsServer).ListIntents(ctx, in)
262 }
263 info := &grpc.UnaryServerInfo{
264 Server: srv,
265 FullMethod: Intents_ListIntents_FullMethodName,
266 }
267 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
268 return srv.(IntentsServer).ListIntents(ctx, req.(*ListIntentsRequest))
269 }
270 return interceptor(ctx, in, info, handler)
271 }
272
273 func _Intents_GetIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
274 in := new(GetIntentRequest)
275 if err := dec(in); err != nil {
276 return nil, err
277 }
278 if interceptor == nil {
279 return srv.(IntentsServer).GetIntent(ctx, in)
280 }
281 info := &grpc.UnaryServerInfo{
282 Server: srv,
283 FullMethod: Intents_GetIntent_FullMethodName,
284 }
285 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
286 return srv.(IntentsServer).GetIntent(ctx, req.(*GetIntentRequest))
287 }
288 return interceptor(ctx, in, info, handler)
289 }
290
291 func _Intents_CreateIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
292 in := new(CreateIntentRequest)
293 if err := dec(in); err != nil {
294 return nil, err
295 }
296 if interceptor == nil {
297 return srv.(IntentsServer).CreateIntent(ctx, in)
298 }
299 info := &grpc.UnaryServerInfo{
300 Server: srv,
301 FullMethod: Intents_CreateIntent_FullMethodName,
302 }
303 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
304 return srv.(IntentsServer).CreateIntent(ctx, req.(*CreateIntentRequest))
305 }
306 return interceptor(ctx, in, info, handler)
307 }
308
309 func _Intents_UpdateIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
310 in := new(UpdateIntentRequest)
311 if err := dec(in); err != nil {
312 return nil, err
313 }
314 if interceptor == nil {
315 return srv.(IntentsServer).UpdateIntent(ctx, in)
316 }
317 info := &grpc.UnaryServerInfo{
318 Server: srv,
319 FullMethod: Intents_UpdateIntent_FullMethodName,
320 }
321 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
322 return srv.(IntentsServer).UpdateIntent(ctx, req.(*UpdateIntentRequest))
323 }
324 return interceptor(ctx, in, info, handler)
325 }
326
327 func _Intents_DeleteIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
328 in := new(DeleteIntentRequest)
329 if err := dec(in); err != nil {
330 return nil, err
331 }
332 if interceptor == nil {
333 return srv.(IntentsServer).DeleteIntent(ctx, in)
334 }
335 info := &grpc.UnaryServerInfo{
336 Server: srv,
337 FullMethod: Intents_DeleteIntent_FullMethodName,
338 }
339 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
340 return srv.(IntentsServer).DeleteIntent(ctx, req.(*DeleteIntentRequest))
341 }
342 return interceptor(ctx, in, info, handler)
343 }
344
345 func _Intents_ImportIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
346 in := new(ImportIntentsRequest)
347 if err := dec(in); err != nil {
348 return nil, err
349 }
350 if interceptor == nil {
351 return srv.(IntentsServer).ImportIntents(ctx, in)
352 }
353 info := &grpc.UnaryServerInfo{
354 Server: srv,
355 FullMethod: Intents_ImportIntents_FullMethodName,
356 }
357 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
358 return srv.(IntentsServer).ImportIntents(ctx, req.(*ImportIntentsRequest))
359 }
360 return interceptor(ctx, in, info, handler)
361 }
362
363 func _Intents_ExportIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
364 in := new(ExportIntentsRequest)
365 if err := dec(in); err != nil {
366 return nil, err
367 }
368 if interceptor == nil {
369 return srv.(IntentsServer).ExportIntents(ctx, in)
370 }
371 info := &grpc.UnaryServerInfo{
372 Server: srv,
373 FullMethod: Intents_ExportIntents_FullMethodName,
374 }
375 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
376 return srv.(IntentsServer).ExportIntents(ctx, req.(*ExportIntentsRequest))
377 }
378 return interceptor(ctx, in, info, handler)
379 }
380
381 // Intents_ServiceDesc is the grpc.ServiceDesc for Intents service.
382 // It's only intended for direct use with grpc.RegisterService,
383 // and not to be introspected or modified (even as a copy)
384 var Intents_ServiceDesc = grpc.ServiceDesc{
385 ServiceName: "google.cloud.dialogflow.cx.v3beta1.Intents",
386 HandlerType: (*IntentsServer)(nil),
387 Methods: []grpc.MethodDesc{
388 {
389 MethodName: "ListIntents",
390 Handler: _Intents_ListIntents_Handler,
391 },
392 {
393 MethodName: "GetIntent",
394 Handler: _Intents_GetIntent_Handler,
395 },
396 {
397 MethodName: "CreateIntent",
398 Handler: _Intents_CreateIntent_Handler,
399 },
400 {
401 MethodName: "UpdateIntent",
402 Handler: _Intents_UpdateIntent_Handler,
403 },
404 {
405 MethodName: "DeleteIntent",
406 Handler: _Intents_DeleteIntent_Handler,
407 },
408 {
409 MethodName: "ImportIntents",
410 Handler: _Intents_ImportIntents_Handler,
411 },
412 {
413 MethodName: "ExportIntents",
414 Handler: _Intents_ExportIntents_Handler,
415 },
416 },
417 Streams: []grpc.StreamDesc{},
418 Metadata: "google/cloud/dialogflow/cx/v3beta1/intent.proto",
419 }