// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package pb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

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

// ShipmentServiceClient is the client API for ShipmentService 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 ShipmentServiceClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	Archive(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
	ArchiveBatch(ctx context.Context, in *ArchiveBatchRequest, opts ...grpc.CallOption) (*ArchiveBatchResponse, error)
	SyncCourierShipmentStatus(ctx context.Context, in *SyncCourierShipmentStatusRequest, opts ...grpc.CallOption) (*SyncCourierShipmentStatusResponse, error)
}

type shipmentServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewShipmentServiceClient(cc grpc.ClientConnInterface) ShipmentServiceClient {
	return &shipmentServiceClient{cc}
}

func (c *shipmentServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
	out := new(PingResponse)
	err := c.cc.Invoke(ctx, "/shipmentpb.shipmentService/Ping", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *shipmentServiceClient) Archive(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error) {
	out := new(ArchiveResponse)
	err := c.cc.Invoke(ctx, "/shipmentpb.shipmentService/Archive", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *shipmentServiceClient) ArchiveBatch(ctx context.Context, in *ArchiveBatchRequest, opts ...grpc.CallOption) (*ArchiveBatchResponse, error) {
	out := new(ArchiveBatchResponse)
	err := c.cc.Invoke(ctx, "/shipmentpb.shipmentService/ArchiveBatch", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *shipmentServiceClient) SyncCourierShipmentStatus(ctx context.Context, in *SyncCourierShipmentStatusRequest, opts ...grpc.CallOption) (*SyncCourierShipmentStatusResponse, error) {
	out := new(SyncCourierShipmentStatusResponse)
	err := c.cc.Invoke(ctx, "/shipmentpb.shipmentService/SyncCourierShipmentStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ShipmentServiceServer is the server API for ShipmentService service.
// All implementations must embed UnimplementedShipmentServiceServer
// for forward compatibility
type ShipmentServiceServer interface {
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	Archive(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
	ArchiveBatch(context.Context, *ArchiveBatchRequest) (*ArchiveBatchResponse, error)
	SyncCourierShipmentStatus(context.Context, *SyncCourierShipmentStatusRequest) (*SyncCourierShipmentStatusResponse, error)
	mustEmbedUnimplementedShipmentServiceServer()
}

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

func (UnimplementedShipmentServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedShipmentServiceServer) Archive(context.Context, *ArchiveRequest) (*ArchiveResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Archive not implemented")
}
func (UnimplementedShipmentServiceServer) ArchiveBatch(context.Context, *ArchiveBatchRequest) (*ArchiveBatchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ArchiveBatch not implemented")
}
func (UnimplementedShipmentServiceServer) SyncCourierShipmentStatus(context.Context, *SyncCourierShipmentStatusRequest) (*SyncCourierShipmentStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SyncCourierShipmentStatus not implemented")
}
func (UnimplementedShipmentServiceServer) mustEmbedUnimplementedShipmentServiceServer() {}

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

func RegisterShipmentServiceServer(s grpc.ServiceRegistrar, srv ShipmentServiceServer) {
	s.RegisterService(&ShipmentService_ServiceDesc, srv)
}

func _ShipmentService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShipmentServiceServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/shipmentpb.shipmentService/Ping",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShipmentServiceServer).Ping(ctx, req.(*PingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ShipmentService_Archive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArchiveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShipmentServiceServer).Archive(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/shipmentpb.shipmentService/Archive",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShipmentServiceServer).Archive(ctx, req.(*ArchiveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ShipmentService_ArchiveBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArchiveBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShipmentServiceServer).ArchiveBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/shipmentpb.shipmentService/ArchiveBatch",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShipmentServiceServer).ArchiveBatch(ctx, req.(*ArchiveBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ShipmentService_SyncCourierShipmentStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SyncCourierShipmentStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ShipmentServiceServer).SyncCourierShipmentStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/shipmentpb.shipmentService/SyncCourierShipmentStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ShipmentServiceServer).SyncCourierShipmentStatus(ctx, req.(*SyncCourierShipmentStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ShipmentService_ServiceDesc is the grpc.ServiceDesc for ShipmentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ShipmentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shipmentpb.shipmentService",
	HandlerType: (*ShipmentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _ShipmentService_Ping_Handler,
		},
		{
			MethodName: "Archive",
			Handler:    _ShipmentService_Archive_Handler,
		},
		{
			MethodName: "ArchiveBatch",
			Handler:    _ShipmentService_ArchiveBatch_Handler,
		},
		{
			MethodName: "SyncCourierShipmentStatus",
			Handler:    _ShipmentService_SyncCourierShipmentStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shipment.proto",
}
