code: public List<Share> shareTo(long objectId, List<Share> shares, Boolean sendEmail) throws SmartsheetException {
          String path = getMasterResourceType() + "/" + objectId + "/shares";
          if (sendEmail != null){
              path += "?sendEmail=" + sendEmail;
          }
          return this.postAndReceiveList(path, shares, Share.class);
      }
docs: Shares the object with the specified Users and Groups.
  
  It mirrors to the following Smartsheet REST API method:
  POST /workspaces/{id}/shares
  POST /sheets/{id}/shares
  POST /sights/{id}/shares
  POST /reports/{reportId}/shares
  
  Exceptions:
  IllegalArgumentException : if multiShare is null
  InvalidRequestException : if there is any problem with the REST API request
  AuthorizationException : if there is any problem with the REST API authorization(access token)
  ResourceNotFoundException : if the resource can not be found
  ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting)
  SmartsheetRestException : if there is any other REST API related error occurred during the operation
  SmartsheetException : if there is any other error occurred during the operation
  
  @param objectId the ID of the object to share
  @param shares list of share objects
  @param sendEmail whether to send email
  @return the created shares
  @throws SmartsheetException the smartsheet exception