// ChangeFilter is a transform function that alters status constraints set to
// change and replaces with the opposite of the prior status.
199636
func ChangeFilter(conf *yaml.Config, prev string) {
	for _, step := range conf.Pipeline {
		for i, status := range step.Constraints.Status.Include {
			if status != "change" && status != "changed" {
				continue
			}
			if prev == drone.StatusFailure {
				step.Constraints.Status.Include[i] = drone.StatusSuccess
			} else {
				step.Constraints.Status.Include[i] = drone.StatusFailure
			}
		}
	}
}
1259979
func (fm *filterManager) SetFilter(filter ...Filter) {
	fm.fmLocker.Lock()
	fm.filters = make([]Filter, len(filter))
	fm.addFilter(filter...)
	fm.fmLocker.Unlock()
}
710734
func (f *Filters) AddFilter(key, op, value string) {
	filter := &filter{Key: key, Op: op, Val: value}
	f.f = append(f.f, filter)
}
876254
func (fm *filterManager) RemoveFilter(filter ...Filter) {
	for i := range filter {
		fm.removeFilter(filter[i])
	}
}
1107487
func (s *DescribeDimensionKeysInput) SetFilter(v map[string]*string) *DescribeDimensionKeysInput {
	s.Filter = v
	return s
}
1109154
func (hook *AppInsightsHook) AddFilter(name string, fn func(interface{}) interface{}) {
	hook.filters[name] = fn
}
685997
func (s *GetCostAndUsageInput) SetFilter(v *Expression) *GetCostAndUsageInput {
	s.Filter = v
	return s
}
1114018
func (filterModulator *FilterModulator) ApplyFilter(msg *Message) (FilterResult, error) {
	return filterModulator.Filter.ApplyFilter(msg)
}
910876
func (s *PipelineActivity) SetFilter(v *FilterActivity) *PipelineActivity {
	s.Filter = v
	return s
}
779015
func (hook *FluentHook) AddFilter(name string, fn func(interface{}) interface{}) {
	hook.filters[name] = fn
}
758190
func (client *BaseClient) RemoveFilter(filter ...Filter) Client {
	client.filterManager.RemoveFilter(filter...)
	return client
}
1158285
func (s *ListPoliciesForTargetInput) SetFilter(v string) *ListPoliciesForTargetInput {
	s.Filter = &v
	return s
}
640166
func (s *DescribeEventsInput) SetFilter(v *EventFilter) *DescribeEventsInput {
	s.Filter = v
	return s
}
1359282
func (s *ListHandshakesForOrganizationInput) SetFilter(v *HandshakeFilter) *ListHandshakesForOrganizationInput {
	s.Filter = v
	return s
}
562908
func (client *BaseClient) SetFilter(filter ...Filter) Client {
	client.filterManager.SetFilter(filter...)
	return client
}
746474
func (s *ListEntityRecognizersInput) SetFilter(v *EntityRecognizerFilter) *ListEntityRecognizersInput {
	s.Filter = v
	return s
}
739627
func (r *Request) AddFilter(key string, value interface{}) *Request {
	if r.Filter == nil {
		r.Filter = map[string]interface{}{}
	}
	r.Filter[key] = value
	return r
}