@Test public void testJsonSerialization() { BgpRoute br = BgpRoute.builder() .setNetwork(Prefix.parse("1.1.1.0/24")) .setNextHopIp(Ip.parse("1.1.1.1")) .setOriginatorIp(Ip.parse("1.1.1.1")) .setOriginType(OriginType.IGP) .setProtocol(RoutingProtocol.BGP) .build(); assertThat(BatfishObjectMapper.clone(br, BgpRoute.class), equalTo(br)); }
public static Builder builder() { return new Builder(); }
BgpRoute { public static Builder builder() { return new Builder(); } }
BgpRoute { public static Builder builder() { return new Builder(); } private  BgpRoute(
      AsPath asPath,
      SortedSet<Community> communities,
      long localPreference,
      long metric,
      Prefix network,
      Ip nextHopIp,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable RoutingProtocol srcProtocol,
      int weight); }
BgpRoute { public static Builder builder() { return new Builder(); } private  BgpRoute(
      AsPath asPath,
      SortedSet<Community> communities,
      long localPreference,
      long metric,
      Prefix network,
      Ip nextHopIp,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable RoutingProtocol srcProtocol,
      int weight); @Nonnull @JsonProperty(PROP_AS_PATH) AsPath getAsPath(); @Nonnull @JsonProperty(PROP_COMMUNITIES) SortedSet<Community> getCommunities(); @JsonProperty(PROP_LOCAL_PREFERENCE) long getLocalPreference(); @JsonProperty(PROP_METRIC) long getMetric(); @Nonnull @JsonProperty(PROP_NETWORK) Prefix getNetwork(); @Nonnull @JsonProperty(PROP_NEXT_HOP_IP) Ip getNextHopIp(); @Nonnull @JsonProperty(PROP_ORIGINATOR_IP) Ip getOriginatorIp(); @Nonnull @JsonProperty(PROP_ORIGIN_TYPE) OriginType getOriginType(); @Nonnull @JsonProperty(PROP_PROTOCOL) RoutingProtocol getProtocol(); @Nullable @JsonProperty(PROP_SRC_PROTOCOL) RoutingProtocol getSrcProtocol(); @JsonProperty(PROP_WEIGHT) int getWeight(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder(); Builder toBuilder(); }
BgpRoute { public static Builder builder() { return new Builder(); } private  BgpRoute(
      AsPath asPath,
      SortedSet<Community> communities,
      long localPreference,
      long metric,
      Prefix network,
      Ip nextHopIp,
      Ip originatorIp,
      OriginType originType,
      RoutingProtocol protocol,
      @Nullable RoutingProtocol srcProtocol,
      int weight); @Nonnull @JsonProperty(PROP_AS_PATH) AsPath getAsPath(); @Nonnull @JsonProperty(PROP_COMMUNITIES) SortedSet<Community> getCommunities(); @JsonProperty(PROP_LOCAL_PREFERENCE) long getLocalPreference(); @JsonProperty(PROP_METRIC) long getMetric(); @Nonnull @JsonProperty(PROP_NETWORK) Prefix getNetwork(); @Nonnull @JsonProperty(PROP_NEXT_HOP_IP) Ip getNextHopIp(); @Nonnull @JsonProperty(PROP_ORIGINATOR_IP) Ip getOriginatorIp(); @Nonnull @JsonProperty(PROP_ORIGIN_TYPE) OriginType getOriginType(); @Nonnull @JsonProperty(PROP_PROTOCOL) RoutingProtocol getProtocol(); @Nullable @JsonProperty(PROP_SRC_PROTOCOL) RoutingProtocol getSrcProtocol(); @JsonProperty(PROP_WEIGHT) int getWeight(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder(); Builder toBuilder(); static final String PROP_AS_PATH; static final String PROP_COMMUNITIES; static final String PROP_LOCAL_PREFERENCE; static final String PROP_METRIC; static final String PROP_NETWORK; static final String PROP_NEXT_HOP_IP; static final String PROP_ORIGINATOR_IP; static final String PROP_ORIGIN_TYPE; static final String PROP_PROTOCOL; static final String PROP_SRC_PROTOCOL; static final String PROP_WEIGHT; static final String PROP_CLASS; }