// Code generated by protoc-gen-grpc-mock. DO NOT EDIT.
// source: external/iam/v2/introspect.proto

package v2

import (
	"context"

	request "github.com/chef/automate/api/external/iam/v2/request"
	response "github.com/chef/automate/api/external/iam/v2/response"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)

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

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

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

// AuthorizationServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type AuthorizationServerMock struct {
	validateRequests   bool
	IntrospectAllFunc  func(context.Context, *request.IntrospectAllReq) (*response.IntrospectResp, error)
	IntrospectSomeFunc func(context.Context, *request.IntrospectSomeReq) (*response.IntrospectResp, error)
	IntrospectFunc     func(context.Context, *request.IntrospectReq) (*response.IntrospectResp, error)
}

func (m *AuthorizationServerMock) IntrospectAll(ctx context.Context, req *request.IntrospectAllReq) (*response.IntrospectResp, 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.IntrospectAllFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'IntrospectAll' not implemented")
}

func (m *AuthorizationServerMock) IntrospectSome(ctx context.Context, req *request.IntrospectSomeReq) (*response.IntrospectResp, 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.IntrospectSomeFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'IntrospectSome' not implemented")
}

func (m *AuthorizationServerMock) Introspect(ctx context.Context, req *request.IntrospectReq) (*response.IntrospectResp, 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.IntrospectFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'Introspect' not implemented")
}

// Reset resets all overridden functions
func (m *AuthorizationServerMock) Reset() {
	m.IntrospectAllFunc = nil
	m.IntrospectSomeFunc = nil
	m.IntrospectFunc = nil
}
