// validate check if the caller has set the right fields.
6496
func (s HorizontalPodAutoscalerGeneratorV1) validate() error {
	if len(s.Name) == 0 {
		return fmt.Errorf("name must be specified")
	}
	if s.MaxReplicas < 1 {
		return fmt.Errorf("'max' is a required parameter and must be at least 1")
	}
	if s.MinReplicas > s.MaxReplicas {
		return fmt.Errorf("'max' must be greater than or equal to 'min'")
	}
	return nil
}
90111
func (*StringSchema) Validate(v reflect.Value) bool {
	_, ok := dereference(v).Interface().(string)
	return ok
}
1124467
func (c *ChannelsCreateCall) Validate(validate bool) *ChannelsCreateCall {
	c.validate = validate
	return c
}
820462
func (s Spec) Validate() error {
	if s.Cancel == nil {
		if !s.NoCancel {
			return errors.NotValidf("missing Cancel")
		}
	}
	if s.Worker == "" {
		return errors.NotValidf("mssing Worker")
	}
	return nil
}
1189031
func (val AnnotationValue) Validate(_ interface{}) error {
	if annotationValueRegex.Match([]byte(val)) {
		return nil
	}

	return errInvalidAnnotationValue
}
535066
func (c *ChannelsJoinCall) Validate(validate bool) *ChannelsJoinCall {
	c.validate = validate
	return c
}
498504
func Validate(v string, ctx *Context) error {
	return (&I{Value: v}).Validate(ctx)
}
1091369
func (r *notNilRule) Validate(value interface{}) error {
	_, isNil := Indirect(value)
	if isNil {
		return errors.New(r.message)
	}
	return nil
}
1097301
func (c *GroupsCreateCall) Validate(validate bool) *GroupsCreateCall {
	c.validate = validate
	return c
}
360356
func (s *ArraySchema) Validate(v reflect.Value) bool {
	v = dereference(v)

	// This needs to be a slice
	return v.Kind() == reflect.Slice || v.Kind() == reflect.Array
}
727169
func (c *Config) Validate() error {
	var result *multierror.Error

	if c.PoolName == "" {
		result = multierror.Append(result, fmt.Errorf("pool_name is required"))
	}

	if c.RootPath == "" {
		result = multierror.Append(result, fmt.Errorf("root_path is required"))
	}

	if c.BaseImageSize == "" {
		result = multierror.Append(result, fmt.Errorf("base_image_size is required"))
	}

	return result.ErrorOrNil()
}
1111145
func (v *Validator) Validate(x interface{}) error {
	jsv, err := v.validator()
	if err != nil {
		return err
	}
	return jsv.Validate(x)
}
1333293
func (o *SetSelectorOptions) Validate() error {
	if o.selector == nil {
		return fmt.Errorf("one selector is required")
	}
	return nil
}
779949
func Validate(req *http.Request, userStruct FieldMapper) error {
	err := validate(Errors{}, req, userStruct)
	if len(err) > 0 {
		return err
	}

	return nil
}
1047750
func (c *Config) Validate(configKey string) error {
	if len(c.DialInfo.Addrs) == 0 {
		return fmt.Errorf("At least one element in %s.dial_info.addrs is required", configKey)
	}
	if c.DialInfo.Timeout == 0 {
		c.DialInfo.Timeout = 10 * time.Second
	}
	if c.DialInfo.Database == "" {
		return fmt.Errorf("%s.dial_info.database is required", configKey)
	}
	return nil
}
564021
func (p *Number) Validate() error {
	if p.Int8 != nil {
		p.Variant = NumberVariantInt8
	} else if p.Int16 != nil {
		p.Variant = NumberVariantInt16
	} else if p.Int32 != nil {
		p.Variant = NumberVariantInt32
	} else if p.Int64 != nil {
		p.Variant = NumberVariantInt64
	} else if p.Float32 != nil {
		p.Variant = NumberVariantFloat32
	} else if p.Float64 != nil {
		p.Variant = NumberVariantFloat64
	} else {
		return fmt.Errorf("Number: Missing required variant")
	}
	return nil
}
434912
func (c *GroupsRenameCall) Validate(validate bool) *GroupsRenameCall {
	c.validate = validate
	return c
}