vpndetection 5.17.0 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -7
  3. data/lib/vpndetection/api/account_wire_api.rb +2 -2
  4. data/lib/vpndetection/api/api_keys_wire_api.rb +2 -2
  5. data/lib/vpndetection/api/authorization_wire_api.rb +2 -2
  6. data/lib/vpndetection/api/database_wire_api.rb +2 -2
  7. data/lib/vpndetection/api/entitlement_wire_api.rb +2 -2
  8. data/lib/vpndetection/api/lookup_wire_api.rb +4 -4
  9. data/lib/vpndetection/api/organization_wire_api.rb +2 -2
  10. data/lib/vpndetection/api_client.rb +2 -2
  11. data/lib/vpndetection/api_error.rb +2 -2
  12. data/lib/vpndetection/api_model_base.rb +2 -2
  13. data/lib/vpndetection/bogon.rb +11 -2
  14. data/lib/vpndetection/cache.rb +31 -2
  15. data/lib/vpndetection/client.rb +4 -3
  16. data/lib/vpndetection/configuration.rb +2 -2
  17. data/lib/vpndetection/models/abuse_contact.rb +236 -0
  18. data/lib/vpndetection/models/account_create_apikey_request.rb +2 -2
  19. data/lib/vpndetection/models/account_created_apikey.rb +2 -2
  20. data/lib/vpndetection/models/account_org.rb +2 -2
  21. data/lib/vpndetection/models/account_org_ref.rb +2 -2
  22. data/lib/vpndetection/models/account_org_wrap.rb +2 -2
  23. data/lib/vpndetection/models/account_rc.rb +2 -2
  24. data/lib/vpndetection/models/account_revealed_apikey.rb +2 -2
  25. data/lib/vpndetection/models/account_user.rb +2 -2
  26. data/lib/vpndetection/models/apikey_detail.rb +2 -2
  27. data/lib/vpndetection/models/apikey_list.rb +2 -2
  28. data/lib/vpndetection/models/asn.rb +26 -6
  29. data/lib/vpndetection/models/batch_lookup_error.rb +2 -2
  30. data/lib/vpndetection/models/batch_lookup_request.rb +2 -2
  31. data/lib/vpndetection/models/batch_lookup_response.rb +2 -2
  32. data/lib/vpndetection/models/bit_torrent_detail.rb +241 -0
  33. data/lib/vpndetection/models/carrier_detail.rb +189 -0
  34. data/lib/vpndetection/models/class_detail.rb +2 -2
  35. data/lib/vpndetection/models/client_registration.rb +2 -2
  36. data/lib/vpndetection/models/client_registration_request.rb +2 -2
  37. data/lib/vpndetection/models/company.rb +213 -0
  38. data/lib/vpndetection/models/database.rb +2 -2
  39. data/lib/vpndetection/models/database_checksums_response.rb +2 -2
  40. data/lib/vpndetection/models/database_format.rb +2 -2
  41. data/lib/vpndetection/models/database_format_size.rb +2 -2
  42. data/lib/vpndetection/models/database_list.rb +2 -2
  43. data/lib/vpndetection/models/database_metadata.rb +2 -2
  44. data/lib/vpndetection/models/database_metadata_column.rb +2 -2
  45. data/lib/vpndetection/models/database_version.rb +2 -2
  46. data/lib/vpndetection/models/db_checksums.rb +2 -2
  47. data/lib/vpndetection/models/device_authorization.rb +2 -2
  48. data/lib/vpndetection/models/dns_resolver_detail.rb +199 -0
  49. data/lib/vpndetection/models/download.rb +2 -2
  50. data/lib/vpndetection/models/download_list.rb +2 -2
  51. data/lib/vpndetection/models/entitlement.rb +2 -2
  52. data/lib/vpndetection/models/entitlement_apikey.rb +2 -2
  53. data/lib/vpndetection/models/entitlement_error.rb +2 -2
  54. data/lib/vpndetection/models/entitlement_plan.rb +3 -3
  55. data/lib/vpndetection/models/entitlement_usage.rb +2 -2
  56. data/lib/vpndetection/models/error_envelope.rb +2 -2
  57. data/lib/vpndetection/models/identity.rb +2 -2
  58. data/lib/vpndetection/models/location.rb +107 -7
  59. data/lib/vpndetection/models/lookup_error.rb +2 -2
  60. data/lib/vpndetection/models/lookup_response.rb +185 -5
  61. data/lib/vpndetection/models/oauth_error.rb +2 -2
  62. data/lib/vpndetection/models/oauth_metadata.rb +2 -2
  63. data/lib/vpndetection/models/proxy_detail.rb +2 -2
  64. data/lib/vpndetection/models/pubproxy_detail.rb +2 -2
  65. data/lib/vpndetection/models/satellite_detail.rb +209 -0
  66. data/lib/vpndetection/models/smtp_detail.rb +189 -0
  67. data/lib/vpndetection/models/ssh_detail.rb +199 -0
  68. data/lib/vpndetection/models/standing.rb +2 -2
  69. data/lib/vpndetection/models/token_response.rb +2 -2
  70. data/lib/vpndetection/models/vpn_detail.rb +2 -2
  71. data/lib/vpndetection/models/web_detail.rb +517 -0
  72. data/lib/vpndetection/result.rb +182 -12
  73. data/lib/vpndetection/transport.rb +10 -0
  74. data/lib/vpndetection/version.rb +1 -1
  75. metadata +10 -1
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -31,6 +31,12 @@ module VPNDetection
31
31
  # The announced BGP prefix that covers the address, the most specific when several do.
