// WithZoneFilter applies a filter based on zone name.
771988
func WithZoneFilter(zone string) ReqOption {
	return func(opt *reqOption) {
		opt.params.Set("name", zone)
	}
}
242102
func (set *TemplateSet) BanFilter(name string) error {
	_, has := filters[name]
	if !has {
		return errors.Errorf("filter '%s' not found", name)
	}
	if set.firstTemplateCreated {
		return errors.New("you cannot ban any filters after you've added your first template to your template set")
	}
	_, has = set.bannedFilters[name]
	if has {
		return errors.Errorf("filter '%s' is already banned", name)
	}
	set.bannedFilters[name] = true

	return nil
}
362139
func Zone() (string, error) {
	zone, err := getTrimmed("instance/zone")
	// zone is of the form "projects/<projNum>/zones/<zoneName>".
	if err != nil {
		return "", err
	}
	return zone[strings.LastIndex(zone, "/")+1:], nil
}
474542
func (s *GetCostForecastInput) SetFilter(v *Expression) *GetCostForecastInput {
	s.Filter = v
	return s
}
1363636
func (jb *join) PushFilter(pb *primitiveBuilder, filter sqlparser.Expr, whereType string, origin builder) error {
	if jb.isOnLeft(origin.Order()) {
		return jb.Left.PushFilter(pb, filter, whereType, origin)
	}
	if jb.ejoin.Opcode == engine.LeftJoin {
		return errors.New("unsupported: cross-shard left join and where clause")
	}
	return jb.Right.PushFilter(pb, filter, whereType, origin)
}
1159503
func (m *Metrics) AddZone(z string) {
	m.zoneMu.Lock()
	m.zoneMap[z] = struct{}{}
	m.zoneNames = keys(m.zoneMap)
	m.zoneMu.Unlock()
}
837354
func (s *GetReservationUtilizationInput) SetFilter(v *Expression) *GetReservationUtilizationInput {
	s.Filter = v
	return s
}
283862
func (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder {
	b.filters = append(b.filters, filter)
	return b
}
228933
func (api *API) UpdateFilters(zoneID string, filters []Filter) ([]Filter, error) {
	for _, filter := range filters {
		if filter.ID == "" {
			return []Filter{}, errors.Errorf("filter ID cannot be empty")
		}
	}

	uri := "/zones/" + zoneID + "/filters"

	res, err := api.makeRequest("PUT", uri, filters)
	if err != nil {
		return []Filter{}, errors.Wrap(err, errMakeRequestError)
	}

	var filtersResponse FiltersDetailResponse
	err = json.Unmarshal(res, &filtersResponse)
	if err != nil {
		return []Filter{}, errors.Wrap(err, errUnmarshalError)
	}

	return filtersResponse.Result, nil
}
605758
func networkFilter(name string, external bool) *neutron.Filter {
	filter := neutron.NewFilter()
	filter.Set(neutron.FilterNetwork, fmt.Sprintf("%s", name))
	filter.Set(neutron.FilterRouterExternal, fmt.Sprintf("%t", external))
	return filter
}
356669
func (s *GetAccountAuthorizationDetailsInput) SetFilter(v []*string) *GetAccountAuthorizationDetailsInput {
	s.Filter = v
	return s
}
52868
func (s *ZonesService) ListZones(accountID string, options *ZoneListOptions) (*zonesResponse, error) {
	path := versioned(fmt.Sprintf("/%v/zones", accountID))
	zonesResponse := &zonesResponse{}

	path, err := addURLQueryOptions(path, options)
	if err != nil {
		return nil, err
	}

	resp, err := s.client.get(path, zonesResponse)
	if err != nil {
		return zonesResponse, err
	}

	zonesResponse.HttpResponse = resp
	return zonesResponse, nil
}
1039548
func (s *GetReservationCoverageInput) SetFilter(v *Expression) *GetReservationCoverageInput {
	s.Filter = v
	return s
}
1158285
func (s *ListPoliciesForTargetInput) SetFilter(v string) *ListPoliciesForTargetInput {
	s.Filter = &v
	return s
}
357768
func (o *PatchPrefilterParams) WithContext(ctx context.Context) *PatchPrefilterParams {
	o.SetContext(ctx)
	return o
}
577421
func WithTargetFilter(filter fab.TargetFilter) Opt {
	return func(p *DiscoveryWrapper) {
		p.filter = filter
	}
}
1051138
func (s *FakeAWSServices) WithAz(az string) *FakeAWSServices {
	if s.selfInstance.Placement == nil {
		s.selfInstance.Placement = &ec2.Placement{}
	}
	s.selfInstance.Placement.AvailabilityZone = aws.String(az)
	return s
}