// Code generated by protoc-gen-grpc-mock. DO NOT EDIT.
// source: automate-gateway/api/license/license.proto

package license

import (
	"context"

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

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

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

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

// LicenseServerMock is the mock-what-you-want struct that stubs all not-overridden
// methods with "not implemented" returns
type LicenseServerMock struct {
	validateRequests   bool
	ApplyLicenseFunc   func(context.Context, *ApplyLicenseReq) (*ApplyLicenseResp, error)
	GetStatusFunc      func(context.Context, *GetStatusReq) (*GetStatusResp, error)
	RequestLicenseFunc func(context.Context, *RequestLicenseReq) (*RequestLicenseResp, error)
}

func (m *LicenseServerMock) ApplyLicense(ctx context.Context, req *ApplyLicenseReq) (*ApplyLicenseResp, 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.ApplyLicenseFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'ApplyLicense' not implemented")
}

func (m *LicenseServerMock) GetStatus(ctx context.Context, req *GetStatusReq) (*GetStatusResp, 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.GetStatusFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'GetStatus' not implemented")
}

func (m *LicenseServerMock) RequestLicense(ctx context.Context, req *RequestLicenseReq) (*RequestLicenseResp, 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.RequestLicenseFunc; f != nil {
		return f(ctx, req)
	}
	return nil, status.Error(codes.Internal, "mock: 'RequestLicense' not implemented")
}

// Reset resets all overridden functions
func (m *LicenseServerMock) Reset() {
	m.ApplyLicenseFunc = nil
	m.GetStatusFunc = nil
	m.RequestLicenseFunc = nil
}
