@Test public void testToBuilder() { EvpnType2Route er = EvpnType2Route.builder() .setIp(Ip.parse("1.1.1.1")) .setMacAddress(MacAddress.parse("00:11:22:33:44:55")) .setNetwork(Prefix.parse("1.1.1.0/24")) .setNextHopInterface("blah") .setOriginatorIp(Ip.parse("1.1.1.1")) .setOriginType(OriginType.IGP) .setProtocol(RoutingProtocol.BGP) .setRouteDistinguisher(RouteDistinguisher.from(Ip.parse("1.1.1.1"), 2)) .build(); assertThat(er, equalTo(er.toBuilder().build())); }
@Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setIp(_ip) .setLocalPreference(_localPreference) .setMacAddress(_macAddress) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setRouteDistinguisher(_routeDistinguisher) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); }
EvpnType2Route extends EvpnRoute<EvpnType2Route.Builder, EvpnType2Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setIp(_ip) .setLocalPreference(_localPreference) .setMacAddress(_macAddress) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setRouteDistinguisher(_routeDistinguisher) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } }
EvpnType2Route extends EvpnRoute<EvpnType2Route.Builder, EvpnType2Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setIp(_ip) .setLocalPreference(_localPreference) .setMacAddress(_macAddress) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setRouteDistinguisher(_routeDistinguisher) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } private  EvpnType2Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      Ip ip,
      long localPreference,
      @Nullable MacAddress macAddress,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      int weight); }
EvpnType2Route extends EvpnRoute<EvpnType2Route.Builder, EvpnType2Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setIp(_ip) .setLocalPreference(_localPreference) .setMacAddress(_macAddress) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setRouteDistinguisher(_routeDistinguisher) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } private  EvpnType2Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      Ip ip,
      long localPreference,
      @Nullable MacAddress macAddress,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      int weight); @Nullable MacAddress getMacAddress(); @Nonnull Ip getIp(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); }
EvpnType2Route extends EvpnRoute<EvpnType2Route.Builder, EvpnType2Route> { @Override public Builder toBuilder() { return builder() .setNetwork(getNetwork()) .setAdmin(getAdministrativeCost()) .setNonRouting(getNonRouting()) .setNonForwarding(getNonForwarding()) .setAsPath(_asPath) .setClusterList(_clusterList) .setCommunities(_communities) .setDiscard(_discard) .setIp(_ip) .setLocalPreference(_localPreference) .setMacAddress(_macAddress) .setMetric(_med) .setNextHopInterface(_nextHopInterface) .setNextHopIp(_nextHopIp) .setOriginatorIp(_originatorIp) .setOriginType(_originType) .setProtocol(_protocol) .setReceivedFromIp(_receivedFromIp) .setReceivedFromRouteReflectorClient(_receivedFromRouteReflectorClient) .setRouteDistinguisher(_routeDistinguisher) .setSrcProtocol(_srcProtocol) .setTag(_tag) .setWeight(_weight); } private  EvpnType2Route(
      int admin,
      AsPath asPath,
      Set<Long> clusterList,
      Set<Community> communities,
      boolean discard,
      Ip ip,
      long localPreference,
      @Nullable MacAddress macAddress,
      long med,
      String nextHopInterface,
      Ip nextHopIp,
      boolean nonForwarding,
      boolean nonRouting,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable Ip receivedFromIp,
      boolean receivedFromRouteReflectorClient,
      RouteDistinguisher routeDistinguisher,
      @Nullable RoutingProtocol srcProtocol,
      long tag,
      int weight); @Nullable MacAddress getMacAddress(); @Nonnull Ip getIp(); static Builder builder(); @Override Builder toBuilder(); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }