// Greater will add an error to the Validator if the first
// element of data.Values[field] is not greater than value or if the first
// element of data.Values[field] cannot be converted to a number.
197491
func (v *Validator) Greater(field string, value float64) *ValidationResult {
	return v.inequality(field, value, greater, "greater than")
}
1024912
func (t *Tags) Less(i, j int) bool {
	a := *t
	return a[i] < a[j]
}
1081313
func (v *MatchRule) Validate(value interface{}) error {
	value, isNil := Indirect(value)
	if isNil {
		return nil
	}

	isString, str, isBytes, bs := StringOrBytes(value)
	if isString && (str == "" || v.re.MatchString(str)) {
		return nil
	} else if isBytes && (len(bs) == 0 || v.re.Match(bs)) {
		return nil
	}
	return errors.New(v.message)
}
1094271
func (s Float64Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
277883
func (num Number) Equal(other Value) bool {
	switch other := other.(type) {
	case Number:
		return Compare(num, other) == 0
	default:
		return false
	}
}
1292464
func MaxError(f reflect.StructField, actual, max interface{}) error {
	return fmt.Errorf("%s: %v greater than %v", f.Name, actual, max)
}
593352
func (m *RateLimitSettings) Validate() error {
	if m == nil {
		return nil
	}

	{
		tmp := m.GetMaxTokens()

		if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

			if err := v.Validate(); err != nil {
				return RateLimitSettingsValidationError{
					field:  "MaxTokens",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}

	if wrapper := m.GetFillRate(); wrapper != nil {

		if wrapper.GetValue() <= 0 {
			return RateLimitSettingsValidationError{
				field:  "FillRate",
				reason: "value must be greater than 0",
			}
		}

	}

	return nil
}
610740
func (f Filter) GreaterThan(val interface{}) Filter {
	f.Op = ">"
	f.Val = val
	return f
}
182811
func (val *Validation) Validate(checkers ...Checker) *Validation {

	for _, checker := range checkers {
		if pass, msg := checker(); !pass {
			if val == nil {
				val = &Validation{}
			}

			val.Errors = append(val.Errors, msg)
		}
	}

	return val
}
675723
func (a AcceptSlice) Less(i, j int) bool {
	// Higher qvalues come first.
	if a[i].Q > a[j].Q {
		return true
	} else if a[i].Q < a[j].Q {
		return false
	}

	// Specific types come before wildcard types.
	if a[i].Type != "*" && a[j].Type == "*" {
		return true
	} else if a[i].Type == "*" && a[j].Type != "*" {
		return false
	}

	// Specific subtypes come before wildcard subtypes.
	if a[i].Subtype != "*" && a[j].Subtype == "*" {
		return true
	} else if a[i].Subtype == "*" && a[j].Subtype != "*" {
		return false
	}

	// A lot of extensions comes before not a lot of extensions.
	if len(a[i].Extensions) > len(a[j].Extensions) {
		return true
	}

	return false
}
173273
func (r *InRule) Validate(value interface{}) error {
	value, isNil := Indirect(value)
	if isNil || IsEmpty(value) {
		return nil
	}

	for _, e := range r.elements {
		if e == value {
			return nil
		}
	}
	return errors.New(r.message)
}
973335
func (m *RetryPolicy_RetryPriority) Validate() error {
	if m == nil {
		return nil
	}

	if len(m.GetName()) < 1 {
		return RetryPolicy_RetryPriorityValidationError{
			field:  "Name",
			reason: "value length must be at least 1 bytes",
		}
	}

	switch m.ConfigType.(type) {

	case *RetryPolicy_RetryPriority_Config:

		{
			tmp := m.GetConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return RetryPolicy_RetryPriorityValidationError{
						field:  "Config",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	case *RetryPolicy_RetryPriority_TypedConfig:

		{
			tmp := m.GetTypedConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return RetryPolicy_RetryPriorityValidationError{
						field:  "TypedConfig",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	return nil
}
950661
func (m *Buffer) Validate() error {
	if m == nil {
		return nil
	}

	if wrapper := m.GetMaxRequestBytes(); wrapper != nil {

		if wrapper.GetValue() <= 0 {
			return BufferValidationError{
				field:  "MaxRequestBytes",
				reason: "value must be greater than 0",
			}
		}

	}

	return nil
}
78780
func (c Comparators) Less(i, j int) bool {
	return c[i].Compare(c[j]) < 0
}
1182435
func (sli *serviceLogInfo) GreaterThanOrEqual(value string) bool {
	if sli.Version == "" {
		return false
	} else if value == "" {
		return true
	}

	a := version.Version(sli.Version)
	b := version.Version(value)
	return a.GreaterThanOrEqualTo(b)
}
702527
func (b *Bar) Value(n float64) {
	if n > b.Total {
		panic("Bar update value cannot be greater than the total")
	}
	b.value = n
}
820749
func (hg *Histogram) greaterRowCount(value types.Datum) float64 {
	gtCount := hg.notNullCount() - hg.lessRowCount(value) - hg.equalRowCount(value)
	if gtCount < 0 {
		gtCount = 0
	}
	return gtCount
}