@Test public void testJsonDeserializationUnknownFields() throws Exception { final PortMapping pm = portMappingFromResource("portmapping-unknown-fields.json"); assertThat(pm, equalTo(PortMapping.builder() .internalPort(456) .externalPort(123) .protocol(TCP) .build())); }
public static Builder builder() { return new Builder().protocol(TCP); }
PortMapping extends Descriptor { public static Builder builder() { return new Builder().protocol(TCP); } }
PortMapping extends Descriptor { public static Builder builder() { return new Builder().protocol(TCP); } PortMapping(@JsonProperty("ip") @Nullable final String ip,
                     @JsonProperty("internalPort") final int internalPort,
                     @JsonProperty("externalPort") @Nullable final Integer externalPort,
                     @JsonProperty("protocol") @Nullable final String protocol);  PortMapping(final int internalPort, final Integer externalPort);  PortMapping(final int internalPort); private  PortMapping(final Builder builder); }
PortMapping extends Descriptor { public static Builder builder() { return new Builder().protocol(TCP); } PortMapping(@JsonProperty("ip") @Nullable final String ip,
                     @JsonProperty("internalPort") final int internalPort,
                     @JsonProperty("externalPort") @Nullable final Integer externalPort,
                     @JsonProperty("protocol") @Nullable final String protocol);  PortMapping(final int internalPort, final Integer externalPort);  PortMapping(final int internalPort); private  PortMapping(final Builder builder); @Nullable String getIp(); int getInternalPort(); boolean hasExternalPort(); @Nullable Integer getExternalPort(); String getProtocol(); PortMapping withExternalPort(final Integer externalPort); static PortMapping of(final int internalPort); static PortMapping of(final int internalPort, final Integer externalPort); static PortMapping of(final int internalPort, final Integer externalPort,
                               final String protocol); static PortMapping of(final int internalPort, final String protocol); static Builder builder(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); }
PortMapping extends Descriptor { public static Builder builder() { return new Builder().protocol(TCP); } PortMapping(@JsonProperty("ip") @Nullable final String ip,
                     @JsonProperty("internalPort") final int internalPort,
                     @JsonProperty("externalPort") @Nullable final Integer externalPort,
                     @JsonProperty("protocol") @Nullable final String protocol);  PortMapping(final int internalPort, final Integer externalPort);  PortMapping(final int internalPort); private  PortMapping(final Builder builder); @Nullable String getIp(); int getInternalPort(); boolean hasExternalPort(); @Nullable Integer getExternalPort(); String getProtocol(); PortMapping withExternalPort(final Integer externalPort); static PortMapping of(final int internalPort); static PortMapping of(final int internalPort, final Integer externalPort); static PortMapping of(final int internalPort, final Integer externalPort,
                               final String protocol); static PortMapping of(final int internalPort, final String protocol); static Builder builder(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static final String TCP; static final String UDP; }