code: public Deferred<String> getUidName(final UniqueIdType type, final byte[] uid) {
      if (uid == null) {
        throw new IllegalArgumentException("Missing UID");
      }
  
      switch (type) {
        case METRIC:
          return this.metrics.getNameAsync(uid);
        case TAGK:
          return this.tag_names.getNameAsync(uid);
        case TAGV:
          return this.tag_values.getNameAsync(uid);
        default:
          throw new IllegalArgumentException("Unrecognized UID type");
      }
    }
docs: Attempts to find the name for a unique identifier given a type
  @param type The type of UID
  @param uid The UID to search for
  @return The name of the UID object if found
  @throws IllegalArgumentException if the type is not valid
  @throws NoSuchUniqueId if the UID was not found
  @since 2.0