Debian Codegraph @

dialogflow/cx/apiv3beta1/cxpb/playbook_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/playbook.proto
20
21 package cxpb
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 emptypb "google.golang.org/protobuf/types/known/emptypb"
29 )
30
31 // This is a compile-time assertion to ensure that this generated file
32 // is compatible with the grpc package it is being compiled against.
33 // Requires gRPC-Go v1.32.0 or later.
34 const _ = grpc.SupportPackageIsVersion7
35
36 const (
37 Playbooks_CreatePlaybook_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybook"
38 Playbooks_DeletePlaybook_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybook"
39 Playbooks_ListPlaybooks_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybooks"
40 Playbooks_GetPlaybook_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybook"
41 Playbooks_UpdatePlaybook_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/UpdatePlaybook"
42 Playbooks_CreatePlaybookVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybookVersion"
43 Playbooks_GetPlaybookVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybookVersion"
44 Playbooks_ListPlaybookVersions_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybookVersions"
45 Playbooks_DeletePlaybookVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybookVersion"
46 )
47
48 // PlaybooksClient is the client API for Playbooks service.
49 //
50 // 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.
51 type PlaybooksClient interface {
52 // Creates a playbook in a specified agent.
53 CreatePlaybook(ctx context.Context, in *CreatePlaybookRequest, opts ...grpc.CallOption) (*Playbook, error)
54 // Deletes a specified playbook.
55 DeletePlaybook(ctx context.Context, in *DeletePlaybookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
56 // Returns a list of playbooks in the specified agent.
57 ListPlaybooks(ctx context.Context, in *ListPlaybooksRequest, opts ...grpc.CallOption) (*ListPlaybooksResponse, error)
58 // Retrieves the specified Playbook.
59 GetPlaybook(ctx context.Context, in *GetPlaybookRequest, opts ...grpc.CallOption) (*Playbook, error)
60 // Updates the specified Playbook.
61 UpdatePlaybook(ctx context.Context, in *UpdatePlaybookRequest, opts ...grpc.CallOption) (*Playbook, error)
62 // Creates a version for the specified Playbook.
63 CreatePlaybookVersion(ctx context.Context, in *CreatePlaybookVersionRequest, opts ...grpc.CallOption) (*PlaybookVersion, error)
64 // Retrieves the specified version of the Playbook.
65 GetPlaybookVersion(ctx context.Context, in *GetPlaybookVersionRequest, opts ...grpc.CallOption) (*PlaybookVersion, error)
66 // Lists versions for the specified Playbook.
67 ListPlaybookVersions(ctx context.Context, in *ListPlaybookVersionsRequest, opts ...grpc.CallOption) (*ListPlaybookVersionsResponse, error)
68 // Deletes the specified version of the Playbook.
69 DeletePlaybookVersion(ctx context.Context, in *DeletePlaybookVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
70 }
71
72 type playbooksClient struct {
73 cc grpc.ClientConnInterface
74 }
75
76 func NewPlaybooksClient(cc grpc.ClientConnInterface) PlaybooksClient {
77 return &playbooksClient{cc}
78 }
79
80 func (c *playbooksClient) CreatePlaybook(ctx context.Context, in *CreatePlaybookRequest, opts ...grpc.CallOption) (*Playbook, error) {
81 out := new(Playbook)
82 err := c.cc.Invoke(ctx, Playbooks_CreatePlaybook_FullMethodName, in, out, opts...)
83 if err != nil {
84 return nil, err
85 }
86 return out, nil
87 }
88
89 func (c *playbooksClient) DeletePlaybook(ctx context.Context, in *DeletePlaybookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
90 out := new(emptypb.Empty)
91 err := c.cc.Invoke(ctx, Playbooks_DeletePlaybook_FullMethodName, in, out, opts...)
92 if err != nil {
93 return nil, err
94 }
95 return out, nil
96 }
97
98 func (c *playbooksClient) ListPlaybooks(ctx context.Context, in *ListPlaybooksRequest, opts ...grpc.CallOption) (*ListPlaybooksResponse, error) {
99 out := new(ListPlaybooksResponse)
100 err := c.cc.Invoke(ctx, Playbooks_ListPlaybooks_FullMethodName, in, out, opts...)
101 if err != nil {
102 return nil, err
103 }
104 return out, nil
105 }
106
107 func (c *playbooksClient) GetPlaybook(ctx context.Context, in *GetPlaybookRequest, opts ...grpc.CallOption) (*Playbook, error) {
108 out := new(Playbook)
109 err := c.cc.Invoke(ctx, Playbooks_GetPlaybook_FullMethodName, in, out, opts...)
110 if err != nil {
111 return nil, err
112 }
113 return out, nil
114 }
115
116 func (c *playbooksClient) UpdatePlaybook(ctx context.Context, in *UpdatePlaybookRequest, opts ...grpc.CallOption) (*Playbook, error) {
117 out := new(Playbook)
118 err := c.cc.Invoke(ctx, Playbooks_UpdatePlaybook_FullMethodName, in, out, opts...)
119 if err != nil {
120 return nil, err
121 }
122 return out, nil
123 }
124
125 func (c *playbooksClient) CreatePlaybookVersion(ctx context.Context, in *CreatePlaybookVersionRequest, opts ...grpc.CallOption) (*PlaybookVersion, error) {
126 out := new(PlaybookVersion)
127 err := c.cc.Invoke(ctx, Playbooks_CreatePlaybookVersion_FullMethodName, in, out, opts...)
128 if err != nil {
129 return nil, err
130 }
131 return out, nil
132 }
133
134 func (c *playbooksClient) GetPlaybookVersion(ctx context.Context, in *GetPlaybookVersionRequest, opts ...grpc.CallOption) (*PlaybookVersion, error) {
135 out := new(PlaybookVersion)
136 err := c.cc.Invoke(ctx, Playbooks_GetPlaybookVersion_FullMethodName, in, out, opts...)
137 if err != nil {
138 return nil, err
139 }
140 return out, nil
141 }
142
143 func (c *playbooksClient) ListPlaybookVersions(ctx context.Context, in *ListPlaybookVersionsRequest, opts ...grpc.CallOption) (*ListPlaybookVersionsResponse, error) {
144 out := new(ListPlaybookVersionsResponse)
145 err := c.cc.Invoke(ctx, Playbooks_ListPlaybookVersions_FullMethodName, in, out, opts...)
146 if err != nil {
147 return nil, err
148 }
149 return out, nil
150 }
151
152 func (c *playbooksClient) DeletePlaybookVersion(ctx context.Context, in *DeletePlaybookVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
153 out := new(emptypb.Empty)
154 err := c.cc.Invoke(ctx, Playbooks_DeletePlaybookVersion_FullMethodName, in, out, opts...)
155 if err != nil {
156 return nil, err
157 }
158 return out, nil
159 }
160
161 // PlaybooksServer is the server API for Playbooks service.
162 // All implementations should embed UnimplementedPlaybooksServer
163 // for forward compatibility
164 type PlaybooksServer interface {
165 // Creates a playbook in a specified agent.
166 CreatePlaybook(context.Context, *CreatePlaybookRequest) (*Playbook, error)
167 // Deletes a specified playbook.
168 DeletePlaybook(context.Context, *DeletePlaybookRequest) (*emptypb.Empty, error)
169 // Returns a list of playbooks in the specified agent.
170 ListPlaybooks(context.Context, *ListPlaybooksRequest) (*ListPlaybooksResponse, error)
171 // Retrieves the specified Playbook.
172 GetPlaybook(context.Context, *GetPlaybookRequest) (*Playbook, error)
173 // Updates the specified Playbook.
174 UpdatePlaybook(context.Context, *UpdatePlaybookRequest) (*Playbook, error)
175 // Creates a version for the specified Playbook.
176 CreatePlaybookVersion(context.Context, *CreatePlaybookVersionRequest) (*PlaybookVersion, error)
177 // Retrieves the specified version of the Playbook.
178 GetPlaybookVersion(context.Context, *GetPlaybookVersionRequest) (*PlaybookVersion, error)
179 // Lists versions for the specified Playbook.
180 ListPlaybookVersions(context.Context, *ListPlaybookVersionsRequest) (*ListPlaybookVersionsResponse, error)
181 // Deletes the specified version of the Playbook.
182 DeletePlaybookVersion(context.Context, *DeletePlaybookVersionRequest) (*emptypb.Empty, error)
183 }
184
185 // UnimplementedPlaybooksServer should be embedded to have forward compatible implementations.
186 type UnimplementedPlaybooksServer struct {
187 }
188
189 func (UnimplementedPlaybooksServer) CreatePlaybook(context.Context, *CreatePlaybookRequest) (*Playbook, error) {
190 return nil, status.Errorf(codes.Unimplemented, "method CreatePlaybook not implemented")
191 }
192 func (UnimplementedPlaybooksServer) DeletePlaybook(context.Context, *DeletePlaybookRequest) (*emptypb.Empty, error) {
193 return nil, status.Errorf(codes.Unimplemented, "method DeletePlaybook not implemented")
194 }
195 func (UnimplementedPlaybooksServer) ListPlaybooks(context.Context, *ListPlaybooksRequest) (*ListPlaybooksResponse, error) {
196 return nil, status.Errorf(codes.Unimplemented, "method ListPlaybooks not implemented")
197 }
198 func (UnimplementedPlaybooksServer) GetPlaybook(context.Context, *GetPlaybookRequest) (*Playbook, error) {
199 return nil, status.Errorf(codes.Unimplemented, "method GetPlaybook not implemented")
200 }
201 func (UnimplementedPlaybooksServer) UpdatePlaybook(context.Context, *UpdatePlaybookRequest) (*Playbook, error) {
202 return nil, status.Errorf(codes.Unimplemented, "method UpdatePlaybook not implemented")
203 }
204 func (UnimplementedPlaybooksServer) CreatePlaybookVersion(context.Context, *CreatePlaybookVersionRequest) (*PlaybookVersion, error) {
205 return nil, status.Errorf(codes.Unimplemented, "method CreatePlaybookVersion not implemented")
206 }
207 func (UnimplementedPlaybooksServer) GetPlaybookVersion(context.Context, *GetPlaybookVersionRequest) (*PlaybookVersion, error) {
208 return nil, status.Errorf(codes.Unimplemented, "method GetPlaybookVersion not implemented")
209 }
210 func (UnimplementedPlaybooksServer) ListPlaybookVersions(context.Context, *ListPlaybookVersionsRequest) (*ListPlaybookVersionsResponse, error) {
211 return nil, status.Errorf(codes.Unimplemented, "method ListPlaybookVersions not implemented")
212 }
213 func (UnimplementedPlaybooksServer) DeletePlaybookVersion(context.Context, *DeletePlaybookVersionRequest) (*emptypb.Empty, error) {
214 return nil, status.Errorf(codes.Unimplemented, "method DeletePlaybookVersion not implemented")
215 }
216
217 // UnsafePlaybooksServer may be embedded to opt out of forward compatibility for this service.
218 // Use of this interface is not recommended, as added methods to PlaybooksServer will
219 // result in compilation errors.
220 type UnsafePlaybooksServer interface {
221 mustEmbedUnimplementedPlaybooksServer()
222 }
223
224 func RegisterPlaybooksServer(s grpc.ServiceRegistrar, srv PlaybooksServer) {
225 s.RegisterService(&Playbooks_ServiceDesc, srv)
226 }
227
228 func _Playbooks_CreatePlaybook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
229 in := new(CreatePlaybookRequest)
230 if err := dec(in); err != nil {
231 return nil, err
232 }
233 if interceptor == nil {
234 return srv.(PlaybooksServer).CreatePlaybook(ctx, in)
235 }
236 info := &grpc.UnaryServerInfo{
237 Server: srv,
238 FullMethod: Playbooks_CreatePlaybook_FullMethodName,
239 }
240 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
241 return srv.(PlaybooksServer).CreatePlaybook(ctx, req.(*CreatePlaybookRequest))
242 }
243 return interceptor(ctx, in, info, handler)
244 }
245
246 func _Playbooks_DeletePlaybook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
247 in := new(DeletePlaybookRequest)
248 if err := dec(in); err != nil {
249 return nil, err
250 }
251 if interceptor == nil {
252 return srv.(PlaybooksServer).DeletePlaybook(ctx, in)
253 }
254 info := &grpc.UnaryServerInfo{
255 Server: srv,
256 FullMethod: Playbooks_DeletePlaybook_FullMethodName,
257 }
258 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
259 return srv.(PlaybooksServer).DeletePlaybook(ctx, req.(*DeletePlaybookRequest))
260 }
261 return interceptor(ctx, in, info, handler)
262 }
263
264 func _Playbooks_ListPlaybooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
265 in := new(ListPlaybooksRequest)
266 if err := dec(in); err != nil {
267 return nil, err
268 }
269 if interceptor == nil {
270 return srv.(PlaybooksServer).ListPlaybooks(ctx, in)
271 }
272 info := &grpc.UnaryServerInfo{
273 Server: srv,
274 FullMethod: Playbooks_ListPlaybooks_FullMethodName,
275 }
276 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
277 return srv.(PlaybooksServer).ListPlaybooks(ctx, req.(*ListPlaybooksRequest))
278 }
279 return interceptor(ctx, in, info, handler)
280 }
281
282 func _Playbooks_GetPlaybook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
283 in := new(GetPlaybookRequest)
284 if err := dec(in); err != nil {
285 return nil, err
286 }
287 if interceptor == nil {
288 return srv.(PlaybooksServer).GetPlaybook(ctx, in)
289 }
290 info := &grpc.UnaryServerInfo{
291 Server: srv,
292 FullMethod: Playbooks_GetPlaybook_FullMethodName,
293 }
294 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
295 return srv.(PlaybooksServer).GetPlaybook(ctx, req.(*GetPlaybookRequest))
296 }
297 return interceptor(ctx, in, info, handler)
298 }
299
300 func _Playbooks_UpdatePlaybook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
301 in := new(UpdatePlaybookRequest)
302 if err := dec(in); err != nil {
303 return nil, err
304 }
305 if interceptor == nil {
306 return srv.(PlaybooksServer).UpdatePlaybook(ctx, in)
307 }
308 info := &grpc.UnaryServerInfo{
309 Server: srv,
310 FullMethod: Playbooks_UpdatePlaybook_FullMethodName,
311 }
312 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
313 return srv.(PlaybooksServer).UpdatePlaybook(ctx, req.(*UpdatePlaybookRequest))
314 }
315 return interceptor(ctx, in, info, handler)
316 }
317
318 func _Playbooks_CreatePlaybookVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
319 in := new(CreatePlaybookVersionRequest)
320 if err := dec(in); err != nil {
321 return nil, err
322 }
323 if interceptor == nil {
324 return srv.(PlaybooksServer).CreatePlaybookVersion(ctx, in)
325 }
326 info := &grpc.UnaryServerInfo{
327 Server: srv,
328 FullMethod: Playbooks_CreatePlaybookVersion_FullMethodName,
329 }
330 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
331 return srv.(PlaybooksServer).CreatePlaybookVersion(ctx, req.(*CreatePlaybookVersionRequest))
332 }
333 return interceptor(ctx, in, info, handler)
334 }
335
336 func _Playbooks_GetPlaybookVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
337 in := new(GetPlaybookVersionRequest)
338 if err := dec(in); err != nil {
339 return nil, err
340 }
341 if interceptor == nil {
342 return srv.(PlaybooksServer).GetPlaybookVersion(ctx, in)
343 }
344 info := &grpc.UnaryServerInfo{
345 Server: srv,
346 FullMethod: Playbooks_GetPlaybookVersion_FullMethodName,
347 }
348 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
349 return srv.(PlaybooksServer).GetPlaybookVersion(ctx, req.(*GetPlaybookVersionRequest))
350 }
351 return interceptor(ctx, in, info, handler)
352 }
353
354 func _Playbooks_ListPlaybookVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
355 in := new(ListPlaybookVersionsRequest)
356 if err := dec(in); err != nil {
357 return nil, err
358 }
359 if interceptor == nil {
360 return srv.(PlaybooksServer).ListPlaybookVersions(ctx, in)
361 }
362 info := &grpc.UnaryServerInfo{
363 Server: srv,
364 FullMethod: Playbooks_ListPlaybookVersions_FullMethodName,
365 }
366 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
367 return srv.(PlaybooksServer).ListPlaybookVersions(ctx, req.(*ListPlaybookVersionsRequest))
368 }
369 return interceptor(ctx, in, info, handler)
370 }
371
372 func _Playbooks_DeletePlaybookVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
373 in := new(DeletePlaybookVersionRequest)
374 if err := dec(in); err != nil {
375 return nil, err
376 }
377 if interceptor == nil {
378 return srv.(PlaybooksServer).DeletePlaybookVersion(ctx, in)
379 }
380 info := &grpc.UnaryServerInfo{
381 Server: srv,
382 FullMethod: Playbooks_DeletePlaybookVersion_FullMethodName,
383 }
384 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
385 return srv.(PlaybooksServer).DeletePlaybookVersion(ctx, req.(*DeletePlaybookVersionRequest))
386 }
387 return interceptor(ctx, in, info, handler)
388 }
389
390 // Playbooks_ServiceDesc is the grpc.ServiceDesc for Playbooks service.
391 // It's only intended for direct use with grpc.RegisterService,
392 // and not to be introspected or modified (even as a copy)
393 var Playbooks_ServiceDesc = grpc.ServiceDesc{
394 ServiceName: "google.cloud.dialogflow.cx.v3beta1.Playbooks",
395 HandlerType: (*PlaybooksServer)(nil),
396 Methods: []grpc.MethodDesc{
397 {
398 MethodName: "CreatePlaybook",
399 Handler: _Playbooks_CreatePlaybook_Handler,
400 },
401 {
402 MethodName: "DeletePlaybook",
403 Handler: _Playbooks_DeletePlaybook_Handler,
404 },
405 {
406 MethodName: "ListPlaybooks",
407 Handler: _Playbooks_ListPlaybooks_Handler,
408 },
409 {
410 MethodName: "GetPlaybook",
411 Handler: _Playbooks_GetPlaybook_Handler,
412 },
413 {
414 MethodName: "UpdatePlaybook",
415 Handler: _Playbooks_UpdatePlaybook_Handler,
416 },
417 {
418 MethodName: "CreatePlaybookVersion",
419 Handler: _Playbooks_CreatePlaybookVersion_Handler,
420 },
421 {
422 MethodName: "GetPlaybookVersion",
423 Handler: _Playbooks_GetPlaybookVersion_Handler,
424 },
425 {
426 MethodName: "ListPlaybookVersions",
427 Handler: _Playbooks_ListPlaybookVersions_Handler,
428 },
429 {
430 MethodName: "DeletePlaybookVersion",
431 Handler: _Playbooks_DeletePlaybookVersion_Handler,
432 },
433 },
434 Streams: []grpc.StreamDesc{},
435 Metadata: "google/cloud/dialogflow/cx/v3beta1/playbook.proto",
436 }