1// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
3package testdata
4
5import (
6	context "context"
7	grpc "google.golang.org/grpc"
8	codes "google.golang.org/grpc/codes"
9	status "google.golang.org/grpc/status"
10)
11
12// This is a compile-time assertion to ensure that this generated file
13// is compatible with the grpc package it is being compiled against.
14// Requires gRPC-Go v1.32.0 or later.
15const _ = grpc.SupportPackageIsVersion7
16
17// InterceptedServiceClient is the client API for InterceptedService service.
18//
19// 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.
20type InterceptedServiceClient interface {
21	TestMethod(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error)
22}
23
24type interceptedServiceClient struct {
25	cc grpc.ClientConnInterface
26}
27
28func NewInterceptedServiceClient(cc grpc.ClientConnInterface) InterceptedServiceClient {
29	return &interceptedServiceClient{cc}
30}
31
32func (c *interceptedServiceClient) TestMethod(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
33	out := new(ValidResponse)
34	err := c.cc.Invoke(ctx, "/test.InterceptedService/TestMethod", in, out, opts...)
35	if err != nil {
36		return nil, err
37	}
38	return out, nil
39}
40
41// InterceptedServiceServer is the server API for InterceptedService service.
42// All implementations must embed UnimplementedInterceptedServiceServer
43// for forward compatibility
44type InterceptedServiceServer interface {
45	TestMethod(context.Context, *ValidRequest) (*ValidResponse, error)
46	mustEmbedUnimplementedInterceptedServiceServer()
47}
48
49// UnimplementedInterceptedServiceServer must be embedded to have forward compatible implementations.
50type UnimplementedInterceptedServiceServer struct {
51}
52
53func (UnimplementedInterceptedServiceServer) TestMethod(context.Context, *ValidRequest) (*ValidResponse, error) {
54	return nil, status.Errorf(codes.Unimplemented, "method TestMethod not implemented")
55}
56func (UnimplementedInterceptedServiceServer) mustEmbedUnimplementedInterceptedServiceServer() {}
57
58// UnsafeInterceptedServiceServer may be embedded to opt out of forward compatibility for this service.
59// Use of this interface is not recommended, as added methods to InterceptedServiceServer will
60// result in compilation errors.
61type UnsafeInterceptedServiceServer interface {
62	mustEmbedUnimplementedInterceptedServiceServer()
63}
64
65func RegisterInterceptedServiceServer(s grpc.ServiceRegistrar, srv InterceptedServiceServer) {
66	s.RegisterService(&InterceptedService_ServiceDesc, srv)
67}
68
69func _InterceptedService_TestMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
70	in := new(ValidRequest)
71	if err := dec(in); err != nil {
72		return nil, err
73	}
74	if interceptor == nil {
75		return srv.(InterceptedServiceServer).TestMethod(ctx, in)
76	}
77	info := &grpc.UnaryServerInfo{
78		Server:     srv,
79		FullMethod: "/test.InterceptedService/TestMethod",
80	}
81	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
82		return srv.(InterceptedServiceServer).TestMethod(ctx, req.(*ValidRequest))
83	}
84	return interceptor(ctx, in, info, handler)
85}
86
87// InterceptedService_ServiceDesc is the grpc.ServiceDesc for InterceptedService service.
88// It's only intended for direct use with grpc.RegisterService,
89// and not to be introspected or modified (even as a copy)
90var InterceptedService_ServiceDesc = grpc.ServiceDesc{
91	ServiceName: "test.InterceptedService",
92	HandlerType: (*InterceptedServiceServer)(nil),
93	Methods: []grpc.MethodDesc{
94		{
95			MethodName: "TestMethod",
96			Handler:    _InterceptedService_TestMethod_Handler,
97		},
98	},
99	Streams:  []grpc.StreamDesc{},
100	Metadata: "go/internal/linter/testdata/valid.proto",
101}
102
103// ValidServiceClient is the client API for ValidService service.
104//
105// 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.
106type ValidServiceClient interface {
107	TestMethod(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error)
108	TestMethod2(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error)
109	TestMethod3(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error)
110	TestMethod5(ctx context.Context, in *ValidNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error)
111	TestMethod6(ctx context.Context, in *ValidNestedSharedRequest, opts ...grpc.CallOption) (*ValidResponse, error)
112	TestMethod7(ctx context.Context, in *ValidInnerNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error)
113	TestMethod8(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error)
114	TestMethod9(ctx context.Context, in *ValidStorageNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error)
115	// Intercepted methods do not need operation type annotations.
116	TestMethod10(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error)
117}
118
119type validServiceClient struct {
120	cc grpc.ClientConnInterface
121}
122
123func NewValidServiceClient(cc grpc.ClientConnInterface) ValidServiceClient {
124	return &validServiceClient{cc}
125}
126
127func (c *validServiceClient) TestMethod(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
128	out := new(ValidResponse)
129	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod", in, out, opts...)
130	if err != nil {
131		return nil, err
132	}
133	return out, nil
134}
135
136func (c *validServiceClient) TestMethod2(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
137	out := new(ValidResponse)
138	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod2", in, out, opts...)
139	if err != nil {
140		return nil, err
141	}
142	return out, nil
143}
144
145func (c *validServiceClient) TestMethod3(ctx context.Context, in *ValidRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
146	out := new(ValidResponse)
147	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod3", in, out, opts...)
148	if err != nil {
149		return nil, err
150	}
151	return out, nil
152}
153
154func (c *validServiceClient) TestMethod5(ctx context.Context, in *ValidNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
155	out := new(ValidResponse)
156	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod5", in, out, opts...)
157	if err != nil {
158		return nil, err
159	}
160	return out, nil
161}
162
163func (c *validServiceClient) TestMethod6(ctx context.Context, in *ValidNestedSharedRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
164	out := new(ValidResponse)
165	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod6", in, out, opts...)
166	if err != nil {
167		return nil, err
168	}
169	return out, nil
170}
171
172func (c *validServiceClient) TestMethod7(ctx context.Context, in *ValidInnerNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
173	out := new(ValidResponse)
174	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod7", in, out, opts...)
175	if err != nil {
176		return nil, err
177	}
178	return out, nil
179}
180
181func (c *validServiceClient) TestMethod8(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
182	out := new(ValidResponse)
183	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod8", in, out, opts...)
184	if err != nil {
185		return nil, err
186	}
187	return out, nil
188}
189
190func (c *validServiceClient) TestMethod9(ctx context.Context, in *ValidStorageNestedRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
191	out := new(ValidResponse)
192	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod9", in, out, opts...)
193	if err != nil {
194		return nil, err
195	}
196	return out, nil
197}
198
199func (c *validServiceClient) TestMethod10(ctx context.Context, in *ValidStorageRequest, opts ...grpc.CallOption) (*ValidResponse, error) {
200	out := new(ValidResponse)
201	err := c.cc.Invoke(ctx, "/test.ValidService/TestMethod10", in, out, opts...)
202	if err != nil {
203		return nil, err
204	}
205	return out, nil
206}
207
208// ValidServiceServer is the server API for ValidService service.
209// All implementations must embed UnimplementedValidServiceServer
210// for forward compatibility
211type ValidServiceServer interface {
212	TestMethod(context.Context, *ValidRequest) (*ValidResponse, error)
213	TestMethod2(context.Context, *ValidRequest) (*ValidResponse, error)
214	TestMethod3(context.Context, *ValidRequest) (*ValidResponse, error)
215	TestMethod5(context.Context, *ValidNestedRequest) (*ValidResponse, error)
216	TestMethod6(context.Context, *ValidNestedSharedRequest) (*ValidResponse, error)
217	TestMethod7(context.Context, *ValidInnerNestedRequest) (*ValidResponse, error)
218	TestMethod8(context.Context, *ValidStorageRequest) (*ValidResponse, error)
219	TestMethod9(context.Context, *ValidStorageNestedRequest) (*ValidResponse, error)
220	// Intercepted methods do not need operation type annotations.
221	TestMethod10(context.Context, *ValidStorageRequest) (*ValidResponse, error)
222	mustEmbedUnimplementedValidServiceServer()
223}
224
225// UnimplementedValidServiceServer must be embedded to have forward compatible implementations.
226type UnimplementedValidServiceServer struct {
227}
228
229func (UnimplementedValidServiceServer) TestMethod(context.Context, *ValidRequest) (*ValidResponse, error) {
230	return nil, status.Errorf(codes.Unimplemented, "method TestMethod not implemented")
231}
232func (UnimplementedValidServiceServer) TestMethod2(context.Context, *ValidRequest) (*ValidResponse, error) {
233	return nil, status.Errorf(codes.Unimplemented, "method TestMethod2 not implemented")
234}
235func (UnimplementedValidServiceServer) TestMethod3(context.Context, *ValidRequest) (*ValidResponse, error) {
236	return nil, status.Errorf(codes.Unimplemented, "method TestMethod3 not implemented")
237}
238func (UnimplementedValidServiceServer) TestMethod5(context.Context, *ValidNestedRequest) (*ValidResponse, error) {
239	return nil, status.Errorf(codes.Unimplemented, "method TestMethod5 not implemented")
240}
241func (UnimplementedValidServiceServer) TestMethod6(context.Context, *ValidNestedSharedRequest) (*ValidResponse, error) {
242	return nil, status.Errorf(codes.Unimplemented, "method TestMethod6 not implemented")
243}
244func (UnimplementedValidServiceServer) TestMethod7(context.Context, *ValidInnerNestedRequest) (*ValidResponse, error) {
245	return nil, status.Errorf(codes.Unimplemented, "method TestMethod7 not implemented")
246}
247func (UnimplementedValidServiceServer) TestMethod8(context.Context, *ValidStorageRequest) (*ValidResponse, error) {
248	return nil, status.Errorf(codes.Unimplemented, "method TestMethod8 not implemented")
249}
250func (UnimplementedValidServiceServer) TestMethod9(context.Context, *ValidStorageNestedRequest) (*ValidResponse, error) {
251	return nil, status.Errorf(codes.Unimplemented, "method TestMethod9 not implemented")
252}
253func (UnimplementedValidServiceServer) TestMethod10(context.Context, *ValidStorageRequest) (*ValidResponse, error) {
254	return nil, status.Errorf(codes.Unimplemented, "method TestMethod10 not implemented")
255}
256func (UnimplementedValidServiceServer) mustEmbedUnimplementedValidServiceServer() {}
257
258// UnsafeValidServiceServer may be embedded to opt out of forward compatibility for this service.
259// Use of this interface is not recommended, as added methods to ValidServiceServer will
260// result in compilation errors.
261type UnsafeValidServiceServer interface {
262	mustEmbedUnimplementedValidServiceServer()
263}
264
265func RegisterValidServiceServer(s grpc.ServiceRegistrar, srv ValidServiceServer) {
266	s.RegisterService(&ValidService_ServiceDesc, srv)
267}
268
269func _ValidService_TestMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
270	in := new(ValidRequest)
271	if err := dec(in); err != nil {
272		return nil, err
273	}
274	if interceptor == nil {
275		return srv.(ValidServiceServer).TestMethod(ctx, in)
276	}
277	info := &grpc.UnaryServerInfo{
278		Server:     srv,
279		FullMethod: "/test.ValidService/TestMethod",
280	}
281	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
282		return srv.(ValidServiceServer).TestMethod(ctx, req.(*ValidRequest))
283	}
284	return interceptor(ctx, in, info, handler)
285}
286
287func _ValidService_TestMethod2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
288	in := new(ValidRequest)
289	if err := dec(in); err != nil {
290		return nil, err
291	}
292	if interceptor == nil {
293		return srv.(ValidServiceServer).TestMethod2(ctx, in)
294	}
295	info := &grpc.UnaryServerInfo{
296		Server:     srv,
297		FullMethod: "/test.ValidService/TestMethod2",
298	}
299	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
300		return srv.(ValidServiceServer).TestMethod2(ctx, req.(*ValidRequest))
301	}
302	return interceptor(ctx, in, info, handler)
303}
304
305func _ValidService_TestMethod3_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
306	in := new(ValidRequest)
307	if err := dec(in); err != nil {
308		return nil, err
309	}
310	if interceptor == nil {
311		return srv.(ValidServiceServer).TestMethod3(ctx, in)
312	}
313	info := &grpc.UnaryServerInfo{
314		Server:     srv,
315		FullMethod: "/test.ValidService/TestMethod3",
316	}
317	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
318		return srv.(ValidServiceServer).TestMethod3(ctx, req.(*ValidRequest))
319	}
320	return interceptor(ctx, in, info, handler)
321}
322
323func _ValidService_TestMethod5_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
324	in := new(ValidNestedRequest)
325	if err := dec(in); err != nil {
326		return nil, err
327	}
328	if interceptor == nil {
329		return srv.(ValidServiceServer).TestMethod5(ctx, in)
330	}
331	info := &grpc.UnaryServerInfo{
332		Server:     srv,
333		FullMethod: "/test.ValidService/TestMethod5",
334	}
335	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
336		return srv.(ValidServiceServer).TestMethod5(ctx, req.(*ValidNestedRequest))
337	}
338	return interceptor(ctx, in, info, handler)
339}
340
341func _ValidService_TestMethod6_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
342	in := new(ValidNestedSharedRequest)
343	if err := dec(in); err != nil {
344		return nil, err
345	}
346	if interceptor == nil {
347		return srv.(ValidServiceServer).TestMethod6(ctx, in)
348	}
349	info := &grpc.UnaryServerInfo{
350		Server:     srv,
351		FullMethod: "/test.ValidService/TestMethod6",
352	}
353	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
354		return srv.(ValidServiceServer).TestMethod6(ctx, req.(*ValidNestedSharedRequest))
355	}
356	return interceptor(ctx, in, info, handler)
357}
358
359func _ValidService_TestMethod7_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
360	in := new(ValidInnerNestedRequest)
361	if err := dec(in); err != nil {
362		return nil, err
363	}
364	if interceptor == nil {
365		return srv.(ValidServiceServer).TestMethod7(ctx, in)
366	}
367	info := &grpc.UnaryServerInfo{
368		Server:     srv,
369		FullMethod: "/test.ValidService/TestMethod7",
370	}
371	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
372		return srv.(ValidServiceServer).TestMethod7(ctx, req.(*ValidInnerNestedRequest))
373	}
374	return interceptor(ctx, in, info, handler)
375}
376
377func _ValidService_TestMethod8_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
378	in := new(ValidStorageRequest)
379	if err := dec(in); err != nil {
380		return nil, err
381	}
382	if interceptor == nil {
383		return srv.(ValidServiceServer).TestMethod8(ctx, in)
384	}
385	info := &grpc.UnaryServerInfo{
386		Server:     srv,
387		FullMethod: "/test.ValidService/TestMethod8",
388	}
389	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
390		return srv.(ValidServiceServer).TestMethod8(ctx, req.(*ValidStorageRequest))
391	}
392	return interceptor(ctx, in, info, handler)
393}
394
395func _ValidService_TestMethod9_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
396	in := new(ValidStorageNestedRequest)
397	if err := dec(in); err != nil {
398		return nil, err
399	}
400	if interceptor == nil {
401		return srv.(ValidServiceServer).TestMethod9(ctx, in)
402	}
403	info := &grpc.UnaryServerInfo{
404		Server:     srv,
405		FullMethod: "/test.ValidService/TestMethod9",
406	}
407	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
408		return srv.(ValidServiceServer).TestMethod9(ctx, req.(*ValidStorageNestedRequest))
409	}
410	return interceptor(ctx, in, info, handler)
411}
412
413func _ValidService_TestMethod10_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
414	in := new(ValidStorageRequest)
415	if err := dec(in); err != nil {
416		return nil, err
417	}
418	if interceptor == nil {
419		return srv.(ValidServiceServer).TestMethod10(ctx, in)
420	}
421	info := &grpc.UnaryServerInfo{
422		Server:     srv,
423		FullMethod: "/test.ValidService/TestMethod10",
424	}
425	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
426		return srv.(ValidServiceServer).TestMethod10(ctx, req.(*ValidStorageRequest))
427	}
428	return interceptor(ctx, in, info, handler)
429}
430
431// ValidService_ServiceDesc is the grpc.ServiceDesc for ValidService service.
432// It's only intended for direct use with grpc.RegisterService,
433// and not to be introspected or modified (even as a copy)
434var ValidService_ServiceDesc = grpc.ServiceDesc{
435	ServiceName: "test.ValidService",
436	HandlerType: (*ValidServiceServer)(nil),
437	Methods: []grpc.MethodDesc{
438		{
439			MethodName: "TestMethod",
440			Handler:    _ValidService_TestMethod_Handler,
441		},
442		{
443			MethodName: "TestMethod2",
444			Handler:    _ValidService_TestMethod2_Handler,
445		},
446		{
447			MethodName: "TestMethod3",
448			Handler:    _ValidService_TestMethod3_Handler,
449		},
450		{
451			MethodName: "TestMethod5",
452			Handler:    _ValidService_TestMethod5_Handler,
453		},
454		{
455			MethodName: "TestMethod6",
456			Handler:    _ValidService_TestMethod6_Handler,
457		},
458		{
459			MethodName: "TestMethod7",
460			Handler:    _ValidService_TestMethod7_Handler,
461		},
462		{
463			MethodName: "TestMethod8",
464			Handler:    _ValidService_TestMethod8_Handler,
465		},
466		{
467			MethodName: "TestMethod9",
468			Handler:    _ValidService_TestMethod9_Handler,
469		},
470		{
471			MethodName: "TestMethod10",
472			Handler:    _ValidService_TestMethod10_Handler,
473		},
474	},
475	Streams:  []grpc.StreamDesc{},
476	Metadata: "go/internal/linter/testdata/valid.proto",
477}
478