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