|
31 | 31 | * @param providerName The name of the VPN provider (e.g., NordVPN, SurfShark, etc.) associated |
32 | 32 | * with the network. This is only available from the GeoIP Insights |
33 | 33 | * web service. |
| 34 | + * @param residential Data about the network's presence in the GeoIP Residential Proxy feed. |
| 35 | + * Note that the residential proxy feed is a superset of the data used for |
| 36 | + * the other fields on this record, so this field may be present even when |
| 37 | + * none of the other fields are set. This is only available from the GeoIP |
| 38 | + * Insights web service. |
34 | 39 | */ |
35 | 40 | public record Anonymizer( |
36 | 41 | @JsonProperty("confidence") |
@@ -58,14 +63,24 @@ public record Anonymizer( |
58 | 63 | LocalDate networkLastSeen, |
59 | 64 |
|
60 | 65 | @JsonProperty("provider_name") |
61 | | - String providerName |
| 66 | + String providerName, |
| 67 | + |
| 68 | + @JsonProperty("residential") |
| 69 | + AnonymizerFeed residential |
62 | 70 | ) implements JsonSerializable { |
63 | 71 |
|
| 72 | + /** |
| 73 | + * Compact canonical constructor that sets a default for a null {@code residential} value. |
| 74 | + */ |
| 75 | + public Anonymizer { |
| 76 | + residential = residential != null ? residential : new AnonymizerFeed(); |
| 77 | + } |
| 78 | + |
64 | 79 | /** |
65 | 80 | * Constructs an {@code Anonymizer} record with {@code null} values for all the nullable |
66 | 81 | * fields and {@code false} for all boolean fields. |
67 | 82 | */ |
68 | 83 | public Anonymizer() { |
69 | | - this(null, false, false, false, false, false, false, null, null); |
| 84 | + this(null, false, false, false, false, false, false, null, null, null); |
70 | 85 | } |
71 | 86 | } |
0 commit comments