@Test public void testEquals() { Layer3VniConfig.Builder builder = Layer3VniConfig.builder() .setVni(1) .setVrf("v") .setRouteDistinguisher(RouteDistinguisher.from(65555L, 1)) .setRouteTarget(ExtendedCommunity.of(0, 1, 1)) .setImportRouteTarget(importRtPatternForAnyAs(1)) .setAdvertiseV4Unicast(false); Layer3VniConfig vni = builder.build(); new EqualsTester() .addEqualityGroup(vni, vni, builder.build()) .addEqualityGroup(builder.setVni(2).build()) .addEqualityGroup(builder.setVrf("v2").build()) .addEqualityGroup(builder.setRouteDistinguisher(RouteDistinguisher.from(65555L, 2)).build()) .addEqualityGroup(builder.setRouteTarget(ExtendedCommunity.of(0, 2, 1)).build()) .addEqualityGroup(builder.setImportRouteTarget(importRtPatternForAnyAs(2)).build()) .addEqualityGroup(builder.setAdvertiseV4Unicast(true).build()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer3VniConfig)) { return false; } Layer3VniConfig vniConfig = (Layer3VniConfig) o; return _vni == vniConfig._vni && Objects.equals(_vrf, vniConfig._vrf) && Objects.equals(_rd, vniConfig._rd) && Objects.equals(_routeTarget, vniConfig._routeTarget) && Objects.equals(_importRouteTarget, vniConfig._importRouteTarget) && _advertiseV4Unicast == vniConfig._advertiseV4Unicast; }
Layer3VniConfig extends VniConfig implements Serializable, Comparable<Layer3VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer3VniConfig)) { return false; } Layer3VniConfig vniConfig = (Layer3VniConfig) o; return _vni == vniConfig._vni && Objects.equals(_vrf, vniConfig._vrf) && Objects.equals(_rd, vniConfig._rd) && Objects.equals(_routeTarget, vniConfig._routeTarget) && Objects.equals(_importRouteTarget, vniConfig._importRouteTarget) && _advertiseV4Unicast == vniConfig._advertiseV4Unicast; } }
Layer3VniConfig extends VniConfig implements Serializable, Comparable<Layer3VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer3VniConfig)) { return false; } Layer3VniConfig vniConfig = (Layer3VniConfig) o; return _vni == vniConfig._vni && Objects.equals(_vrf, vniConfig._vrf) && Objects.equals(_rd, vniConfig._rd) && Objects.equals(_routeTarget, vniConfig._routeTarget) && Objects.equals(_importRouteTarget, vniConfig._importRouteTarget) && _advertiseV4Unicast == vniConfig._advertiseV4Unicast; } private  Layer3VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget,
      boolean advertiseV4Unicast); }
Layer3VniConfig extends VniConfig implements Serializable, Comparable<Layer3VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer3VniConfig)) { return false; } Layer3VniConfig vniConfig = (Layer3VniConfig) o; return _vni == vniConfig._vni && Objects.equals(_vrf, vniConfig._vrf) && Objects.equals(_rd, vniConfig._rd) && Objects.equals(_routeTarget, vniConfig._routeTarget) && Objects.equals(_importRouteTarget, vniConfig._importRouteTarget) && _advertiseV4Unicast == vniConfig._advertiseV4Unicast; } private  Layer3VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget,
      boolean advertiseV4Unicast); @JsonProperty(PROP_ADVERTISE_V4_UNICAST) boolean getAdvertiseV4Unicast(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(Layer3VniConfig o); @Override String toString(); static Builder builder(); }
Layer3VniConfig extends VniConfig implements Serializable, Comparable<Layer3VniConfig> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof Layer3VniConfig)) { return false; } Layer3VniConfig vniConfig = (Layer3VniConfig) o; return _vni == vniConfig._vni && Objects.equals(_vrf, vniConfig._vrf) && Objects.equals(_rd, vniConfig._rd) && Objects.equals(_routeTarget, vniConfig._routeTarget) && Objects.equals(_importRouteTarget, vniConfig._importRouteTarget) && _advertiseV4Unicast == vniConfig._advertiseV4Unicast; } private  Layer3VniConfig(
      int vni,
      String vrf,
      RouteDistinguisher rd,
      ExtendedCommunity routeTarget,
      String importRouteTarget,
      boolean advertiseV4Unicast); @JsonProperty(PROP_ADVERTISE_V4_UNICAST) boolean getAdvertiseV4Unicast(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(Layer3VniConfig o); @Override String toString(); static Builder builder();  }