code: @SuppressWarnings("unchecked")
      private void updateMap(Map<String, Object> parentMap, String paramName, Object paramValue) {
          Object currentValue = parentMap.get(paramName);
          if (currentValue == null || !(currentValue instanceof Map)) {
              if (paramValue instanceof Map) {
                  parentMap.put(paramName, paramValue);
              } else {
                  parentMap.put(paramName, paramValue.toString());
              }
          } else {
              Utils.require(paramValue instanceof Map,
                            "Parameter '%s' must be a map: %s", paramName, paramValue.toString());
              Map<String, Object> currentMap = (Map<String, Object>)currentValue;
              Map<String, Object> updateMap = (Map<String, Object>)paramValue;
              for (String subParam : updateMap.keySet()) {
                  updateMap(currentMap, subParam, updateMap.get(subParam));
              }
          }
      }
docs: Replace or add the given parameter name and value to the given map.