public static ClientProtos.Condition toCondition(final byte[] row, final byte[] family,
    final byte[] qualifier, final CompareOperator op, final byte[] value, final Filter filter,
    final TimeRange timeRange, boolean queryMetricsEnabled) throws IOException {

    ClientProtos.Condition.Builder builder =
      ClientProtos.Condition.newBuilder().setRow(UnsafeByteOperations.unsafeWrap(row));

    if (filter != null) {
      builder.setFilter(ProtobufUtil.toFilter(filter));
    } else {
      builder.setFamily(UnsafeByteOperations.unsafeWrap(family))
        .setQualifier(UnsafeByteOperations
          .unsafeWrap(qualifier == null ? HConstants.EMPTY_BYTE_ARRAY : qualifier))
        .setComparator(ProtobufUtil.toComparator(new BinaryComparator(value)))
        .setCompareType(HBaseProtos.CompareType.valueOf(op.name()));
    }

    builder.setQueryMetricsEnabled(queryMetricsEnabled);
    return builder.setTimeRange(ProtobufUtil.toTimeRange(timeRange)).build();
  }
Convert {@link ClearSlowLogResponses} to boolean
@param clearSlowLogResponses Clear slowlog response protobuf instance
@return boolean representing clear slowlog response
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java