@Test public void testJsonSerialization() { BgpAdvertisementGroup bgpAdvertisementGroup = BgpAdvertisementGroup.builder() .setAsPath(AsPath.ofSingletonAsSets(2L)) .setDescription("hello") .setExtendedCommunities(ImmutableSet.of(ExtendedCommunity.of(0, 6555L, 123456L))) .setLocalPreference(123L) .setMed(456L) .setOriginator(Ip.parse("1.1.1.1")) .setOriginType(OriginType.EGP) .setPrefixes(ImmutableSet.of(Prefix.ZERO)) .setRxPeer(Ip.parse("2.2.2.2")) .setStandardCommunities(ImmutableSet.of(555L)) .setTxAs(666L) .setTxPeer(Ip.parse("3.3.3.3")) .build(); assertThat( BatfishObjectMapper.clone(bgpAdvertisementGroup, BgpAdvertisementGroup.class), equalTo(bgpAdvertisementGroup)); }
public static @Nonnull Builder builder() { return new Builder(); }
BgpAdvertisementGroup implements Serializable { public static @Nonnull Builder builder() { return new Builder(); } }
BgpAdvertisementGroup implements Serializable { public static @Nonnull Builder builder() { return new Builder(); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); }
BgpAdvertisementGroup implements Serializable { public static @Nonnull Builder builder() { return new Builder(); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); static @Nonnull Builder builder(); @JsonProperty(PROP_AS_PATH) @Nonnull AsPath getAsPath(); @JsonProperty(PROP_DESCRIPTION) @Nonnull String getDescription(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); long getLocalPreference(); long getMed(); @Nonnull Ip getOriginator(); @Nonnull OriginType getOriginType(); @Nonnull Set<Prefix> getPrefixes(); @Nonnull Ip getRxPeer(); @Nonnull Set<Long> getStandardCommunities(); @Nullable Long getTxAs(); @Nonnull Ip getTxPeer(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString(); }
BgpAdvertisementGroup implements Serializable { public static @Nonnull Builder builder() { return new Builder(); } private  BgpAdvertisementGroup(
      AsPath asPath,
      String description,
      Set<ExtendedCommunity> extendedCommunities,
      long localPreference,
      long med,
      Ip originator,
      OriginType originType,
      Set<Prefix> prefixes,
      Ip rxPeer,
      Set<Long> standardCommunities,
      @Nullable Long txAs,
      Ip txPeer); static @Nonnull Builder builder(); @JsonProperty(PROP_AS_PATH) @Nonnull AsPath getAsPath(); @JsonProperty(PROP_DESCRIPTION) @Nonnull String getDescription(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); long getLocalPreference(); long getMed(); @Nonnull Ip getOriginator(); @Nonnull OriginType getOriginType(); @Nonnull Set<Prefix> getPrefixes(); @Nonnull Ip getRxPeer(); @Nonnull Set<Long> getStandardCommunities(); @Nullable Long getTxAs(); @Nonnull Ip getTxPeer(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override String toString();  }