code: private ResourceType getResourceType(String resourceTag) {
          if (resourceTag == null || !resourceTag.endsWith("-resource")) {
              return ResourceType.unknown;
          }
  
          try {
              return ResourceType.valueOf(resourceTag.substring(0, resourceTag.length() - 9));
          } catch (Exception e) {
              return ResourceType.unknown;
          }
      }
docs: Returns the ResourceType enum value corresponding to the resource tag.
  
  @param resourceTag Tag name of resource
  @return ResourceType enum. Returns an enum of unknown if tag is not a supported resource
  type.