// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.19.0
// source: proto/testing/baggage.proto

package testing

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// BaggageServiceClient is the client API for BaggageService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type BaggageServiceClient interface {
	Handler1(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Handler2(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type baggageServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBaggageServiceClient(cc grpc.ClientConnInterface) BaggageServiceClient {
	return &baggageServiceClient{cc}
}

func (c *baggageServiceClient) Handler1(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/zipkin.testing.BaggageService/Handler1", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *baggageServiceClient) Handler2(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/zipkin.testing.BaggageService/Handler2", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BaggageServiceServer is the server API for BaggageService service.
// All implementations must embed UnimplementedBaggageServiceServer
// for forward compatibility
type BaggageServiceServer interface {
	Handler1(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Handler2(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	mustEmbedUnimplementedBaggageServiceServer()
}

// UnimplementedBaggageServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBaggageServiceServer struct {
}

func (UnimplementedBaggageServiceServer) Handler1(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Handler1 not implemented")
}
func (UnimplementedBaggageServiceServer) Handler2(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Handler2 not implemented")
}
func (UnimplementedBaggageServiceServer) mustEmbedUnimplementedBaggageServiceServer() {}

// UnsafeBaggageServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BaggageServiceServer will
// result in compilation errors.
type UnsafeBaggageServiceServer interface {
	mustEmbedUnimplementedBaggageServiceServer()
}

func RegisterBaggageServiceServer(s grpc.ServiceRegistrar, srv BaggageServiceServer) {
	s.RegisterService(&BaggageService_ServiceDesc, srv)
}

func _BaggageService_Handler1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BaggageServiceServer).Handler1(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/zipkin.testing.BaggageService/Handler1",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BaggageServiceServer).Handler1(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BaggageService_Handler2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BaggageServiceServer).Handler2(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/zipkin.testing.BaggageService/Handler2",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BaggageServiceServer).Handler2(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// BaggageService_ServiceDesc is the grpc.ServiceDesc for BaggageService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BaggageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "zipkin.testing.BaggageService",
	HandlerType: (*BaggageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Handler1",
			Handler:    _BaggageService_Handler1_Handler,
		},
		{
			MethodName: "Handler2",
			Handler:    _BaggageService_Handler2_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/testing/baggage.proto",
}
