// Automatically generated by mockimpl. DO NOT EDIT!

package mock

import "github.com/fleetdm/fleet/v4/server/fleet"

var _ fleet.QueryStore = (*QueryStore)(nil)

type ApplyQueriesFunc func(authorID uint, queries []*fleet.Query) error

type NewQueryFunc func(query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error)

type SaveQueryFunc func(query *fleet.Query) error

type DeleteQueryFunc func(name string) error

type DeleteQueriesFunc func(ids []uint) (uint, error)

type QueryFunc func(id uint) (*fleet.Query, error)

type ListQueriesFunc func(opt fleet.ListOptions) ([]*fleet.Query, error)

type QueryByNameFunc func(name string, opts ...fleet.OptionalArg) (*fleet.Query, error)

type QueryStore struct {
	ApplyQueriesFunc        ApplyQueriesFunc
	ApplyQueriesFuncInvoked bool

	NewQueryFunc        NewQueryFunc
	NewQueryFuncInvoked bool

	SaveQueryFunc        SaveQueryFunc
	SaveQueryFuncInvoked bool

	DeleteQueryFunc        DeleteQueryFunc
	DeleteQueryFuncInvoked bool

	DeleteQueriesFunc        DeleteQueriesFunc
	DeleteQueriesFuncInvoked bool

	QueryFunc        QueryFunc
	QueryFuncInvoked bool

	ListQueriesFunc        ListQueriesFunc
	ListQueriesFuncInvoked bool

	QueryByNameFunc        QueryByNameFunc
	QueryByNameFuncInvoked bool
}

func (s *QueryStore) ApplyQueries(authorID uint, queries []*fleet.Query) error {
	s.ApplyQueriesFuncInvoked = true
	return s.ApplyQueriesFunc(authorID, queries)
}

func (s *QueryStore) NewQuery(query *fleet.Query, opts ...fleet.OptionalArg) (*fleet.Query, error) {
	s.NewQueryFuncInvoked = true
	return s.NewQueryFunc(query, opts...)
}

func (s *QueryStore) SaveQuery(query *fleet.Query) error {
	s.SaveQueryFuncInvoked = true
	return s.SaveQueryFunc(query)
}

func (s *QueryStore) DeleteQuery(name string) error {
	s.DeleteQueryFuncInvoked = true
	return s.DeleteQueryFunc(name)
}

func (s *QueryStore) DeleteQueries(ids []uint) (uint, error) {
	s.DeleteQueriesFuncInvoked = true
	return s.DeleteQueriesFunc(ids)
}

func (s *QueryStore) Query(id uint) (*fleet.Query, error) {
	s.QueryFuncInvoked = true
	return s.QueryFunc(id)
}

func (s *QueryStore) ListQueries(opt fleet.ListOptions) ([]*fleet.Query, error) {
	s.ListQueriesFuncInvoked = true
	return s.ListQueriesFunc(opt)
}

func (s *QueryStore) QueryByName(name string, opts ...fleet.OptionalArg) (*fleet.Query, error) {
	s.QueryByNameFuncInvoked = true
	return s.QueryByNameFunc(name, opts...)
}