32
32
  attr_accessor :prefix
33
33
 
34
+ # The country the AS's registry assigned it to.
35
+ attr_accessor :country
36
+
37
+ # The announcement's RPKI status: valid, invalid or not_found.
38
+ attr_accessor :rpki_status
39
+
34
40
  # Attribute mapping from ruby-style variable name to JSON key.
35
41
  def self.attribute_map
36
42
  {
@@ -38,7 +44,9 @@ module VPNDetection
38
44
  :'name' => :'name',
39
45
  :'domain' => :'domain',
40
46
  :'type' => :'type',
41
- :'prefix' => :'prefix'
47
+ :'prefix' => :'prefix',
48
+ :'country' => :'country',
49
+ :'rpki_status' => :'rpki_status'
42
50
  }
43
51
  end
44
52
 
@@ -59,7 +67,9 @@ module VPNDetection
59
67
  :'name' => :'String',
60
68
  :'domain' => :'String',
61
69
  :'type' => :'String',
62
- :'prefix' => :'String'
70
+ :'prefix' => :'String',
71
+ :'country' => :'String',
72
+ :'rpki_status' => :'String'
63
73
  }
64
74
  end
65
75
 
@@ -114,6 +124,14 @@ module VPNDetection
114
124
  else
115
125
  self.prefix = nil
116
126
  end
127
+
128
+ if attributes.key?(:'country')
129
+ self.country = attributes[:'country']
130
+ end
131
+
132
+ if attributes.key?(:'rpki_status')
133
+ self.rpki_status = attributes[:'rpki_status']
134
+ end
117
135
  end
118
136
 
119
137
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -215,7 +233,9 @@ module VPNDetection
215
233
  name == o.name &&
216
234
  domain == o.domain &&
217
235
  type == o.type &&
218
- prefix == o.prefix
236
+ prefix == o.prefix &&
237
+ country == o.country &&
238
+ rpki_status == o.rpki_status
219
239
  end
220
240
 
221
241
  # @see the `==` method
@@ -227,7 +247,7 @@ module VPNDetection
227
247
  # Calculates hash code according to all attributes.
228
248
  # @return [Integer] Hash code
229
249
  def hash
230
- [asn, name, domain, type, prefix].hash
250
+ [asn, name, domain, type, prefix, country, rpki_status].hash
231
251
  end
232
252
 
