public static SpanKind forNumber(int value) {
      switch (value) {
        case 0:
          return SPAN_KIND_UNSPECIFIED;
        case 1:
          return INTERNAL;
        case 2:
          return SERVER;
        case 3:
          return CLIENT;
        case 4:
          return PRODUCER;
        case 5:
          return CONSUMER;
        default:
          return null;
      }
    }
@param value The numeric wire value of the corresponding enum entry.
@return The enum associated with the given numeric wire value.
java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java