// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: module/social/relation/proto/match.proto

package relation

import (
	protobuf "bsm/full/protobuf"
	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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Match_Fetch_FullMethodName    = "/relation.Match/Fetch"
	Match_Get_FullMethodName      = "/relation.Match/Get"
	Match_DoJoin_FullMethodName   = "/relation.Match/DoJoin"
	Match_DoIgnore_FullMethodName = "/relation.Match/DoIgnore"
)

// MatchClient is the client API for Match 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.
//
// relation-关系管理:匹配
type MatchClient interface {
	// 获取匹配列表
	Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error)
	// 获取匹配详情
	Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error)
	// 执行通过，加为好友
	DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
	// 执行忽略
	DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
}

type matchClient struct {
	cc grpc.ClientConnInterface
}

func NewMatchClient(cc grpc.ClientConnInterface) MatchClient {
	return &matchClient{cc}
}

func (c *matchClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.FetchRelationItemReply)
	err := c.cc.Invoke(ctx, Match_Fetch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *matchClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.RelationItem)
	err := c.cc.Invoke(ctx, Match_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *matchClient) DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.DataStatusReply)
	err := c.cc.Invoke(ctx, Match_DoJoin_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *matchClient) DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.DataStatusReply)
	err := c.cc.Invoke(ctx, Match_DoIgnore_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MatchServer is the server API for Match service.
// All implementations should embed UnimplementedMatchServer
// for forward compatibility.
//
// relation-关系管理:匹配
type MatchServer interface {
	// 获取匹配列表
	Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error)
	// 获取匹配详情
	Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error)
	// 执行通过，加为好友
	DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
	// 执行忽略
	DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
}

// UnimplementedMatchServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMatchServer struct{}

func (UnimplementedMatchServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedMatchServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMatchServer) DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented")
}
func (UnimplementedMatchServer) DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method DoIgnore not implemented")
}
func (UnimplementedMatchServer) testEmbeddedByValue() {}

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

func RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) {
	// If the following call panics, it indicates UnimplementedMatchServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Match_ServiceDesc, srv)
}

func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.FetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MatchServer).Fetch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Match_Fetch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MatchServer).Fetch(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MatchServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Match_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MatchServer).Get(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MatchServer).DoJoin(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Match_DoJoin_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MatchServer).DoJoin(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MatchServer).DoIgnore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Match_DoIgnore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MatchServer).DoIgnore(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Match_ServiceDesc is the grpc.ServiceDesc for Match service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Match_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "relation.Match",
	HandlerType: (*MatchServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Fetch",
			Handler:    _Match_Fetch_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Match_Get_Handler,
		},
		{
			MethodName: "DoJoin",
			Handler:    _Match_DoJoin_Handler,
		},
		{
			MethodName: "DoIgnore",
			Handler:    _Match_DoIgnore_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/social/relation/proto/match.proto",
}
