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

package authn

import (
	"context"

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

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

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

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

// AuthenticationServiceServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type AuthenticationServiceServerMock struct {
	validateRequests bool
	AuthenticateFunc func(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
}

func (m *AuthenticationServiceServerMock) Authenticate(ctx context.Context, req *AuthenticateRequest) (*AuthenticateResponse, 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.AuthenticateFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'Authenticate' not implemented")
}

// Reset resets all overridden functions
func (m *AuthenticationServiceServerMock) Reset() {
	m.AuthenticateFunc = nil
}
