public static State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return RUNNING;
        case 2:
          return SUCCEEDED;
        case 3:
          return FAILED;
        case 4:
          return CANCELLING;
        case 5:
          return CANCELLED;
        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-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentMetadata.java