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

package local_user

import (
	"context"

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

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

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

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

// UsersMgmtServiceServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type UsersMgmtServiceServerMock struct {
	validateRequests bool
	GetUsersFunc     func(context.Context, *GetUsersReq) (*Users, error)
	GetUserFunc      func(context.Context, *Email) (*User, error)
	CreateUserFunc   func(context.Context, *CreateUserReq) (*User, error)
	DeleteUserFunc   func(context.Context, *Email) (*DeleteUserResp, error)
	UpdateUserFunc   func(context.Context, *UpdateUserReq) (*User, error)
	UpdateSelfFunc   func(context.Context, *UpdateSelfReq) (*User, error)
}

func (m *UsersMgmtServiceServerMock) GetUsers(ctx context.Context, req *GetUsersReq) (*Users, 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.GetUsersFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetUsers' not implemented")
}

func (m *UsersMgmtServiceServerMock) GetUser(ctx context.Context, req *Email) (*User, 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.GetUserFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetUser' not implemented")
}

func (m *UsersMgmtServiceServerMock) CreateUser(ctx context.Context, req *CreateUserReq) (*User, 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.CreateUserFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateUser' not implemented")
}

func (m *UsersMgmtServiceServerMock) DeleteUser(ctx context.Context, req *Email) (*DeleteUserResp, 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.DeleteUserFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteUser' not implemented")
}

func (m *UsersMgmtServiceServerMock) UpdateUser(ctx context.Context, req *UpdateUserReq) (*User, 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.UpdateUserFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateUser' not implemented")
}

func (m *UsersMgmtServiceServerMock) UpdateSelf(ctx context.Context, req *UpdateSelfReq) (*User, 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.UpdateSelfFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateSelf' not implemented")
}

// Reset resets all overridden functions
func (m *UsersMgmtServiceServerMock) Reset() {
	m.GetUsersFunc = nil
	m.GetUserFunc = nil
	m.CreateUserFunc = nil
	m.DeleteUserFunc = nil
	m.UpdateUserFunc = nil
	m.UpdateSelfFunc = nil
}
