// 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 *UpdateReceiptRuleInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateReceiptRuleInput"}
	if s.Rule == nil {
		invalidParams.Add(request.NewErrParamRequired("Rule"))
	}
	if s.RuleSetName == nil {
		invalidParams.Add(request.NewErrParamRequired("RuleSetName"))
	}
	if s.Rule != nil {
		if err := s.Rule.Validate(); err != nil {
			invalidParams.AddNested("Rule", err.(request.ErrInvalidParams))
		}
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * UpdateReceiptRuleInput ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . Rule == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . RuleSetName == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . Rule != nil { if err := s . Rule . 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 .