// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v5.26.1
// source: friendships.proto

package proto

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

const (
	Friendships_ListFriendship_FullMethodName = "/proto.Friendships/ListFriendship"
	Friendships_GetFriendship_FullMethodName  = "/proto.Friendships/GetFriendship"
)

// FriendshipsClient is the client API for Friendships 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 FriendshipsClient interface {
	ListFriendship(ctx context.Context, in *FriendshipLookupRequest, opts ...grpc.CallOption) (*ListFriendshipResponse, error)
	GetFriendship(ctx context.Context, in *FriendshipTwoSideLookupRequest, opts ...grpc.CallOption) (*FriendshipResponse, error)
}

type friendshipsClient struct {
	cc grpc.ClientConnInterface
}

func NewFriendshipsClient(cc grpc.ClientConnInterface) FriendshipsClient {
	return &friendshipsClient{cc}
}

func (c *friendshipsClient) ListFriendship(ctx context.Context, in *FriendshipLookupRequest, opts ...grpc.CallOption) (*ListFriendshipResponse, error) {
	out := new(ListFriendshipResponse)
	err := c.cc.Invoke(ctx, Friendships_ListFriendship_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *friendshipsClient) GetFriendship(ctx context.Context, in *FriendshipTwoSideLookupRequest, opts ...grpc.CallOption) (*FriendshipResponse, error) {
	out := new(FriendshipResponse)
	err := c.cc.Invoke(ctx, Friendships_GetFriendship_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// FriendshipsServer is the server API for Friendships service.
// All implementations must embed UnimplementedFriendshipsServer
// for forward compatibility
type FriendshipsServer interface {
	ListFriendship(context.Context, *FriendshipLookupRequest) (*ListFriendshipResponse, error)
	GetFriendship(context.Context, *FriendshipTwoSideLookupRequest) (*FriendshipResponse, error)
	mustEmbedUnimplementedFriendshipsServer()
}

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

func (UnimplementedFriendshipsServer) ListFriendship(context.Context, *FriendshipLookupRequest) (*ListFriendshipResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListFriendship not implemented")
}
func (UnimplementedFriendshipsServer) GetFriendship(context.Context, *FriendshipTwoSideLookupRequest) (*FriendshipResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetFriendship not implemented")
}
func (UnimplementedFriendshipsServer) mustEmbedUnimplementedFriendshipsServer() {}

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

func RegisterFriendshipsServer(s grpc.ServiceRegistrar, srv FriendshipsServer) {
	s.RegisterService(&Friendships_ServiceDesc, srv)
}

func _Friendships_ListFriendship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FriendshipLookupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendshipsServer).ListFriendship(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Friendships_ListFriendship_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendshipsServer).ListFriendship(ctx, req.(*FriendshipLookupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Friendships_GetFriendship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FriendshipTwoSideLookupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FriendshipsServer).GetFriendship(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Friendships_GetFriendship_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FriendshipsServer).GetFriendship(ctx, req.(*FriendshipTwoSideLookupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Friendships_ServiceDesc is the grpc.ServiceDesc for Friendships service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Friendships_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Friendships",
	HandlerType: (*FriendshipsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListFriendship",
			Handler:    _Friendships_ListFriendship_Handler,
		},
		{
			MethodName: "GetFriendship",
			Handler:    _Friendships_GetFriendship_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "friendships.proto",
}