func (s *RulesSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RulesSource"}
	if s.RulesSourceList != nil {
		if err := s.RulesSourceList.Validate(); err != nil {
			invalidParams.AddNested("RulesSourceList", err.(request.ErrInvalidParams))
		}
	}
	if s.StatefulRules != nil {
		for i, v := range s.StatefulRules {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StatefulRules", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.StatelessRulesAndCustomActions != nil {
		if err := s.StatelessRulesAndCustomActions.Validate(); err != nil {
			invalidParams.AddNested("StatelessRulesAndCustomActions", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid.
// Validate inspects the fields of the type to determine if they are valid .
func (s *RulesSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RulesSource"}
	if s.RulesSourceList != nil {
		if err := s.RulesSourceList.Validate(); err != nil {
			invalidParams.AddNested("RulesSourceList", err.(request.ErrInvalidParams))
		}
	}
	if s.StatefulRules != nil {
		for i, v := range s.StatefulRules {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StatefulRules", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.StatelessRulesAndCustomActions != nil {
		if err := s.StatelessRulesAndCustomActions.Validate(); err != nil {
			invalidParams.AddNested("StatelessRulesAndCustomActions", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * RulesSource ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . RulesSourceList != nil { if err := s . RulesSourceList . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if s . StatefulRules != nil { for i , v := range s . StatefulRules { if v == nil { continue } if err := v . Validate ( ) ; err != nil { invalidParams . AddNested ( fmt . Sprintf ( " " , " " , i ) , err . ( request . ErrInvalidParams ) ) } } } if s . StatelessRulesAndCustomActions != nil { if err := s . StatelessRulesAndCustomActions . Validate ( ) ; err != nil { invalidParams . AddNested ( " " , err . ( request . ErrInvalidParams ) ) } } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .