| 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/tool.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 |
Tools_CreateTool_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/CreateTool" |
| 39 |
Tools_ListTools_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/ListTools" |
| 40 |
Tools_ExportTools_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/ExportTools" |
| 41 |
Tools_GetTool_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/GetTool" |
| 42 |
Tools_UpdateTool_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/UpdateTool" |
| 43 |
Tools_DeleteTool_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/DeleteTool" |
| 44 |
Tools_ListToolVersions_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/ListToolVersions" |
| 45 |
Tools_CreateToolVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/CreateToolVersion" |
| 46 |
Tools_GetToolVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/GetToolVersion" |
| 47 |
Tools_DeleteToolVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/DeleteToolVersion" |
| 48 |
Tools_RestoreToolVersion_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Tools/RestoreToolVersion" |
| 49 |
) |
| 50 |
|
| 51 |
// ToolsClient is the client API for Tools service. |
| 52 |
// |
| 53 |
// 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. |
| 54 |
type ToolsClient interface { |
| 55 |
// Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified |
| 56 |
// agent. |
| 57 |
CreateTool(ctx context.Context, in *CreateToolRequest, opts ...grpc.CallOption) (*Tool, error) |
| 58 |
// Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the |
| 59 |
// specified agent. |
| 60 |
ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error) |
| 61 |
// Exports the selected tools. |
| 62 |
ExportTools(ctx context.Context, in *ExportToolsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 63 |
// Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 64 |
GetTool(ctx context.Context, in *GetToolRequest, opts ...grpc.CallOption) (*Tool, error) |
| 65 |
// Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 66 |
UpdateTool(ctx context.Context, in *UpdateToolRequest, opts ...grpc.CallOption) (*Tool, error) |
| 67 |
// Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 68 |
DeleteTool(ctx context.Context, in *DeleteToolRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 69 |
// List versions of the specified |
| 70 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 71 |
ListToolVersions(ctx context.Context, in *ListToolVersionsRequest, opts ...grpc.CallOption) (*ListToolVersionsResponse, error) |
| 72 |
// Creates a version for the specified |
| 73 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 74 |
CreateToolVersion(ctx context.Context, in *CreateToolVersionRequest, opts ...grpc.CallOption) (*ToolVersion, error) |
| 75 |
// Retrieves the specified version of the |
| 76 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 77 |
GetToolVersion(ctx context.Context, in *GetToolVersionRequest, opts ...grpc.CallOption) (*ToolVersion, error) |
| 78 |
// Deletes the specified version of the |
| 79 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 80 |
DeleteToolVersion(ctx context.Context, in *DeleteToolVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 81 |
// Retrieves the specified version of the Tool and stores it as the |
| 82 |
// current tool draft, returning the tool with resources updated. |
| 83 |
RestoreToolVersion(ctx context.Context, in *RestoreToolVersionRequest, opts ...grpc.CallOption) (*RestoreToolVersionResponse, error) |
| 84 |
} |
| 85 |
|
| 86 |
type toolsClient struct { |
| 87 |
cc grpc.ClientConnInterface |
| 88 |
} |
| 89 |
|
| 90 |
func NewToolsClient(cc grpc.ClientConnInterface) ToolsClient { |
| 91 |
return &toolsClient{cc} |
| 92 |
} |
| 93 |
|
| 94 |
func (c *toolsClient) CreateTool(ctx context.Context, in *CreateToolRequest, opts ...grpc.CallOption) (*Tool, error) { |
| 95 |
out := new(Tool) |
| 96 |
err := c.cc.Invoke(ctx, Tools_CreateTool_FullMethodName, in, out, opts...) |
| 97 |
if err != nil { |
| 98 |
return nil, err |
| 99 |
} |
| 100 |
return out, nil |
| 101 |
} |
| 102 |
|
| 103 |
func (c *toolsClient) ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error) { |
| 104 |
out := new(ListToolsResponse) |
| 105 |
err := c.cc.Invoke(ctx, Tools_ListTools_FullMethodName, in, out, opts...) |
| 106 |
if err != nil { |
| 107 |
return nil, err |
| 108 |
} |
| 109 |
return out, nil |
| 110 |
} |
| 111 |
|
| 112 |
func (c *toolsClient) ExportTools(ctx context.Context, in *ExportToolsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 113 |
out := new(longrunningpb.Operation) |
| 114 |
err := c.cc.Invoke(ctx, Tools_ExportTools_FullMethodName, in, out, opts...) |
| 115 |
if err != nil { |
| 116 |
return nil, err |
| 117 |
} |
| 118 |
return out, nil |
| 119 |
} |
| 120 |
|
| 121 |
func (c *toolsClient) GetTool(ctx context.Context, in *GetToolRequest, opts ...grpc.CallOption) (*Tool, error) { |
| 122 |
out := new(Tool) |
| 123 |
err := c.cc.Invoke(ctx, Tools_GetTool_FullMethodName, in, out, opts...) |
| 124 |
if err != nil { |
| 125 |
return nil, err |
| 126 |
} |
| 127 |
return out, nil |
| 128 |
} |
| 129 |
|
| 130 |
func (c *toolsClient) UpdateTool(ctx context.Context, in *UpdateToolRequest, opts ...grpc.CallOption) (*Tool, error) { |
| 131 |
out := new(Tool) |
| 132 |
err := c.cc.Invoke(ctx, Tools_UpdateTool_FullMethodName, in, out, opts...) |
| 133 |
if err != nil { |
| 134 |
return nil, err |
| 135 |
} |
| 136 |
return out, nil |
| 137 |
} |
| 138 |
|
| 139 |
func (c *toolsClient) DeleteTool(ctx context.Context, in *DeleteToolRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 140 |
out := new(emptypb.Empty) |
| 141 |
err := c.cc.Invoke(ctx, Tools_DeleteTool_FullMethodName, in, out, opts...) |
| 142 |
if err != nil { |
| 143 |
return nil, err |
| 144 |
} |
| 145 |
return out, nil |
| 146 |
} |
| 147 |
|
| 148 |
func (c *toolsClient) ListToolVersions(ctx context.Context, in *ListToolVersionsRequest, opts ...grpc.CallOption) (*ListToolVersionsResponse, error) { |
| 149 |
out := new(ListToolVersionsResponse) |
| 150 |
err := c.cc.Invoke(ctx, Tools_ListToolVersions_FullMethodName, in, out, opts...) |
| 151 |
if err != nil { |
| 152 |
return nil, err |
| 153 |
} |
| 154 |
return out, nil |
| 155 |
} |
| 156 |
|
| 157 |
func (c *toolsClient) CreateToolVersion(ctx context.Context, in *CreateToolVersionRequest, opts ...grpc.CallOption) (*ToolVersion, error) { |
| 158 |
out := new(ToolVersion) |
| 159 |
err := c.cc.Invoke(ctx, Tools_CreateToolVersion_FullMethodName, in, out, opts...) |
| 160 |
if err != nil { |
| 161 |
return nil, err |
| 162 |
} |
| 163 |
return out, nil |
| 164 |
} |
| 165 |
|
| 166 |
func (c *toolsClient) GetToolVersion(ctx context.Context, in *GetToolVersionRequest, opts ...grpc.CallOption) (*ToolVersion, error) { |
| 167 |
out := new(ToolVersion) |
| 168 |
err := c.cc.Invoke(ctx, Tools_GetToolVersion_FullMethodName, in, out, opts...) |
| 169 |
if err != nil { |
| 170 |
return nil, err |
| 171 |
} |
| 172 |
return out, nil |
| 173 |
} |
| 174 |
|
| 175 |
func (c *toolsClient) DeleteToolVersion(ctx context.Context, in *DeleteToolVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 176 |
out := new(emptypb.Empty) |
| 177 |
err := c.cc.Invoke(ctx, Tools_DeleteToolVersion_FullMethodName, in, out, opts...) |
| 178 |
if err != nil { |
| 179 |
return nil, err |
| 180 |
} |
| 181 |
return out, nil |
| 182 |
} |
| 183 |
|
| 184 |
func (c *toolsClient) RestoreToolVersion(ctx context.Context, in *RestoreToolVersionRequest, opts ...grpc.CallOption) (*RestoreToolVersionResponse, error) { |
| 185 |
out := new(RestoreToolVersionResponse) |
| 186 |
err := c.cc.Invoke(ctx, Tools_RestoreToolVersion_FullMethodName, in, out, opts...) |
| 187 |
if err != nil { |
| 188 |
return nil, err |
| 189 |
} |
| 190 |
return out, nil |
| 191 |
} |
| 192 |
|
| 193 |
// ToolsServer is the server API for Tools service. |
| 194 |
// All implementations should embed UnimplementedToolsServer |
| 195 |
// for forward compatibility |
| 196 |
type ToolsServer interface { |
| 197 |
// Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified |
| 198 |
// agent. |
| 199 |
CreateTool(context.Context, *CreateToolRequest) (*Tool, error) |
| 200 |
// Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the |
| 201 |
// specified agent. |
| 202 |
ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error) |
| 203 |
// Exports the selected tools. |
| 204 |
ExportTools(context.Context, *ExportToolsRequest) (*longrunningpb.Operation, error) |
| 205 |
// Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 206 |
GetTool(context.Context, *GetToolRequest) (*Tool, error) |
| 207 |
// Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 208 |
UpdateTool(context.Context, *UpdateToolRequest) (*Tool, error) |
| 209 |
// Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 210 |
DeleteTool(context.Context, *DeleteToolRequest) (*emptypb.Empty, error) |
| 211 |
// List versions of the specified |
| 212 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 213 |
ListToolVersions(context.Context, *ListToolVersionsRequest) (*ListToolVersionsResponse, error) |
| 214 |
// Creates a version for the specified |
| 215 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 216 |
CreateToolVersion(context.Context, *CreateToolVersionRequest) (*ToolVersion, error) |
| 217 |
// Retrieves the specified version of the |
| 218 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 219 |
GetToolVersion(context.Context, *GetToolVersionRequest) (*ToolVersion, error) |
| 220 |
// Deletes the specified version of the |
| 221 |
// [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. |
| 222 |
DeleteToolVersion(context.Context, *DeleteToolVersionRequest) (*emptypb.Empty, error) |
| 223 |
// Retrieves the specified version of the Tool and stores it as the |
| 224 |
// current tool draft, returning the tool with resources updated. |
| 225 |
RestoreToolVersion(context.Context, *RestoreToolVersionRequest) (*RestoreToolVersionResponse, error) |
| 226 |
} |
| 227 |
|
| 228 |
// UnimplementedToolsServer should be embedded to have forward compatible implementations. |
| 229 |
type UnimplementedToolsServer struct { |
| 230 |
} |
| 231 |
|
| 232 |
func (UnimplementedToolsServer) CreateTool(context.Context, *CreateToolRequest) (*Tool, error) { |
| 233 |
return nil, status.Errorf(codes.Unimplemented, "method CreateTool not implemented") |
| 234 |
} |
| 235 |
func (UnimplementedToolsServer) ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error) { |
| 236 |
return nil, status.Errorf(codes.Unimplemented, "method ListTools not implemented") |
| 237 |
} |
| 238 |
func (UnimplementedToolsServer) ExportTools(context.Context, *ExportToolsRequest) (*longrunningpb.Operation, error) { |
| 239 |
return nil, status.Errorf(codes.Unimplemented, "method ExportTools not implemented") |
| 240 |
} |
| 241 |
func (UnimplementedToolsServer) GetTool(context.Context, *GetToolRequest) (*Tool, error) { |
| 242 |
return nil, status.Errorf(codes.Unimplemented, "method GetTool not implemented") |
| 243 |
} |
| 244 |
func (UnimplementedToolsServer) UpdateTool(context.Context, *UpdateToolRequest) (*Tool, error) { |
| 245 |
return nil, status.Errorf(codes.Unimplemented, "method UpdateTool not implemented") |
| 246 |
} |
| 247 |
func (UnimplementedToolsServer) DeleteTool(context.Context, *DeleteToolRequest) (*emptypb.Empty, error) { |
| 248 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteTool not implemented") |
| 249 |
} |
| 250 |
func (UnimplementedToolsServer) ListToolVersions(context.Context, *ListToolVersionsRequest) (*ListToolVersionsResponse, error) { |
| 251 |
return nil, status.Errorf(codes.Unimplemented, "method ListToolVersions not implemented") |
| 252 |
} |
| 253 |
func (UnimplementedToolsServer) CreateToolVersion(context.Context, *CreateToolVersionRequest) (*ToolVersion, error) { |
| 254 |
return nil, status.Errorf(codes.Unimplemented, "method CreateToolVersion not implemented") |
| 255 |
} |
| 256 |
func (UnimplementedToolsServer) GetToolVersion(context.Context, *GetToolVersionRequest) (*ToolVersion, error) { |
| 257 |
return nil, status.Errorf(codes.Unimplemented, "method GetToolVersion not implemented") |
| 258 |
} |
| 259 |
func (UnimplementedToolsServer) DeleteToolVersion(context.Context, *DeleteToolVersionRequest) (*emptypb.Empty, error) { |
| 260 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteToolVersion not implemented") |
| 261 |
} |
| 262 |
func (UnimplementedToolsServer) RestoreToolVersion(context.Context, *RestoreToolVersionRequest) (*RestoreToolVersionResponse, error) { |
| 263 |
return nil, status.Errorf(codes.Unimplemented, "method RestoreToolVersion not implemented") |
| 264 |
} |
| 265 |
|
| 266 |
// UnsafeToolsServer may be embedded to opt out of forward compatibility for this service. |
| 267 |
// Use of this interface is not recommended, as added methods to ToolsServer will |
| 268 |
// result in compilation errors. |
| 269 |
type UnsafeToolsServer interface { |
| 270 |
mustEmbedUnimplementedToolsServer() |
| 271 |
} |
| 272 |
|
| 273 |
func RegisterToolsServer(s grpc.ServiceRegistrar, srv ToolsServer) { |
| 274 |
s.RegisterService(&Tools_ServiceDesc, srv) |
| 275 |
} |
| 276 |
|
| 277 |
func _Tools_CreateTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 278 |
in := new(CreateToolRequest) |
| 279 |
if err := dec(in); err != nil { |
| 280 |
return nil, err |
| 281 |
} |
| 282 |
if interceptor == nil { |
| 283 |
return srv.(ToolsServer).CreateTool(ctx, in) |
| 284 |
} |
| 285 |
info := &grpc.UnaryServerInfo{ |
| 286 |
Server: srv, |
| 287 |
FullMethod: Tools_CreateTool_FullMethodName, |
| 288 |
} |
| 289 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 290 |
return srv.(ToolsServer).CreateTool(ctx, req.(*CreateToolRequest)) |
| 291 |
} |
| 292 |
return interceptor(ctx, in, info, handler) |
| 293 |
} |
| 294 |
|
| 295 |
func _Tools_ListTools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 296 |
in := new(ListToolsRequest) |
| 297 |
if err := dec(in); err != nil { |
| 298 |
return nil, err |
| 299 |
} |
| 300 |
if interceptor == nil { |
| 301 |
return srv.(ToolsServer).ListTools(ctx, in) |
| 302 |
} |
| 303 |
info := &grpc.UnaryServerInfo{ |
| 304 |
Server: srv, |
| 305 |
FullMethod: Tools_ListTools_FullMethodName, |
| 306 |
} |
| 307 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 308 |
return srv.(ToolsServer).ListTools(ctx, req.(*ListToolsRequest)) |
| 309 |
} |
| 310 |
return interceptor(ctx, in, info, handler) |
| 311 |
} |
| 312 |
|
| 313 |
func _Tools_ExportTools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 314 |
in := new(ExportToolsRequest) |
| 315 |
if err := dec(in); err != nil { |
| 316 |
return nil, err |
| 317 |
} |
| 318 |
if interceptor == nil { |
| 319 |
return srv.(ToolsServer).ExportTools(ctx, in) |
| 320 |
} |
| 321 |
info := &grpc.UnaryServerInfo{ |
| 322 |
Server: srv, |
| 323 |
FullMethod: Tools_ExportTools_FullMethodName, |
| 324 |
} |
| 325 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 326 |
return srv.(ToolsServer).ExportTools(ctx, req.(*ExportToolsRequest)) |
| 327 |
} |
| 328 |
return interceptor(ctx, in, info, handler) |
| 329 |
} |
| 330 |
|
| 331 |
func _Tools_GetTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 332 |
in := new(GetToolRequest) |
| 333 |
if err := dec(in); err != nil { |
| 334 |
return nil, err |
| 335 |
} |
| 336 |
if interceptor == nil { |
| 337 |
return srv.(ToolsServer).GetTool(ctx, in) |
| 338 |
} |
| 339 |
info := &grpc.UnaryServerInfo{ |
| 340 |
Server: srv, |
| 341 |
FullMethod: Tools_GetTool_FullMethodName, |
| 342 |
} |
| 343 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 344 |
return srv.(ToolsServer).GetTool(ctx, req.(*GetToolRequest)) |
| 345 |
} |
| 346 |
return interceptor(ctx, in, info, handler) |
| 347 |
} |
| 348 |
|
| 349 |
func _Tools_UpdateTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 350 |
in := new(UpdateToolRequest) |
| 351 |
if err := dec(in); err != nil { |
| 352 |
return nil, err |
| 353 |
} |
| 354 |
if interceptor == nil { |
| 355 |
return srv.(ToolsServer).UpdateTool(ctx, in) |
| 356 |
} |
| 357 |
info := &grpc.UnaryServerInfo{ |
| 358 |
Server: srv, |
| 359 |
FullMethod: Tools_UpdateTool_FullMethodName, |
| 360 |
} |
| 361 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 362 |
return srv.(ToolsServer).UpdateTool(ctx, req.(*UpdateToolRequest)) |
| 363 |
} |
| 364 |
return interceptor(ctx, in, info, handler) |
| 365 |
} |
| 366 |
|
| 367 |
func _Tools_DeleteTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 368 |
in := new(DeleteToolRequest) |
| 369 |
if err := dec(in); err != nil { |
| 370 |
return nil, err |
| 371 |
} |
| 372 |
if interceptor == nil { |
| 373 |
return srv.(ToolsServer).DeleteTool(ctx, in) |
| 374 |
} |
| 375 |
info := &grpc.UnaryServerInfo{ |
| 376 |
Server: srv, |
| 377 |
FullMethod: Tools_DeleteTool_FullMethodName, |
| 378 |
} |
| 379 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 380 |
return srv.(ToolsServer).DeleteTool(ctx, req.(*DeleteToolRequest)) |
| 381 |
} |
| 382 |
return interceptor(ctx, in, info, handler) |
| 383 |
} |
| 384 |
|
| 385 |
func _Tools_ListToolVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 386 |
in := new(ListToolVersionsRequest) |
| 387 |
if err := dec(in); err != nil { |
| 388 |
return nil, err |
| 389 |
} |
| 390 |
if interceptor == nil { |
| 391 |
return srv.(ToolsServer).ListToolVersions(ctx, in) |
| 392 |
} |
| 393 |
info := &grpc.UnaryServerInfo{ |
| 394 |
Server: srv, |
| 395 |
FullMethod: Tools_ListToolVersions_FullMethodName, |
| 396 |
} |
| 397 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 398 |
return srv.(ToolsServer).ListToolVersions(ctx, req.(*ListToolVersionsRequest)) |
| 399 |
} |
| 400 |
return interceptor(ctx, in, info, handler) |
| 401 |
} |
| 402 |
|
| 403 |
func _Tools_CreateToolVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 404 |
in := new(CreateToolVersionRequest) |
| 405 |
if err := dec(in); err != nil { |
| 406 |
return nil, err |
| 407 |
} |
| 408 |
if interceptor == nil { |
| 409 |
return srv.(ToolsServer).CreateToolVersion(ctx, in) |
| 410 |
} |
| 411 |
info := &grpc.UnaryServerInfo{ |
| 412 |
Server: srv, |
| 413 |
FullMethod: Tools_CreateToolVersion_FullMethodName, |
| 414 |
} |
| 415 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 416 |
return srv.(ToolsServer).CreateToolVersion(ctx, req.(*CreateToolVersionRequest)) |
| 417 |
} |
| 418 |
return interceptor(ctx, in, info, handler) |
| 419 |
} |
| 420 |
|
| 421 |
func _Tools_GetToolVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 422 |
in := new(GetToolVersionRequest) |
| 423 |
if err := dec(in); err != nil { |
| 424 |
return nil, err |
| 425 |
} |
| 426 |
if interceptor == nil { |
| 427 |
return srv.(ToolsServer).GetToolVersion(ctx, in) |
| 428 |
} |
| 429 |
info := &grpc.UnaryServerInfo{ |
| 430 |
Server: srv, |
| 431 |
FullMethod: Tools_GetToolVersion_FullMethodName, |
| 432 |
} |
| 433 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 434 |
return srv.(ToolsServer).GetToolVersion(ctx, req.(*GetToolVersionRequest)) |
| 435 |
} |
| 436 |
return interceptor(ctx, in, info, handler) |
| 437 |
} |
| 438 |
|
| 439 |
func _Tools_DeleteToolVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 440 |
in := new(DeleteToolVersionRequest) |
| 441 |
if err := dec(in); err != nil { |
| 442 |
return nil, err |
| 443 |
} |
| 444 |
if interceptor == nil { |
| 445 |
return srv.(ToolsServer).DeleteToolVersion(ctx, in) |
| 446 |
} |
| 447 |
info := &grpc.UnaryServerInfo{ |
| 448 |
Server: srv, |
| 449 |
FullMethod: Tools_DeleteToolVersion_FullMethodName, |
| 450 |
} |
| 451 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 452 |
return srv.(ToolsServer).DeleteToolVersion(ctx, req.(*DeleteToolVersionRequest)) |
| 453 |
} |
| 454 |
return interceptor(ctx, in, info, handler) |
| 455 |
} |
| 456 |
|
| 457 |
func _Tools_RestoreToolVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 458 |
in := new(RestoreToolVersionRequest) |
| 459 |
if err := dec(in); err != nil { |
| 460 |
return nil, err |
| 461 |
} |
| 462 |
if interceptor == nil { |
| 463 |
return srv.(ToolsServer).RestoreToolVersion(ctx, in) |
| 464 |
} |
| 465 |
info := &grpc.UnaryServerInfo{ |
| 466 |
Server: srv, |
| 467 |
FullMethod: Tools_RestoreToolVersion_FullMethodName, |
| 468 |
} |
| 469 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 470 |
return srv.(ToolsServer).RestoreToolVersion(ctx, req.(*RestoreToolVersionRequest)) |
| 471 |
} |
| 472 |
return interceptor(ctx, in, info, handler) |
| 473 |
} |
| 474 |
|
| 475 |
// Tools_ServiceDesc is the grpc.ServiceDesc for Tools service. |
| 476 |
// It's only intended for direct use with grpc.RegisterService, |
| 477 |
// and not to be introspected or modified (even as a copy) |
| 478 |
var Tools_ServiceDesc = grpc.ServiceDesc{ |
| 479 |
ServiceName: "google.cloud.dialogflow.cx.v3beta1.Tools", |
| 480 |
HandlerType: (*ToolsServer)(nil), |
| 481 |
Methods: []grpc.MethodDesc{ |
| 482 |
{ |
| 483 |
MethodName: "CreateTool", |
| 484 |
Handler: _Tools_CreateTool_Handler, |
| 485 |
}, |
| 486 |
{ |
| 487 |
MethodName: "ListTools", |
| 488 |
Handler: _Tools_ListTools_Handler, |
| 489 |
}, |
| 490 |
{ |
| 491 |
MethodName: "ExportTools", |
| 492 |
Handler: _Tools_ExportTools_Handler, |
| 493 |
}, |
| 494 |
{ |
| 495 |
MethodName: "GetTool", |
| 496 |
Handler: _Tools_GetTool_Handler, |
| 497 |
}, |
| 498 |
{ |
| 499 |
MethodName: "UpdateTool", |
| 500 |
Handler: _Tools_UpdateTool_Handler, |
| 501 |
}, |
| 502 |
{ |
| 503 |
MethodName: "DeleteTool", |
| 504 |
Handler: _Tools_DeleteTool_Handler, |
| 505 |
}, |
| 506 |
{ |
| 507 |
MethodName: "ListToolVersions", |
| 508 |
Handler: _Tools_ListToolVersions_Handler, |
| 509 |
}, |
| 510 |
{ |
| 511 |
MethodName: "CreateToolVersion", |
| 512 |
Handler: _Tools_CreateToolVersion_Handler, |
| 513 |
}, |
| 514 |
{ |
| 515 |
MethodName: "GetToolVersion", |
| 516 |
Handler: _Tools_GetToolVersion_Handler, |
| 517 |
}, |
| 518 |
{ |
| 519 |
MethodName: "DeleteToolVersion", |
| 520 |
Handler: _Tools_DeleteToolVersion_Handler, |
| 521 |
}, |
| 522 |
{ |
| 523 |
MethodName: "RestoreToolVersion", |
| 524 |
Handler: _Tools_RestoreToolVersion_Handler, |
| 525 |
}, |
| 526 |
}, |
| 527 |
Streams: []grpc.StreamDesc{}, |
| 528 |
Metadata: "google/cloud/dialogflow/cx/v3beta1/tool.proto", |
| 529 |
} |