code: private static ServiceType serviceTypeFor(final CouchbaseRequest request) {
          if (request instanceof BinaryRequest) {
              return ServiceType.BINARY;
          } else if (request instanceof ConfigRequest) {
              return ServiceType.CONFIG;
          } else if (request instanceof ViewRequest) {
              return ServiceType.VIEW;
          } else if (request instanceof QueryRequest) {
              return ServiceType.QUERY;
          } else if (request instanceof SearchRequest) {
              return ServiceType.SEARCH;
          } else if (request instanceof AnalyticsRequest) {
              return ServiceType.ANALYTICS;
          } else {
              throw new IllegalStateException("Unknown Request: " + request);
          }
      }
docs: Returns the mapping for a given {@link CouchbaseRequest}.
  
  @param request the request to check.
  @return the mapping for the request.