class GeneratedRoute extends AbstractRoute implements Comparable<GeneratedRoute> {

  @Override
  public Builder toBuilder() {
    return new Builder()
        // General route properties
        .setNetwork(getNetwork())
        .setAdmin(getAdministrativeCost())
        .setNonForwarding(getNonForwarding())
        .setNonRouting(getNonRouting())
        .setMetric(firstNonNull(getMetric(), 0L))
        .setNextHopInterface(getNextHopInterface())
        .setNextHopIp(getNextHopIp())
        .setTag(getTag())
        // GeneratedRoute properties
        .setAsPath(getAsPath())
        .setAttributePolicy(getAttributePolicy())
        .setCommunities(getCommunities())
        .setDiscard(getDiscard())
        .setGenerationPolicy(getGenerationPolicy());
  }

  private  GeneratedRoute(
      Prefix network,
      int administrativeCost,
      Ip nextHopIp,
      AsPath asPath,
      @Nullable String attributePolicy,
      @Nullable SortedSet<Community> communities,
      boolean discard,
      @Nullable String generationPolicy,
      long metric,
      String nextHopInterface,
      long tag,
      boolean nonForwarding,
      boolean nonRouting);

}