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

package authn

import (
	"context"

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

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

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

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

// TokensMgmtServiceServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type TokensMgmtServiceServerMock struct {
	validateRequests         bool
	GetTokensFunc            func(context.Context, *GetTokensReq) (*Tokens, error)
	CreateTokenFunc          func(context.Context, *CreateTokenReq) (*Token, error)
	CreateTokenWithValueFunc func(context.Context, *CreateTokenWithValueReq) (*Token, error)
	UpdateTokenFunc          func(context.Context, *UpdateTokenReq) (*Token, error)
	GetTokenFunc             func(context.Context, *GetTokenReq) (*Token, error)
	DeleteTokenFunc          func(context.Context, *DeleteTokenReq) (*DeleteTokenResp, error)
}

func (m *TokensMgmtServiceServerMock) GetTokens(ctx context.Context, req *GetTokensReq) (*Tokens, 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.GetTokensFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetTokens' not implemented")
}

func (m *TokensMgmtServiceServerMock) CreateToken(ctx context.Context, req *CreateTokenReq) (*Token, 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.CreateTokenFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateToken' not implemented")
}

func (m *TokensMgmtServiceServerMock) CreateTokenWithValue(ctx context.Context, req *CreateTokenWithValueReq) (*Token, 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.CreateTokenWithValueFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'CreateTokenWithValue' not implemented")
}

func (m *TokensMgmtServiceServerMock) UpdateToken(ctx context.Context, req *UpdateTokenReq) (*Token, 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.UpdateTokenFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'UpdateToken' not implemented")
}

func (m *TokensMgmtServiceServerMock) GetToken(ctx context.Context, req *GetTokenReq) (*Token, 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.GetTokenFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetToken' not implemented")
}

func (m *TokensMgmtServiceServerMock) DeleteToken(ctx context.Context, req *DeleteTokenReq) (*DeleteTokenResp, 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.DeleteTokenFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'DeleteToken' not implemented")
}

// Reset resets all overridden functions
func (m *TokensMgmtServiceServerMock) Reset() {
	m.GetTokensFunc = nil
	m.CreateTokenFunc = nil
	m.CreateTokenWithValueFunc = nil
	m.UpdateTokenFunc = nil
	m.GetTokenFunc = nil
	m.DeleteTokenFunc = nil
}
