google.golang.org/grpc@v1.72.2/interop/grpc_testing/test_grpc.pb.go (about)

     1  // Copyright 2015-2016 gRPC authors.
     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  // An integration test service that covers all the method signature permutations
    16  // of unary/streaming requests/responses.
    17  
    18  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    19  // versions:
    20  // - protoc-gen-go-grpc v1.5.1
    21  // - protoc             v5.27.1
    22  // source: grpc/testing/test.proto
    23  
    24  package grpc_testing
    25  
    26  import (
    27  	context "context"
    28  	grpc "google.golang.org/grpc"
    29  	codes "google.golang.org/grpc/codes"
    30  	status "google.golang.org/grpc/status"
    31  )
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the grpc package it is being compiled against.
    35  // Requires gRPC-Go v1.64.0 or later.
    36  const _ = grpc.SupportPackageIsVersion9
    37  
    38  const (
    39  	TestService_EmptyCall_FullMethodName           = "/grpc.testing.TestService/EmptyCall"
    40  	TestService_UnaryCall_FullMethodName           = "/grpc.testing.TestService/UnaryCall"
    41  	TestService_CacheableUnaryCall_FullMethodName  = "/grpc.testing.TestService/CacheableUnaryCall"
    42  	TestService_StreamingOutputCall_FullMethodName = "/grpc.testing.TestService/StreamingOutputCall"
    43  	TestService_StreamingInputCall_FullMethodName  = "/grpc.testing.TestService/StreamingInputCall"
    44  	TestService_FullDuplexCall_FullMethodName      = "/grpc.testing.TestService/FullDuplexCall"
    45  	TestService_HalfDuplexCall_FullMethodName      = "/grpc.testing.TestService/HalfDuplexCall"
    46  	TestService_UnimplementedCall_FullMethodName   = "/grpc.testing.TestService/UnimplementedCall"
    47  )
    48  
    49  // TestServiceClient is the client API for TestService service.
    50  //
    51  // 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.
    52  //
    53  // A simple service to test the various types of RPCs and experiment with
    54  // performance with various types of payload.
    55  type TestServiceClient interface {
    56  	// One empty request followed by one empty response.
    57  	EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    58  	// One request followed by one response.
    59  	UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    60  	// One request followed by one response. Response has cache control
    61  	// headers set such that a caching HTTP proxy (such as GFE) can
    62  	// satisfy subsequent requests.
    63  	CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    64  	// One request followed by a sequence of responses (streamed download).
    65  	// The server returns the payload with client desired type and sizes.
    66  	StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamingOutputCallResponse], error)
    67  	// A sequence of requests followed by one response (streamed upload).
    68  	// The server returns the aggregated size of client payload as the result.
    69  	StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse], error)
    70  	// A sequence of requests with each request served by the server immediately.
    71  	// As one request could lead to multiple responses, this interface
    72  	// demonstrates the idea of full duplexing.
    73  	FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error)
    74  	// A sequence of requests followed by a sequence of responses.
    75  	// The server buffers all the client requests and then serves them in order. A
    76  	// stream of responses are returned to the client when the server starts with
    77  	// first request.
    78  	HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error)
    79  	// The test server will not implement this method. It will be used
    80  	// to test the behavior when clients call unimplemented methods.
    81  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    82  }
    83  
    84  type testServiceClient struct {
    85  	cc grpc.ClientConnInterface
    86  }
    87  
    88  func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
    89  	return &testServiceClient{cc}
    90  }
    91  
    92  func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
    93  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    94  	out := new(Empty)
    95  	err := c.cc.Invoke(ctx, TestService_EmptyCall_FullMethodName, in, out, cOpts...)
    96  	if err != nil {
    97  		return nil, err
    98  	}
    99  	return out, nil
   100  }
   101  
   102  func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
   103  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   104  	out := new(SimpleResponse)
   105  	err := c.cc.Invoke(ctx, TestService_UnaryCall_FullMethodName, in, out, cOpts...)
   106  	if err != nil {
   107  		return nil, err
   108  	}
   109  	return out, nil
   110  }
   111  
   112  func (c *testServiceClient) CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
   113  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   114  	out := new(SimpleResponse)
   115  	err := c.cc.Invoke(ctx, TestService_CacheableUnaryCall_FullMethodName, in, out, cOpts...)
   116  	if err != nil {
   117  		return nil, err
   118  	}
   119  	return out, nil
   120  }
   121  
   122  func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamingOutputCallResponse], error) {
   123  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   124  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], TestService_StreamingOutputCall_FullMethodName, cOpts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   129  	if err := x.ClientStream.SendMsg(in); err != nil {
   130  		return nil, err
   131  	}
   132  	if err := x.ClientStream.CloseSend(); err != nil {
   133  		return nil, err
   134  	}
   135  	return x, nil
   136  }
   137  
   138  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   139  type TestService_StreamingOutputCallClient = grpc.ServerStreamingClient[StreamingOutputCallResponse]
   140  
   141  func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse], error) {
   142  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   143  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], TestService_StreamingInputCall_FullMethodName, cOpts...)
   144  	if err != nil {
   145  		return nil, err
   146  	}
   147  	x := &grpc.GenericClientStream[StreamingInputCallRequest, StreamingInputCallResponse]{ClientStream: stream}
   148  	return x, nil
   149  }
   150  
   151  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   152  type TestService_StreamingInputCallClient = grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse]
   153  
   154  func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error) {
   155  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   156  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], TestService_FullDuplexCall_FullMethodName, cOpts...)
   157  	if err != nil {
   158  		return nil, err
   159  	}
   160  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   161  	return x, nil
   162  }
   163  
   164  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   165  type TestService_FullDuplexCallClient = grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse]
   166  
   167  func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error) {
   168  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   169  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[3], TestService_HalfDuplexCall_FullMethodName, cOpts...)
   170  	if err != nil {
   171  		return nil, err
   172  	}
   173  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   174  	return x, nil
   175  }
   176  
   177  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   178  type TestService_HalfDuplexCallClient = grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse]
   179  
   180  func (c *testServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   181  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   182  	out := new(Empty)
   183  	err := c.cc.Invoke(ctx, TestService_UnimplementedCall_FullMethodName, in, out, cOpts...)
   184  	if err != nil {
   185  		return nil, err
   186  	}
   187  	return out, nil
   188  }
   189  
   190  // TestServiceServer is the server API for TestService service.
   191  // All implementations must embed UnimplementedTestServiceServer
   192  // for forward compatibility.
   193  //
   194  // A simple service to test the various types of RPCs and experiment with
   195  // performance with various types of payload.
   196  type TestServiceServer interface {
   197  	// One empty request followed by one empty response.
   198  	EmptyCall(context.Context, *Empty) (*Empty, error)
   199  	// One request followed by one response.
   200  	UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   201  	// One request followed by one response. Response has cache control
   202  	// headers set such that a caching HTTP proxy (such as GFE) can
   203  	// satisfy subsequent requests.
   204  	CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   205  	// One request followed by a sequence of responses (streamed download).
   206  	// The server returns the payload with client desired type and sizes.
   207  	StreamingOutputCall(*StreamingOutputCallRequest, grpc.ServerStreamingServer[StreamingOutputCallResponse]) error
   208  	// A sequence of requests followed by one response (streamed upload).
   209  	// The server returns the aggregated size of client payload as the result.
   210  	StreamingInputCall(grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]) error
   211  	// A sequence of requests with each request served by the server immediately.
   212  	// As one request could lead to multiple responses, this interface
   213  	// demonstrates the idea of full duplexing.
   214  	FullDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error
   215  	// A sequence of requests followed by a sequence of responses.
   216  	// The server buffers all the client requests and then serves them in order. A
   217  	// stream of responses are returned to the client when the server starts with
   218  	// first request.
   219  	HalfDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error
   220  	// The test server will not implement this method. It will be used
   221  	// to test the behavior when clients call unimplemented methods.
   222  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   223  	mustEmbedUnimplementedTestServiceServer()
   224  }
   225  
   226  // UnimplementedTestServiceServer must be embedded to have
   227  // forward compatible implementations.
   228  //
   229  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   230  // pointer dereference when methods are called.
   231  type UnimplementedTestServiceServer struct{}
   232  
   233  func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) {
   234  	return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented")
   235  }
   236  func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   237  	return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented")
   238  }
   239  func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   240  	return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented")
   241  }
   242  func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, grpc.ServerStreamingServer[StreamingOutputCallResponse]) error {
   243  	return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented")
   244  }
   245  func (UnimplementedTestServiceServer) StreamingInputCall(grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]) error {
   246  	return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented")
   247  }
   248  func (UnimplementedTestServiceServer) FullDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error {
   249  	return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented")
   250  }
   251  func (UnimplementedTestServiceServer) HalfDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error {
   252  	return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented")
   253  }
   254  func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   255  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   256  }
   257  func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {}
   258  func (UnimplementedTestServiceServer) testEmbeddedByValue()                     {}
   259  
   260  // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
   261  // Use of this interface is not recommended, as added methods to TestServiceServer will
   262  // result in compilation errors.
   263  type UnsafeTestServiceServer interface {
   264  	mustEmbedUnimplementedTestServiceServer()
   265  }
   266  
   267  func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
   268  	// If the following call panics, it indicates UnimplementedTestServiceServer was
   269  	// embedded by pointer and is nil.  This will cause panics if an
   270  	// unimplemented method is ever invoked, so we test this at initialization
   271  	// time to prevent it from happening at runtime later due to I/O.
   272  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   273  		t.testEmbeddedByValue()
   274  	}
   275  	s.RegisterService(&TestService_ServiceDesc, srv)
   276  }
   277  
   278  func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   279  	in := new(Empty)
   280  	if err := dec(in); err != nil {
   281  		return nil, err
   282  	}
   283  	if interceptor == nil {
   284  		return srv.(TestServiceServer).EmptyCall(ctx, in)
   285  	}
   286  	info := &grpc.UnaryServerInfo{
   287  		Server:     srv,
   288  		FullMethod: TestService_EmptyCall_FullMethodName,
   289  	}
   290  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   291  		return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
   292  	}
   293  	return interceptor(ctx, in, info, handler)
   294  }
   295  
   296  func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   297  	in := new(SimpleRequest)
   298  	if err := dec(in); err != nil {
   299  		return nil, err
   300  	}
   301  	if interceptor == nil {
   302  		return srv.(TestServiceServer).UnaryCall(ctx, in)
   303  	}
   304  	info := &grpc.UnaryServerInfo{
   305  		Server:     srv,
   306  		FullMethod: TestService_UnaryCall_FullMethodName,
   307  	}
   308  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   309  		return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
   310  	}
   311  	return interceptor(ctx, in, info, handler)
   312  }
   313  
   314  func _TestService_CacheableUnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   315  	in := new(SimpleRequest)
   316  	if err := dec(in); err != nil {
   317  		return nil, err
   318  	}
   319  	if interceptor == nil {
   320  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, in)
   321  	}
   322  	info := &grpc.UnaryServerInfo{
   323  		Server:     srv,
   324  		FullMethod: TestService_CacheableUnaryCall_FullMethodName,
   325  	}
   326  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   327  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, req.(*SimpleRequest))
   328  	}
   329  	return interceptor(ctx, in, info, handler)
   330  }
   331  
   332  func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   333  	m := new(StreamingOutputCallRequest)
   334  	if err := stream.RecvMsg(m); err != nil {
   335  		return err
   336  	}
   337  	return srv.(TestServiceServer).StreamingOutputCall(m, &grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   338  }
   339  
   340  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   341  type TestService_StreamingOutputCallServer = grpc.ServerStreamingServer[StreamingOutputCallResponse]
   342  
   343  func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   344  	return srv.(TestServiceServer).StreamingInputCall(&grpc.GenericServerStream[StreamingInputCallRequest, StreamingInputCallResponse]{ServerStream: stream})
   345  }
   346  
   347  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   348  type TestService_StreamingInputCallServer = grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]
   349  
   350  func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   351  	return srv.(TestServiceServer).FullDuplexCall(&grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   352  }
   353  
   354  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   355  type TestService_FullDuplexCallServer = grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]
   356  
   357  func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   358  	return srv.(TestServiceServer).HalfDuplexCall(&grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   359  }
   360  
   361  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   362  type TestService_HalfDuplexCallServer = grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]
   363  
   364  func _TestService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   365  	in := new(Empty)
   366  	if err := dec(in); err != nil {
   367  		return nil, err
   368  	}
   369  	if interceptor == nil {
   370  		return srv.(TestServiceServer).UnimplementedCall(ctx, in)
   371  	}
   372  	info := &grpc.UnaryServerInfo{
   373  		Server:     srv,
   374  		FullMethod: TestService_UnimplementedCall_FullMethodName,
   375  	}
   376  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   377  		return srv.(TestServiceServer).UnimplementedCall(ctx, req.(*Empty))
   378  	}
   379  	return interceptor(ctx, in, info, handler)
   380  }
   381  
   382  // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
   383  // It's only intended for direct use with grpc.RegisterService,
   384  // and not to be introspected or modified (even as a copy)
   385  var TestService_ServiceDesc = grpc.ServiceDesc{
   386  	ServiceName: "grpc.testing.TestService",
   387  	HandlerType: (*TestServiceServer)(nil),
   388  	Methods: []grpc.MethodDesc{
   389  		{
   390  			MethodName: "EmptyCall",
   391  			Handler:    _TestService_EmptyCall_Handler,
   392  		},
   393  		{
   394  			MethodName: "UnaryCall",
   395  			Handler:    _TestService_UnaryCall_Handler,
   396  		},
   397  		{
   398  			MethodName: "CacheableUnaryCall",
   399  			Handler:    _TestService_CacheableUnaryCall_Handler,
   400  		},
   401  		{
   402  			MethodName: "UnimplementedCall",
   403  			Handler:    _TestService_UnimplementedCall_Handler,
   404  		},
   405  	},
   406  	Streams: []grpc.StreamDesc{
   407  		{
   408  			StreamName:    "StreamingOutputCall",
   409  			Handler:       _TestService_StreamingOutputCall_Handler,
   410  			ServerStreams: true,
   411  		},
   412  		{
   413  			StreamName:    "StreamingInputCall",
   414  			Handler:       _TestService_StreamingInputCall_Handler,
   415  			ClientStreams: true,
   416  		},
   417  		{
   418  			StreamName:    "FullDuplexCall",
   419  			Handler:       _TestService_FullDuplexCall_Handler,
   420  			ServerStreams: true,
   421  			ClientStreams: true,
   422  		},
   423  		{
   424  			StreamName:    "HalfDuplexCall",
   425  			Handler:       _TestService_HalfDuplexCall_Handler,
   426  			ServerStreams: true,
   427  			ClientStreams: true,
   428  		},
   429  	},
   430  	Metadata: "grpc/testing/test.proto",
   431  }
   432  
   433  const (
   434  	UnimplementedService_UnimplementedCall_FullMethodName = "/grpc.testing.UnimplementedService/UnimplementedCall"
   435  )
   436  
   437  // UnimplementedServiceClient is the client API for UnimplementedService service.
   438  //
   439  // 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.
   440  //
   441  // A simple service NOT implemented at servers so clients can test for
   442  // that case.
   443  type UnimplementedServiceClient interface {
   444  	// A call that no server should implement
   445  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   446  }
   447  
   448  type unimplementedServiceClient struct {
   449  	cc grpc.ClientConnInterface
   450  }
   451  
   452  func NewUnimplementedServiceClient(cc grpc.ClientConnInterface) UnimplementedServiceClient {
   453  	return &unimplementedServiceClient{cc}
   454  }
   455  
   456  func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   457  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   458  	out := new(Empty)
   459  	err := c.cc.Invoke(ctx, UnimplementedService_UnimplementedCall_FullMethodName, in, out, cOpts...)
   460  	if err != nil {
   461  		return nil, err
   462  	}
   463  	return out, nil
   464  }
   465  
   466  // UnimplementedServiceServer is the server API for UnimplementedService service.
   467  // All implementations must embed UnimplementedUnimplementedServiceServer
   468  // for forward compatibility.
   469  //
   470  // A simple service NOT implemented at servers so clients can test for
   471  // that case.
   472  type UnimplementedServiceServer interface {
   473  	// A call that no server should implement
   474  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   475  	mustEmbedUnimplementedUnimplementedServiceServer()
   476  }
   477  
   478  // UnimplementedUnimplementedServiceServer must be embedded to have
   479  // forward compatible implementations.
   480  //
   481  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   482  // pointer dereference when methods are called.
   483  type UnimplementedUnimplementedServiceServer struct{}
   484  
   485  func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   486  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   487  }
   488  func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {}
   489  func (UnimplementedUnimplementedServiceServer) testEmbeddedByValue()                              {}
   490  
   491  // UnsafeUnimplementedServiceServer may be embedded to opt out of forward compatibility for this service.
   492  // Use of this interface is not recommended, as added methods to UnimplementedServiceServer will
   493  // result in compilation errors.
   494  type UnsafeUnimplementedServiceServer interface {
   495  	mustEmbedUnimplementedUnimplementedServiceServer()
   496  }
   497  
   498  func RegisterUnimplementedServiceServer(s grpc.ServiceRegistrar, srv UnimplementedServiceServer) {
   499  	// If the following call panics, it indicates UnimplementedUnimplementedServiceServer was
   500  	// embedded by pointer and is nil.  This will cause panics if an
   501  	// unimplemented method is ever invoked, so we test this at initialization
   502  	// time to prevent it from happening at runtime later due to I/O.
   503  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   504  		t.testEmbeddedByValue()
   505  	}
   506  	s.RegisterService(&UnimplementedService_ServiceDesc, srv)
   507  }
   508  
   509  func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   510  	in := new(Empty)
   511  	if err := dec(in); err != nil {
   512  		return nil, err
   513  	}
   514  	if interceptor == nil {
   515  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in)
   516  	}
   517  	info := &grpc.UnaryServerInfo{
   518  		Server:     srv,
   519  		FullMethod: UnimplementedService_UnimplementedCall_FullMethodName,
   520  	}
   521  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   522  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty))
   523  	}
   524  	return interceptor(ctx, in, info, handler)
   525  }
   526  
   527  // UnimplementedService_ServiceDesc is the grpc.ServiceDesc for UnimplementedService service.
   528  // It's only intended for direct use with grpc.RegisterService,
   529  // and not to be introspected or modified (even as a copy)
   530  var UnimplementedService_ServiceDesc = grpc.ServiceDesc{
   531  	ServiceName: "grpc.testing.UnimplementedService",
   532  	HandlerType: (*UnimplementedServiceServer)(nil),
   533  	Methods: []grpc.MethodDesc{
   534  		{
   535  			MethodName: "UnimplementedCall",
   536  			Handler:    _UnimplementedService_UnimplementedCall_Handler,
   537  		},
   538  	},
   539  	Streams:  []grpc.StreamDesc{},
   540  	Metadata: "grpc/testing/test.proto",
   541  }
   542  
   543  const (
   544  	ReconnectService_Start_FullMethodName = "/grpc.testing.ReconnectService/Start"
   545  	ReconnectService_Stop_FullMethodName  = "/grpc.testing.ReconnectService/Stop"
   546  )
   547  
   548  // ReconnectServiceClient is the client API for ReconnectService service.
   549  //
   550  // 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.
   551  //
   552  // A service used to control reconnect server.
   553  type ReconnectServiceClient interface {
   554  	Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error)
   555  	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error)
   556  }
   557  
   558  type reconnectServiceClient struct {
   559  	cc grpc.ClientConnInterface
   560  }
   561  
   562  func NewReconnectServiceClient(cc grpc.ClientConnInterface) ReconnectServiceClient {
   563  	return &reconnectServiceClient{cc}
   564  }
   565  
   566  func (c *reconnectServiceClient) Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) {
   567  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   568  	out := new(Empty)
   569  	err := c.cc.Invoke(ctx, ReconnectService_Start_FullMethodName, in, out, cOpts...)
   570  	if err != nil {
   571  		return nil, err
   572  	}
   573  	return out, nil
   574  }
   575  
   576  func (c *reconnectServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) {
   577  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   578  	out := new(ReconnectInfo)
   579  	err := c.cc.Invoke(ctx, ReconnectService_Stop_FullMethodName, in, out, cOpts...)
   580  	if err != nil {
   581  		return nil, err
   582  	}
   583  	return out, nil
   584  }
   585  
   586  // ReconnectServiceServer is the server API for ReconnectService service.
   587  // All implementations must embed UnimplementedReconnectServiceServer
   588  // for forward compatibility.
   589  //
   590  // A service used to control reconnect server.
   591  type ReconnectServiceServer interface {
   592  	Start(context.Context, *ReconnectParams) (*Empty, error)
   593  	Stop(context.Context, *Empty) (*ReconnectInfo, error)
   594  	mustEmbedUnimplementedReconnectServiceServer()
   595  }
   596  
   597  // UnimplementedReconnectServiceServer must be embedded to have
   598  // forward compatible implementations.
   599  //
   600  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   601  // pointer dereference when methods are called.
   602  type UnimplementedReconnectServiceServer struct{}
   603  
   604  func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) {
   605  	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
   606  }
   607  func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) {
   608  	return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
   609  }
   610  func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {}
   611  func (UnimplementedReconnectServiceServer) testEmbeddedByValue()                          {}
   612  
   613  // UnsafeReconnectServiceServer may be embedded to opt out of forward compatibility for this service.
   614  // Use of this interface is not recommended, as added methods to ReconnectServiceServer will
   615  // result in compilation errors.
   616  type UnsafeReconnectServiceServer interface {
   617  	mustEmbedUnimplementedReconnectServiceServer()
   618  }
   619  
   620  func RegisterReconnectServiceServer(s grpc.ServiceRegistrar, srv ReconnectServiceServer) {
   621  	// If the following call panics, it indicates UnimplementedReconnectServiceServer was
   622  	// embedded by pointer and is nil.  This will cause panics if an
   623  	// unimplemented method is ever invoked, so we test this at initialization
   624  	// time to prevent it from happening at runtime later due to I/O.
   625  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   626  		t.testEmbeddedByValue()
   627  	}
   628  	s.RegisterService(&ReconnectService_ServiceDesc, srv)
   629  }
   630  
   631  func _ReconnectService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   632  	in := new(ReconnectParams)
   633  	if err := dec(in); err != nil {
   634  		return nil, err
   635  	}
   636  	if interceptor == nil {
   637  		return srv.(ReconnectServiceServer).Start(ctx, in)
   638  	}
   639  	info := &grpc.UnaryServerInfo{
   640  		Server:     srv,
   641  		FullMethod: ReconnectService_Start_FullMethodName,
   642  	}
   643  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   644  		return srv.(ReconnectServiceServer).Start(ctx, req.(*ReconnectParams))
   645  	}
   646  	return interceptor(ctx, in, info, handler)
   647  }
   648  
   649  func _ReconnectService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   650  	in := new(Empty)
   651  	if err := dec(in); err != nil {
   652  		return nil, err
   653  	}
   654  	if interceptor == nil {
   655  		return srv.(ReconnectServiceServer).Stop(ctx, in)
   656  	}
   657  	info := &grpc.UnaryServerInfo{
   658  		Server:     srv,
   659  		FullMethod: ReconnectService_Stop_FullMethodName,
   660  	}
   661  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   662  		return srv.(ReconnectServiceServer).Stop(ctx, req.(*Empty))
   663  	}
   664  	return interceptor(ctx, in, info, handler)
   665  }
   666  
   667  // ReconnectService_ServiceDesc is the grpc.ServiceDesc for ReconnectService service.
   668  // It's only intended for direct use with grpc.RegisterService,
   669  // and not to be introspected or modified (even as a copy)
   670  var ReconnectService_ServiceDesc = grpc.ServiceDesc{
   671  	ServiceName: "grpc.testing.ReconnectService",
   672  	HandlerType: (*ReconnectServiceServer)(nil),
   673  	Methods: []grpc.MethodDesc{
   674  		{
   675  			MethodName: "Start",
   676  			Handler:    _ReconnectService_Start_Handler,
   677  		},
   678  		{
   679  			MethodName: "Stop",
   680  			Handler:    _ReconnectService_Stop_Handler,
   681  		},
   682  	},
   683  	Streams:  []grpc.StreamDesc{},
   684  	Metadata: "grpc/testing/test.proto",
   685  }
   686  
   687  const (
   688  	LoadBalancerStatsService_GetClientStats_FullMethodName            = "/grpc.testing.LoadBalancerStatsService/GetClientStats"
   689  	LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats"
   690  )
   691  
   692  // LoadBalancerStatsServiceClient is the client API for LoadBalancerStatsService service.
   693  //
   694  // 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.
   695  //
   696  // A service used to obtain stats for verifying LB behavior.
   697  type LoadBalancerStatsServiceClient interface {
   698  	// Gets the backend distribution for RPCs sent by a test client.
   699  	GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error)
   700  	// Gets the accumulated stats for RPCs sent by a test client.
   701  	GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error)
   702  }
   703  
   704  type loadBalancerStatsServiceClient struct {
   705  	cc grpc.ClientConnInterface
   706  }
   707  
   708  func NewLoadBalancerStatsServiceClient(cc grpc.ClientConnInterface) LoadBalancerStatsServiceClient {
   709  	return &loadBalancerStatsServiceClient{cc}
   710  }
   711  
   712  func (c *loadBalancerStatsServiceClient) GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) {
   713  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   714  	out := new(LoadBalancerStatsResponse)
   715  	err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientStats_FullMethodName, in, out, cOpts...)
   716  	if err != nil {
   717  		return nil, err
   718  	}
   719  	return out, nil
   720  }
   721  
   722  func (c *loadBalancerStatsServiceClient) GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) {
   723  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   724  	out := new(LoadBalancerAccumulatedStatsResponse)
   725  	err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName, in, out, cOpts...)
   726  	if err != nil {
   727  		return nil, err
   728  	}
   729  	return out, nil
   730  }
   731  
   732  // LoadBalancerStatsServiceServer is the server API for LoadBalancerStatsService service.
   733  // All implementations must embed UnimplementedLoadBalancerStatsServiceServer
   734  // for forward compatibility.
   735  //
   736  // A service used to obtain stats for verifying LB behavior.
   737  type LoadBalancerStatsServiceServer interface {
   738  	// Gets the backend distribution for RPCs sent by a test client.
   739  	GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error)
   740  	// Gets the accumulated stats for RPCs sent by a test client.
   741  	GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error)
   742  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   743  }
   744  
   745  // UnimplementedLoadBalancerStatsServiceServer must be embedded to have
   746  // forward compatible implementations.
   747  //
   748  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   749  // pointer dereference when methods are called.
   750  type UnimplementedLoadBalancerStatsServiceServer struct{}
   751  
   752  func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) {
   753  	return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented")
   754  }
   755  func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) {
   756  	return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented")
   757  }
   758  func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() {
   759  }
   760  func (UnimplementedLoadBalancerStatsServiceServer) testEmbeddedByValue() {}
   761  
   762  // UnsafeLoadBalancerStatsServiceServer may be embedded to opt out of forward compatibility for this service.
   763  // Use of this interface is not recommended, as added methods to LoadBalancerStatsServiceServer will
   764  // result in compilation errors.
   765  type UnsafeLoadBalancerStatsServiceServer interface {
   766  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   767  }
   768  
   769  func RegisterLoadBalancerStatsServiceServer(s grpc.ServiceRegistrar, srv LoadBalancerStatsServiceServer) {
   770  	// If the following call panics, it indicates UnimplementedLoadBalancerStatsServiceServer was
   771  	// embedded by pointer and is nil.  This will cause panics if an
   772  	// unimplemented method is ever invoked, so we test this at initialization
   773  	// time to prevent it from happening at runtime later due to I/O.
   774  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   775  		t.testEmbeddedByValue()
   776  	}
   777  	s.RegisterService(&LoadBalancerStatsService_ServiceDesc, srv)
   778  }
   779  
   780  func _LoadBalancerStatsService_GetClientStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   781  	in := new(LoadBalancerStatsRequest)
   782  	if err := dec(in); err != nil {
   783  		return nil, err
   784  	}
   785  	if interceptor == nil {
   786  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, in)
   787  	}
   788  	info := &grpc.UnaryServerInfo{
   789  		Server:     srv,
   790  		FullMethod: LoadBalancerStatsService_GetClientStats_FullMethodName,
   791  	}
   792  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   793  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, req.(*LoadBalancerStatsRequest))
   794  	}
   795  	return interceptor(ctx, in, info, handler)
   796  }
   797  
   798  func _LoadBalancerStatsService_GetClientAccumulatedStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   799  	in := new(LoadBalancerAccumulatedStatsRequest)
   800  	if err := dec(in); err != nil {
   801  		return nil, err
   802  	}
   803  	if interceptor == nil {
   804  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, in)
   805  	}
   806  	info := &grpc.UnaryServerInfo{
   807  		Server:     srv,
   808  		FullMethod: LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName,
   809  	}
   810  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   811  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, req.(*LoadBalancerAccumulatedStatsRequest))
   812  	}
   813  	return interceptor(ctx, in, info, handler)
   814  }
   815  
   816  // LoadBalancerStatsService_ServiceDesc is the grpc.ServiceDesc for LoadBalancerStatsService service.
   817  // It's only intended for direct use with grpc.RegisterService,
   818  // and not to be introspected or modified (even as a copy)
   819  var LoadBalancerStatsService_ServiceDesc = grpc.ServiceDesc{
   820  	ServiceName: "grpc.testing.LoadBalancerStatsService",
   821  	HandlerType: (*LoadBalancerStatsServiceServer)(nil),
   822  	Methods: []grpc.MethodDesc{
   823  		{
   824  			MethodName: "GetClientStats",
   825  			Handler:    _LoadBalancerStatsService_GetClientStats_Handler,
   826  		},
   827  		{
   828  			MethodName: "GetClientAccumulatedStats",
   829  			Handler:    _LoadBalancerStatsService_GetClientAccumulatedStats_Handler,
   830  		},
   831  	},
   832  	Streams:  []grpc.StreamDesc{},
   833  	Metadata: "grpc/testing/test.proto",
   834  }
   835  
   836  const (
   837  	HookService_Hook_FullMethodName              = "/grpc.testing.HookService/Hook"
   838  	HookService_SetReturnStatus_FullMethodName   = "/grpc.testing.HookService/SetReturnStatus"
   839  	HookService_ClearReturnStatus_FullMethodName = "/grpc.testing.HookService/ClearReturnStatus"
   840  )
   841  
   842  // HookServiceClient is the client API for HookService service.
   843  //
   844  // 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.
   845  //
   846  // Hook service. Used to keep Kubernetes from shutting the pod down.
   847  type HookServiceClient interface {
   848  	// Sends a request that will "hang" until the return status is set by a call
   849  	// to a SetReturnStatus
   850  	Hook(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   851  	// Sets a return status for pending and upcoming calls to Hook
   852  	SetReturnStatus(ctx context.Context, in *SetReturnStatusRequest, opts ...grpc.CallOption) (*Empty, error)
   853  	// Clears the return status. Incoming calls to Hook will "hang"
   854  	ClearReturnStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   855  }
   856  
   857  type hookServiceClient struct {
   858  	cc grpc.ClientConnInterface
   859  }
   860  
   861  func NewHookServiceClient(cc grpc.ClientConnInterface) HookServiceClient {
   862  	return &hookServiceClient{cc}
   863  }
   864  
   865  func (c *hookServiceClient) Hook(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   866  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   867  	out := new(Empty)
   868  	err := c.cc.Invoke(ctx, HookService_Hook_FullMethodName, in, out, cOpts...)
   869  	if err != nil {
   870  		return nil, err
   871  	}
   872  	return out, nil
   873  }
   874  
   875  func (c *hookServiceClient) SetReturnStatus(ctx context.Context, in *SetReturnStatusRequest, opts ...grpc.CallOption) (*Empty, error) {
   876  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   877  	out := new(Empty)
   878  	err := c.cc.Invoke(ctx, HookService_SetReturnStatus_FullMethodName, in, out, cOpts...)
   879  	if err != nil {
   880  		return nil, err
   881  	}
   882  	return out, nil
   883  }
   884  
   885  func (c *hookServiceClient) ClearReturnStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   886  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   887  	out := new(Empty)
   888  	err := c.cc.Invoke(ctx, HookService_ClearReturnStatus_FullMethodName, in, out, cOpts...)
   889  	if err != nil {
   890  		return nil, err
   891  	}
   892  	return out, nil
   893  }
   894  
   895  // HookServiceServer is the server API for HookService service.
   896  // All implementations must embed UnimplementedHookServiceServer
   897  // for forward compatibility.
   898  //
   899  // Hook service. Used to keep Kubernetes from shutting the pod down.
   900  type HookServiceServer interface {
   901  	// Sends a request that will "hang" until the return status is set by a call
   902  	// to a SetReturnStatus
   903  	Hook(context.Context, *Empty) (*Empty, error)
   904  	// Sets a return status for pending and upcoming calls to Hook
   905  	SetReturnStatus(context.Context, *SetReturnStatusRequest) (*Empty, error)
   906  	// Clears the return status. Incoming calls to Hook will "hang"
   907  	ClearReturnStatus(context.Context, *Empty) (*Empty, error)
   908  	mustEmbedUnimplementedHookServiceServer()
   909  }
   910  
   911  // UnimplementedHookServiceServer must be embedded to have
   912  // forward compatible implementations.
   913  //
   914  // NOTE: this should be embedded by value instead of pointer to avoid a nil
   915  // pointer dereference when methods are called.
   916  type UnimplementedHookServiceServer struct{}
   917  
   918  func (UnimplementedHookServiceServer) Hook(context.Context, *Empty) (*Empty, error) {
   919  	return nil, status.Errorf(codes.Unimplemented, "method Hook not implemented")
   920  }
   921  func (UnimplementedHookServiceServer) SetReturnStatus(context.Context, *SetReturnStatusRequest) (*Empty, error) {
   922  	return nil, status.Errorf(codes.Unimplemented, "method SetReturnStatus not implemented")
   923  }
   924  func (UnimplementedHookServiceServer) ClearReturnStatus(context.Context, *Empty) (*Empty, error) {
   925  	return nil, status.Errorf(codes.Unimplemented, "method ClearReturnStatus not implemented")
   926  }
   927  func (UnimplementedHookServiceServer) mustEmbedUnimplementedHookServiceServer() {}
   928  func (UnimplementedHookServiceServer) testEmbeddedByValue()                     {}
   929  
   930  // UnsafeHookServiceServer may be embedded to opt out of forward compatibility for this service.
   931  // Use of this interface is not recommended, as added methods to HookServiceServer will
   932  // result in compilation errors.
   933  type UnsafeHookServiceServer interface {
   934  	mustEmbedUnimplementedHookServiceServer()
   935  }
   936  
   937  func RegisterHookServiceServer(s grpc.ServiceRegistrar, srv HookServiceServer) {
   938  	// If the following call panics, it indicates UnimplementedHookServiceServer was
   939  	// embedded by pointer and is nil.  This will cause panics if an
   940  	// unimplemented method is ever invoked, so we test this at initialization
   941  	// time to prevent it from happening at runtime later due to I/O.
   942  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
   943  		t.testEmbeddedByValue()
   944  	}
   945  	s.RegisterService(&HookService_ServiceDesc, srv)
   946  }
   947  
   948  func _HookService_Hook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   949  	in := new(Empty)
   950  	if err := dec(in); err != nil {
   951  		return nil, err
   952  	}
   953  	if interceptor == nil {
   954  		return srv.(HookServiceServer).Hook(ctx, in)
   955  	}
   956  	info := &grpc.UnaryServerInfo{
   957  		Server:     srv,
   958  		FullMethod: HookService_Hook_FullMethodName,
   959  	}
   960  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   961  		return srv.(HookServiceServer).Hook(ctx, req.(*Empty))
   962  	}
   963  	return interceptor(ctx, in, info, handler)
   964  }
   965  
   966  func _HookService_SetReturnStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   967  	in := new(SetReturnStatusRequest)
   968  	if err := dec(in); err != nil {
   969  		return nil, err
   970  	}
   971  	if interceptor == nil {
   972  		return srv.(HookServiceServer).SetReturnStatus(ctx, in)
   973  	}
   974  	info := &grpc.UnaryServerInfo{
   975  		Server:     srv,
   976  		FullMethod: HookService_SetReturnStatus_FullMethodName,
   977  	}
   978  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   979  		return srv.(HookServiceServer).SetReturnStatus(ctx, req.(*SetReturnStatusRequest))
   980  	}
   981  	return interceptor(ctx, in, info, handler)
   982  }
   983  
   984  func _HookService_ClearReturnStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   985  	in := new(Empty)
   986  	if err := dec(in); err != nil {
   987  		return nil, err
   988  	}
   989  	if interceptor == nil {
   990  		return srv.(HookServiceServer).ClearReturnStatus(ctx, in)
   991  	}
   992  	info := &grpc.UnaryServerInfo{
   993  		Server:     srv,
   994  		FullMethod: HookService_ClearReturnStatus_FullMethodName,
   995  	}
   996  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   997  		return srv.(HookServiceServer).ClearReturnStatus(ctx, req.(*Empty))
   998  	}
   999  	return interceptor(ctx, in, info, handler)
  1000  }
  1001  
  1002  // HookService_ServiceDesc is the grpc.ServiceDesc for HookService service.
  1003  // It's only intended for direct use with grpc.RegisterService,
  1004  // and not to be introspected or modified (even as a copy)
  1005  var HookService_ServiceDesc = grpc.ServiceDesc{
  1006  	ServiceName: "grpc.testing.HookService",
  1007  	HandlerType: (*HookServiceServer)(nil),
  1008  	Methods: []grpc.MethodDesc{
  1009  		{
  1010  			MethodName: "Hook",
  1011  			Handler:    _HookService_Hook_Handler,
  1012  		},
  1013  		{
  1014  			MethodName: "SetReturnStatus",
  1015  			Handler:    _HookService_SetReturnStatus_Handler,
  1016  		},
  1017  		{
  1018  			MethodName: "ClearReturnStatus",
  1019  			Handler:    _HookService_ClearReturnStatus_Handler,
  1020  		},
  1021  	},
  1022  	Streams:  []grpc.StreamDesc{},
  1023  	Metadata: "grpc/testing/test.proto",
  1024  }
  1025  
  1026  const (
  1027  	XdsUpdateHealthService_SetServing_FullMethodName      = "/grpc.testing.XdsUpdateHealthService/SetServing"
  1028  	XdsUpdateHealthService_SetNotServing_FullMethodName   = "/grpc.testing.XdsUpdateHealthService/SetNotServing"
  1029  	XdsUpdateHealthService_SendHookRequest_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SendHookRequest"
  1030  )
  1031  
  1032  // XdsUpdateHealthServiceClient is the client API for XdsUpdateHealthService service.
  1033  //
  1034  // 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.
  1035  //
  1036  // A service to remotely control health status of an xDS test server.
  1037  type XdsUpdateHealthServiceClient interface {
  1038  	SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  1039  	SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  1040  	SendHookRequest(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*HookResponse, error)
  1041  }
  1042  
  1043  type xdsUpdateHealthServiceClient struct {
  1044  	cc grpc.ClientConnInterface
  1045  }
  1046  
  1047  func NewXdsUpdateHealthServiceClient(cc grpc.ClientConnInterface) XdsUpdateHealthServiceClient {
  1048  	return &xdsUpdateHealthServiceClient{cc}
  1049  }
  1050  
  1051  func (c *xdsUpdateHealthServiceClient) SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  1052  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  1053  	out := new(Empty)
  1054  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetServing_FullMethodName, in, out, cOpts...)
  1055  	if err != nil {
  1056  		return nil, err
  1057  	}
  1058  	return out, nil
  1059  }
  1060  
  1061  func (c *xdsUpdateHealthServiceClient) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  1062  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  1063  	out := new(Empty)
  1064  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetNotServing_FullMethodName, in, out, cOpts...)
  1065  	if err != nil {
  1066  		return nil, err
  1067  	}
  1068  	return out, nil
  1069  }
  1070  
  1071  func (c *xdsUpdateHealthServiceClient) SendHookRequest(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*HookResponse, error) {
  1072  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  1073  	out := new(HookResponse)
  1074  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SendHookRequest_FullMethodName, in, out, cOpts...)
  1075  	if err != nil {
  1076  		return nil, err
  1077  	}
  1078  	return out, nil
  1079  }
  1080  
  1081  // XdsUpdateHealthServiceServer is the server API for XdsUpdateHealthService service.
  1082  // All implementations must embed UnimplementedXdsUpdateHealthServiceServer
  1083  // for forward compatibility.
  1084  //
  1085  // A service to remotely control health status of an xDS test server.
  1086  type XdsUpdateHealthServiceServer interface {
  1087  	SetServing(context.Context, *Empty) (*Empty, error)
  1088  	SetNotServing(context.Context, *Empty) (*Empty, error)
  1089  	SendHookRequest(context.Context, *HookRequest) (*HookResponse, error)
  1090  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  1091  }
  1092  
  1093  // UnimplementedXdsUpdateHealthServiceServer must be embedded to have
  1094  // forward compatible implementations.
  1095  //
  1096  // NOTE: this should be embedded by value instead of pointer to avoid a nil
  1097  // pointer dereference when methods are called.
  1098  type UnimplementedXdsUpdateHealthServiceServer struct{}
  1099  
  1100  func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) {
  1101  	return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented")
  1102  }
  1103  func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) {
  1104  	return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented")
  1105  }
  1106  func (UnimplementedXdsUpdateHealthServiceServer) SendHookRequest(context.Context, *HookRequest) (*HookResponse, error) {
  1107  	return nil, status.Errorf(codes.Unimplemented, "method SendHookRequest not implemented")
  1108  }
  1109  func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() {
  1110  }
  1111  func (UnimplementedXdsUpdateHealthServiceServer) testEmbeddedByValue() {}
  1112  
  1113  // UnsafeXdsUpdateHealthServiceServer may be embedded to opt out of forward compatibility for this service.
  1114  // Use of this interface is not recommended, as added methods to XdsUpdateHealthServiceServer will
  1115  // result in compilation errors.
  1116  type UnsafeXdsUpdateHealthServiceServer interface {
  1117  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  1118  }
  1119  
  1120  func RegisterXdsUpdateHealthServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateHealthServiceServer) {
  1121  	// If the following call panics, it indicates UnimplementedXdsUpdateHealthServiceServer was
  1122  	// embedded by pointer and is nil.  This will cause panics if an
  1123  	// unimplemented method is ever invoked, so we test this at initialization
  1124  	// time to prevent it from happening at runtime later due to I/O.
  1125  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  1126  		t.testEmbeddedByValue()
  1127  	}
  1128  	s.RegisterService(&XdsUpdateHealthService_ServiceDesc, srv)
  1129  }
  1130  
  1131  func _XdsUpdateHealthService_SetServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1132  	in := new(Empty)
  1133  	if err := dec(in); err != nil {
  1134  		return nil, err
  1135  	}
  1136  	if interceptor == nil {
  1137  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, in)
  1138  	}
  1139  	info := &grpc.UnaryServerInfo{
  1140  		Server:     srv,
  1141  		FullMethod: XdsUpdateHealthService_SetServing_FullMethodName,
  1142  	}
  1143  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1144  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, req.(*Empty))
  1145  	}
  1146  	return interceptor(ctx, in, info, handler)
  1147  }
  1148  
  1149  func _XdsUpdateHealthService_SetNotServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1150  	in := new(Empty)
  1151  	if err := dec(in); err != nil {
  1152  		return nil, err
  1153  	}
  1154  	if interceptor == nil {
  1155  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, in)
  1156  	}
  1157  	info := &grpc.UnaryServerInfo{
  1158  		Server:     srv,
  1159  		FullMethod: XdsUpdateHealthService_SetNotServing_FullMethodName,
  1160  	}
  1161  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1162  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, req.(*Empty))
  1163  	}
  1164  	return interceptor(ctx, in, info, handler)
  1165  }
  1166  
  1167  func _XdsUpdateHealthService_SendHookRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1168  	in := new(HookRequest)
  1169  	if err := dec(in); err != nil {
  1170  		return nil, err
  1171  	}
  1172  	if interceptor == nil {
  1173  		return srv.(XdsUpdateHealthServiceServer).SendHookRequest(ctx, in)
  1174  	}
  1175  	info := &grpc.UnaryServerInfo{
  1176  		Server:     srv,
  1177  		FullMethod: XdsUpdateHealthService_SendHookRequest_FullMethodName,
  1178  	}
  1179  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1180  		return srv.(XdsUpdateHealthServiceServer).SendHookRequest(ctx, req.(*HookRequest))
  1181  	}
  1182  	return interceptor(ctx, in, info, handler)
  1183  }
  1184  
  1185  // XdsUpdateHealthService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateHealthService service.
  1186  // It's only intended for direct use with grpc.RegisterService,
  1187  // and not to be introspected or modified (even as a copy)
  1188  var XdsUpdateHealthService_ServiceDesc = grpc.ServiceDesc{
  1189  	ServiceName: "grpc.testing.XdsUpdateHealthService",
  1190  	HandlerType: (*XdsUpdateHealthServiceServer)(nil),
  1191  	Methods: []grpc.MethodDesc{
  1192  		{
  1193  			MethodName: "SetServing",
  1194  			Handler:    _XdsUpdateHealthService_SetServing_Handler,
  1195  		},
  1196  		{
  1197  			MethodName: "SetNotServing",
  1198  			Handler:    _XdsUpdateHealthService_SetNotServing_Handler,
  1199  		},
  1200  		{
  1201  			MethodName: "SendHookRequest",
  1202  			Handler:    _XdsUpdateHealthService_SendHookRequest_Handler,
  1203  		},
  1204  	},
  1205  	Streams:  []grpc.StreamDesc{},
  1206  	Metadata: "grpc/testing/test.proto",
  1207  }
  1208  
  1209  const (
  1210  	XdsUpdateClientConfigureService_Configure_FullMethodName = "/grpc.testing.XdsUpdateClientConfigureService/Configure"
  1211  )
  1212  
  1213  // XdsUpdateClientConfigureServiceClient is the client API for XdsUpdateClientConfigureService service.
  1214  //
  1215  // 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.
  1216  //
  1217  // A service to dynamically update the configuration of an xDS test client.
  1218  type XdsUpdateClientConfigureServiceClient interface {
  1219  	// Update the tes client's configuration.
  1220  	Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error)
  1221  }
  1222  
  1223  type xdsUpdateClientConfigureServiceClient struct {
  1224  	cc grpc.ClientConnInterface
  1225  }
  1226  
  1227  func NewXdsUpdateClientConfigureServiceClient(cc grpc.ClientConnInterface) XdsUpdateClientConfigureServiceClient {
  1228  	return &xdsUpdateClientConfigureServiceClient{cc}
  1229  }
  1230  
  1231  func (c *xdsUpdateClientConfigureServiceClient) Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) {
  1232  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  1233  	out := new(ClientConfigureResponse)
  1234  	err := c.cc.Invoke(ctx, XdsUpdateClientConfigureService_Configure_FullMethodName, in, out, cOpts...)
  1235  	if err != nil {
  1236  		return nil, err
  1237  	}
  1238  	return out, nil
  1239  }
  1240  
  1241  // XdsUpdateClientConfigureServiceServer is the server API for XdsUpdateClientConfigureService service.
  1242  // All implementations must embed UnimplementedXdsUpdateClientConfigureServiceServer
  1243  // for forward compatibility.
  1244  //
  1245  // A service to dynamically update the configuration of an xDS test client.
  1246  type XdsUpdateClientConfigureServiceServer interface {
  1247  	// Update the tes client's configuration.
  1248  	Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error)
  1249  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1250  }
  1251  
  1252  // UnimplementedXdsUpdateClientConfigureServiceServer must be embedded to have
  1253  // forward compatible implementations.
  1254  //
  1255  // NOTE: this should be embedded by value instead of pointer to avoid a nil
  1256  // pointer dereference when methods are called.
  1257  type UnimplementedXdsUpdateClientConfigureServiceServer struct{}
  1258  
  1259  func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) {
  1260  	return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
  1261  }
  1262  func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() {
  1263  }
  1264  func (UnimplementedXdsUpdateClientConfigureServiceServer) testEmbeddedByValue() {}
  1265  
  1266  // UnsafeXdsUpdateClientConfigureServiceServer may be embedded to opt out of forward compatibility for this service.
  1267  // Use of this interface is not recommended, as added methods to XdsUpdateClientConfigureServiceServer will
  1268  // result in compilation errors.
  1269  type UnsafeXdsUpdateClientConfigureServiceServer interface {
  1270  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1271  }
  1272  
  1273  func RegisterXdsUpdateClientConfigureServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateClientConfigureServiceServer) {
  1274  	// If the following call panics, it indicates UnimplementedXdsUpdateClientConfigureServiceServer was
  1275  	// embedded by pointer and is nil.  This will cause panics if an
  1276  	// unimplemented method is ever invoked, so we test this at initialization
  1277  	// time to prevent it from happening at runtime later due to I/O.
  1278  	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  1279  		t.testEmbeddedByValue()
  1280  	}
  1281  	s.RegisterService(&XdsUpdateClientConfigureService_ServiceDesc, srv)
  1282  }
  1283  
  1284  func _XdsUpdateClientConfigureService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1285  	in := new(ClientConfigureRequest)
  1286  	if err := dec(in); err != nil {
  1287  		return nil, err
  1288  	}
  1289  	if interceptor == nil {
  1290  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, in)
  1291  	}
  1292  	info := &grpc.UnaryServerInfo{
  1293  		Server:     srv,
  1294  		FullMethod: XdsUpdateClientConfigureService_Configure_FullMethodName,
  1295  	}
  1296  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1297  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, req.(*ClientConfigureRequest))
  1298  	}
  1299  	return interceptor(ctx, in, info, handler)
  1300  }
  1301  
  1302  // XdsUpdateClientConfigureService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateClientConfigureService service.
  1303  // It's only intended for direct use with grpc.RegisterService,
  1304  // and not to be introspected or modified (even as a copy)
  1305  var XdsUpdateClientConfigureService_ServiceDesc = grpc.ServiceDesc{
  1306  	ServiceName: "grpc.testing.XdsUpdateClientConfigureService",
  1307  	HandlerType: (*XdsUpdateClientConfigureServiceServer)(nil),
  1308  	Methods: []grpc.MethodDesc{
  1309  		{
  1310  			MethodName: "Configure",
  1311  			Handler:    _XdsUpdateClientConfigureService_Configure_Handler,
  1312  		},
  1313  	},
  1314  	Streams:  []grpc.StreamDesc{},
  1315  	Metadata: "grpc/testing/test.proto",
  1316  }