/
target_group_service_grpc.pb.go
383 lines (354 loc) · 16 KB
/
target_group_service_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.17.3
// source: yandex/cloud/loadbalancer/v1/target_group_service.proto
package loadbalancer
import (
context "context"
operation "github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
TargetGroupService_Get_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/Get"
TargetGroupService_List_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/List"
TargetGroupService_Create_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/Create"
TargetGroupService_Update_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/Update"
TargetGroupService_Delete_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/Delete"
TargetGroupService_AddTargets_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/AddTargets"
TargetGroupService_RemoveTargets_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/RemoveTargets"
TargetGroupService_ListOperations_FullMethodName = "/yandex.cloud.loadbalancer.v1.TargetGroupService/ListOperations"
)
// TargetGroupServiceClient is the client API for TargetGroupService service.
//
// 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.
type TargetGroupServiceClient interface {
// Returns the specified TargetGroup resource.
Get(ctx context.Context, in *GetTargetGroupRequest, opts ...grpc.CallOption) (*TargetGroup, error)
// Retrieves the list of TargetGroup resources in the specified folder.
List(ctx context.Context, in *ListTargetGroupsRequest, opts ...grpc.CallOption) (*ListTargetGroupsResponse, error)
// Creates a target group in the specified folder and adds the specified targets to it.
Create(ctx context.Context, in *CreateTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
// Updates the specified target group.
Update(ctx context.Context, in *UpdateTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
// Deletes the specified target group.
Delete(ctx context.Context, in *DeleteTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error)
// Adds targets to the target group.
AddTargets(ctx context.Context, in *AddTargetsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
// Removes targets from the target group.
RemoveTargets(ctx context.Context, in *RemoveTargetsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
// Lists operations for the specified target group.
ListOperations(ctx context.Context, in *ListTargetGroupOperationsRequest, opts ...grpc.CallOption) (*ListTargetGroupOperationsResponse, error)
}
type targetGroupServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTargetGroupServiceClient(cc grpc.ClientConnInterface) TargetGroupServiceClient {
return &targetGroupServiceClient{cc}
}
func (c *targetGroupServiceClient) Get(ctx context.Context, in *GetTargetGroupRequest, opts ...grpc.CallOption) (*TargetGroup, error) {
out := new(TargetGroup)
err := c.cc.Invoke(ctx, TargetGroupService_Get_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) List(ctx context.Context, in *ListTargetGroupsRequest, opts ...grpc.CallOption) (*ListTargetGroupsResponse, error) {
out := new(ListTargetGroupsResponse)
err := c.cc.Invoke(ctx, TargetGroupService_List_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) Create(ctx context.Context, in *CreateTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
out := new(operation.Operation)
err := c.cc.Invoke(ctx, TargetGroupService_Create_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) Update(ctx context.Context, in *UpdateTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
out := new(operation.Operation)
err := c.cc.Invoke(ctx, TargetGroupService_Update_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) Delete(ctx context.Context, in *DeleteTargetGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
out := new(operation.Operation)
err := c.cc.Invoke(ctx, TargetGroupService_Delete_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) AddTargets(ctx context.Context, in *AddTargetsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
out := new(operation.Operation)
err := c.cc.Invoke(ctx, TargetGroupService_AddTargets_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) RemoveTargets(ctx context.Context, in *RemoveTargetsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
out := new(operation.Operation)
err := c.cc.Invoke(ctx, TargetGroupService_RemoveTargets_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *targetGroupServiceClient) ListOperations(ctx context.Context, in *ListTargetGroupOperationsRequest, opts ...grpc.CallOption) (*ListTargetGroupOperationsResponse, error) {
out := new(ListTargetGroupOperationsResponse)
err := c.cc.Invoke(ctx, TargetGroupService_ListOperations_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TargetGroupServiceServer is the server API for TargetGroupService service.
// All implementations should embed UnimplementedTargetGroupServiceServer
// for forward compatibility
type TargetGroupServiceServer interface {
// Returns the specified TargetGroup resource.
Get(context.Context, *GetTargetGroupRequest) (*TargetGroup, error)
// Retrieves the list of TargetGroup resources in the specified folder.
List(context.Context, *ListTargetGroupsRequest) (*ListTargetGroupsResponse, error)
// Creates a target group in the specified folder and adds the specified targets to it.
Create(context.Context, *CreateTargetGroupRequest) (*operation.Operation, error)
// Updates the specified target group.
Update(context.Context, *UpdateTargetGroupRequest) (*operation.Operation, error)
// Deletes the specified target group.
Delete(context.Context, *DeleteTargetGroupRequest) (*operation.Operation, error)
// Adds targets to the target group.
AddTargets(context.Context, *AddTargetsRequest) (*operation.Operation, error)
// Removes targets from the target group.
RemoveTargets(context.Context, *RemoveTargetsRequest) (*operation.Operation, error)
// Lists operations for the specified target group.
ListOperations(context.Context, *ListTargetGroupOperationsRequest) (*ListTargetGroupOperationsResponse, error)
}
// UnimplementedTargetGroupServiceServer should be embedded to have forward compatible implementations.
type UnimplementedTargetGroupServiceServer struct {
}
func (UnimplementedTargetGroupServiceServer) Get(context.Context, *GetTargetGroupRequest) (*TargetGroup, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedTargetGroupServiceServer) List(context.Context, *ListTargetGroupsRequest) (*ListTargetGroupsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedTargetGroupServiceServer) Create(context.Context, *CreateTargetGroupRequest) (*operation.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedTargetGroupServiceServer) Update(context.Context, *UpdateTargetGroupRequest) (*operation.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedTargetGroupServiceServer) Delete(context.Context, *DeleteTargetGroupRequest) (*operation.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedTargetGroupServiceServer) AddTargets(context.Context, *AddTargetsRequest) (*operation.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddTargets not implemented")
}
func (UnimplementedTargetGroupServiceServer) RemoveTargets(context.Context, *RemoveTargetsRequest) (*operation.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveTargets not implemented")
}
func (UnimplementedTargetGroupServiceServer) ListOperations(context.Context, *ListTargetGroupOperationsRequest) (*ListTargetGroupOperationsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
// UnsafeTargetGroupServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TargetGroupServiceServer will
// result in compilation errors.
type UnsafeTargetGroupServiceServer interface {
mustEmbedUnimplementedTargetGroupServiceServer()
}
func RegisterTargetGroupServiceServer(s grpc.ServiceRegistrar, srv TargetGroupServiceServer) {
s.RegisterService(&TargetGroupService_ServiceDesc, srv)
}
func _TargetGroupService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTargetGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).Get(ctx, req.(*GetTargetGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListTargetGroupsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_List_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).List(ctx, req.(*ListTargetGroupsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTargetGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_Create_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).Create(ctx, req.(*CreateTargetGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateTargetGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).Update(ctx, req.(*UpdateTargetGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTargetGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).Delete(ctx, req.(*DeleteTargetGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_AddTargets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddTargetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).AddTargets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_AddTargets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).AddTargets(ctx, req.(*AddTargetsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_RemoveTargets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveTargetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).RemoveTargets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_RemoveTargets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).RemoveTargets(ctx, req.(*RemoveTargetsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TargetGroupService_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListTargetGroupOperationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TargetGroupServiceServer).ListOperations(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: TargetGroupService_ListOperations_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TargetGroupServiceServer).ListOperations(ctx, req.(*ListTargetGroupOperationsRequest))
}
return interceptor(ctx, in, info, handler)
}
// TargetGroupService_ServiceDesc is the grpc.ServiceDesc for TargetGroupService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TargetGroupService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "yandex.cloud.loadbalancer.v1.TargetGroupService",
HandlerType: (*TargetGroupServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _TargetGroupService_Get_Handler,
},
{
MethodName: "List",
Handler: _TargetGroupService_List_Handler,
},
{
MethodName: "Create",
Handler: _TargetGroupService_Create_Handler,
},
{
MethodName: "Update",
Handler: _TargetGroupService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _TargetGroupService_Delete_Handler,
},
{
MethodName: "AddTargets",
Handler: _TargetGroupService_AddTargets_Handler,
},
{
MethodName: "RemoveTargets",
Handler: _TargetGroupService_RemoveTargets_Handler,
},
{
MethodName: "ListOperations",
Handler: _TargetGroupService_ListOperations_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "yandex/cloud/loadbalancer/v1/target_group_service.proto",
}