// Code generated by protoc-gen-grpc-mock. DO NOT EDIT.
// source: interservice/authz/project.proto

package authz

import (
	"context"

	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)

// verify that the mock satisfies the ProjectsServiceServer interface (at compile time)
var _ ProjectsServiceServer = &ProjectsServiceServerMock{}

// NewProjectsServiceServerMock gives you a fresh instance of ProjectsServiceServerMock.
func NewProjectsServiceServerMock() *ProjectsServiceServerMock {
	return &ProjectsServiceServerMock{validateRequests: true}
}

// NewProjectsServiceServerMockWithoutValidation gives you a fresh instance of
// ProjectsServiceServerMock which does not attempt to validate requests before passing
// them to their respective '*Func'.
func NewProjectsServiceServerMockWithoutValidation() *ProjectsServiceServerMock {
	return &ProjectsServiceServerMock{}
}

// ProjectsServiceServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type ProjectsServiceServerMock struct {
	validateRequests                 bool
	UpdateProjectFunc                func(context.Context, *UpdateProjectReq) (*UpdateProjectResp, error)
	CreateProjectFunc                func(context.Context, *CreateProjectReq) (*CreateProjectResp, error)
	GetProjectFunc                   func(context.Context, *GetProjectReq) (*GetProjectResp, error)
	DeleteProjectFunc                func(context.Context, *DeleteProjectReq) (*DeleteProjectResp, error)
	ListProjectsFunc                 func(context.Context, *ListProjectsReq) (*ListProjectsResp, error)
	ListProjectsForIntrospectionFunc func(context.Context, *ListProjectsReq) (*ListProjectsResp, error)
	ApplyRulesStartFunc              func(context.Context, *ApplyRulesStartReq) (*ApplyRulesStartResp, error)
	ApplyRulesCancelFunc             func(context.Context, *ApplyRulesCancelReq) (*ApplyRulesCancelResp, error)
	ApplyRulesStatusFunc             func(context.Context, *ApplyRulesStatusReq) (*ApplyRulesStatusResp, error)
	CreateRuleFunc                   func(context.Context, *CreateRuleReq) (*CreateRuleResp, error)
	UpdateRuleFunc                   func(context.Context, *UpdateRuleReq) (*UpdateRuleResp, error)
	GetRuleFunc                      func(context.Context, *GetRuleReq) (*GetRuleResp, error)
	ListRulesFunc                    func(context.Context, *ListRulesReq) (*ListRulesResp, error)
	ListRulesForProjectFunc          func(context.Context, *ListRulesForProjectReq) (*ListRulesForProjectResp, error)
	DeleteRuleFunc                   func(context.Context, *DeleteRuleReq) (*DeleteRuleResp, error)
	ListRulesForAllProjectsFunc      func(context.Context, *ListRulesForAllProjectsReq) (*ListRulesForAllProjectsResp, error)
}

func (m *ProjectsServiceServerMock) UpdateProject(ctx context.Context, req *UpdateProjectReq) (*UpdateProjectResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.UpdateProjectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateProject' not implemented")
}

func (m *ProjectsServiceServerMock) CreateProject(ctx context.Context, req *CreateProjectReq) (*CreateProjectResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.CreateProjectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateProject' not implemented")
}

func (m *ProjectsServiceServerMock) GetProject(ctx context.Context, req *GetProjectReq) (*GetProjectResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.GetProjectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetProject' not implemented")
}

func (m *ProjectsServiceServerMock) DeleteProject(ctx context.Context, req *DeleteProjectReq) (*DeleteProjectResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.DeleteProjectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteProject' not implemented")
}

func (m *ProjectsServiceServerMock) ListProjects(ctx context.Context, req *ListProjectsReq) (*ListProjectsResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListProjectsFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListProjects' not implemented")
}

func (m *ProjectsServiceServerMock) ListProjectsForIntrospection(ctx context.Context, req *ListProjectsReq) (*ListProjectsResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListProjectsForIntrospectionFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListProjectsForIntrospection' not implemented")
}

func (m *ProjectsServiceServerMock) ApplyRulesStart(ctx context.Context, req *ApplyRulesStartReq) (*ApplyRulesStartResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ApplyRulesStartFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ApplyRulesStart' not implemented")
}

func (m *ProjectsServiceServerMock) ApplyRulesCancel(ctx context.Context, req *ApplyRulesCancelReq) (*ApplyRulesCancelResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ApplyRulesCancelFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ApplyRulesCancel' not implemented")
}

func (m *ProjectsServiceServerMock) ApplyRulesStatus(ctx context.Context, req *ApplyRulesStatusReq) (*ApplyRulesStatusResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ApplyRulesStatusFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ApplyRulesStatus' not implemented")
}

func (m *ProjectsServiceServerMock) CreateRule(ctx context.Context, req *CreateRuleReq) (*CreateRuleResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.CreateRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateRule' not implemented")
}

func (m *ProjectsServiceServerMock) UpdateRule(ctx context.Context, req *UpdateRuleReq) (*UpdateRuleResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.UpdateRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateRule' not implemented")
}

func (m *ProjectsServiceServerMock) GetRule(ctx context.Context, req *GetRuleReq) (*GetRuleResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.GetRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetRule' not implemented")
}

func (m *ProjectsServiceServerMock) ListRules(ctx context.Context, req *ListRulesReq) (*ListRulesResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListRulesFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListRules' not implemented")
}

func (m *ProjectsServiceServerMock) ListRulesForProject(ctx context.Context, req *ListRulesForProjectReq) (*ListRulesForProjectResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListRulesForProjectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListRulesForProject' not implemented")
}

func (m *ProjectsServiceServerMock) DeleteRule(ctx context.Context, req *DeleteRuleReq) (*DeleteRuleResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.DeleteRuleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteRule' not implemented")
}

func (m *ProjectsServiceServerMock) ListRulesForAllProjects(ctx context.Context, req *ListRulesForAllProjectsReq) (*ListRulesForAllProjectsResp, error) {
	if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok {
		if err := msg.Validate(); err != nil {
			return nil, status.Error(codes.InvalidArgument, err.Error())
		}
	}
	if f := m.ListRulesForAllProjectsFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListRulesForAllProjects' not implemented")
}

// Reset resets all overridden functions
func (m *ProjectsServiceServerMock) Reset() {
	m.UpdateProjectFunc = nil
	m.CreateProjectFunc = nil
	m.GetProjectFunc = nil
	m.DeleteProjectFunc = nil
	m.ListProjectsFunc = nil
	m.ListProjectsForIntrospectionFunc = nil
	m.ApplyRulesStartFunc = nil
	m.ApplyRulesCancelFunc = nil
	m.ApplyRulesStatusFunc = nil
	m.CreateRuleFunc = nil
	m.UpdateRuleFunc = nil
	m.GetRuleFunc = nil
	m.ListRulesFunc = nil
	m.ListRulesForProjectFunc = nil
	m.DeleteRuleFunc = nil
	m.ListRulesForAllProjectsFunc = nil
}
