code: public Endpoint addPathSegment(String segment) {
          Endpoint configured = new Endpoint(this);
          if (StringUtils.isNotBlank(segment)) {
              configured.path.add(segment);
          }
          return configured;
      }
docs: Creates a new {@link Endpoint} instance with an additional path segment.
  
  Typical usage is to add an ID to an endpoint path, which is why this method returns a new instance, rather than modifying the existing one.
  This allows you add different ID at different times without affecting the original instance.
  
  @param segment The segment to be added.
  @return A copy of this instance, with the additional path segment.