233
253
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #VPNDetection API
3
+
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
+
6
+ The version of the OpenAPI document: 2026.11.20
7
+ Contact: support@vpndetection.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module VPNDetection
17
+ # BitTorrent clients seen on the address over the last 90 days, from our BitTorrent IP database. Every key is present when the object is populated; the object is `{}` when `is_bittorrent` is false.
18
+ class BitTorrentDetail < ApiModelBase
19
+ # A client here answered, or two or more reported it at once.
20
+ attr_accessor :verified
21
+
22
+ # A client here derived its node ID from the address (BEP 42).
23
+ attr_accessor :id_matches_ip
24
+
25
+ # The first day a client was seen here.
26
+ attr_accessor :first_seen
27
+
28
+ # The last day.
29
+ attr_accessor :last_seen
30
+
31
+ # The last day one answered, empty when none did.
32
+ attr_accessor :last_reachable
33
+
34
+ # On how many days.
35
+ attr_accessor :days_seen
36
+
37
+ # Distinct ports over the window.
38
+ attr_accessor :num_ports
39
+
40
+ # The most on one day.
41
+ attr_accessor :peak_num_ports
42
+
43
+ # A DHT indexer rather than people.
44
+ attr_accessor :indexer
45
+
46
+ # The two-letter codes its clients name themselves by.
47
+ attr_accessor :clients
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'verified' => :'verified',
53
+ :'id_matches_ip' => :'id_matches_ip',
54
+ :'first_seen' => :'first_seen',
55
+ :'last_seen' => :'last_seen',
56
+ :'last_reachable' => :'last_reachable',
57
+ :'days_seen' => :'days_seen',
58
+ :'num_ports' => :'num_ports',
59
+ :'peak_num_ports' => :'peak_num_ports',
60
+ :'indexer' => :'indexer',
61
+ :'clients' => :'clients'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'verified' => :'Boolean',
79
+ :'id_matches_ip' => :'Boolean',
80
+ :'first_seen' => :'String',
81
+ :'last_seen' => :'String',
82
+ :'last_reachable' => :'String',
83
+ :'days_seen' => :'Integer',
84
+ :'num_ports' => :'Integer',
85
+ :'peak_num_ports' => :'Integer',
86
+ :'indexer' => :'Boolean',
87
+ :'clients' => :'Array<String>'
88
+ }
89
+ end
90
+
91
+ # List of attributes with nullable: true
92
+ def self.openapi_nullable
93
+ Set.new([
94
+ ])
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ if (!attributes.is_a?(Hash))
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::BitTorrentDetail` initialize method"
102
+ end
103
+
104
+ # check to see if the attribute exists and convert string to symbol for hash key
105
+ acceptable_attribute_map = self.class.acceptable_attribute_map
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!acceptable_attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::BitTorrentDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'verified')
114
+ self.verified = attributes[:'verified']
115
+ end
116
+
117
+ if attributes.key?(:'id_matches_ip')
118
+ self.id_matches_ip = attributes[:'id_matches_ip']
119
+ end
120
+
121
+ if attributes.key?(:'first_seen')
122
+ self.first_seen = attributes[:'first_seen']
123
+ end
124
+
125
+ if attributes.key?(:'last_seen')
126
+ self.last_seen = attributes[:'last_seen']
127
+ end
128
+
129
+ if attributes.key?(:'last_reachable')
130
+ self.last_reachable = attributes[:'last_reachable']
131
+ end
132
+
133
+ if attributes.key?(:'days_seen')
134
+ self.days_seen = attributes[:'days_seen']
135
+ end
136
+
137
+ if attributes.key?(:'num_ports')
138
+ self.num_ports = attributes[:'num_ports']
139
+ end
140
+
141
+ if attributes.key?(:'peak_num_ports')
142
+ self.peak_num_ports = attributes[:'peak_num_ports']
143
+ end
144
+
145
+ if attributes.key?(:'indexer')
146
+ self.indexer = attributes[:'indexer']
147
+ end
148
+
149
+ if attributes.key?(:'clients')
150
+ if (value = attributes[:'clients']).is_a?(Array)
151
+ self.clients = value
152
+ end
153
+ end
154
+ end
155
+
156
+ # Show invalid properties with the reasons. Usually used together with valid?
157
+ # @return Array for valid properties with the reasons
158
+ def list_invalid_properties
159
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
160
+ invalid_properties = Array.new
161
+ invalid_properties
162
+ end
163
+
164
+ # Check to see if the all the properties in the model are valid
165
+ # @return true if the model is valid
166
+ def valid?
167
+ warn '[DEPRECATED] the `valid?` method is obsolete'
168
+ true
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ verified == o.verified &&
177
+ id_matches_ip == o.id_matches_ip &&
178
+ first_seen == o.first_seen &&
179
+ last_seen == o.last_seen &&
180
+ last_reachable == o.last_reachable &&
181
+ days_seen == o.days_seen &&
182
+ num_ports == o.num_ports &&
183
+ peak_num_ports == o.peak_num_ports &&
184
+ indexer == o.indexer &&
185
+ clients == o.clients
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(o)
191
+ self == o
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Integer] Hash code
196
+ def hash
197
+ [verified, id_matches_ip, first_seen, last_seen, last_reachable, days_seen, num_ports, peak_num_ports, indexer, clients].hash
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def self.build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ attributes = attributes.transform_keys(&:to_sym)
206
+ transformed_hash = {}
207
+ openapi_types.each_pair do |key, type|
208
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
209
+ transformed_hash["#{key}"] = nil
210
+ elsif type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[attribute_map[key]].is_a?(Array)
214
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
215
+ end
216
+ elsif !attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
218
+ end
219
+ end
220
+ new(transformed_hash)
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -0,0 +1,189 @@
1
+ =begin
2
+ #VPNDetection API
3
+
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
+
6
+ The version of the OpenAPI document: 2026.11.20
7
+ Contact: support@vpndetection.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module VPNDetection
17
+ # The mobile network whose space the address is, from our Carrier IP database. Every key is present when the object is populated; the object is `{}` when `is_carrier` is false.
18
+ class CarrierDetail < ApiModelBase
19
+ # The mobile carrier.
20
+ attr_accessor :name
21
+
22
+ # Its mobile country code.
23
+ attr_accessor :mcc
24
+
25
+ # Its mobile network code.
26
+ attr_accessor :mnc
27
+
28
+ # ISO 3166 country code.
29
+ attr_accessor :country
30
+
31
+ # `high`, `medium` or `low`.
32
+ attr_accessor :confidence
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'name' => :'name',
38
+ :'mcc' => :'mcc',
39
+ :'mnc' => :'mnc',
40
+ :'country' => :'country',
41
+ :'confidence' => :'confidence'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'name' => :'String',
59
+ :'mcc' => :'String',
60
+ :'mnc' => :'String',
61
+ :'country' => :'String',
62
+ :'confidence' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VPNDetection::CarrierDetail` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VPNDetection::CarrierDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'name')
89
+ self.name = attributes[:'name']
90
+ end
91
+
92
+ if attributes.key?(:'mcc')
93
+ self.mcc = attributes[:'mcc']
94
+ end
95
+
96
+ if attributes.key?(:'mnc')
97
+ self.mnc = attributes[:'mnc']
98
+ end
99
+
100
+ if attributes.key?(:'country')
101
+ self.country = attributes[:'country']
102
+ end
103
+
104
+ if attributes.key?(:'confidence')
105
+ self.confidence = attributes[:'confidence']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ name == o.name &&
130
+ mcc == o.mcc &&
131
+ mnc == o.mnc &&
132
+ country == o.country &&
133
+ confidence == o.confidence
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [name, mcc, mnc, country, confidence].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ return nil unless attributes.is_a?(Hash)
153
+ attributes = attributes.transform_keys(&:to_sym)
154
+ transformed_hash = {}
155
+ openapi_types.each_pair do |key, type|
156
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = nil
158
+ elsif type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[attribute_map[key]].is_a?(Array)
162
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
163
+ end
164
+ elsif !attributes[attribute_map[key]].nil?
165
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
166
+ end
167
+ end
168
+ new(transformed_hash)
169
+ end
170
+
171
+ # Returns the object in the form of hash
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ if value.nil?
178
+ is_nullable = self.class.openapi_nullable.include?(attr)
179
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
180
+ end
181
+
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ end
188
+
189
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #VPNDetection API
3
3
 
4
- #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them, 100 lookups a day. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
4
+ #The VPNDetection API: classify any IP address, and download the databases behind the answers. Lookups need no API key: Unlimited, the free plan, answers any address with no daily or monthly cap, with a key or without one. Every paid plan answers every field, and a free account tries them. Unlimited's answers may be used commercially, but not redistributed or used in a competing service (https://vpndetection.io/terms#no-key). See https://docs.vpndetection.io for guides and https://github.com/vpndetection-io for the official client libraries.
5
5
 
6
- The version of the OpenAPI document: 2026.11.17
6
+ The version of the OpenAPI document: 2026.11.20
7
7
  Contact: support@vpndetection.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.25.0