//
// Copyright 2025 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

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

package v1

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 (
	ProjectService_ListMembers_FullMethodName            = "/controlplane.v1.ProjectService/ListMembers"
	ProjectService_AddMember_FullMethodName              = "/controlplane.v1.ProjectService/AddMember"
	ProjectService_RemoveMember_FullMethodName           = "/controlplane.v1.ProjectService/RemoveMember"
	ProjectService_UpdateMemberRole_FullMethodName       = "/controlplane.v1.ProjectService/UpdateMemberRole"
	ProjectService_ListPendingInvitations_FullMethodName = "/controlplane.v1.ProjectService/ListPendingInvitations"
)

// ProjectServiceClient is the client API for ProjectService 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 ProjectServiceClient interface {
	// Project membership management
	ListMembers(ctx context.Context, in *ProjectServiceListMembersRequest, opts ...grpc.CallOption) (*ProjectServiceListMembersResponse, error)
	AddMember(ctx context.Context, in *ProjectServiceAddMemberRequest, opts ...grpc.CallOption) (*ProjectServiceAddMemberResponse, error)
	RemoveMember(ctx context.Context, in *ProjectServiceRemoveMemberRequest, opts ...grpc.CallOption) (*ProjectServiceRemoveMemberResponse, error)
	UpdateMemberRole(ctx context.Context, in *ProjectServiceUpdateMemberRoleRequest, opts ...grpc.CallOption) (*ProjectServiceUpdateMemberRoleResponse, error)
	ListPendingInvitations(ctx context.Context, in *ProjectServiceListPendingInvitationsRequest, opts ...grpc.CallOption) (*ProjectServiceListPendingInvitationsResponse, error)
}

type projectServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewProjectServiceClient(cc grpc.ClientConnInterface) ProjectServiceClient {
	return &projectServiceClient{cc}
}

func (c *projectServiceClient) ListMembers(ctx context.Context, in *ProjectServiceListMembersRequest, opts ...grpc.CallOption) (*ProjectServiceListMembersResponse, error) {
	out := new(ProjectServiceListMembersResponse)
	err := c.cc.Invoke(ctx, ProjectService_ListMembers_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectServiceClient) AddMember(ctx context.Context, in *ProjectServiceAddMemberRequest, opts ...grpc.CallOption) (*ProjectServiceAddMemberResponse, error) {
	out := new(ProjectServiceAddMemberResponse)
	err := c.cc.Invoke(ctx, ProjectService_AddMember_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectServiceClient) RemoveMember(ctx context.Context, in *ProjectServiceRemoveMemberRequest, opts ...grpc.CallOption) (*ProjectServiceRemoveMemberResponse, error) {
	out := new(ProjectServiceRemoveMemberResponse)
	err := c.cc.Invoke(ctx, ProjectService_RemoveMember_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectServiceClient) UpdateMemberRole(ctx context.Context, in *ProjectServiceUpdateMemberRoleRequest, opts ...grpc.CallOption) (*ProjectServiceUpdateMemberRoleResponse, error) {
	out := new(ProjectServiceUpdateMemberRoleResponse)
	err := c.cc.Invoke(ctx, ProjectService_UpdateMemberRole_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *projectServiceClient) ListPendingInvitations(ctx context.Context, in *ProjectServiceListPendingInvitationsRequest, opts ...grpc.CallOption) (*ProjectServiceListPendingInvitationsResponse, error) {
	out := new(ProjectServiceListPendingInvitationsResponse)
	err := c.cc.Invoke(ctx, ProjectService_ListPendingInvitations_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ProjectServiceServer is the server API for ProjectService service.
// All implementations must embed UnimplementedProjectServiceServer
// for forward compatibility
type ProjectServiceServer interface {
	// Project membership management
	ListMembers(context.Context, *ProjectServiceListMembersRequest) (*ProjectServiceListMembersResponse, error)
	AddMember(context.Context, *ProjectServiceAddMemberRequest) (*ProjectServiceAddMemberResponse, error)
	RemoveMember(context.Context, *ProjectServiceRemoveMemberRequest) (*ProjectServiceRemoveMemberResponse, error)
	UpdateMemberRole(context.Context, *ProjectServiceUpdateMemberRoleRequest) (*ProjectServiceUpdateMemberRoleResponse, error)
	ListPendingInvitations(context.Context, *ProjectServiceListPendingInvitationsRequest) (*ProjectServiceListPendingInvitationsResponse, error)
	mustEmbedUnimplementedProjectServiceServer()
}

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

func (UnimplementedProjectServiceServer) ListMembers(context.Context, *ProjectServiceListMembersRequest) (*ProjectServiceListMembersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListMembers not implemented")
}
func (UnimplementedProjectServiceServer) AddMember(context.Context, *ProjectServiceAddMemberRequest) (*ProjectServiceAddMemberResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddMember not implemented")
}
func (UnimplementedProjectServiceServer) RemoveMember(context.Context, *ProjectServiceRemoveMemberRequest) (*ProjectServiceRemoveMemberResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveMember not implemented")
}
func (UnimplementedProjectServiceServer) UpdateMemberRole(context.Context, *ProjectServiceUpdateMemberRoleRequest) (*ProjectServiceUpdateMemberRoleResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateMemberRole not implemented")
}
func (UnimplementedProjectServiceServer) ListPendingInvitations(context.Context, *ProjectServiceListPendingInvitationsRequest) (*ProjectServiceListPendingInvitationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListPendingInvitations not implemented")
}
func (UnimplementedProjectServiceServer) mustEmbedUnimplementedProjectServiceServer() {}

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

func RegisterProjectServiceServer(s grpc.ServiceRegistrar, srv ProjectServiceServer) {
	s.RegisterService(&ProjectService_ServiceDesc, srv)
}

func _ProjectService_ListMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectServiceListMembersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServiceServer).ListMembers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ProjectService_ListMembers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServiceServer).ListMembers(ctx, req.(*ProjectServiceListMembersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProjectService_AddMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectServiceAddMemberRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServiceServer).AddMember(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ProjectService_AddMember_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServiceServer).AddMember(ctx, req.(*ProjectServiceAddMemberRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProjectService_RemoveMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectServiceRemoveMemberRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServiceServer).RemoveMember(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ProjectService_RemoveMember_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServiceServer).RemoveMember(ctx, req.(*ProjectServiceRemoveMemberRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProjectService_UpdateMemberRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectServiceUpdateMemberRoleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServiceServer).UpdateMemberRole(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ProjectService_UpdateMemberRole_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServiceServer).UpdateMemberRole(ctx, req.(*ProjectServiceUpdateMemberRoleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProjectService_ListPendingInvitations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectServiceListPendingInvitationsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProjectServiceServer).ListPendingInvitations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ProjectService_ListPendingInvitations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProjectServiceServer).ListPendingInvitations(ctx, req.(*ProjectServiceListPendingInvitationsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ProjectService_ServiceDesc is the grpc.ServiceDesc for ProjectService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ProjectService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controlplane.v1.ProjectService",
	HandlerType: (*ProjectServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListMembers",
			Handler:    _ProjectService_ListMembers_Handler,
		},
		{
			MethodName: "AddMember",
			Handler:    _ProjectService_AddMember_Handler,
		},
		{
			MethodName: "RemoveMember",
			Handler:    _ProjectService_RemoveMember_Handler,
		},
		{
			MethodName: "UpdateMemberRole",
			Handler:    _ProjectService_UpdateMemberRole_Handler,
		},
		{
			MethodName: "ListPendingInvitations",
			Handler:    _ProjectService_ListPendingInvitations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controlplane/v1/project.proto",
}
