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

package authz

import (
	"context"

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

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

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

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

// PoliciesServiceServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type PoliciesServiceServerMock struct {
	validateRequests             bool
	ReplacePolicyMembersFunc     func(context.Context, *ReplacePolicyMembersReq) (*ReplacePolicyMembersResp, error)
	CreatePolicyFunc             func(context.Context, *CreatePolicyReq) (*Policy, error)
	DeletePolicyFunc             func(context.Context, *DeletePolicyReq) (*DeletePolicyResp, error)
	ListPoliciesFunc             func(context.Context, *ListPoliciesReq) (*ListPoliciesResp, error)
	GetPolicyFunc                func(context.Context, *GetPolicyReq) (*Policy, error)
	UpdatePolicyFunc             func(context.Context, *UpdatePolicyReq) (*Policy, error)
	GetPolicyVersionFunc         func(context.Context, *GetPolicyVersionReq) (*GetPolicyVersionResp, error)
	CreateRoleFunc               func(context.Context, *CreateRoleReq) (*Role, error)
	ListRolesFunc                func(context.Context, *ListRolesReq) (*ListRolesResp, error)
	GetRoleFunc                  func(context.Context, *GetRoleReq) (*Role, error)
	DeleteRoleFunc               func(context.Context, *DeleteRoleReq) (*DeleteRoleResp, error)
	UpdateRoleFunc               func(context.Context, *UpdateRoleReq) (*Role, error)
	ListPolicyMembersFunc        func(context.Context, *ListPolicyMembersReq) (*ListPolicyMembersResp, error)
	RemovePolicyMembersFunc      func(context.Context, *RemovePolicyMembersReq) (*RemovePolicyMembersResp, error)
	AddPolicyMembersFunc         func(context.Context, *AddPolicyMembersReq) (*AddPolicyMembersResp, error)
	PurgeSubjectFromPoliciesFunc func(context.Context, *PurgeSubjectFromPoliciesReq) (*PurgeSubjectFromPoliciesResp, error)
}

func (m *PoliciesServiceServerMock) ReplacePolicyMembers(ctx context.Context, req *ReplacePolicyMembersReq) (*ReplacePolicyMembersResp, 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.ReplacePolicyMembersFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ReplacePolicyMembers' not implemented")
}

func (m *PoliciesServiceServerMock) CreatePolicy(ctx context.Context, req *CreatePolicyReq) (*Policy, 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.CreatePolicyFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreatePolicy' not implemented")
}

func (m *PoliciesServiceServerMock) DeletePolicy(ctx context.Context, req *DeletePolicyReq) (*DeletePolicyResp, 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.DeletePolicyFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeletePolicy' not implemented")
}

func (m *PoliciesServiceServerMock) ListPolicies(ctx context.Context, req *ListPoliciesReq) (*ListPoliciesResp, 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.ListPoliciesFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListPolicies' not implemented")
}

func (m *PoliciesServiceServerMock) GetPolicy(ctx context.Context, req *GetPolicyReq) (*Policy, 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.GetPolicyFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetPolicy' not implemented")
}

func (m *PoliciesServiceServerMock) UpdatePolicy(ctx context.Context, req *UpdatePolicyReq) (*Policy, 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.UpdatePolicyFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdatePolicy' not implemented")
}

func (m *PoliciesServiceServerMock) GetPolicyVersion(ctx context.Context, req *GetPolicyVersionReq) (*GetPolicyVersionResp, 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.GetPolicyVersionFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetPolicyVersion' not implemented")
}

func (m *PoliciesServiceServerMock) CreateRole(ctx context.Context, req *CreateRoleReq) (*Role, 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.CreateRoleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateRole' not implemented")
}

func (m *PoliciesServiceServerMock) ListRoles(ctx context.Context, req *ListRolesReq) (*ListRolesResp, 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.ListRolesFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListRoles' not implemented")
}

func (m *PoliciesServiceServerMock) GetRole(ctx context.Context, req *GetRoleReq) (*Role, 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.GetRoleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetRole' not implemented")
}

func (m *PoliciesServiceServerMock) DeleteRole(ctx context.Context, req *DeleteRoleReq) (*DeleteRoleResp, 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.DeleteRoleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteRole' not implemented")
}

func (m *PoliciesServiceServerMock) UpdateRole(ctx context.Context, req *UpdateRoleReq) (*Role, 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.UpdateRoleFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateRole' not implemented")
}

func (m *PoliciesServiceServerMock) ListPolicyMembers(ctx context.Context, req *ListPolicyMembersReq) (*ListPolicyMembersResp, 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.ListPolicyMembersFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ListPolicyMembers' not implemented")
}

func (m *PoliciesServiceServerMock) RemovePolicyMembers(ctx context.Context, req *RemovePolicyMembersReq) (*RemovePolicyMembersResp, 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.RemovePolicyMembersFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'RemovePolicyMembers' not implemented")
}

func (m *PoliciesServiceServerMock) AddPolicyMembers(ctx context.Context, req *AddPolicyMembersReq) (*AddPolicyMembersResp, 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.AddPolicyMembersFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'AddPolicyMembers' not implemented")
}

func (m *PoliciesServiceServerMock) PurgeSubjectFromPolicies(ctx context.Context, req *PurgeSubjectFromPoliciesReq) (*PurgeSubjectFromPoliciesResp, 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.PurgeSubjectFromPoliciesFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'PurgeSubjectFromPolicies' not implemented")
}

// Reset resets all overridden functions
func (m *PoliciesServiceServerMock) Reset() {
	m.ReplacePolicyMembersFunc = nil
	m.CreatePolicyFunc = nil
	m.DeletePolicyFunc = nil
	m.ListPoliciesFunc = nil
	m.GetPolicyFunc = nil
	m.UpdatePolicyFunc = nil
	m.GetPolicyVersionFunc = nil
	m.CreateRoleFunc = nil
	m.ListRolesFunc = nil
	m.GetRoleFunc = nil
	m.DeleteRoleFunc = nil
	m.UpdateRoleFunc = nil
	m.ListPolicyMembersFunc = nil
	m.RemovePolicyMembersFunc = nil
	m.AddPolicyMembersFunc = nil
	m.PurgeSubjectFromPoliciesFunc = nil
}
