code: public static ResourceIdParts parseResourceId(String resourceId) {
          if (resourceId == null) {
              throw new IllegalArgumentException("Invalid resource ID - cannot be null");
          }
  
          String[] parts = resourceId.split("~", 3);
          if (parts.length != 3) {
              throw new IllegalArgumentException("Cannot parse invalid ID: " + resourceId);
          }
          return new ResourceIdParts(parts[0], parts[1], parts[2]);
      }
docs: Given a resource ID generated via {@link InventoryIdUtil#generateResourceId}
  this returns the different parts that make up that resource ID.
  
  @param resourceId the full resource ID to be parsed
  @return the parts of the resource ID