// validate checks if the given domain is valid, i.e. contains at least
// the minimum viable keys and values
513156
func (domain *TypedDataDomain) validate() error {
	if domain.ChainId == big.NewInt(0) {
		return errors.New("chainId must be specified according to EIP-155")
	}

	if len(domain.Name) == 0 && len(domain.Version) == 0 && len(domain.VerifyingContract) == 0 && len(domain.Salt) == 0 {
		return errors.New("domain is undefined")
	}

	return nil
}
1267665
func (m *SubjectAlternateName) Validate() error {
	if m == nil {
		return nil
	}

	switch m.Name.(type) {

	case *SubjectAlternateName_Dns:
		// no validation rules for Dns

	case *SubjectAlternateName_Uri:
		// no validation rules for Uri

	}

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

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
710404
func (m *Certificates) Validate() error {
	if m == nil {
		return nil
	}

	for idx, item := range m.GetCertificates() {
		_, _ = idx, item

		{
			tmp := item

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

				if err := v.Validate(); err != nil {
					return CertificatesValidationError{
						field:  fmt.Sprintf("Certificates[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	return nil
}
377746
func (u User) Validate() error {
	if u.Login == "" {
		return NewValidationError(errors.New("invalid user login"))
	}
	if u.Email != "" {
		if _, err := mail.ParseAddress(u.Email); err != nil {
			return NewValidationError(err)
		}
	}

	return nil
}
877010
func (c *Certificate) Validate() error {
	if len(c.CertPEM) == 0 {
		return errors.NotValidf("missing cert PEM")
	}
	if len(c.KeyPEM) == 0 {
		return errors.NotValidf("missing key PEM")
	}
	return nil
}
771080
func (m *Trigger) Validate() error {
	if m == nil {
		return nil
	}

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

	switch m.TriggerOneof.(type) {

	case *Trigger_Threshold:

		{
			tmp := m.GetThreshold()

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

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

	default:
		return TriggerValidationError{
			field:  "TriggerOneof",
			reason: "value is required",
		}

	}

	return nil
}
410066
func (m *Certificate) Validate() error {
	if m == nil {
		return nil
	}

	for idx, item := range m.GetCaCert() {
		_, _ = idx, item

		{
			tmp := item

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

				if err := v.Validate(); err != nil {
					return CertificateValidationError{
						field:  fmt.Sprintf("CaCert[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	for idx, item := range m.GetCertChain() {
		_, _ = idx, item

		{
			tmp := item

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

				if err := v.Validate(); err != nil {
					return CertificateValidationError{
						field:  fmt.Sprintf("CertChain[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	return nil
}
45450
func (s *IndicesShrinkService) Validate() error {
	var invalid []string
	if s.source == "" {
		invalid = append(invalid, "Source")
	}
	if s.target == "" {
		invalid = append(invalid, "Target")
	}
	if len(invalid) > 0 {
		return fmt.Errorf("missing required fields: %v", invalid)
	}
	return nil
}
1695
func (typedData *TypedData) validate() error {
	if err := typedData.Types.validate(); err != nil {
		return err
	}
	if err := typedData.Domain.validate(); err != nil {
		return err
	}
	return nil
}
1164624
func (config Config) Validate() error {
	if config.Facade == nil {
		return errors.NotValidf("nil Facade")
	}
	if config.Entity == nil {
		return errors.NotValidf("nil Entity")
	}
	if config.Result == nil {
		return errors.NotValidf("nil Result")
	}
	return nil
}
218706
func (r *ResponseDefinition) Validate() *dslengine.ValidationErrors {
	verr := new(dslengine.ValidationErrors)
	if r.Headers != nil {
		verr.Merge(r.Headers.Validate("response headers", r))
	}
	if r.Status == 0 {
		verr.Add(r, "response status not defined")
	}
	return verr.AsError()
}
70328
func (m *Body) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Truncated

	switch m.BodyType.(type) {

	case *Body_AsBytes:
		// no validation rules for AsBytes

	case *Body_AsString:
		// no validation rules for AsString

	}

	return nil
}
1278379
func (m *RateLimitRequest) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Domain

	for idx, item := range m.GetDescriptors() {
		_, _ = idx, item

		{
			tmp := item

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

				if err := v.Validate(); err != nil {
					return RateLimitRequestValidationError{
						field:  fmt.Sprintf("Descriptors[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	// no validation rules for HitsAddend

	return nil
}
541355
func (binaryStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	// TODO: validate
	return nil
}
973183
func (vc ValidChain) Validate(s string) error {
	for _, v := range vc {
		if e := v(s); e != nil {
			return e
		}
	}

	return nil
}
1138741
func (pTypeDef *UUIDTest) Validate() error {
	if pTypeDef.Myid == nil {
		return fmt.Errorf("UUIDTest: Missing required field: myid")
	}
	return nil
}