// GetFilterQueue indicates an expected call of GetFilterQueue
// nolint
762536
func (mr *MockEnforcerMockRecorder) GetFilterQueue() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFilterQueue", reflect.TypeOf((*MockEnforcer)(nil).GetFilterQueue))
}
221315
func (c *Client) GetCFilter(blockHash *chainhash.Hash,
	filterType wire.FilterType) (*wire.MsgCFilter, error) {
	return c.GetCFilterAsync(blockHash, filterType).Receive()
}
155375
func (sc *Client) FilterMessages(ctx context.Context, id string) ([]*whisper.Message, error) {
	var messages []*whisper.Message
	return messages, sc.c.CallContext(ctx, &messages, "shh_getFilterMessages", id)
}
695270
func (rpc *EthRPC) EthGetFilterChanges(filterID string) ([]Log, error) {
	var logs = []Log{}
	err := rpc.call("eth_getFilterChanges", &logs, filterID)
	return logs, err
}
81066
func (client *Client) GetStacks(filters ...Filter) ([]Stack, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetStacksRequest,
		Query:       ConvertFilterParameters(filters),
	})
	if err != nil {
		return nil, nil, err
	}

	var fullStacksList []Stack
	warnings, err := client.paginate(request, Stack{}, func(item interface{}) error {
		if space, ok := item.(Stack); ok {
			fullStacksList = append(fullStacksList, space)
		} else {
			return ccerror.UnknownObjectInListError{
				Expected:   Stack{},
				Unexpected: item,
			}
		}
		return nil
	})

	return fullStacksList, warnings, err
}
604149
func KeyFilter(key string, f Filter) Option {
	return func(ec *Envcfg) {
		ec.filters[key] = f
	}
}
1142839
func ParseFilterQL(filter string) (*FilterStatement, error) {
	f, err := NewFilterParser(filter).ParseFilter()
	if err != nil {
		return nil, err
	}
	return f.FilterStatement, nil
}
830831
func (fs *FilterService) GetList() ([]*Filter, *Response, error) {

	options := &GetQueryOptions{}
	apiEndpoint := "rest/api/2/filter"
	req, err := fs.client.NewRequest("GET", apiEndpoint, nil)
	if err != nil {
		return nil, nil, err
	}

	if options != nil {
		q, err := query.Values(options)
		if err != nil {
			return nil, nil, err
		}
		req.URL.RawQuery = q.Encode()
	}

	filters := []*Filter{}
	resp, err := fs.client.Do(req, &filters)
	if err != nil {
		jerr := NewJiraError(resp, err)
		return nil, resp, jerr
	}
	return filters, resp, err
}
922596
func (client *Client) GetServices(filters ...Filter) ([]Service, Warnings, error) {
	opts := requestOptions{
		RequestName: internal.GetServicesRequest,
		Query:       ConvertFilterParameters(filters),
	}

	return client.makeServicesRequest(opts)
}
1008621
func (s *Selection) NextFilteredUntilMatcher(filter, until Matcher) *Selection {
	return filterAndPush(s, getSiblingNodes(s.Nodes, siblingNextUntil,
		until, nil), filter)
}
338896
func (mr *MockAuthorizeResponderMockRecorder) GetQuery() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQuery", reflect.TypeOf((*MockAuthorizeResponder)(nil).GetQuery))
}
685181
func (client *Client) GetRouteMappings(filters ...Filter) ([]RouteMapping, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetRouteMappingsRequest,
		Query:       ConvertFilterParameters(filters),
	})
	if err != nil {
		return nil, nil, err
	}

	var fullRouteMappingsList []RouteMapping
	warnings, err := client.paginate(request, RouteMapping{}, func(item interface{}) error {
		if routeMapping, ok := item.(RouteMapping); ok {
			fullRouteMappingsList = append(fullRouteMappingsList, routeMapping)
		} else {
			return ccerror.UnknownObjectInListError{
				Expected:   RouteMapping{},
				Unexpected: item,
			}
		}
		return nil
	})

	return fullRouteMappingsList, warnings, err
}
1345495
func Filters(f filter.Filter) func(Call) error {
	return func(hc Call) error {
		if c, ok := hc.(hasQueryOptions); ok {
			pbF, err := f.ConstructPBFilter()
			if err != nil {
				return err
			}
			c.setFilter(pbF)
			return nil
		}
		return errors.New("'Filters' option can only be used with Get or Scan request")
	}
}
285778
func NewFilterQueue(queueSeparation bool, MarkValue int, QueueStart, NumberOfNetworkQueues, NumberOfApplicationQueues uint16, NetworkQueueSize, ApplicationQueueSize uint32) *FilterQueue {

	fq := &FilterQueue{
		QueueSeparation:      queueSeparation,
		MarkValue:            MarkValue,
		NetworkQueueSize:     NetworkQueueSize,
		ApplicationQueueSize: ApplicationQueueSize,
	}

	if queueSeparation {

		fq.ApplicationQueue = QueueStart
		fq.ApplicationQueuesSynStr = strconv.Itoa(int(fq.ApplicationQueue)) + ":" + strconv.Itoa(int(fq.ApplicationQueue+NumberOfApplicationQueues-1))
		fq.ApplicationQueuesAckStr = strconv.Itoa(int(fq.ApplicationQueue+1*NumberOfApplicationQueues)) + ":" + strconv.Itoa(int(fq.ApplicationQueue+2*NumberOfApplicationQueues-1))
		fq.ApplicationQueuesSynAckStr = strconv.Itoa(int(fq.ApplicationQueue+2*NumberOfApplicationQueues)) + ":" + strconv.Itoa(int(fq.ApplicationQueue+3*NumberOfApplicationQueues-1))
		fq.ApplicationQueuesSvcStr = strconv.Itoa(int(fq.ApplicationQueue+3*NumberOfApplicationQueues)) + ":" + strconv.Itoa(int(fq.ApplicationQueue+4*NumberOfApplicationQueues-1))
		fq.NumberOfApplicationQueues = NumberOfApplicationQueues * 4

		fq.NetworkQueue = QueueStart + fq.NumberOfApplicationQueues
		fq.NetworkQueuesSynStr = strconv.Itoa(int(fq.NetworkQueue)) + ":" + strconv.Itoa(int(fq.NetworkQueue+NumberOfNetworkQueues-1))
		fq.NetworkQueuesAckStr = strconv.Itoa(int(fq.NetworkQueue+1*NumberOfNetworkQueues)) + ":" + strconv.Itoa(int(fq.NetworkQueue+2*NumberOfNetworkQueues-1))
		fq.NetworkQueuesSynAckStr = strconv.Itoa(int(fq.NetworkQueue+2*NumberOfNetworkQueues)) + ":" + strconv.Itoa(int(fq.NetworkQueue+3*NumberOfNetworkQueues-1))
		fq.NetworkQueuesSvcStr = strconv.Itoa(int(fq.NetworkQueue+3*NumberOfNetworkQueues)) + ":" + strconv.Itoa(int(fq.NetworkQueue+4*NumberOfNetworkQueues-1))
		fq.NumberOfNetworkQueues = NumberOfNetworkQueues * 4
	} else {

		fq.ApplicationQueue = QueueStart
		fq.ApplicationQueuesSynStr = strconv.Itoa(int(fq.ApplicationQueue)) + ":" + strconv.Itoa(int(fq.ApplicationQueue+NumberOfApplicationQueues-1))
		fq.ApplicationQueuesAckStr = fq.ApplicationQueuesSynStr
		fq.ApplicationQueuesSvcStr = fq.ApplicationQueuesSynStr
		fq.ApplicationQueuesSynAckStr = fq.ApplicationQueuesSynStr
		fq.NumberOfApplicationQueues = NumberOfApplicationQueues

		fq.NetworkQueue = QueueStart + fq.NumberOfApplicationQueues
		fq.NetworkQueuesSynStr = strconv.Itoa(int(fq.NetworkQueue)) + ":" + strconv.Itoa(int(fq.NetworkQueue+NumberOfNetworkQueues-1))
		fq.NetworkQueuesAckStr = fq.NetworkQueuesSynStr
		fq.NetworkQueuesSynAckStr = fq.NetworkQueuesSynStr
		fq.NetworkQueuesSvcStr = fq.NetworkQueuesSynStr
		fq.NumberOfNetworkQueues = NumberOfNetworkQueues
	}

	return fq
}
842002
func (filter *Sample) ApplyFilter(msg *core.Message) (core.FilterResult, error) {
	// Ignore based on StreamID
	if ignore, known := filter.ignore[msg.GetStreamID()]; known && ignore {
		return core.FilterResultMessageAccept, nil // ### return, do not limit ###
	}

	// Accept the first n messages of each group, reject the rest
	// Overflow is not really an issue here as it will take years to get one
	index := (atomic.AddUint64(filter.count, 1) - 1) % filter.group
	if index < filter.rate {
		return core.FilterResultMessageAccept, nil // ### return, ok ###
	}

	return filter.GetFilterResultMessageReject(), nil
}
1239137
func GetFilterHash(filter *gcs.Filter) (chainhash.Hash, error) {
	filterData, err := filter.NBytes()
	if err != nil {
		return chainhash.Hash{}, err
	}

	return chainhash.DoubleHashH(filterData), nil
}
87370
func (filters FilterArray) ApplyFilter(msg *Message) (FilterResult, error) {
	for _, filter := range filters {
		result, err := filter.ApplyFilter(msg)
		if err != nil {
			return result, err
		}

		if result != FilterResultMessageAccept {
			return result, nil
		}
	}
	return FilterResultMessageAccept, nil
}