github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/interop/grpc_testing/test_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             v3.14.0
     5  // source: grpc/testing/test.proto
     6  
     7  package grpc_testing
     8  
     9  import (
    10  	context "context"
    11  	grpc "github.com/hxx258456/ccgo/grpc"
    12  	codes "github.com/hxx258456/ccgo/grpc/codes"
    13  	status "github.com/hxx258456/ccgo/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  // TestServiceClient is the client API for TestService service.
    22  //
    23  // 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.
    24  type TestServiceClient interface {
    25  	// One empty request followed by one empty response.
    26  	EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    27  	// One request followed by one response.
    28  	UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    29  	// One request followed by one response. Response has cache control
    30  	// headers set such that a caching HTTP proxy (such as GFE) can
    31  	// satisfy subsequent requests.
    32  	CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    33  	// One request followed by a sequence of responses (streamed download).
    34  	// The server returns the payload with client desired type and sizes.
    35  	StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error)
    36  	// A sequence of requests followed by one response (streamed upload).
    37  	// The server returns the aggregated size of client payload as the result.
    38  	StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error)
    39  	// A sequence of requests with each request served by the server immediately.
    40  	// As one request could lead to multiple responses, this interface
    41  	// demonstrates the idea of full duplexing.
    42  	FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error)
    43  	// A sequence of requests followed by a sequence of responses.
    44  	// The server buffers all the client requests and then serves them in order. A
    45  	// stream of responses are returned to the client when the server starts with
    46  	// first request.
    47  	HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error)
    48  	// The test server will not implement this method. It will be used
    49  	// to test the behavior when clients call unimplemented methods.
    50  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    51  }
    52  
    53  type testServiceClient struct {
    54  	cc grpc.ClientConnInterface
    55  }
    56  
    57  func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
    58  	return &testServiceClient{cc}
    59  }
    60  
    61  func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
    62  	out := new(Empty)
    63  	err := c.cc.Invoke(ctx, "/grpc.testing.TestService/EmptyCall", in, out, opts...)
    64  	if err != nil {
    65  		return nil, err
    66  	}
    67  	return out, nil
    68  }
    69  
    70  func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
    71  	out := new(SimpleResponse)
    72  	err := c.cc.Invoke(ctx, "/grpc.testing.TestService/UnaryCall", in, out, opts...)
    73  	if err != nil {
    74  		return nil, err
    75  	}
    76  	return out, nil
    77  }
    78  
    79  func (c *testServiceClient) CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
    80  	out := new(SimpleResponse)
    81  	err := c.cc.Invoke(ctx, "/grpc.testing.TestService/CacheableUnaryCall", in, out, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return out, nil
    86  }
    87  
    88  func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) {
    89  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], "/grpc.testing.TestService/StreamingOutputCall", opts...)
    90  	if err != nil {
    91  		return nil, err
    92  	}
    93  	x := &testServiceStreamingOutputCallClient{stream}
    94  	if err := x.ClientStream.SendMsg(in); err != nil {
    95  		return nil, err
    96  	}
    97  	if err := x.ClientStream.CloseSend(); err != nil {
    98  		return nil, err
    99  	}
   100  	return x, nil
   101  }
   102  
   103  type TestService_StreamingOutputCallClient interface {
   104  	Recv() (*StreamingOutputCallResponse, error)
   105  	grpc.ClientStream
   106  }
   107  
   108  type testServiceStreamingOutputCallClient struct {
   109  	grpc.ClientStream
   110  }
   111  
   112  func (x *testServiceStreamingOutputCallClient) Recv() (*StreamingOutputCallResponse, error) {
   113  	m := new(StreamingOutputCallResponse)
   114  	if err := x.ClientStream.RecvMsg(m); err != nil {
   115  		return nil, err
   116  	}
   117  	return m, nil
   118  }
   119  
   120  func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) {
   121  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], "/grpc.testing.TestService/StreamingInputCall", opts...)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	x := &testServiceStreamingInputCallClient{stream}
   126  	return x, nil
   127  }
   128  
   129  type TestService_StreamingInputCallClient interface {
   130  	Send(*StreamingInputCallRequest) error
   131  	CloseAndRecv() (*StreamingInputCallResponse, error)
   132  	grpc.ClientStream
   133  }
   134  
   135  type testServiceStreamingInputCallClient struct {
   136  	grpc.ClientStream
   137  }
   138  
   139  func (x *testServiceStreamingInputCallClient) Send(m *StreamingInputCallRequest) error {
   140  	return x.ClientStream.SendMsg(m)
   141  }
   142  
   143  func (x *testServiceStreamingInputCallClient) CloseAndRecv() (*StreamingInputCallResponse, error) {
   144  	if err := x.ClientStream.CloseSend(); err != nil {
   145  		return nil, err
   146  	}
   147  	m := new(StreamingInputCallResponse)
   148  	if err := x.ClientStream.RecvMsg(m); err != nil {
   149  		return nil, err
   150  	}
   151  	return m, nil
   152  }
   153  
   154  func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) {
   155  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], "/grpc.testing.TestService/FullDuplexCall", opts...)
   156  	if err != nil {
   157  		return nil, err
   158  	}
   159  	x := &testServiceFullDuplexCallClient{stream}
   160  	return x, nil
   161  }
   162  
   163  type TestService_FullDuplexCallClient interface {
   164  	Send(*StreamingOutputCallRequest) error
   165  	Recv() (*StreamingOutputCallResponse, error)
   166  	grpc.ClientStream
   167  }
   168  
   169  type testServiceFullDuplexCallClient struct {
   170  	grpc.ClientStream
   171  }
   172  
   173  func (x *testServiceFullDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
   174  	return x.ClientStream.SendMsg(m)
   175  }
   176  
   177  func (x *testServiceFullDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
   178  	m := new(StreamingOutputCallResponse)
   179  	if err := x.ClientStream.RecvMsg(m); err != nil {
   180  		return nil, err
   181  	}
   182  	return m, nil
   183  }
   184  
   185  func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) {
   186  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[3], "/grpc.testing.TestService/HalfDuplexCall", opts...)
   187  	if err != nil {
   188  		return nil, err
   189  	}
   190  	x := &testServiceHalfDuplexCallClient{stream}
   191  	return x, nil
   192  }
   193  
   194  type TestService_HalfDuplexCallClient interface {
   195  	Send(*StreamingOutputCallRequest) error
   196  	Recv() (*StreamingOutputCallResponse, error)
   197  	grpc.ClientStream
   198  }
   199  
   200  type testServiceHalfDuplexCallClient struct {
   201  	grpc.ClientStream
   202  }
   203  
   204  func (x *testServiceHalfDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
   205  	return x.ClientStream.SendMsg(m)
   206  }
   207  
   208  func (x *testServiceHalfDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
   209  	m := new(StreamingOutputCallResponse)
   210  	if err := x.ClientStream.RecvMsg(m); err != nil {
   211  		return nil, err
   212  	}
   213  	return m, nil
   214  }
   215  
   216  func (c *testServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   217  	out := new(Empty)
   218  	err := c.cc.Invoke(ctx, "/grpc.testing.TestService/UnimplementedCall", in, out, opts...)
   219  	if err != nil {
   220  		return nil, err
   221  	}
   222  	return out, nil
   223  }
   224  
   225  // TestServiceServer is the server API for TestService service.
   226  // All implementations must embed UnimplementedTestServiceServer
   227  // for forward compatibility
   228  type TestServiceServer interface {
   229  	// One empty request followed by one empty response.
   230  	EmptyCall(context.Context, *Empty) (*Empty, error)
   231  	// One request followed by one response.
   232  	UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   233  	// One request followed by one response. Response has cache control
   234  	// headers set such that a caching HTTP proxy (such as GFE) can
   235  	// satisfy subsequent requests.
   236  	CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   237  	// One request followed by a sequence of responses (streamed download).
   238  	// The server returns the payload with client desired type and sizes.
   239  	StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error
   240  	// A sequence of requests followed by one response (streamed upload).
   241  	// The server returns the aggregated size of client payload as the result.
   242  	StreamingInputCall(TestService_StreamingInputCallServer) error
   243  	// A sequence of requests with each request served by the server immediately.
   244  	// As one request could lead to multiple responses, this interface
   245  	// demonstrates the idea of full duplexing.
   246  	FullDuplexCall(TestService_FullDuplexCallServer) error
   247  	// A sequence of requests followed by a sequence of responses.
   248  	// The server buffers all the client requests and then serves them in order. A
   249  	// stream of responses are returned to the client when the server starts with
   250  	// first request.
   251  	HalfDuplexCall(TestService_HalfDuplexCallServer) error
   252  	// The test server will not implement this method. It will be used
   253  	// to test the behavior when clients call unimplemented methods.
   254  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   255  	mustEmbedUnimplementedTestServiceServer()
   256  }
   257  
   258  // UnimplementedTestServiceServer must be embedded to have forward compatible implementations.
   259  type UnimplementedTestServiceServer struct {
   260  }
   261  
   262  func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) {
   263  	return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented")
   264  }
   265  func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   266  	return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented")
   267  }
   268  func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   269  	return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented")
   270  }
   271  func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error {
   272  	return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented")
   273  }
   274  func (UnimplementedTestServiceServer) StreamingInputCall(TestService_StreamingInputCallServer) error {
   275  	return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented")
   276  }
   277  func (UnimplementedTestServiceServer) FullDuplexCall(TestService_FullDuplexCallServer) error {
   278  	return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented")
   279  }
   280  func (UnimplementedTestServiceServer) HalfDuplexCall(TestService_HalfDuplexCallServer) error {
   281  	return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented")
   282  }
   283  func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   284  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   285  }
   286  func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {}
   287  
   288  // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
   289  // Use of this interface is not recommended, as added methods to TestServiceServer will
   290  // result in compilation errors.
   291  type UnsafeTestServiceServer interface {
   292  	mustEmbedUnimplementedTestServiceServer()
   293  }
   294  
   295  func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
   296  	s.RegisterService(&TestService_ServiceDesc, srv)
   297  }
   298  
   299  func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   300  	in := new(Empty)
   301  	if err := dec(in); err != nil {
   302  		return nil, err
   303  	}
   304  	if interceptor == nil {
   305  		return srv.(TestServiceServer).EmptyCall(ctx, in)
   306  	}
   307  	info := &grpc.UnaryServerInfo{
   308  		Server:     srv,
   309  		FullMethod: "/grpc.testing.TestService/EmptyCall",
   310  	}
   311  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   312  		return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
   313  	}
   314  	return interceptor(ctx, in, info, handler)
   315  }
   316  
   317  func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   318  	in := new(SimpleRequest)
   319  	if err := dec(in); err != nil {
   320  		return nil, err
   321  	}
   322  	if interceptor == nil {
   323  		return srv.(TestServiceServer).UnaryCall(ctx, in)
   324  	}
   325  	info := &grpc.UnaryServerInfo{
   326  		Server:     srv,
   327  		FullMethod: "/grpc.testing.TestService/UnaryCall",
   328  	}
   329  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   330  		return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
   331  	}
   332  	return interceptor(ctx, in, info, handler)
   333  }
   334  
   335  func _TestService_CacheableUnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   336  	in := new(SimpleRequest)
   337  	if err := dec(in); err != nil {
   338  		return nil, err
   339  	}
   340  	if interceptor == nil {
   341  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, in)
   342  	}
   343  	info := &grpc.UnaryServerInfo{
   344  		Server:     srv,
   345  		FullMethod: "/grpc.testing.TestService/CacheableUnaryCall",
   346  	}
   347  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   348  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, req.(*SimpleRequest))
   349  	}
   350  	return interceptor(ctx, in, info, handler)
   351  }
   352  
   353  func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   354  	m := new(StreamingOutputCallRequest)
   355  	if err := stream.RecvMsg(m); err != nil {
   356  		return err
   357  	}
   358  	return srv.(TestServiceServer).StreamingOutputCall(m, &testServiceStreamingOutputCallServer{stream})
   359  }
   360  
   361  type TestService_StreamingOutputCallServer interface {
   362  	Send(*StreamingOutputCallResponse) error
   363  	grpc.ServerStream
   364  }
   365  
   366  type testServiceStreamingOutputCallServer struct {
   367  	grpc.ServerStream
   368  }
   369  
   370  func (x *testServiceStreamingOutputCallServer) Send(m *StreamingOutputCallResponse) error {
   371  	return x.ServerStream.SendMsg(m)
   372  }
   373  
   374  func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   375  	return srv.(TestServiceServer).StreamingInputCall(&testServiceStreamingInputCallServer{stream})
   376  }
   377  
   378  type TestService_StreamingInputCallServer interface {
   379  	SendAndClose(*StreamingInputCallResponse) error
   380  	Recv() (*StreamingInputCallRequest, error)
   381  	grpc.ServerStream
   382  }
   383  
   384  type testServiceStreamingInputCallServer struct {
   385  	grpc.ServerStream
   386  }
   387  
   388  func (x *testServiceStreamingInputCallServer) SendAndClose(m *StreamingInputCallResponse) error {
   389  	return x.ServerStream.SendMsg(m)
   390  }
   391  
   392  func (x *testServiceStreamingInputCallServer) Recv() (*StreamingInputCallRequest, error) {
   393  	m := new(StreamingInputCallRequest)
   394  	if err := x.ServerStream.RecvMsg(m); err != nil {
   395  		return nil, err
   396  	}
   397  	return m, nil
   398  }
   399  
   400  func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   401  	return srv.(TestServiceServer).FullDuplexCall(&testServiceFullDuplexCallServer{stream})
   402  }
   403  
   404  type TestService_FullDuplexCallServer interface {
   405  	Send(*StreamingOutputCallResponse) error
   406  	Recv() (*StreamingOutputCallRequest, error)
   407  	grpc.ServerStream
   408  }
   409  
   410  type testServiceFullDuplexCallServer struct {
   411  	grpc.ServerStream
   412  }
   413  
   414  func (x *testServiceFullDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
   415  	return x.ServerStream.SendMsg(m)
   416  }
   417  
   418  func (x *testServiceFullDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
   419  	m := new(StreamingOutputCallRequest)
   420  	if err := x.ServerStream.RecvMsg(m); err != nil {
   421  		return nil, err
   422  	}
   423  	return m, nil
   424  }
   425  
   426  func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   427  	return srv.(TestServiceServer).HalfDuplexCall(&testServiceHalfDuplexCallServer{stream})
   428  }
   429  
   430  type TestService_HalfDuplexCallServer interface {
   431  	Send(*StreamingOutputCallResponse) error
   432  	Recv() (*StreamingOutputCallRequest, error)
   433  	grpc.ServerStream
   434  }
   435  
   436  type testServiceHalfDuplexCallServer struct {
   437  	grpc.ServerStream
   438  }
   439  
   440  func (x *testServiceHalfDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
   441  	return x.ServerStream.SendMsg(m)
   442  }
   443  
   444  func (x *testServiceHalfDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
   445  	m := new(StreamingOutputCallRequest)
   446  	if err := x.ServerStream.RecvMsg(m); err != nil {
   447  		return nil, err
   448  	}
   449  	return m, nil
   450  }
   451  
   452  func _TestService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   453  	in := new(Empty)
   454  	if err := dec(in); err != nil {
   455  		return nil, err
   456  	}
   457  	if interceptor == nil {
   458  		return srv.(TestServiceServer).UnimplementedCall(ctx, in)
   459  	}
   460  	info := &grpc.UnaryServerInfo{
   461  		Server:     srv,
   462  		FullMethod: "/grpc.testing.TestService/UnimplementedCall",
   463  	}
   464  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   465  		return srv.(TestServiceServer).UnimplementedCall(ctx, req.(*Empty))
   466  	}
   467  	return interceptor(ctx, in, info, handler)
   468  }
   469  
   470  // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
   471  // It's only intended for direct use with grpc.RegisterService,
   472  // and not to be introspected or modified (even as a copy)
   473  var TestService_ServiceDesc = grpc.ServiceDesc{
   474  	ServiceName: "grpc.testing.TestService",
   475  	HandlerType: (*TestServiceServer)(nil),
   476  	Methods: []grpc.MethodDesc{
   477  		{
   478  			MethodName: "EmptyCall",
   479  			Handler:    _TestService_EmptyCall_Handler,
   480  		},
   481  		{
   482  			MethodName: "UnaryCall",
   483  			Handler:    _TestService_UnaryCall_Handler,
   484  		},
   485  		{
   486  			MethodName: "CacheableUnaryCall",
   487  			Handler:    _TestService_CacheableUnaryCall_Handler,
   488  		},
   489  		{
   490  			MethodName: "UnimplementedCall",
   491  			Handler:    _TestService_UnimplementedCall_Handler,
   492  		},
   493  	},
   494  	Streams: []grpc.StreamDesc{
   495  		{
   496  			StreamName:    "StreamingOutputCall",
   497  			Handler:       _TestService_StreamingOutputCall_Handler,
   498  			ServerStreams: true,
   499  		},
   500  		{
   501  			StreamName:    "StreamingInputCall",
   502  			Handler:       _TestService_StreamingInputCall_Handler,
   503  			ClientStreams: true,
   504  		},
   505  		{
   506  			StreamName:    "FullDuplexCall",
   507  			Handler:       _TestService_FullDuplexCall_Handler,
   508  			ServerStreams: true,
   509  			ClientStreams: true,
   510  		},
   511  		{
   512  			StreamName:    "HalfDuplexCall",
   513  			Handler:       _TestService_HalfDuplexCall_Handler,
   514  			ServerStreams: true,
   515  			ClientStreams: true,
   516  		},
   517  	},
   518  	Metadata: "grpc/testing/test.proto",
   519  }
   520  
   521  // UnimplementedServiceClient is the client API for UnimplementedService service.
   522  //
   523  // 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.
   524  type UnimplementedServiceClient interface {
   525  	// A call that no server should implement
   526  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   527  }
   528  
   529  type unimplementedServiceClient struct {
   530  	cc grpc.ClientConnInterface
   531  }
   532  
   533  func NewUnimplementedServiceClient(cc grpc.ClientConnInterface) UnimplementedServiceClient {
   534  	return &unimplementedServiceClient{cc}
   535  }
   536  
   537  func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   538  	out := new(Empty)
   539  	err := c.cc.Invoke(ctx, "/grpc.testing.UnimplementedService/UnimplementedCall", in, out, opts...)
   540  	if err != nil {
   541  		return nil, err
   542  	}
   543  	return out, nil
   544  }
   545  
   546  // UnimplementedServiceServer is the server API for UnimplementedService service.
   547  // All implementations must embed UnimplementedUnimplementedServiceServer
   548  // for forward compatibility
   549  type UnimplementedServiceServer interface {
   550  	// A call that no server should implement
   551  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   552  	mustEmbedUnimplementedUnimplementedServiceServer()
   553  }
   554  
   555  // UnimplementedUnimplementedServiceServer must be embedded to have forward compatible implementations.
   556  type UnimplementedUnimplementedServiceServer struct {
   557  }
   558  
   559  func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   560  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   561  }
   562  func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {}
   563  
   564  // UnsafeUnimplementedServiceServer may be embedded to opt out of forward compatibility for this service.
   565  // Use of this interface is not recommended, as added methods to UnimplementedServiceServer will
   566  // result in compilation errors.
   567  type UnsafeUnimplementedServiceServer interface {
   568  	mustEmbedUnimplementedUnimplementedServiceServer()
   569  }
   570  
   571  func RegisterUnimplementedServiceServer(s grpc.ServiceRegistrar, srv UnimplementedServiceServer) {
   572  	s.RegisterService(&UnimplementedService_ServiceDesc, srv)
   573  }
   574  
   575  func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   576  	in := new(Empty)
   577  	if err := dec(in); err != nil {
   578  		return nil, err
   579  	}
   580  	if interceptor == nil {
   581  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in)
   582  	}
   583  	info := &grpc.UnaryServerInfo{
   584  		Server:     srv,
   585  		FullMethod: "/grpc.testing.UnimplementedService/UnimplementedCall",
   586  	}
   587  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   588  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty))
   589  	}
   590  	return interceptor(ctx, in, info, handler)
   591  }
   592  
   593  // UnimplementedService_ServiceDesc is the grpc.ServiceDesc for UnimplementedService service.
   594  // It's only intended for direct use with grpc.RegisterService,
   595  // and not to be introspected or modified (even as a copy)
   596  var UnimplementedService_ServiceDesc = grpc.ServiceDesc{
   597  	ServiceName: "grpc.testing.UnimplementedService",
   598  	HandlerType: (*UnimplementedServiceServer)(nil),
   599  	Methods: []grpc.MethodDesc{
   600  		{
   601  			MethodName: "UnimplementedCall",
   602  			Handler:    _UnimplementedService_UnimplementedCall_Handler,
   603  		},
   604  	},
   605  	Streams:  []grpc.StreamDesc{},
   606  	Metadata: "grpc/testing/test.proto",
   607  }
   608  
   609  // ReconnectServiceClient is the client API for ReconnectService service.
   610  //
   611  // 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.
   612  type ReconnectServiceClient interface {
   613  	Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error)
   614  	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error)
   615  }
   616  
   617  type reconnectServiceClient struct {
   618  	cc grpc.ClientConnInterface
   619  }
   620  
   621  func NewReconnectServiceClient(cc grpc.ClientConnInterface) ReconnectServiceClient {
   622  	return &reconnectServiceClient{cc}
   623  }
   624  
   625  func (c *reconnectServiceClient) Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) {
   626  	out := new(Empty)
   627  	err := c.cc.Invoke(ctx, "/grpc.testing.ReconnectService/Start", in, out, opts...)
   628  	if err != nil {
   629  		return nil, err
   630  	}
   631  	return out, nil
   632  }
   633  
   634  func (c *reconnectServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) {
   635  	out := new(ReconnectInfo)
   636  	err := c.cc.Invoke(ctx, "/grpc.testing.ReconnectService/Stop", in, out, opts...)
   637  	if err != nil {
   638  		return nil, err
   639  	}
   640  	return out, nil
   641  }
   642  
   643  // ReconnectServiceServer is the server API for ReconnectService service.
   644  // All implementations must embed UnimplementedReconnectServiceServer
   645  // for forward compatibility
   646  type ReconnectServiceServer interface {
   647  	Start(context.Context, *ReconnectParams) (*Empty, error)
   648  	Stop(context.Context, *Empty) (*ReconnectInfo, error)
   649  	mustEmbedUnimplementedReconnectServiceServer()
   650  }
   651  
   652  // UnimplementedReconnectServiceServer must be embedded to have forward compatible implementations.
   653  type UnimplementedReconnectServiceServer struct {
   654  }
   655  
   656  func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) {
   657  	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
   658  }
   659  func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) {
   660  	return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
   661  }
   662  func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {}
   663  
   664  // UnsafeReconnectServiceServer may be embedded to opt out of forward compatibility for this service.
   665  // Use of this interface is not recommended, as added methods to ReconnectServiceServer will
   666  // result in compilation errors.
   667  type UnsafeReconnectServiceServer interface {
   668  	mustEmbedUnimplementedReconnectServiceServer()
   669  }
   670  
   671  func RegisterReconnectServiceServer(s grpc.ServiceRegistrar, srv ReconnectServiceServer) {
   672  	s.RegisterService(&ReconnectService_ServiceDesc, srv)
   673  }
   674  
   675  func _ReconnectService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   676  	in := new(ReconnectParams)
   677  	if err := dec(in); err != nil {
   678  		return nil, err
   679  	}
   680  	if interceptor == nil {
   681  		return srv.(ReconnectServiceServer).Start(ctx, in)
   682  	}
   683  	info := &grpc.UnaryServerInfo{
   684  		Server:     srv,
   685  		FullMethod: "/grpc.testing.ReconnectService/Start",
   686  	}
   687  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   688  		return srv.(ReconnectServiceServer).Start(ctx, req.(*ReconnectParams))
   689  	}
   690  	return interceptor(ctx, in, info, handler)
   691  }
   692  
   693  func _ReconnectService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   694  	in := new(Empty)
   695  	if err := dec(in); err != nil {
   696  		return nil, err
   697  	}
   698  	if interceptor == nil {
   699  		return srv.(ReconnectServiceServer).Stop(ctx, in)
   700  	}
   701  	info := &grpc.UnaryServerInfo{
   702  		Server:     srv,
   703  		FullMethod: "/grpc.testing.ReconnectService/Stop",
   704  	}
   705  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   706  		return srv.(ReconnectServiceServer).Stop(ctx, req.(*Empty))
   707  	}
   708  	return interceptor(ctx, in, info, handler)
   709  }
   710  
   711  // ReconnectService_ServiceDesc is the grpc.ServiceDesc for ReconnectService service.
   712  // It's only intended for direct use with grpc.RegisterService,
   713  // and not to be introspected or modified (even as a copy)
   714  var ReconnectService_ServiceDesc = grpc.ServiceDesc{
   715  	ServiceName: "grpc.testing.ReconnectService",
   716  	HandlerType: (*ReconnectServiceServer)(nil),
   717  	Methods: []grpc.MethodDesc{
   718  		{
   719  			MethodName: "Start",
   720  			Handler:    _ReconnectService_Start_Handler,
   721  		},
   722  		{
   723  			MethodName: "Stop",
   724  			Handler:    _ReconnectService_Stop_Handler,
   725  		},
   726  	},
   727  	Streams:  []grpc.StreamDesc{},
   728  	Metadata: "grpc/testing/test.proto",
   729  }
   730  
   731  // LoadBalancerStatsServiceClient is the client API for LoadBalancerStatsService service.
   732  //
   733  // 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.
   734  type LoadBalancerStatsServiceClient interface {
   735  	// Gets the backend distribution for RPCs sent by a test client.
   736  	GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error)
   737  	// Gets the accumulated stats for RPCs sent by a test client.
   738  	GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error)
   739  }
   740  
   741  type loadBalancerStatsServiceClient struct {
   742  	cc grpc.ClientConnInterface
   743  }
   744  
   745  func NewLoadBalancerStatsServiceClient(cc grpc.ClientConnInterface) LoadBalancerStatsServiceClient {
   746  	return &loadBalancerStatsServiceClient{cc}
   747  }
   748  
   749  func (c *loadBalancerStatsServiceClient) GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) {
   750  	out := new(LoadBalancerStatsResponse)
   751  	err := c.cc.Invoke(ctx, "/grpc.testing.LoadBalancerStatsService/GetClientStats", in, out, opts...)
   752  	if err != nil {
   753  		return nil, err
   754  	}
   755  	return out, nil
   756  }
   757  
   758  func (c *loadBalancerStatsServiceClient) GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) {
   759  	out := new(LoadBalancerAccumulatedStatsResponse)
   760  	err := c.cc.Invoke(ctx, "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats", in, out, opts...)
   761  	if err != nil {
   762  		return nil, err
   763  	}
   764  	return out, nil
   765  }
   766  
   767  // LoadBalancerStatsServiceServer is the server API for LoadBalancerStatsService service.
   768  // All implementations must embed UnimplementedLoadBalancerStatsServiceServer
   769  // for forward compatibility
   770  type LoadBalancerStatsServiceServer interface {
   771  	// Gets the backend distribution for RPCs sent by a test client.
   772  	GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error)
   773  	// Gets the accumulated stats for RPCs sent by a test client.
   774  	GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error)
   775  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   776  }
   777  
   778  // UnimplementedLoadBalancerStatsServiceServer must be embedded to have forward compatible implementations.
   779  type UnimplementedLoadBalancerStatsServiceServer struct {
   780  }
   781  
   782  func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) {
   783  	return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented")
   784  }
   785  func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) {
   786  	return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented")
   787  }
   788  func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() {
   789  }
   790  
   791  // UnsafeLoadBalancerStatsServiceServer may be embedded to opt out of forward compatibility for this service.
   792  // Use of this interface is not recommended, as added methods to LoadBalancerStatsServiceServer will
   793  // result in compilation errors.
   794  type UnsafeLoadBalancerStatsServiceServer interface {
   795  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   796  }
   797  
   798  func RegisterLoadBalancerStatsServiceServer(s grpc.ServiceRegistrar, srv LoadBalancerStatsServiceServer) {
   799  	s.RegisterService(&LoadBalancerStatsService_ServiceDesc, srv)
   800  }
   801  
   802  func _LoadBalancerStatsService_GetClientStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   803  	in := new(LoadBalancerStatsRequest)
   804  	if err := dec(in); err != nil {
   805  		return nil, err
   806  	}
   807  	if interceptor == nil {
   808  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, in)
   809  	}
   810  	info := &grpc.UnaryServerInfo{
   811  		Server:     srv,
   812  		FullMethod: "/grpc.testing.LoadBalancerStatsService/GetClientStats",
   813  	}
   814  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   815  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, req.(*LoadBalancerStatsRequest))
   816  	}
   817  	return interceptor(ctx, in, info, handler)
   818  }
   819  
   820  func _LoadBalancerStatsService_GetClientAccumulatedStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   821  	in := new(LoadBalancerAccumulatedStatsRequest)
   822  	if err := dec(in); err != nil {
   823  		return nil, err
   824  	}
   825  	if interceptor == nil {
   826  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, in)
   827  	}
   828  	info := &grpc.UnaryServerInfo{
   829  		Server:     srv,
   830  		FullMethod: "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats",
   831  	}
   832  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   833  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, req.(*LoadBalancerAccumulatedStatsRequest))
   834  	}
   835  	return interceptor(ctx, in, info, handler)
   836  }
   837  
   838  // LoadBalancerStatsService_ServiceDesc is the grpc.ServiceDesc for LoadBalancerStatsService service.
   839  // It's only intended for direct use with grpc.RegisterService,
   840  // and not to be introspected or modified (even as a copy)
   841  var LoadBalancerStatsService_ServiceDesc = grpc.ServiceDesc{
   842  	ServiceName: "grpc.testing.LoadBalancerStatsService",
   843  	HandlerType: (*LoadBalancerStatsServiceServer)(nil),
   844  	Methods: []grpc.MethodDesc{
   845  		{
   846  			MethodName: "GetClientStats",
   847  			Handler:    _LoadBalancerStatsService_GetClientStats_Handler,
   848  		},
   849  		{
   850  			MethodName: "GetClientAccumulatedStats",
   851  			Handler:    _LoadBalancerStatsService_GetClientAccumulatedStats_Handler,
   852  		},
   853  	},
   854  	Streams:  []grpc.StreamDesc{},
   855  	Metadata: "grpc/testing/test.proto",
   856  }
   857  
   858  // XdsUpdateHealthServiceClient is the client API for XdsUpdateHealthService service.
   859  //
   860  // 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.
   861  type XdsUpdateHealthServiceClient interface {
   862  	SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   863  	SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   864  }
   865  
   866  type xdsUpdateHealthServiceClient struct {
   867  	cc grpc.ClientConnInterface
   868  }
   869  
   870  func NewXdsUpdateHealthServiceClient(cc grpc.ClientConnInterface) XdsUpdateHealthServiceClient {
   871  	return &xdsUpdateHealthServiceClient{cc}
   872  }
   873  
   874  func (c *xdsUpdateHealthServiceClient) SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   875  	out := new(Empty)
   876  	err := c.cc.Invoke(ctx, "/grpc.testing.XdsUpdateHealthService/SetServing", in, out, opts...)
   877  	if err != nil {
   878  		return nil, err
   879  	}
   880  	return out, nil
   881  }
   882  
   883  func (c *xdsUpdateHealthServiceClient) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   884  	out := new(Empty)
   885  	err := c.cc.Invoke(ctx, "/grpc.testing.XdsUpdateHealthService/SetNotServing", in, out, opts...)
   886  	if err != nil {
   887  		return nil, err
   888  	}
   889  	return out, nil
   890  }
   891  
   892  // XdsUpdateHealthServiceServer is the server API for XdsUpdateHealthService service.
   893  // All implementations must embed UnimplementedXdsUpdateHealthServiceServer
   894  // for forward compatibility
   895  type XdsUpdateHealthServiceServer interface {
   896  	SetServing(context.Context, *Empty) (*Empty, error)
   897  	SetNotServing(context.Context, *Empty) (*Empty, error)
   898  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
   899  }
   900  
   901  // UnimplementedXdsUpdateHealthServiceServer must be embedded to have forward compatible implementations.
   902  type UnimplementedXdsUpdateHealthServiceServer struct {
   903  }
   904  
   905  func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) {
   906  	return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented")
   907  }
   908  func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) {
   909  	return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented")
   910  }
   911  func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() {
   912  }
   913  
   914  // UnsafeXdsUpdateHealthServiceServer may be embedded to opt out of forward compatibility for this service.
   915  // Use of this interface is not recommended, as added methods to XdsUpdateHealthServiceServer will
   916  // result in compilation errors.
   917  type UnsafeXdsUpdateHealthServiceServer interface {
   918  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
   919  }
   920  
   921  func RegisterXdsUpdateHealthServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateHealthServiceServer) {
   922  	s.RegisterService(&XdsUpdateHealthService_ServiceDesc, srv)
   923  }
   924  
   925  func _XdsUpdateHealthService_SetServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   926  	in := new(Empty)
   927  	if err := dec(in); err != nil {
   928  		return nil, err
   929  	}
   930  	if interceptor == nil {
   931  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, in)
   932  	}
   933  	info := &grpc.UnaryServerInfo{
   934  		Server:     srv,
   935  		FullMethod: "/grpc.testing.XdsUpdateHealthService/SetServing",
   936  	}
   937  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   938  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, req.(*Empty))
   939  	}
   940  	return interceptor(ctx, in, info, handler)
   941  }
   942  
   943  func _XdsUpdateHealthService_SetNotServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   944  	in := new(Empty)
   945  	if err := dec(in); err != nil {
   946  		return nil, err
   947  	}
   948  	if interceptor == nil {
   949  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, in)
   950  	}
   951  	info := &grpc.UnaryServerInfo{
   952  		Server:     srv,
   953  		FullMethod: "/grpc.testing.XdsUpdateHealthService/SetNotServing",
   954  	}
   955  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   956  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, req.(*Empty))
   957  	}
   958  	return interceptor(ctx, in, info, handler)
   959  }
   960  
   961  // XdsUpdateHealthService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateHealthService service.
   962  // It's only intended for direct use with grpc.RegisterService,
   963  // and not to be introspected or modified (even as a copy)
   964  var XdsUpdateHealthService_ServiceDesc = grpc.ServiceDesc{
   965  	ServiceName: "grpc.testing.XdsUpdateHealthService",
   966  	HandlerType: (*XdsUpdateHealthServiceServer)(nil),
   967  	Methods: []grpc.MethodDesc{
   968  		{
   969  			MethodName: "SetServing",
   970  			Handler:    _XdsUpdateHealthService_SetServing_Handler,
   971  		},
   972  		{
   973  			MethodName: "SetNotServing",
   974  			Handler:    _XdsUpdateHealthService_SetNotServing_Handler,
   975  		},
   976  	},
   977  	Streams:  []grpc.StreamDesc{},
   978  	Metadata: "grpc/testing/test.proto",
   979  }
   980  
   981  // XdsUpdateClientConfigureServiceClient is the client API for XdsUpdateClientConfigureService service.
   982  //
   983  // 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.
   984  type XdsUpdateClientConfigureServiceClient interface {
   985  	// Update the tes client's configuration.
   986  	Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error)
   987  }
   988  
   989  type xdsUpdateClientConfigureServiceClient struct {
   990  	cc grpc.ClientConnInterface
   991  }
   992  
   993  func NewXdsUpdateClientConfigureServiceClient(cc grpc.ClientConnInterface) XdsUpdateClientConfigureServiceClient {
   994  	return &xdsUpdateClientConfigureServiceClient{cc}
   995  }
   996  
   997  func (c *xdsUpdateClientConfigureServiceClient) Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) {
   998  	out := new(ClientConfigureResponse)
   999  	err := c.cc.Invoke(ctx, "/grpc.testing.XdsUpdateClientConfigureService/Configure", in, out, opts...)
  1000  	if err != nil {
  1001  		return nil, err
  1002  	}
  1003  	return out, nil
  1004  }
  1005  
  1006  // XdsUpdateClientConfigureServiceServer is the server API for XdsUpdateClientConfigureService service.
  1007  // All implementations must embed UnimplementedXdsUpdateClientConfigureServiceServer
  1008  // for forward compatibility
  1009  type XdsUpdateClientConfigureServiceServer interface {
  1010  	// Update the tes client's configuration.
  1011  	Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error)
  1012  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1013  }
  1014  
  1015  // UnimplementedXdsUpdateClientConfigureServiceServer must be embedded to have forward compatible implementations.
  1016  type UnimplementedXdsUpdateClientConfigureServiceServer struct {
  1017  }
  1018  
  1019  func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) {
  1020  	return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
  1021  }
  1022  func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() {
  1023  }
  1024  
  1025  // UnsafeXdsUpdateClientConfigureServiceServer may be embedded to opt out of forward compatibility for this service.
  1026  // Use of this interface is not recommended, as added methods to XdsUpdateClientConfigureServiceServer will
  1027  // result in compilation errors.
  1028  type UnsafeXdsUpdateClientConfigureServiceServer interface {
  1029  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1030  }
  1031  
  1032  func RegisterXdsUpdateClientConfigureServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateClientConfigureServiceServer) {
  1033  	s.RegisterService(&XdsUpdateClientConfigureService_ServiceDesc, srv)
  1034  }
  1035  
  1036  func _XdsUpdateClientConfigureService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1037  	in := new(ClientConfigureRequest)
  1038  	if err := dec(in); err != nil {
  1039  		return nil, err
  1040  	}
  1041  	if interceptor == nil {
  1042  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, in)
  1043  	}
  1044  	info := &grpc.UnaryServerInfo{
  1045  		Server:     srv,
  1046  		FullMethod: "/grpc.testing.XdsUpdateClientConfigureService/Configure",
  1047  	}
  1048  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1049  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, req.(*ClientConfigureRequest))
  1050  	}
  1051  	return interceptor(ctx, in, info, handler)
  1052  }
  1053  
  1054  // XdsUpdateClientConfigureService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateClientConfigureService service.
  1055  // It's only intended for direct use with grpc.RegisterService,
  1056  // and not to be introspected or modified (even as a copy)
  1057  var XdsUpdateClientConfigureService_ServiceDesc = grpc.ServiceDesc{
  1058  	ServiceName: "grpc.testing.XdsUpdateClientConfigureService",
  1059  	HandlerType: (*XdsUpdateClientConfigureServiceServer)(nil),
  1060  	Methods: []grpc.MethodDesc{
  1061  		{
  1062  			MethodName: "Configure",
  1063  			Handler:    _XdsUpdateClientConfigureService_Configure_Handler,
  1064  		},
  1065  	},
  1066  	Streams:  []grpc.StreamDesc{},
  1067  	Metadata: "grpc/testing/test.proto",
  1068  }