code: Map<String, Object> mapFieldNameToValue(Object toMap) {
      Class<?> typeOfObjectToMap = toMap.getClass();
      Map<String, Object> toRet = new HashMap<>();
      Set<Field> fieldsToMap = getFieldsToSerialize(typeOfObjectToMap);
      Object fieldValue = null;
      for (Field field : fieldsToMap) {
        BigqueryFieldMarshaller marshaller = findMarshaller(field, marshallers);
        if (marshaller != null) {
          fieldValue = marshaller.getFieldValue(field, toMap);
        } else {
          fieldValue = getFieldValue(field, toMap);
        }
        assertFieldValue(field, fieldValue);
        if (fieldValue == null){
            continue;
        }
  
        if (marshaller != null) {
          toRet.put(getFieldName(field), fieldValue);
        } else if (BigQueryFieldUtil.isCollectionOrArray(field.getType())) {
          toRet.put(getFieldName(field), mapRepeatedFieldToListOfValues(field, fieldValue));
        } else {
          toRet.put(getFieldName(field), mapFieldNameToValue(fieldValue));
        }
      }
      return toRet;
    }
docs: Converts the input object into a nested map of field name to field value. Recursively breaks
  down complex field types to simple bigquery types as listed in {@link BigQueryDataTypeUtil}.
  Uses reflection to infer the type and value of fields. If any field in the class hierarchy is
  protected by {@link SecurityManager} the method will fail. Fields annotated with
  {@link BigQueryIgnore} are ignored
  
  @param toMap of type object
  @return a nested map of field name to field value.