public String getPostDataString()

in api-reference-examples/java/te-tag-query/com/facebook/threatexchange/DescriptorPostParameters.java [389:457]


  public String getPostDataString() {
    StringBuilder sb = new StringBuilder();
    if (this._indicatorType != null) {
      sb.append("type=").append(Utils.urlEncodeUTF8(this._indicatorType));
    }
    if (this._description != null) {
      sb.append("&description=").append(Utils.urlEncodeUTF8(this._description));
    }
    if (this._shareLevel != null) {
      sb.append("&share_level=").append(Utils.urlEncodeUTF8(this._shareLevel));
    }
    if (this._status != null) {
      sb.append("&status=").append(Utils.urlEncodeUTF8(this._status));
    }
    if (this._privacyType != null) {
      sb.append("&privacy_type=").append(Utils.urlEncodeUTF8(this._privacyType));
    }
    if (this._privacyMembers != null) {
      sb.append("&privacy_members=").append(Utils.urlEncodeUTF8(this._privacyMembers));
    }
    if (this._tagsToSet != null) {
      sb.append("&tags=").append(Utils.urlEncodeUTF8(this._tagsToSet));
    }
    if (this._tagsToAdd != null) {
      sb.append("&add_tags=").append(Utils.urlEncodeUTF8(this._tagsToAdd));
    }
    if (this._tagsToRemove != null) {
      sb.append("&remove_tags=").append(Utils.urlEncodeUTF8(this._tagsToRemove));
    }
    if (this._confidence != null) {
      sb.append("&confidence=").append(Utils.urlEncodeUTF8(this._confidence));
    }
    if (this._precision != null) {
      sb.append("&precision=").append(Utils.urlEncodeUTF8(this._precision));
    }
    if (this._reviewStatus != null) {
      sb.append("&review_status=").append(Utils.urlEncodeUTF8(this._reviewStatus));
    }
    if (this._severity != null) {
      sb.append("&severity=").append(Utils.urlEncodeUTF8(this._severity));
    }
    if (this._expiredOn != null) {
      sb.append("&expired_on=").append(Utils.urlEncodeUTF8(this._expiredOn));
    }
    if (this._firstActive != null) {
      sb.append("&first_active=").append(Utils.urlEncodeUTF8(this._firstActive));
    }
    if (this._lastActive != null) {
      sb.append("&last_active=").append(Utils.urlEncodeUTF8(this._tagsToRemove));
    }
    if (this._relatedIDsForUpload != null) {
      sb.append("&related_ids_for_upload=").append(Utils.urlEncodeUTF8(this._relatedIDsForUpload));
    }
    if (this._relatedTriplesForUploadAsJSON != null) {
      sb.append("&related_triples_for_upload_as_json=")
        .append(Utils.urlEncodeUTF8(this._relatedTriplesForUploadAsJSON));
    }
    if (this._reactionsToAdd != null) {
      sb.append("&reactions=").append(Utils.urlEncodeUTF8(this._reactionsToAdd));
    }
    if (this._reactionsToRemove != null) {
      sb.append("&reactions_to_remove=").append(Utils.urlEncodeUTF8(this._reactionsToRemove));
    }
    // Put indicator last in case it's long (e.g. TMK) for human readability
    if (this._indicatorText != null) {
      sb.append("&indicator=").append(Utils.urlEncodeUTF8(this._indicatorText));
    }
    return sb.toString();
  }