// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: masjid_service.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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	MasjidService_CreateMasjid_FullMethodName = "/limestone.MasjidService/CreateMasjid"
	MasjidService_UpdateMasjid_FullMethodName = "/limestone.MasjidService/UpdateMasjid"
	MasjidService_DeleteMasjid_FullMethodName = "/limestone.MasjidService/DeleteMasjid"
	MasjidService_GetMasjid_FullMethodName    = "/limestone.MasjidService/GetMasjid"
	MasjidService_ListMasjids_FullMethodName  = "/limestone.MasjidService/ListMasjids"
)

// MasjidServiceClient is the client API for MasjidService 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 MasjidServiceClient interface {
	// Creates a masjid in the database.
	CreateMasjid(ctx context.Context, in *CreateMasjidRequest, opts ...grpc.CallOption) (*Masjid, error)
	// Updates a masjid in the database with the corresponding id to the given
	// masjid (i.e. all fields are overwritten).
	UpdateMasjid(ctx context.Context, in *UpdateMasjidRequest, opts ...grpc.CallOption) (*Masjid, error)
	// Deletes a masjid from the database with the given id.
	DeleteMasjid(ctx context.Context, in *DeleteMasjidRequest, opts ...grpc.CallOption) (*DeleteMasjidResponse, error)
	// Gets a masjid from the database with the given id.
	GetMasjid(ctx context.Context, in *GetMasjidRequest, opts ...grpc.CallOption) (*Masjid, error)
	// Returns a paginated list of masjids from the database.
	ListMasjids(ctx context.Context, in *ListMasjidsRequest, opts ...grpc.CallOption) (*ListMasjidsResponse, error)
}

type masjidServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewMasjidServiceClient(cc grpc.ClientConnInterface) MasjidServiceClient {
	return &masjidServiceClient{cc}
}

func (c *masjidServiceClient) CreateMasjid(ctx context.Context, in *CreateMasjidRequest, opts ...grpc.CallOption) (*Masjid, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Masjid)
	err := c.cc.Invoke(ctx, MasjidService_CreateMasjid_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *masjidServiceClient) UpdateMasjid(ctx context.Context, in *UpdateMasjidRequest, opts ...grpc.CallOption) (*Masjid, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Masjid)
	err := c.cc.Invoke(ctx, MasjidService_UpdateMasjid_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *masjidServiceClient) DeleteMasjid(ctx context.Context, in *DeleteMasjidRequest, opts ...grpc.CallOption) (*DeleteMasjidResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteMasjidResponse)
	err := c.cc.Invoke(ctx, MasjidService_DeleteMasjid_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *masjidServiceClient) GetMasjid(ctx context.Context, in *GetMasjidRequest, opts ...grpc.CallOption) (*Masjid, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Masjid)
	err := c.cc.Invoke(ctx, MasjidService_GetMasjid_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *masjidServiceClient) ListMasjids(ctx context.Context, in *ListMasjidsRequest, opts ...grpc.CallOption) (*ListMasjidsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListMasjidsResponse)
	err := c.cc.Invoke(ctx, MasjidService_ListMasjids_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MasjidServiceServer is the server API for MasjidService service.
// All implementations must embed UnimplementedMasjidServiceServer
// for forward compatibility.
type MasjidServiceServer interface {
	// Creates a masjid in the database.
	CreateMasjid(context.Context, *CreateMasjidRequest) (*Masjid, error)
	// Updates a masjid in the database with the corresponding id to the given
	// masjid (i.e. all fields are overwritten).
	UpdateMasjid(context.Context, *UpdateMasjidRequest) (*Masjid, error)
	// Deletes a masjid from the database with the given id.
	DeleteMasjid(context.Context, *DeleteMasjidRequest) (*DeleteMasjidResponse, error)
	// Gets a masjid from the database with the given id.
	GetMasjid(context.Context, *GetMasjidRequest) (*Masjid, error)
	// Returns a paginated list of masjids from the database.
	ListMasjids(context.Context, *ListMasjidsRequest) (*ListMasjidsResponse, error)
	mustEmbedUnimplementedMasjidServiceServer()
}

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

func (UnimplementedMasjidServiceServer) CreateMasjid(context.Context, *CreateMasjidRequest) (*Masjid, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateMasjid not implemented")
}
func (UnimplementedMasjidServiceServer) UpdateMasjid(context.Context, *UpdateMasjidRequest) (*Masjid, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateMasjid not implemented")
}
func (UnimplementedMasjidServiceServer) DeleteMasjid(context.Context, *DeleteMasjidRequest) (*DeleteMasjidResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteMasjid not implemented")
}
func (UnimplementedMasjidServiceServer) GetMasjid(context.Context, *GetMasjidRequest) (*Masjid, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMasjid not implemented")
}
func (UnimplementedMasjidServiceServer) ListMasjids(context.Context, *ListMasjidsRequest) (*ListMasjidsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListMasjids not implemented")
}
func (UnimplementedMasjidServiceServer) mustEmbedUnimplementedMasjidServiceServer() {}
func (UnimplementedMasjidServiceServer) testEmbeddedByValue()                       {}

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

func RegisterMasjidServiceServer(s grpc.ServiceRegistrar, srv MasjidServiceServer) {
	// If the following call pancis, it indicates UnimplementedMasjidServiceServer 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(&MasjidService_ServiceDesc, srv)
}

func _MasjidService_CreateMasjid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateMasjidRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasjidServiceServer).CreateMasjid(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MasjidService_CreateMasjid_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasjidServiceServer).CreateMasjid(ctx, req.(*CreateMasjidRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MasjidService_UpdateMasjid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateMasjidRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasjidServiceServer).UpdateMasjid(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MasjidService_UpdateMasjid_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasjidServiceServer).UpdateMasjid(ctx, req.(*UpdateMasjidRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MasjidService_DeleteMasjid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteMasjidRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasjidServiceServer).DeleteMasjid(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MasjidService_DeleteMasjid_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasjidServiceServer).DeleteMasjid(ctx, req.(*DeleteMasjidRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MasjidService_GetMasjid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMasjidRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasjidServiceServer).GetMasjid(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MasjidService_GetMasjid_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasjidServiceServer).GetMasjid(ctx, req.(*GetMasjidRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MasjidService_ListMasjids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListMasjidsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasjidServiceServer).ListMasjids(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MasjidService_ListMasjids_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasjidServiceServer).ListMasjids(ctx, req.(*ListMasjidsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// MasjidService_ServiceDesc is the grpc.ServiceDesc for MasjidService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MasjidService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "limestone.MasjidService",
	HandlerType: (*MasjidServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMasjid",
			Handler:    _MasjidService_CreateMasjid_Handler,
		},
		{
			MethodName: "UpdateMasjid",
			Handler:    _MasjidService_UpdateMasjid_Handler,
		},
		{
			MethodName: "DeleteMasjid",
			Handler:    _MasjidService_DeleteMasjid_Handler,
		},
		{
			MethodName: "GetMasjid",
			Handler:    _MasjidService_GetMasjid_Handler,
		},
		{
			MethodName: "ListMasjids",
			Handler:    _MasjidService_ListMasjids_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "masjid_service.proto",
}
