private static GetBlobOptions.OperationType getBlobOptionsOperationType(SubResource subResource) {
    if (subResource == null) {
      return GetBlobOptions.OperationType.All;
    }
    switch (subResource) {
      case Segment:
        return GetBlobOptions.OperationType.All;
      case BlobChunkIds:
        return GetBlobOptions.OperationType.BlobChunkIds;
      default:
        return GetBlobOptions.OperationType.BlobInfo;
    }
  }
Get Operation type based on {@link SubResource}.
@param subResource the {@link SubResource} for the request, or {@code null} if no sub-resource is requested.
@return Operation type based on {@link SubResource}.
ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java