| 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/flow.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 |
Flows_CreateFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/CreateFlow" |
| 39 |
Flows_DeleteFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/DeleteFlow" |
| 40 |
Flows_ListFlows_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/ListFlows" |
| 41 |
Flows_GetFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlow" |
| 42 |
Flows_UpdateFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/UpdateFlow" |
| 43 |
Flows_TrainFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/TrainFlow" |
| 44 |
Flows_ValidateFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/ValidateFlow" |
| 45 |
Flows_GetFlowValidationResult_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlowValidationResult" |
| 46 |
Flows_ImportFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/ImportFlow" |
| 47 |
Flows_ExportFlow_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Flows/ExportFlow" |
| 48 |
) |
| 49 |
|
| 50 |
// FlowsClient is the client API for Flows service. |
| 51 |
// |
| 52 |
// 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. |
| 53 |
type FlowsClient interface { |
| 54 |
// Creates a flow in the specified agent. |
| 55 |
// |
| 56 |
// Note: You should always train a flow prior to sending it queries. See the |
| 57 |
// [training |
| 58 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 59 |
CreateFlow(ctx context.Context, in *CreateFlowRequest, opts ...grpc.CallOption) (*Flow, error) |
| 60 |
// Deletes a specified flow. |
| 61 |
DeleteFlow(ctx context.Context, in *DeleteFlowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 62 |
// Returns the list of all flows in the specified agent. |
| 63 |
ListFlows(ctx context.Context, in *ListFlowsRequest, opts ...grpc.CallOption) (*ListFlowsResponse, error) |
| 64 |
// Retrieves the specified flow. |
| 65 |
GetFlow(ctx context.Context, in *GetFlowRequest, opts ...grpc.CallOption) (*Flow, error) |
| 66 |
// Updates the specified flow. |
| 67 |
// |
| 68 |
// Note: You should always train a flow prior to sending it queries. See the |
| 69 |
// [training |
| 70 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 71 |
UpdateFlow(ctx context.Context, in *UpdateFlowRequest, opts ...grpc.CallOption) (*Flow, error) |
| 72 |
// Trains the specified flow. Note that only the flow in 'draft' environment |
| 73 |
// is trained. |
| 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`: An empty [Struct |
| 80 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 81 |
// - `response`: An [Empty |
| 82 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) |
| 83 |
// |
| 84 |
// Note: You should always train a flow prior to sending it queries. See the |
| 85 |
// [training |
| 86 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 87 |
TrainFlow(ctx context.Context, in *TrainFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 88 |
// Validates the specified flow and creates or updates validation results. |
| 89 |
// Please call this API after the training is completed to get the complete |
| 90 |
// validation results. |
| 91 |
ValidateFlow(ctx context.Context, in *ValidateFlowRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) |
| 92 |
// Gets the latest flow validation result. Flow validation is performed |
| 93 |
// when ValidateFlow is called. |
| 94 |
GetFlowValidationResult(ctx context.Context, in *GetFlowValidationResultRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) |
| 95 |
// Imports the specified flow to the specified agent from a binary file. |
| 96 |
// |
| 97 |
// This method is a [long-running |
| 98 |
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). |
| 99 |
// The returned `Operation` type has the following method-specific fields: |
| 100 |
// |
| 101 |
// - `metadata`: An empty [Struct |
| 102 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 103 |
// - `response`: |
| 104 |
// |
| 105 |
// [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] |
| 106 |
// |
| 107 |
// Note: You should always train a flow prior to sending it queries. See the |
| 108 |
// [training |
| 109 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 110 |
ImportFlow(ctx context.Context, in *ImportFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 111 |
// Exports the specified flow to a binary file. |
| 112 |
// |
| 113 |
// This method is a [long-running |
| 114 |
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). |
| 115 |
// The returned `Operation` type has the following method-specific fields: |
| 116 |
// |
| 117 |
// - `metadata`: An empty [Struct |
| 118 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 119 |
// - `response`: |
| 120 |
// |
| 121 |
// [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] |
| 122 |
// |
| 123 |
// Note that resources (e.g. intents, entities, webhooks) that the flow |
| 124 |
// references will also be exported. |
| 125 |
ExportFlow(ctx context.Context, in *ExportFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 126 |
} |
| 127 |
|
| 128 |
type flowsClient struct { |
| 129 |
cc grpc.ClientConnInterface |
| 130 |
} |
| 131 |
|
| 132 |
func NewFlowsClient(cc grpc.ClientConnInterface) FlowsClient { |
| 133 |
return &flowsClient{cc} |
| 134 |
} |
| 135 |
|
| 136 |
func (c *flowsClient) CreateFlow(ctx context.Context, in *CreateFlowRequest, opts ...grpc.CallOption) (*Flow, error) { |
| 137 |
out := new(Flow) |
| 138 |
err := c.cc.Invoke(ctx, Flows_CreateFlow_FullMethodName, in, out, opts...) |
| 139 |
if err != nil { |
| 140 |
return nil, err |
| 141 |
} |
| 142 |
return out, nil |
| 143 |
} |
| 144 |
|
| 145 |
func (c *flowsClient) DeleteFlow(ctx context.Context, in *DeleteFlowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 146 |
out := new(emptypb.Empty) |
| 147 |
err := c.cc.Invoke(ctx, Flows_DeleteFlow_FullMethodName, in, out, opts...) |
| 148 |
if err != nil { |
| 149 |
return nil, err |
| 150 |
} |
| 151 |
return out, nil |
| 152 |
} |
| 153 |
|
| 154 |
func (c *flowsClient) ListFlows(ctx context.Context, in *ListFlowsRequest, opts ...grpc.CallOption) (*ListFlowsResponse, error) { |
| 155 |
out := new(ListFlowsResponse) |
| 156 |
err := c.cc.Invoke(ctx, Flows_ListFlows_FullMethodName, in, out, opts...) |
| 157 |
if err != nil { |
| 158 |
return nil, err |
| 159 |
} |
| 160 |
return out, nil |
| 161 |
} |
| 162 |
|
| 163 |
func (c *flowsClient) GetFlow(ctx context.Context, in *GetFlowRequest, opts ...grpc.CallOption) (*Flow, error) { |
| 164 |
out := new(Flow) |
| 165 |
err := c.cc.Invoke(ctx, Flows_GetFlow_FullMethodName, in, out, opts...) |
| 166 |
if err != nil { |
| 167 |
return nil, err |
| 168 |
} |
| 169 |
return out, nil |
| 170 |
} |
| 171 |
|
| 172 |
func (c *flowsClient) UpdateFlow(ctx context.Context, in *UpdateFlowRequest, opts ...grpc.CallOption) (*Flow, error) { |
| 173 |
out := new(Flow) |
| 174 |
err := c.cc.Invoke(ctx, Flows_UpdateFlow_FullMethodName, in, out, opts...) |
| 175 |
if err != nil { |
| 176 |
return nil, err |
| 177 |
} |
| 178 |
return out, nil |
| 179 |
} |
| 180 |
|
| 181 |
func (c *flowsClient) TrainFlow(ctx context.Context, in *TrainFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 182 |
out := new(longrunningpb.Operation) |
| 183 |
err := c.cc.Invoke(ctx, Flows_TrainFlow_FullMethodName, in, out, opts...) |
| 184 |
if err != nil { |
| 185 |
return nil, err |
| 186 |
} |
| 187 |
return out, nil |
| 188 |
} |
| 189 |
|
| 190 |
func (c *flowsClient) ValidateFlow(ctx context.Context, in *ValidateFlowRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) { |
| 191 |
out := new(FlowValidationResult) |
| 192 |
err := c.cc.Invoke(ctx, Flows_ValidateFlow_FullMethodName, in, out, opts...) |
| 193 |
if err != nil { |
| 194 |
return nil, err |
| 195 |
} |
| 196 |
return out, nil |
| 197 |
} |
| 198 |
|
| 199 |
func (c *flowsClient) GetFlowValidationResult(ctx context.Context, in *GetFlowValidationResultRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) { |
| 200 |
out := new(FlowValidationResult) |
| 201 |
err := c.cc.Invoke(ctx, Flows_GetFlowValidationResult_FullMethodName, in, out, opts...) |
| 202 |
if err != nil { |
| 203 |
return nil, err |
| 204 |
} |
| 205 |
return out, nil |
| 206 |
} |
| 207 |
|
| 208 |
func (c *flowsClient) ImportFlow(ctx context.Context, in *ImportFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 209 |
out := new(longrunningpb.Operation) |
| 210 |
err := c.cc.Invoke(ctx, Flows_ImportFlow_FullMethodName, in, out, opts...) |
| 211 |
if err != nil { |
| 212 |
return nil, err |
| 213 |
} |
| 214 |
return out, nil |
| 215 |
} |
| 216 |
|
| 217 |
func (c *flowsClient) ExportFlow(ctx context.Context, in *ExportFlowRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 218 |
out := new(longrunningpb.Operation) |
| 219 |
err := c.cc.Invoke(ctx, Flows_ExportFlow_FullMethodName, in, out, opts...) |
| 220 |
if err != nil { |
| 221 |
return nil, err |
| 222 |
} |
| 223 |
return out, nil |
| 224 |
} |
| 225 |
|
| 226 |
// FlowsServer is the server API for Flows service. |
| 227 |
// All implementations should embed UnimplementedFlowsServer |
| 228 |
// for forward compatibility |
| 229 |
type FlowsServer interface { |
| 230 |
// Creates a flow in the specified agent. |
| 231 |
// |
| 232 |
// Note: You should always train a flow prior to sending it queries. See the |
| 233 |
// [training |
| 234 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 235 |
CreateFlow(context.Context, *CreateFlowRequest) (*Flow, error) |
| 236 |
// Deletes a specified flow. |
| 237 |
DeleteFlow(context.Context, *DeleteFlowRequest) (*emptypb.Empty, error) |
| 238 |
// Returns the list of all flows in the specified agent. |
| 239 |
ListFlows(context.Context, *ListFlowsRequest) (*ListFlowsResponse, error) |
| 240 |
// Retrieves the specified flow. |
| 241 |
GetFlow(context.Context, *GetFlowRequest) (*Flow, error) |
| 242 |
// Updates the specified flow. |
| 243 |
// |
| 244 |
// Note: You should always train a flow prior to sending it queries. See the |
| 245 |
// [training |
| 246 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 247 |
UpdateFlow(context.Context, *UpdateFlowRequest) (*Flow, error) |
| 248 |
// Trains the specified flow. Note that only the flow in 'draft' environment |
| 249 |
// is trained. |
| 250 |
// |
| 251 |
// This method is a [long-running |
| 252 |
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). |
| 253 |
// The returned `Operation` type has the following method-specific fields: |
| 254 |
// |
| 255 |
// - `metadata`: An empty [Struct |
| 256 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 257 |
// - `response`: An [Empty |
| 258 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) |
| 259 |
// |
| 260 |
// Note: You should always train a flow prior to sending it queries. See the |
| 261 |
// [training |
| 262 |
// documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). |
| 263 |
TrainFlow(context.Context, *TrainFlowRequest) (*longrunningpb.Operation, error) |
| 264 |
// Validates the specified flow and creates or updates validation results. |
| 265 |
// Please call this API after the training is completed to get the complete |
| 266 |
// validation results. |
| 267 |
ValidateFlow(context.Context, *ValidateFlowRequest) (*FlowValidationResult, error) |
| 268 |
// Gets the latest flow validation result. Flow validation is performed |
| 269 |
// when ValidateFlow is called. |
| 270 |
GetFlowValidationResult(context.Context, *GetFlowValidationResultRequest) (*FlowValidationResult, error) |
| 271 |
// Imports the specified flow to the specified agent from a binary file. |
| 272 |
// |
| 273 |
// This method is a [long-running |
| 274 |
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). |
| 275 |
// The returned `Operation` type has the following method-specific fields: |
| 276 |
// |
| 277 |
// - `metadata`: An empty [Struct |
| 278 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 279 |
// - `response`: |
| 280 |
// |
| 281 |
// [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] |
| 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 |
ImportFlow(context.Context, *ImportFlowRequest) (*longrunningpb.Operation, error) |
| 287 |
// Exports the specified flow to a binary file. |
| 288 |
// |
| 289 |
// This method is a [long-running |
| 290 |
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). |
| 291 |
// The returned `Operation` type has the following method-specific fields: |
| 292 |
// |
| 293 |
// - `metadata`: An empty [Struct |
| 294 |
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) |
| 295 |
// - `response`: |
| 296 |
// |
| 297 |
// [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] |
| 298 |
// |
| 299 |
// Note that resources (e.g. intents, entities, webhooks) that the flow |
| 300 |
// references will also be exported. |
| 301 |
ExportFlow(context.Context, *ExportFlowRequest) (*longrunningpb.Operation, error) |
| 302 |
} |
| 303 |
|
| 304 |
// UnimplementedFlowsServer should be embedded to have forward compatible implementations. |
| 305 |
type UnimplementedFlowsServer struct { |
| 306 |
} |
| 307 |
|
| 308 |
func (UnimplementedFlowsServer) CreateFlow(context.Context, *CreateFlowRequest) (*Flow, error) { |
| 309 |
return nil, status.Errorf(codes.Unimplemented, "method CreateFlow not implemented") |
| 310 |
} |
| 311 |
func (UnimplementedFlowsServer) DeleteFlow(context.Context, *DeleteFlowRequest) (*emptypb.Empty, error) { |
| 312 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteFlow not implemented") |
| 313 |
} |
| 314 |
func (UnimplementedFlowsServer) ListFlows(context.Context, *ListFlowsRequest) (*ListFlowsResponse, error) { |
| 315 |
return nil, status.Errorf(codes.Unimplemented, "method ListFlows not implemented") |
| 316 |
} |
| 317 |
func (UnimplementedFlowsServer) GetFlow(context.Context, *GetFlowRequest) (*Flow, error) { |
| 318 |
return nil, status.Errorf(codes.Unimplemented, "method GetFlow not implemented") |
| 319 |
} |
| 320 |
func (UnimplementedFlowsServer) UpdateFlow(context.Context, *UpdateFlowRequest) (*Flow, error) { |
| 321 |
return nil, status.Errorf(codes.Unimplemented, "method UpdateFlow not implemented") |
| 322 |
} |
| 323 |
func (UnimplementedFlowsServer) TrainFlow(context.Context, *TrainFlowRequest) (*longrunningpb.Operation, error) { |
| 324 |
return nil, status.Errorf(codes.Unimplemented, "method TrainFlow not implemented") |
| 325 |
} |
| 326 |
func (UnimplementedFlowsServer) ValidateFlow(context.Context, *ValidateFlowRequest) (*FlowValidationResult, error) { |
| 327 |
return nil, status.Errorf(codes.Unimplemented, "method ValidateFlow not implemented") |
| 328 |
} |
| 329 |
func (UnimplementedFlowsServer) GetFlowValidationResult(context.Context, *GetFlowValidationResultRequest) (*FlowValidationResult, error) { |
| 330 |
return nil, status.Errorf(codes.Unimplemented, "method GetFlowValidationResult not implemented") |
| 331 |
} |
| 332 |
func (UnimplementedFlowsServer) ImportFlow(context.Context, *ImportFlowRequest) (*longrunningpb.Operation, error) { |
| 333 |
return nil, status.Errorf(codes.Unimplemented, "method ImportFlow not implemented") |
| 334 |
} |
| 335 |
func (UnimplementedFlowsServer) ExportFlow(context.Context, *ExportFlowRequest) (*longrunningpb.Operation, error) { |
| 336 |
return nil, status.Errorf(codes.Unimplemented, "method ExportFlow not implemented") |
| 337 |
} |
| 338 |
|
| 339 |
// UnsafeFlowsServer may be embedded to opt out of forward compatibility for this service. |
| 340 |
// Use of this interface is not recommended, as added methods to FlowsServer will |
| 341 |
// result in compilation errors. |
| 342 |
type UnsafeFlowsServer interface { |
| 343 |
mustEmbedUnimplementedFlowsServer() |
| 344 |
} |
| 345 |
|
| 346 |
func RegisterFlowsServer(s grpc.ServiceRegistrar, srv FlowsServer) { |
| 347 |
s.RegisterService(&Flows_ServiceDesc, srv) |
| 348 |
} |
| 349 |
|
| 350 |
func _Flows_CreateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 351 |
in := new(CreateFlowRequest) |
| 352 |
if err := dec(in); err != nil { |
| 353 |
return nil, err |
| 354 |
} |
| 355 |
if interceptor == nil { |
| 356 |
return srv.(FlowsServer).CreateFlow(ctx, in) |
| 357 |
} |
| 358 |
info := &grpc.UnaryServerInfo{ |
| 359 |
Server: srv, |
| 360 |
FullMethod: Flows_CreateFlow_FullMethodName, |
| 361 |
} |
| 362 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 363 |
return srv.(FlowsServer).CreateFlow(ctx, req.(*CreateFlowRequest)) |
| 364 |
} |
| 365 |
return interceptor(ctx, in, info, handler) |
| 366 |
} |
| 367 |
|
| 368 |
func _Flows_DeleteFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 369 |
in := new(DeleteFlowRequest) |
| 370 |
if err := dec(in); err != nil { |
| 371 |
return nil, err |
| 372 |
} |
| 373 |
if interceptor == nil { |
| 374 |
return srv.(FlowsServer).DeleteFlow(ctx, in) |
| 375 |
} |
| 376 |
info := &grpc.UnaryServerInfo{ |
| 377 |
Server: srv, |
| 378 |
FullMethod: Flows_DeleteFlow_FullMethodName, |
| 379 |
} |
| 380 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 381 |
return srv.(FlowsServer).DeleteFlow(ctx, req.(*DeleteFlowRequest)) |
| 382 |
} |
| 383 |
return interceptor(ctx, in, info, handler) |
| 384 |
} |
| 385 |
|
| 386 |
func _Flows_ListFlows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 387 |
in := new(ListFlowsRequest) |
| 388 |
if err := dec(in); err != nil { |
| 389 |
return nil, err |
| 390 |
} |
| 391 |
if interceptor == nil { |
| 392 |
return srv.(FlowsServer).ListFlows(ctx, in) |
| 393 |
} |
| 394 |
info := &grpc.UnaryServerInfo{ |
| 395 |
Server: srv, |
| 396 |
FullMethod: Flows_ListFlows_FullMethodName, |
| 397 |
} |
| 398 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 399 |
return srv.(FlowsServer).ListFlows(ctx, req.(*ListFlowsRequest)) |
| 400 |
} |
| 401 |
return interceptor(ctx, in, info, handler) |
| 402 |
} |
| 403 |
|
| 404 |
func _Flows_GetFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 405 |
in := new(GetFlowRequest) |
| 406 |
if err := dec(in); err != nil { |
| 407 |
return nil, err |
| 408 |
} |
| 409 |
if interceptor == nil { |
| 410 |
return srv.(FlowsServer).GetFlow(ctx, in) |
| 411 |
} |
| 412 |
info := &grpc.UnaryServerInfo{ |
| 413 |
Server: srv, |
| 414 |
FullMethod: Flows_GetFlow_FullMethodName, |
| 415 |
} |
| 416 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 417 |
return srv.(FlowsServer).GetFlow(ctx, req.(*GetFlowRequest)) |
| 418 |
} |
| 419 |
return interceptor(ctx, in, info, handler) |
| 420 |
} |
| 421 |
|
| 422 |
func _Flows_UpdateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 423 |
in := new(UpdateFlowRequest) |
| 424 |
if err := dec(in); err != nil { |
| 425 |
return nil, err |
| 426 |
} |
| 427 |
if interceptor == nil { |
| 428 |
return srv.(FlowsServer).UpdateFlow(ctx, in) |
| 429 |
} |
| 430 |
info := &grpc.UnaryServerInfo{ |
| 431 |
Server: srv, |
| 432 |
FullMethod: Flows_UpdateFlow_FullMethodName, |
| 433 |
} |
| 434 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 435 |
return srv.(FlowsServer).UpdateFlow(ctx, req.(*UpdateFlowRequest)) |
| 436 |
} |
| 437 |
return interceptor(ctx, in, info, handler) |
| 438 |
} |
| 439 |
|
| 440 |
func _Flows_TrainFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 441 |
in := new(TrainFlowRequest) |
| 442 |
if err := dec(in); err != nil { |
| 443 |
return nil, err |
| 444 |
} |
| 445 |
if interceptor == nil { |
| 446 |
return srv.(FlowsServer).TrainFlow(ctx, in) |
| 447 |
} |
| 448 |
info := &grpc.UnaryServerInfo{ |
| 449 |
Server: srv, |
| 450 |
FullMethod: Flows_TrainFlow_FullMethodName, |
| 451 |
} |
| 452 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 453 |
return srv.(FlowsServer).TrainFlow(ctx, req.(*TrainFlowRequest)) |
| 454 |
} |
| 455 |
return interceptor(ctx, in, info, handler) |
| 456 |
} |
| 457 |
|
| 458 |
func _Flows_ValidateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 459 |
in := new(ValidateFlowRequest) |
| 460 |
if err := dec(in); err != nil { |
| 461 |
return nil, err |
| 462 |
} |
| 463 |
if interceptor == nil { |
| 464 |
return srv.(FlowsServer).ValidateFlow(ctx, in) |
| 465 |
} |
| 466 |
info := &grpc.UnaryServerInfo{ |
| 467 |
Server: srv, |
| 468 |
FullMethod: Flows_ValidateFlow_FullMethodName, |
| 469 |
} |
| 470 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 471 |
return srv.(FlowsServer).ValidateFlow(ctx, req.(*ValidateFlowRequest)) |
| 472 |
} |
| 473 |
return interceptor(ctx, in, info, handler) |
| 474 |
} |
| 475 |
|
| 476 |
func _Flows_GetFlowValidationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 477 |
in := new(GetFlowValidationResultRequest) |
| 478 |
if err := dec(in); err != nil { |
| 479 |
return nil, err |
| 480 |
} |
| 481 |
if interceptor == nil { |
| 482 |
return srv.(FlowsServer).GetFlowValidationResult(ctx, in) |
| 483 |
} |
| 484 |
info := &grpc.UnaryServerInfo{ |
| 485 |
Server: srv, |
| 486 |
FullMethod: Flows_GetFlowValidationResult_FullMethodName, |
| 487 |
} |
| 488 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 489 |
return srv.(FlowsServer).GetFlowValidationResult(ctx, req.(*GetFlowValidationResultRequest)) |
| 490 |
} |
| 491 |
return interceptor(ctx, in, info, handler) |
| 492 |
} |
| 493 |
|
| 494 |
func _Flows_ImportFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 495 |
in := new(ImportFlowRequest) |
| 496 |
if err := dec(in); err != nil { |
| 497 |
return nil, err |
| 498 |
} |
| 499 |
if interceptor == nil { |
| 500 |
return srv.(FlowsServer).ImportFlow(ctx, in) |
| 501 |
} |
| 502 |
info := &grpc.UnaryServerInfo{ |
| 503 |
Server: srv, |
| 504 |
FullMethod: Flows_ImportFlow_FullMethodName, |
| 505 |
} |
| 506 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 507 |
return srv.(FlowsServer).ImportFlow(ctx, req.(*ImportFlowRequest)) |
| 508 |
} |
| 509 |
return interceptor(ctx, in, info, handler) |
| 510 |
} |
| 511 |
|
| 512 |
func _Flows_ExportFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 513 |
in := new(ExportFlowRequest) |
| 514 |
if err := dec(in); err != nil { |
| 515 |
return nil, err |
| 516 |
} |
| 517 |
if interceptor == nil { |
| 518 |
return srv.(FlowsServer).ExportFlow(ctx, in) |
| 519 |
} |
| 520 |
info := &grpc.UnaryServerInfo{ |
| 521 |
Server: srv, |
| 522 |
FullMethod: Flows_ExportFlow_FullMethodName, |
| 523 |
} |
| 524 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 525 |
return srv.(FlowsServer).ExportFlow(ctx, req.(*ExportFlowRequest)) |
| 526 |
} |
| 527 |
return interceptor(ctx, in, info, handler) |
| 528 |
} |
| 529 |
|
| 530 |
// Flows_ServiceDesc is the grpc.ServiceDesc for Flows service. |
| 531 |
// It's only intended for direct use with grpc.RegisterService, |
| 532 |
// and not to be introspected or modified (even as a copy) |
| 533 |
var Flows_ServiceDesc = grpc.ServiceDesc{ |
| 534 |
ServiceName: "google.cloud.dialogflow.cx.v3beta1.Flows", |
| 535 |
HandlerType: (*FlowsServer)(nil), |
| 536 |
Methods: []grpc.MethodDesc{ |
| 537 |
{ |
| 538 |
MethodName: "CreateFlow", |
| 539 |
Handler: _Flows_CreateFlow_Handler, |
| 540 |
}, |
| 541 |
{ |
| 542 |
MethodName: "DeleteFlow", |
| 543 |
Handler: _Flows_DeleteFlow_Handler, |
| 544 |
}, |
| 545 |
{ |
| 546 |
MethodName: "ListFlows", |
| 547 |
Handler: _Flows_ListFlows_Handler, |
| 548 |
}, |
| 549 |
{ |
| 550 |
MethodName: "GetFlow", |
| 551 |
Handler: _Flows_GetFlow_Handler, |
| 552 |
}, |
| 553 |
{ |
| 554 |
MethodName: "UpdateFlow", |
| 555 |
Handler: _Flows_UpdateFlow_Handler, |
| 556 |
}, |
| 557 |
{ |
| 558 |
MethodName: "TrainFlow", |
| 559 |
Handler: _Flows_TrainFlow_Handler, |
| 560 |
}, |
| 561 |
{ |
| 562 |
MethodName: "ValidateFlow", |
| 563 |
Handler: _Flows_ValidateFlow_Handler, |
| 564 |
}, |
| 565 |
{ |
| 566 |
MethodName: "GetFlowValidationResult", |
| 567 |
Handler: _Flows_GetFlowValidationResult_Handler, |
| 568 |
}, |
| 569 |
{ |
| 570 |
MethodName: "ImportFlow", |
| 571 |
Handler: _Flows_ImportFlow_Handler, |
| 572 |
}, |
| 573 |
{ |
| 574 |
MethodName: "ExportFlow", |
| 575 |
Handler: _Flows_ExportFlow_Handler, |
| 576 |
}, |
| 577 |
}, |
| 578 |
Streams: []grpc.StreamDesc{}, |
| 579 |
Metadata: "google/cloud/dialogflow/cx/v3beta1/flow.proto", |
| 580 |
} |