@@ -36,6 +36,8 @@ public final class Traits extends AbstractRecord {
3636 private final boolean isSatelliteProvider ;
3737 private final boolean isTorExitNode ;
3838 private final String isp ;
39+ private final String mobileCountryCode ;
40+ private final String mobileNetworkCode ;
3941 private final Network network ;
4042 private final String organization ;
4143 private final String userType ;
@@ -160,6 +162,74 @@ public Traits(
160162 staticIpScore );
161163 }
162164
165+ /**
166+ * @deprecated This constructor exists for backwards compatibility. Will be
167+ * removed in the next major release.
168+ */
169+ public Traits (
170+ Integer autonomousSystemNumber ,
171+ String autonomousSystemOrganization ,
172+ ConnectionType connectionType ,
173+ String domain ,
174+ String ipAddress ,
175+ boolean isAnonymous ,
176+ boolean isAnonymousProxy ,
177+ boolean isAnonymousVpn ,
178+ boolean isHostingProvider ,
179+ boolean isLegitimateProxy ,
180+ boolean isPublicProxy ,
181+ boolean isResidentialProxy ,
182+ boolean isSatelliteProvider ,
183+ boolean isTorExitNode ,
184+ String isp ,
185+ Network network ,
186+ String organization ,
187+ String userType ,
188+ Integer userCount ,
189+ Double staticIpScore
190+ ) {
191+ this (autonomousSystemNumber , autonomousSystemOrganization ,
192+ connectionType , domain , ipAddress , isAnonymous ,
193+ isAnonymousProxy , isAnonymousVpn , isHostingProvider ,
194+ isLegitimateProxy , isPublicProxy , isResidentialProxy , isSatelliteProvider ,
195+ isTorExitNode , isp , null , null , network ,
196+ organization , userType , userCount , staticIpScore );
197+ }
198+
199+ /**
200+ * @deprecated This constructor exists for backwards compatibility. Will be
201+ * removed in the next major release.
202+ */
203+ public Traits (
204+ Long autonomousSystemNumber ,
205+ String autonomousSystemOrganization ,
206+ String connectionType ,
207+ String domain ,
208+ String ipAddress ,
209+ Boolean isAnonymous ,
210+ Boolean isAnonymousProxy ,
211+ Boolean isAnonymousVpn ,
212+ Boolean isHostingProvider ,
213+ Boolean isLegitimateProxy ,
214+ Boolean isPublicProxy ,
215+ Boolean isResidentialProxy ,
216+ Boolean isSatelliteProvider ,
217+ Boolean isTorExitNode ,
218+ String isp ,
219+ Network network ,
220+ String organization ,
221+ String userType ,
222+ Integer userCount ,
223+ Double staticIpScore
224+ ) {
225+ this (autonomousSystemNumber , autonomousSystemOrganization ,
226+ connectionType , domain , ipAddress , isAnonymous ,
227+ isAnonymousProxy , isAnonymousVpn , isHostingProvider ,
228+ isLegitimateProxy , isPublicProxy , isResidentialProxy , isSatelliteProvider ,
229+ isTorExitNode , isp , null , null , network ,
230+ organization , userType , userCount , staticIpScore );
231+ }
232+
163233 public Traits (
164234 @ JsonProperty ("autonomous_system_number" ) Integer autonomousSystemNumber ,
165235 @ JsonProperty ("autonomous_system_organization" ) String autonomousSystemOrganization ,
@@ -176,6 +246,8 @@ public Traits(
176246 @ JsonProperty ("is_satellite_provider" ) boolean isSatelliteProvider ,
177247 @ JsonProperty ("is_tor_exit_node" ) boolean isTorExitNode ,
178248 @ JsonProperty ("isp" ) String isp ,
249+ @ JsonProperty ("mobile_country_code" ) String mobileCountryCode ,
250+ @ JsonProperty ("mobile_network_code" ) String mobileNetworkCode ,
179251 @ JacksonInject ("network" ) @ JsonProperty ("network" ) @ JsonDeserialize (using = NetworkDeserializer .class ) Network network ,
180252 @ JsonProperty ("organization" ) String organization ,
181253 @ JsonProperty ("user_type" ) String userType ,
@@ -197,6 +269,8 @@ public Traits(
197269 this .isSatelliteProvider = isSatelliteProvider ;
198270 this .isTorExitNode = isTorExitNode ;
199271 this .isp = isp ;
272+ this .mobileCountryCode = mobileCountryCode ;
273+ this .mobileNetworkCode = mobileNetworkCode ;
200274 this .network = network ;
201275 this .organization = organization ;
202276 this .userType = userType ;
@@ -221,6 +295,8 @@ public Traits(
221295 @ MaxMindDbParameter (name ="is_satellite_provider" ) Boolean isSatelliteProvider ,
222296 @ MaxMindDbParameter (name ="is_tor_exit_node" ) Boolean isTorExitNode ,
223297 @ MaxMindDbParameter (name ="isp" ) String isp ,
298+ @ MaxMindDbParameter (name ="mobile_country_code" ) String mobileCountryCode ,
299+ @ MaxMindDbParameter (name ="mobile_network_code" ) String mobileNetworkCode ,
224300 @ MaxMindDbParameter (name ="network" ) Network network ,
225301 @ MaxMindDbParameter (name ="organization" ) String organization ,
226302 @ MaxMindDbParameter (name ="user_type" ) String userType ,
@@ -243,6 +319,8 @@ public Traits(
243319 isSatelliteProvider != null ? isSatelliteProvider : false ,
244320 isTorExitNode != null ? isTorExitNode : false ,
245321 isp ,
322+ mobileCountryCode ,
323+ mobileNetworkCode ,
246324 network ,
247325 organization ,
248326 userType ,
@@ -272,6 +350,8 @@ public Traits(
272350 traits .isSatelliteProvider (),
273351 traits .isTorExitNode (),
274352 traits .getIsp (),
353+ traits .getMobileCountryCode (),
354+ traits .getMobileNetworkCode (),
275355 network ,
276356 traits .getOrganization (),
277357 traits .getUserType (),
@@ -461,6 +541,26 @@ public boolean isTorExitNode() {
461541 return this .isTorExitNode ;
462542 }
463543
544+ /**
545+ * @return The <a href="https://en.wikipedia.org/wiki/Mobile_country_code">
546+ * mobile country code (MCC)</a> associated with the IP address and ISP.
547+ * This property is available from the City and Insights web services and
548+ * the GeoIP2 Enterprise database.
549+ */
550+ public String getMobileCountryCode () {
551+ return this .mobileCountryCode ;
552+ }
553+
554+ /**
555+ * @return The <a href="https://en.wikipedia.org/wiki/Mobile_country_code">
556+ * mobile network code (MNC)</a> associated with the IP address and ISP.
557+ * This property is available from the City and Insights web services and
558+ * the GeoIP2 Enterprise database.
559+ */
560+ public String getMobileNetworkCode () {
561+ return this .mobileNetworkCode ;
562+ }
563+
464564 /**
465565 * @return The network associated with the record. In particular, this is
466566 * the largest network where all of the fields besides IP address have the
0 commit comments