// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: saas/v1alpha1/invite_service.proto

package saasv1alpha1

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	InviteService_ListInvites_FullMethodName   = "/saas.v1alpha1.InviteService/ListInvites"
	InviteService_AcceptInvite_FullMethodName  = "/saas.v1alpha1.InviteService/AcceptInvite"
	InviteService_DeclineInvite_FullMethodName = "/saas.v1alpha1.InviteService/DeclineInvite"
	InviteService_DeleteInvite_FullMethodName  = "/saas.v1alpha1.InviteService/DeleteInvite"
)

// InviteServiceClient is the client API for InviteService 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 InviteServiceClient interface {
	ListInvites(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListInvitesResponse, error)
	AcceptInvite(ctx context.Context, in *AcceptInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeclineInvite(ctx context.Context, in *DeclineInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteInvite(ctx context.Context, in *DeleteInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type inviteServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewInviteServiceClient(cc grpc.ClientConnInterface) InviteServiceClient {
	return &inviteServiceClient{cc}
}

func (c *inviteServiceClient) ListInvites(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListInvitesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListInvitesResponse)
	err := c.cc.Invoke(ctx, InviteService_ListInvites_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *inviteServiceClient) AcceptInvite(ctx context.Context, in *AcceptInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, InviteService_AcceptInvite_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *inviteServiceClient) DeclineInvite(ctx context.Context, in *DeclineInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, InviteService_DeclineInvite_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *inviteServiceClient) DeleteInvite(ctx context.Context, in *DeleteInviteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, InviteService_DeleteInvite_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// InviteServiceServer is the server API for InviteService service.
// All implementations should embed UnimplementedInviteServiceServer
// for forward compatibility.
type InviteServiceServer interface {
	ListInvites(context.Context, *emptypb.Empty) (*ListInvitesResponse, error)
	AcceptInvite(context.Context, *AcceptInviteRequest) (*emptypb.Empty, error)
	DeclineInvite(context.Context, *DeclineInviteRequest) (*emptypb.Empty, error)
	DeleteInvite(context.Context, *DeleteInviteRequest) (*emptypb.Empty, error)
}

// UnimplementedInviteServiceServer 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 UnimplementedInviteServiceServer struct{}

func (UnimplementedInviteServiceServer) ListInvites(context.Context, *emptypb.Empty) (*ListInvitesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListInvites not implemented")
}
func (UnimplementedInviteServiceServer) AcceptInvite(context.Context, *AcceptInviteRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AcceptInvite not implemented")
}
func (UnimplementedInviteServiceServer) DeclineInvite(context.Context, *DeclineInviteRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeclineInvite not implemented")
}
func (UnimplementedInviteServiceServer) DeleteInvite(context.Context, *DeleteInviteRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteInvite not implemented")
}
func (UnimplementedInviteServiceServer) testEmbeddedByValue() {}

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

func RegisterInviteServiceServer(s grpc.ServiceRegistrar, srv InviteServiceServer) {
	// If the following call pancis, it indicates UnimplementedInviteServiceServer 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(&InviteService_ServiceDesc, srv)
}

func _InviteService_ListInvites_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.(InviteServiceServer).ListInvites(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InviteService_ListInvites_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InviteServiceServer).ListInvites(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _InviteService_AcceptInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AcceptInviteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InviteServiceServer).AcceptInvite(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InviteService_AcceptInvite_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InviteServiceServer).AcceptInvite(ctx, req.(*AcceptInviteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InviteService_DeclineInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeclineInviteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InviteServiceServer).DeclineInvite(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InviteService_DeclineInvite_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InviteServiceServer).DeclineInvite(ctx, req.(*DeclineInviteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InviteService_DeleteInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteInviteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InviteServiceServer).DeleteInvite(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InviteService_DeleteInvite_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InviteServiceServer).DeleteInvite(ctx, req.(*DeleteInviteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// InviteService_ServiceDesc is the grpc.ServiceDesc for InviteService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var InviteService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "saas.v1alpha1.InviteService",
	HandlerType: (*InviteServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListInvites",
			Handler:    _InviteService_ListInvites_Handler,
		},
		{
			MethodName: "AcceptInvite",
			Handler:    _InviteService_AcceptInvite_Handler,
		},
		{
			MethodName: "DeclineInvite",
			Handler:    _InviteService_DeclineInvite_Handler,
		},
		{
			MethodName: "DeleteInvite",
			Handler:    _InviteService_DeleteInvite_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "saas/v1alpha1/invite_service.proto",
}
