// Validate implements the runtime Validatable interface
773072
func (c Class) Validate(r strfmt.Registry) error {
	return c.Label().Validate(r)
}
28313
func (m *IPAMStatus) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateAllocations(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
752599
func (vl *Validator) Validate(v interface{}) error {
	return vl.validateStruct(reflect.ValueOf(v))
}
175213
func (s *mustRunAs) Validate(fldPath *field.Path, _ *api.Pod, _ *api.Container, runAsNonRoot *bool, runAsUser *int64) field.ErrorList {
	allErrs := field.ErrorList{}

	if runAsUser == nil {
		allErrs = append(allErrs, field.Required(fldPath.Child("runAsUser"), ""))
		return allErrs
	}

	if *s.opts.UID != *runAsUser {
		detail := fmt.Sprintf("must be: %v", *s.opts.UID)
		allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *runAsUser, detail))
		return allErrs
	}

	return allErrs
}
795560
func (c *AllConstraint) Validate(v interface{}) (err error) {
	if pdebug.Enabled {
		g := pdebug.Marker("AllConstraint.Validate").BindError(&err)
		defer g.End()
	}

	for _, celem := range c.constraints {
		if err := celem.Validate(v); err != nil {
			return err
		}
	}
	return nil
}
1051463
func (s *XPackSecurityPutRoleMappingService) Validate() error {
	var invalid []string
	if s.name == "" {
		invalid = append(invalid, "Name")
	}
	if s.body == nil {
		invalid = append(invalid, "Body")
	}
	if len(invalid) > 0 {
		return fmt.Errorf("missing required fields: %v", invalid)
	}
	return nil
}
452008
func (g *Generator) Validate() error {
	if g.Generator == "" {
		return errors.New(ErrValidation, errorMessages, "feed generator must not be empty")
	}
	if g.URI != "" {
		if _, err := url.Parse(g.URI); err != nil {
			return errors.Annotate(err, ErrParsing, errorMessages, "feed generator URI")
		}
	}
	return nil
}
445763
func (m *RuntimeFractionalPercent) Validate() error {
	if m == nil {
		return nil
	}

	if m.GetDefaultValue() == nil {
		return RuntimeFractionalPercentValidationError{
			field:  "DefaultValue",
			reason: "value is required",
		}
	}

	{
		tmp := m.GetDefaultValue()

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

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

	// no validation rules for RuntimeKey

	return nil
}
983045
func (o *Options) Validate(args []string) error {
	if len(args) != 0 {
		return errors.New("no arguments are supported")
	}
	if errs := validation.Validate(o.config); len(errs) != 0 {
		return errs.ToAggregate()
	}

	return nil
}
908514
func (vl *Validator) Validate(v interface{}) error {
	if v == nil {
		return nil
	}
	rv := reflect.ValueOf(v)
	w := &walker{
		v: vl,
		report: &ErrorReport{
			Root: rv,
			Type: "https://github.com/favclip/golidator",
		},
		ParentFieldName: "",
		Root:            rv,
		Current:         rv,
	}
	if err := w.walkStruct(); err != nil {
		return err
	}

	if len(w.report.Details) != 0 {
		return w.report
	}

	return nil
}
537197
func (a Access) Validate() error {
	switch a {
	case NoAccess, AdminAccess, ReadAccess, WriteAccess,
		LoginAccess, AddModelAccess, SuperuserAccess:
		return nil
	}
	return errors.NotValidf("access level %s", a)
}
849694
func (i *I) Validate(ctx *Context) error {
	_, err := i.template(ctx)
	return err
}
556336
func (c Code) Validate(_ interface{}) error {
	if codeRegex.Match([]byte(c)) {
		return nil
	}

	return errInvalidCode
}
1124964
func (config Config) Validate() error {
	if config.ApplicationGetter == nil {
		return errors.NotValidf("missing ApplicationGetter")
	}
	if config.ApplicationUpdater == nil {
		return errors.NotValidf("missing ApplicationUpdater")
	}
	if config.ServiceBroker == nil {
		return errors.NotValidf("missing ServiceBroker")
	}
	if config.ContainerBroker == nil {
		return errors.NotValidf("missing ContainerBroker")
	}
	if config.ProvisioningInfoGetter == nil {
		return errors.NotValidf("missing ProvisioningInfoGetter")
	}
	if config.LifeGetter == nil {
		return errors.NotValidf("missing LifeGetter")
	}
	if config.UnitUpdater == nil {
		return errors.NotValidf("missing UnitUpdater")
	}
	if config.ProvisioningStatusSetter == nil {
		return errors.NotValidf("missing ProvisioningStatusSetter")
	}
	return nil
}
24186
func (m *RuntimeUInt32) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for DefaultValue

	if len(m.GetRuntimeKey()) < 1 {
		return RuntimeUInt32ValidationError{
			field:  "RuntimeKey",
			reason: "value length must be at least 1 bytes",
		}
	}

	return nil
}
621278
func (pTypeDef *StringTest) Validate() error {
	if pTypeDef.Name == "" {
		return fmt.Errorf("StringTest: Missing required field: name")
	}
	if pTypeDef.Parent == "" {
		return fmt.Errorf("StringTest: Missing required field: parent")
	}
	return nil
}
225743
func (m *Lua) Validate() error {
	if m == nil {
		return nil
	}

	if len(m.GetInlineCode()) < 1 {
		return LuaValidationError{
			field:  "InlineCode",
			reason: "value length must be at least 1 bytes",
		}
	}

	return nil
}