@@ -15,11 +15,18 @@ public class IspResponse extends AsnResponse {
1515
1616 private final String isp ;
1717 private final String organization ;
18+ private final String mobileCountryCode ;
19+ private final String mobileNetworkCode ;
1820
1921 IspResponse () {
2022 this (null , null , null , null , null );
2123 }
2224
25+ /**
26+ * @deprecated This constructor exists for backwards compatibility. Will be
27+ * removed in the next major release.
28+ */
29+ @ Deprecated
2330 public IspResponse (
2431 Integer autonomousSystemNumber ,
2532 String autonomousSystemOrganization ,
@@ -30,16 +37,52 @@ public IspResponse(
3037 this (autonomousSystemNumber , autonomousSystemOrganization , ipAddress , isp , organization , null );
3138 }
3239
40+ /**
41+ * @deprecated This constructor exists for backwards compatibility. Will be
42+ * removed in the next major release.
43+ */
44+ @ Deprecated
45+ public IspResponse (
46+ Integer autonomousSystemNumber ,
47+ String autonomousSystemOrganization ,
48+ String ipAddress ,
49+ String isp ,
50+ String organization ,
51+ Network network
52+ ) {
53+ this (autonomousSystemNumber , autonomousSystemOrganization , ipAddress , isp , null , null , organization , network );
54+ }
55+
56+ /**
57+ * @deprecated This constructor exists for backwards compatibility. Will be
58+ * removed in the next major release.
59+ */
60+ @ Deprecated
61+ public IspResponse (
62+ Long autonomousSystemNumber ,
63+ String autonomousSystemOrganization ,
64+ String ipAddress ,
65+ String isp ,
66+ String organization ,
67+ Network network
68+ ) {
69+ this (autonomousSystemNumber , autonomousSystemOrganization , ipAddress , isp , null , null , organization , network );
70+ }
71+
3372 public IspResponse (
3473 @ JsonProperty ("autonomous_system_number" ) Integer autonomousSystemNumber ,
3574 @ JsonProperty ("autonomous_system_organization" ) String autonomousSystemOrganization ,
3675 @ JacksonInject ("ip_address" ) @ JsonProperty ("ip_address" ) String ipAddress ,
3776 @ JsonProperty ("isp" ) String isp ,
77+ @ JsonProperty ("mobile_country_code" ) String mobileCountryCode ,
78+ @ JsonProperty ("mobile_network_code" ) String mobileNetworkCode ,
3879 @ JsonProperty ("organization" ) String organization ,
3980 @ JacksonInject ("network" ) @ JsonProperty ("network" ) @ JsonDeserialize (using = NetworkDeserializer .class ) Network network
4081 ) {
4182 super (autonomousSystemNumber , autonomousSystemOrganization , ipAddress , network );
4283 this .isp = isp ;
84+ this .mobileCountryCode = mobileCountryCode ;
85+ this .mobileNetworkCode = mobileNetworkCode ;
4386 this .organization = organization ;
4487 }
4588
@@ -49,6 +92,8 @@ public IspResponse(
4992 @ MaxMindDbParameter (name ="autonomous_system_organization" ) String autonomousSystemOrganization ,
5093 @ MaxMindDbParameter (name ="ip_address" ) String ipAddress ,
5194 @ MaxMindDbParameter (name ="isp" ) String isp ,
95+ @ MaxMindDbParameter (name ="mobile_country_code" ) String mobileCountryCode ,
96+ @ MaxMindDbParameter (name ="mobile_network_code" ) String mobileNetworkCode ,
5297 @ MaxMindDbParameter (name ="organization" ) String organization ,
5398 @ MaxMindDbParameter (name ="network" ) Network network
5499 ) {
@@ -57,6 +102,8 @@ public IspResponse(
57102 autonomousSystemOrganization ,
58103 ipAddress ,
59104 isp ,
105+ mobileCountryCode ,
106+ mobileNetworkCode ,
60107 organization ,
61108 network
62109 );
@@ -72,6 +119,8 @@ public IspResponse(
72119 response .getAutonomousSystemOrganization (),
73120 ipAddress ,
74121 response .getIsp (),
122+ response .getMobileCountryCode (),
123+ response .getMobileNetworkCode (),
75124 response .getOrganization (),
76125 network
77126 );
@@ -84,6 +133,26 @@ public String getIsp() {
84133 return this .isp ;
85134 }
86135
136+ /**
137+ * @return The <a href="https://en.wikipedia.org/wiki/Mobile_country_code">
138+ * mobile country code (MCC)</a> associated with the IP address and ISP.
139+ * This property is available from the City and Insights web services and
140+ * the GeoIP2 Enterprise database.
141+ */
142+ public String getMobileCountryCode () {
143+ return this .mobileCountryCode ;
144+ }
145+
146+ /**
147+ * @return The <a href="https://en.wikipedia.org/wiki/Mobile_country_code">
148+ * mobile network code (MNC)</a> associated with the IP address and ISP.
149+ * This property is available from the City and Insights web services and
150+ * the GeoIP2 Enterprise database.
151+ */
152+ public String getMobileNetworkCode () {
153+ return this .mobileNetworkCode ;
154+ }
155+
87156 /**
88157 * @return The name of the organization associated with the IP address.
89158 */
0 commit comments