// MaxProperties specifies the maximum number of properties this
// constraint can allow. If unspecified, it is not checked.
191919
func (o *ObjectConstraint) MaxProperties(n int) *ObjectConstraint {
	o.maxProperties = n
	return o
}
1042984
func (iter *DistinctPropertyIterator) satisfiesProperties(option *structs.Node, set []*propertySet) bool {
	for _, ps := range set {
		if satisfies, reason := ps.SatisfiesDistinctProperties(option, iter.tg.Name); !satisfies {
			iter.ctx.Metrics().FilterNode(option, reason)
			return false
		}
	}

	return true
}
1242274
func (obj *GenericMeasure) SetProperties(ctx context.Context, prop *GenericMeasureProperties) error {
	err := obj.rpc(ctx, "SetProperties", nil, prop)
	return err 
}
549622
func (s *SliceQuery) Max(max int) *SliceQuery {
	s.max = &max
	return s
}
584348
func (s *SdkType) SetConfigurationProperties(v []*SdkConfigurationProperty) *SdkType {
	s.ConfigurationProperties = v
	return s
}
982601
func (s *DocumentationPart) SetProperties(v string) *DocumentationPart {
	s.Properties = &v
	return s
}
1075650
func (group *Group) GetProperties(contract *Contract) (*Properties, error) {
	return GetProperties(contract, group)
}
601061
func getMaxLimits(limit *corev1.LimitRange, current corev1.ResourceList) corev1.ResourceList {
	res := current

	for _, item := range limit.Spec.Limits {
		if item.Type != imagev1.LimitTypeImageStream {
			continue
		}
		for _, resource := range []corev1.ResourceName{imagev1.ResourceImageStreamImages, imagev1.ResourceImageStreamTags} {
			if max, ok := item.Max[resource]; ok {
				if oldMax, exists := res[resource]; !exists || oldMax.Cmp(max) > 0 {
					if res == nil {
						res = make(corev1.ResourceList)
					}
					res[resource] = max
				}
			}
		}
	}

	return res
}
182869
func (b *SampleJSONBuilder) Properties() []*SamplePropertyInfo {
	return []*SamplePropertyInfo{
		b.B,
		b.C,
		b.D,
		b.E,
	}
}
288994
func (s *Configuration) SetProperties(v map[string]*string) *Configuration {
	s.Properties = v
	return s
}
54336
func maxRequestConstraint(limitType string, resourceName string, enforced resource.Quantity, request api.ResourceList) error {
	req, reqExists := request[api.ResourceName(resourceName)]
	observedReqValue, _, enforcedValue := requestLimitEnforcedValues(req, resource.Quantity{}, enforced)

	if !reqExists {
		return fmt.Errorf("maximum %s usage per %s is %s.  No request is specified.", resourceName, limitType, enforced.String())
	}
	if observedReqValue > enforcedValue {
		return fmt.Errorf("maximum %s usage per %s is %s, but request is %s.", resourceName, limitType, enforced.String(), req.String())
	}
	return nil
}
1126682
func Max(values []int64) int64 {
	if len(values) == 0 {
		return 0
	}
	if isSorted(values) {
		return values[len(values)-1]
	}
	max := values[0]
	for i := 1; i < len(values); i++ {
		v := values[i]
		if max < v {
			max = v
		}
	}
	return max
}
568775
func MaxItems(path, in string, size, max int64) *errors.Validation {
	if size > max {
		return errors.TooManyItems(path, in, max)
	}
	return nil
}
132238
func (o *ObjectConstraint) PatternProperties(key *regexp.Regexp, c Constraint) *ObjectConstraint {
	o.proplock.Lock()
	defer o.proplock.Unlock()

	o.patternProperties[key] = c
	return o
}
1368614
func (c *Component) AddProperty(key string, val string) {
	c.Properties[key] = val
}
946618
func properties(b *buildbot.Build) (result []*ui.PropertyGroup) {
	groups := map[string]*ui.PropertyGroup{}
	allProps := map[string]Prop{}
	for _, prop := range b.Properties {
		allProps[prop.Name] = Prop{
			Value: prop.Value,
			Group: prop.Source,
		}
	}
	for key, prop := range allProps {
		value := prop.Value
		groupName := prop.Group
		if _, ok := groups[groupName]; !ok {
			groups[groupName] = &ui.PropertyGroup{GroupName: groupName}
		}
		vs := parseProp(value)
		groups[groupName].Property = append(groups[groupName].Property, &ui.Property{
			Key:   key,
			Value: vs,
		})
	}
	// Insert the groups into a list in alphabetical order.
	// You have to make a separate sorting data structure because Go doesn't like
	// sorting things for you.
	groupNames := make([]string, 0, len(groups))
	for n := range groups {
		groupNames = append(groupNames, n)
	}
	sort.Strings(groupNames)
	for _, k := range groupNames {
		group := groups[k]
		// Also take this oppertunity to sort the properties within the groups.
		sort.Sort(group)
		result = append(result, group)
	}
	return
}
100940
func (q *TermRangeQuery) Max(max string, inclusive bool) *TermRangeQuery {
	q.options["max"] = max
	q.options["inclusive_max"] = inclusive
	return q
}