// Validate validates this catalog
489855
func (m *Catalog) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
555350
func (list List) Validate(r *http.Request, response bool) *Error {
	for _, object := range list {
		err := object.Validate(r, response)
		if err != nil {
			return err
		}
	}

	return nil
}
741198
func (a *APS) Validate() error {
	if a == nil {
		return ErrIncomplete
	}

	// must have a body or a badge (or custom data)
	if len(a.Alert.Body) == 0 && a.Badge == badge.Preserve {
		return ErrIncomplete
	}
	return nil
}
813043
func (m *ListMatcher) Validate() error {
	if m == nil {
		return nil
	}

	switch m.MatchPattern.(type) {

	case *ListMatcher_OneOf:

		{
			tmp := m.GetOneOf()

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

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

	default:
		return ListMatcherValidationError{
			field:  "MatchPattern",
			reason: "value is required",
		}

	}

	return nil
}
1017251
func (m *SwaggerJSONWebKey) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
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
}
1187577
func (e Error) Validate(v interface{}) error {
	if e.Message == "" {
		return fmt.Errorf("invalid error message %q", e.Message)
	}

	if e.Code <= 0 {
		return fmt.Errorf("invalid error code %d", e.Code)
	}

	return nil
}
918434
func (validatingWebhookConfigurationStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	return validation.ValidateValidatingWebhookConfiguration(obj.(*admissionregistration.ValidatingWebhookConfiguration))
}
96256
func (s *SnapshotGetService) Validate() error {
	var invalid []string
	if s.repository == "" {
		invalid = append(invalid, "Repository")
	}
	if len(invalid) > 0 {
		return fmt.Errorf("missing required fields: %v", invalid)
	}
	return nil
}
983315
func (config Config) validate() error {
	if config.Collection == "" {
		return errors.New("missing collection")
	}
	if config.Mongo == nil {
		return errors.New("missing mongo client")
	}
	return nil
}
1053321
func (c *Caches) Validate() error {
	if c.RejectCacheSize < MinRejectCacheSize {
		return fmt.Errorf("reject cache size %d is less than min: %d",
			c.RejectCacheSize, MinRejectCacheSize)
	}
	if c.ChannelCacheSize < MinChannelCacheSize {
		return fmt.Errorf("channel cache size %d is less than min: %d",
			c.ChannelCacheSize, MinChannelCacheSize)
	}

	return nil
}
743817
func (m *Order) Validate(formats strfmt.Registry) error {
	var res []error

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
1319522
func (m *SwaggerJSONWebKeySet) Validate(formats strfmt.Registry) error {
	var res []error

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
160985
func (r *ArchiveRequest) Validate() error {
	switch {
	case r.Format == ArchiveRequest_Invalid:
		return errors.New("format must be valid")
	case r.Project == "":
		return errors.New("project is required")
	case r.Ref == "":
		return errors.New("ref is required")
	default:
		return nil
	}
}
1046325
func (f *CLI) validate() error {
	if f.install && f.uninstall {
		return errors.New("Install and uninstall are mutually exclusive")
	}
	return nil
}
1358484
func Validate(m []Validation) error {
	for _, item := range m {
		v := reflect.ValueOf(item.TargetValue)
		for _, constraint := range item.Constraints {
			var err error
			switch v.Kind() {
			case reflect.Ptr:
				err = validatePtr(v, constraint)
			case reflect.String:
				err = validateString(v, constraint)
			case reflect.Struct:
				err = validateStruct(v, constraint)
			case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
				err = validateInt(v, constraint)
			case reflect.Float32, reflect.Float64:
				err = validateFloat(v, constraint)
			case reflect.Array, reflect.Slice, reflect.Map:
				err = validateArrayMap(v, constraint)
			default:
				err = createError(v, constraint, fmt.Sprintf("unknown type %v", v.Kind()))
			}

			if err != nil {
				return err
			}
		}
	}
	return nil
}
151271
func (o *Options) Validate() error {
	if o.Output != "" && o.Output != "yaml" && o.Output != "json" {
		return errors.New(`--output must be 'yaml' or 'json'`)
	}

	return nil
}