// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: proto/rpc/system/project.proto

package rpcv3

import (
	context "context"
	v3 "github.com/RafayLabs/rcloud-base/proto/types/systempb/v3"
	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

// ProjectClient is the client API for Project 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 ProjectClient interface {
	CreateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
	GetProjects(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.ProjectList, error)
	GetProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
	UpdateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
	DeleteProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
}

type projectClient struct {
	cc grpc.ClientConnInterface
}

func NewProjectClient(cc grpc.ClientConnInterface) ProjectClient {
	return &projectClient{cc}
}

func (c *projectClient) CreateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
	out := new(v3.Project)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/CreateProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectClient) GetProjects(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.ProjectList, error) {
	out := new(v3.ProjectList)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProjects", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectClient) GetProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
	out := new(v3.Project)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectClient) UpdateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
	out := new(v3.Project)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/UpdateProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectClient) DeleteProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
	out := new(v3.Project)
	err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/DeleteProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ProjectServer is the server API for Project service.
// All implementations should embed UnimplementedProjectServer
// for forward compatibility
type ProjectServer interface {
	CreateProject(context.Context, *v3.Project) (*v3.Project, error)
	GetProjects(context.Context, *v3.Project) (*v3.ProjectList, error)
	GetProject(context.Context, *v3.Project) (*v3.Project, error)
	UpdateProject(context.Context, *v3.Project) (*v3.Project, error)
	DeleteProject(context.Context, *v3.Project) (*v3.Project, error)
}

// UnimplementedProjectServer should be embedded to have forward compatible implementations.
type UnimplementedProjectServer struct {
}

func (UnimplementedProjectServer) CreateProject(context.Context, *v3.Project) (*v3.Project, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateProject not implemented")
}
func (UnimplementedProjectServer) GetProjects(context.Context, *v3.Project) (*v3.ProjectList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetProjects not implemented")
}
func (UnimplementedProjectServer) GetProject(context.Context, *v3.Project) (*v3.Project, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented")
}
func (UnimplementedProjectServer) UpdateProject(context.Context, *v3.Project) (*v3.Project, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateProject not implemented")
}
func (UnimplementedProjectServer) DeleteProject(context.Context, *v3.Project) (*v3.Project, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteProject not implemented")
}

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

func RegisterProjectServer(s grpc.ServiceRegistrar, srv ProjectServer) {
	s.RegisterService(&Project_ServiceDesc, srv)
}

func _Project_CreateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Project)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServer).CreateProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Project/CreateProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServer).CreateProject(ctx, req.(*v3.Project))
	}
	return interceptor(ctx, in, info, handler)
}

func _Project_GetProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Project)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServer).GetProjects(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Project/GetProjects",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServer).GetProjects(ctx, req.(*v3.Project))
	}
	return interceptor(ctx, in, info, handler)
}

func _Project_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Project)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServer).GetProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Project/GetProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServer).GetProject(ctx, req.(*v3.Project))
	}
	return interceptor(ctx, in, info, handler)
}

func _Project_UpdateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Project)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServer).UpdateProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Project/UpdateProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServer).UpdateProject(ctx, req.(*v3.Project))
	}
	return interceptor(ctx, in, info, handler)
}

func _Project_DeleteProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(v3.Project)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServer).DeleteProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.rpc.v3.Project/DeleteProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServer).DeleteProject(ctx, req.(*v3.Project))
	}
	return interceptor(ctx, in, info, handler)
}

// Project_ServiceDesc is the grpc.ServiceDesc for Project service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Project_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rafay.dev.rpc.v3.Project",
	HandlerType: (*ProjectServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateProject",
			Handler:    _Project_CreateProject_Handler,
		},
		{
			MethodName: "GetProjects",
			Handler:    _Project_GetProjects_Handler,
		},
		{
			MethodName: "GetProject",
			Handler:    _Project_GetProject_Handler,
		},
		{
			MethodName: "UpdateProject",
			Handler:    _Project_UpdateProject_Handler,
		},
		{
			MethodName: "DeleteProject",
			Handler:    _Project_DeleteProject_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/rpc/system/project.proto",
}
