// 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 *ComponentCandidate) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ComponentCandidate"}
	if s.ComponentName != nil && len(*s.ComponentName) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentName", 1))
	}
	if s.ComponentVersion != nil && len(*s.ComponentVersion) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ComponentVersion", 1))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * ComponentCandidate ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . ComponentName != nil && len ( * s . ComponentName ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . ComponentVersion != nil && len ( * s . ComponentVersion ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } 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 .