// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates
// all the taints that apply to the filter in given taint list.
557417
func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool {
	if len(taints) == 0 {
		return true
	}

	for i := range taints {
		if applyFilter != nil && !applyFilter(&taints[i]) {
			continue
		}

		if !TolerationsTolerateTaint(tolerations, &taints[i]) {
			return false
		}
	}

	return true
}
53657
func DisallowedURLFilters(filters ...*regexp.Regexp) func(*Collector) {
	return func(c *Collector) {
		c.DisallowedURLFilters = filters
	}
}
1228424
func (s *DescribeAssociationExecutionTargetsInput) SetFilters(v []*AssociationExecutionTargetsFilter) *DescribeAssociationExecutionTargetsInput {
	s.Filters = v
	return s
}
209806
func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput {
	s.Filters = v
	return s
}
752600
func (s *ListDevicesInput) SetFilters(v []*DeviceFilter) *ListDevicesInput {
	s.Filters = v
	return s
}
719743
func (s *DescribeInstancePatchesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeInstancePatchesInput {
	s.Filters = v
	return s
}
1016635
func FilterByBundle(bundle string) (CertificateFilter, error) {
	bundleFilter, err := regexp.Compile(bundle)
	if err != nil {
		return nil, err
	}

	return func(cm *CertificateMetadata) bool {
		for _, rel := range cm.Releases {
			if bundleFilter.MatchString(rel.Bundle) {
				return true
			}
		}
		return false
	}, nil
}
909758
func (s *ListComplianceSummariesInput) SetFilters(v []*ComplianceStringFilter) *ListComplianceSummariesInput {
	s.Filters = v
	return s
}
941914
func ValidateConfiguration(config *internalapi.Configuration) error {
	allErrs := field.ErrorList{}
	fldpath := field.NewPath("podtolerationrestriction")
	allErrs = append(allErrs, validation.ValidateTolerations(config.Default, fldpath.Child("default"))...)
	allErrs = append(allErrs, validation.ValidateTolerations(config.Whitelist, fldpath.Child("whitelist"))...)
	if len(allErrs) > 0 {
		return fmt.Errorf("invalid config: %v", allErrs)
	}
	return nil
}
733592
func (s *BatchListIncomingTypedLinks) SetFilterAttributeRanges(v []*TypedLinkAttributeRange) *BatchListIncomingTypedLinks {
	s.FilterAttributeRanges = v
	return s
}
321701
func (f *RegexFilter) SetFilters(filters map[string]*regexp.Regexp) {
	f.Log.Log(FilterCount, len(filters), "Changing filters")
	f.mu.Lock()
	f.currentFilters = filters
	atomic.AddInt64(&f.filterChangeIndex, 1)
	f.mu.Unlock()
}
472394
func (s *DeviceSelectionResult) SetFilters(v []*DeviceFilter) *DeviceSelectionResult {
	s.Filters = v
	return s
}
245551
func ValidateTaintsInNodeAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}

	taints, err := helper.GetTaintsFromNodeAnnotations(annotations)
	if err != nil {
		allErrs = append(allErrs, field.Invalid(fldPath, core.TaintsAnnotationKey, err.Error()))
		return allErrs
	}

	if len(taints) > 0 {
		allErrs = append(allErrs, validateNodeTaints(taints, fldPath.Child(core.TaintsAnnotationKey))...)
	}

	return allErrs
}
7204
func (s *ListTagOptionsInput) SetFilters(v *ListTagOptionsFilters) *ListTagOptionsInput {
	s.Filters = v
	return s
}
175987
func GetTolerationsFromPodAnnotations(annotations map[string]string) ([]core.Toleration, error) {
	var tolerations []core.Toleration
	if len(annotations) > 0 && annotations[core.TolerationsAnnotationKey] != "" {
		err := json.Unmarshal([]byte(annotations[core.TolerationsAnnotationKey]), &tolerations)
		if err != nil {
			return tolerations, err
		}
	}
	return tolerations, nil
}
94058
func WithFilter(f Filter) ApplyOpt {
	return func(options *ApplyOptions) error {
		options.Filter = f
		return nil
	}
}
569847
func AreTolerationSecondsEqual(ts1, ts2 *int64) bool {
	if ts1 == ts2 {
		return true
	}
	if ts1 != nil && ts2 != nil && *ts1 == *ts2 {
		return true
	}
	return false
}