@Override
  public String toString() {
    StringBuilder sb = new StringBuilder("Span(");
    boolean first = true;

    sb.append("trace_id:");
    sb.append(this.trace_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("name:");
    if (this.name == null) {
      sb.append("null");
    } else {
      sb.append(this.name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (isSetParent_id()) {
      if (!first) sb.append(", ");
      sb.append("parent_id:");
      sb.append(this.parent_id);
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("annotations:");
    if (this.annotations == null) {
      sb.append("null");
    } else {
      sb.append(this.annotations);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("binary_annotations:");
    if (this.binary_annotations == null) {
      sb.append("null");
    } else {
      sb.append(this.binary_annotations);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }