docs: public Trace withSegments(Segment... segments) {
          if (this.segments == null) {
              setSegments(new java.util.ArrayList<Segment>(segments.length));
          }
          for (Segment ele : segments) {
              this.segments.add(ele);
          }
          return this;
      }