internetdata 2.10.0 → 2.10.1

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.
@@ -86,32 +86,22 @@ module InternetData
86
86
 
87
87
  if attributes.key?(:'port')
88
88
  self.port = attributes[:'port']
89
- else
90
- self.port = nil
91
89
  end
92
90
 
93
91
  if attributes.key?(:'banner')
94
92
  self.banner = attributes[:'banner']
95
- else
96
- self.banner = nil
97
93
  end
98
94
 
99
95
  if attributes.key?(:'session_ok')
100
96
  self.session_ok = attributes[:'session_ok']
101
- else
102
- self.session_ok = nil
103
97
  end
104
98
 
105
99
  if attributes.key?(:'first_seen')
106
100
  self.first_seen = attributes[:'first_seen']
107
- else
108
- self.first_seen = nil
109
101
  end
110
102
 
111
103
  if attributes.key?(:'last_seen')
112
104
  self.last_seen = attributes[:'last_seen']
113
- else
114
- self.last_seen = nil
115
105
  end
116
106
  end
117
107
 
@@ -120,26 +110,6 @@ module InternetData
120
110
  def list_invalid_properties
121
111
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
112
  invalid_properties = Array.new
123
- if @port.nil?
124
- invalid_properties.push('invalid value for "port", port cannot be nil.')
125
- end
126
-
127
- if @banner.nil?
128
- invalid_properties.push('invalid value for "banner", banner cannot be nil.')
129
- end
130
-
131
- if @session_ok.nil?
132
- invalid_properties.push('invalid value for "session_ok", session_ok cannot be nil.')
133
- end
134
-
135
- if @first_seen.nil?
136
- invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.')
137
- end
138
-
139
- if @last_seen.nil?
140
- invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.')
141
- end
142
-
143
113
  invalid_properties
144
114
  end
145
115
 
@@ -147,64 +117,9 @@ module InternetData
147
117
  # @return true if the model is valid
148
118
  def valid?
149
119
  warn '[DEPRECATED] the `valid?` method is obsolete'
150
- return false if @port.nil?
151
- return false if @banner.nil?
152
- return false if @session_ok.nil?
153
- return false if @first_seen.nil?
154
- return false if @last_seen.nil?
155
120
  true
156
121
  end
157
122
 
158
- # Custom attribute writer method with validation
159
- # @param [Object] port Value to be assigned
160
- def port=(port)
161
- if port.nil?
162
- fail ArgumentError, 'port cannot be nil'
163
- end
164
-
165
- @port = port
166
- end
167
-
168
- # Custom attribute writer method with validation
169
- # @param [Object] banner Value to be assigned
170
- def banner=(banner)
171
- if banner.nil?
172
- fail ArgumentError, 'banner cannot be nil'
173
- end
174
-
175
- @banner = banner
176
- end
177
-
178
- # Custom attribute writer method with validation
179
- # @param [Object] session_ok Value to be assigned
180
- def session_ok=(session_ok)
181
- if session_ok.nil?
182
- fail ArgumentError, 'session_ok cannot be nil'
183
- end
184
-
185
- @session_ok = session_ok
186
- end
187
-
188
- # Custom attribute writer method with validation
189
- # @param [Object] first_seen Value to be assigned
190
- def first_seen=(first_seen)
191
- if first_seen.nil?
192
- fail ArgumentError, 'first_seen cannot be nil'
193
- end
194
-
195
- @first_seen = first_seen
196
- end
197
-
198
- # Custom attribute writer method with validation
199
- # @param [Object] last_seen Value to be assigned
200
- def last_seen=(last_seen)
201
- if last_seen.nil?
202
- fail ArgumentError, 'last_seen cannot be nil'
203
- end
204
-
205
- @last_seen = last_seen
206
- end
207
-
208
123
  # Checks equality by comparing each attribute.
209
124
  # @param [Object] Object to be compared
210
125
  def ==(o)
@@ -91,38 +91,26 @@ module InternetData
91
91
 
92
92
  if attributes.key?(:'port')
93
93
  self.port = attributes[:'port']
94
- else
95
- self.port = nil
96
94
  end
97
95
 
98
96
  if attributes.key?(:'banner')
99
97
  self.banner = attributes[:'banner']
100
- else
101
- self.banner = nil
102
98
  end
103
99
 
104
100
  if attributes.key?(:'host_key_fp')
105
101
  self.host_key_fp = attributes[:'host_key_fp']
106
- else
107
- self.host_key_fp = nil
108
102
  end
109
103
 
110
104
  if attributes.key?(:'session_ok')
111
105
  self.session_ok = attributes[:'session_ok']
112
- else
113
- self.session_ok = nil
114
106
  end
115
107
 
116
108
  if attributes.key?(:'first_seen')
117
109
  self.first_seen = attributes[:'first_seen']
118
- else
119
- self.first_seen = nil
120
110
  end
121
111
 
122
112
  if attributes.key?(:'last_seen')
123
113
  self.last_seen = attributes[:'last_seen']
124
- else
125
- self.last_seen = nil
126
114
  end
127
115
  end
128
116
 
@@ -131,30 +119,6 @@ module InternetData
131
119
  def list_invalid_properties
132
120
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
121
  invalid_properties = Array.new
134
- if @port.nil?
135
- invalid_properties.push('invalid value for "port", port cannot be nil.')
136
- end
137
-
138
- if @banner.nil?
139
- invalid_properties.push('invalid value for "banner", banner cannot be nil.')
140
- end
141
-
142
- if @host_key_fp.nil?
143
- invalid_properties.push('invalid value for "host_key_fp", host_key_fp cannot be nil.')
144
- end
145
-
146
- if @session_ok.nil?
147
- invalid_properties.push('invalid value for "session_ok", session_ok cannot be nil.')
148
- end
149
-
150
- if @first_seen.nil?
151
- invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.')
152
- end
153
-
154
- if @last_seen.nil?
155
- invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.')
156
- end
157
-
158
122
  invalid_properties
159
123
  end
160
124
 
@@ -162,75 +126,9 @@ module InternetData
162
126
  # @return true if the model is valid
163
127
  def valid?
164
128
  warn '[DEPRECATED] the `valid?` method is obsolete'
165
- return false if @port.nil?
166
- return false if @banner.nil?
167
- return false if @host_key_fp.nil?
168
- return false if @session_ok.nil?
169
- return false if @first_seen.nil?
170
- return false if @last_seen.nil?
171
129
  true
172
130
  end
173
131
 
174
- # Custom attribute writer method with validation
175
- # @param [Object] port Value to be assigned
176
- def port=(port)
177
- if port.nil?
178
- fail ArgumentError, 'port cannot be nil'
179
- end
180
-
181
- @port = port
182
- end
183
-
184
- # Custom attribute writer method with validation
185
- # @param [Object] banner Value to be assigned
186
- def banner=(banner)
187
- if banner.nil?
188
- fail ArgumentError, 'banner cannot be nil'
189
- end
190
-
191
- @banner = banner
192
- end
193
-
194
- # Custom attribute writer method with validation
195
- # @param [Object] host_key_fp Value to be assigned
196
- def host_key_fp=(host_key_fp)
197
- if host_key_fp.nil?
198
- fail ArgumentError, 'host_key_fp cannot be nil'
199
- end
200
-
201
- @host_key_fp = host_key_fp
202
- end
203
-
204
- # Custom attribute writer method with validation
205
- # @param [Object] session_ok Value to be assigned
206
- def session_ok=(session_ok)
207
- if session_ok.nil?
208
- fail ArgumentError, 'session_ok cannot be nil'
209
- end
210
-
211
- @session_ok = session_ok
212
- end
213
-
214
- # Custom attribute writer method with validation
215
- # @param [Object] first_seen Value to be assigned
216
- def first_seen=(first_seen)
217
- if first_seen.nil?
218
- fail ArgumentError, 'first_seen cannot be nil'
219
- end
220
-
221
- @first_seen = first_seen
222
- end
223
-
224
- # Custom attribute writer method with validation
225
- # @param [Object] last_seen Value to be assigned
226
- def last_seen=(last_seen)
227
- if last_seen.nil?
228
- fail ArgumentError, 'last_seen cannot be nil'
229
- end
230
-
231
- @last_seen = last_seen
232
- end
233
-
234
132
  # Checks equality by comparing each attribute.
235
133
  # @param [Object] Object to be compared
236
134
  def ==(o)
@@ -64,6 +64,10 @@ module InternetData
64
64
  self.scheme = uri.scheme
65
65
  self.host = uri.port == uri.default_port ? uri.host : "#{uri.host}:#{uri.port}"
66
66
  self.base_path = uri.path
67
+ # Every request goes to this base URL. The spec gives each lookup path a
68
+ # server of its own, production's, which an operation the generator
69
+ # emitted would otherwise be sent to whatever base URL the client has.
70
+ self.ignore_operation_servers = true
67
71
  self.access_token = Transport.checked_key(api_key)
68
72
  self.timeout = timeout.nil? ? nil : Transport.checked_timeout(timeout)
69
73
  end
@@ -349,23 +353,23 @@ module InternetData
349
353
  # there and not null: the generated reader skips the writer of a list or map
350
354
  # member that is not one, so `"versions": null` came back as a family with no
351
355
  # versions (2.8.1, measured 2026-10-19). A member the spec does not require is
352
- # one a plan may leave out. test/database_test.rb holds this to
356
+ # one a plan may leave out, every member of a detail object among them, which
357
+ # is `{}` under a false flag. test/database_test.rb holds this to
353
358
  # spec/openapi.yaml.
354
359
  REQUIRED = {
355
360
  'LookupResponse' => %i[ip is_bogon is_tor is_relay is_anycast is_carrier is_satellite is_ssh is_smtp
356
361
  is_web is_dns_resolver is_bittorrent tor relay location asn company hostname abuse],
357
- 'ClassDetail' => %i[provider provider_name confidence last_seen],
358
- 'ProxyDetail' => %i[provider provider_name first_seen last_seen hits hits_days_pct providers_num],
359
- 'PubproxyDetail' => %i[entry exit protocols num_ports num_proxies last_seen last_usable],
360
- 'CarrierDetail' => %i[name mcc mnc country confidence],
361
- 'SatelliteDetail' => %i[provider provider_name orbit segment country asn confidence],
362
- 'SshDetail' => %i[port banner host_key_fp session_ok first_seen last_seen],
363
- 'SmtpDetail' => %i[port banner session_ok first_seen last_seen],
362
+ 'ClassDetail' => [],
363
+ 'ProxyDetail' => [],
364
+ 'PubproxyDetail' => [],
365
+ 'CarrierDetail' => [],
366
+ 'SatelliteDetail' => [],
367
+ 'SshDetail' => [],
368
+ 'SmtpDetail' => [],
364
369
  'WebDetail' => %i[port tls_ok session_ok status_code server location title cert_subject_cn
365
370
  cert_subject_o cert_issuer_dn cert_browser_trusted tls_version first_seen last_seen],
366
- 'DnsResolverDetail' => %i[port recursion_available rcode answer_correct first_seen last_seen],
367
- 'BitTorrentDetail' => %i[verified id_matches_ip first_seen last_seen last_reachable days_seen num_ports
368
- peak_num_ports indexer clients],
371
+ 'DnsResolverDetail' => [],
372
+ 'BitTorrentDetail' => [],
369
373
  'Location' => %i[continent continent_name country country_name timezone currency_code currency_name
370
374
  currency_symbol flag_emoji flag_unicode],
371
375
  'Asn' => %i[asn name domain type prefix],
@@ -384,7 +388,7 @@ module InternetData
384
388
  'DnsCnameRecord' => %i[target last_seen],
385
389
  'DomainIpRanges' => %i[domain redirects_to total ipv4 ranges],
386
390
  'DomainIpRange' => %i[range name country],
387
- 'DisposableDetail' => %i[confidence providers first_seen last_seen],
391
+ 'DisposableDetail' => [],
388
392
  'BatchLookupError' => %i[status error],
389
393
  'Entitlement' => %i[org_id apikey plan usage],
390
394
  'EntitlementApikey' => %i[id expires allowed_cidrs],
@@ -401,13 +405,6 @@ module InternetData
401
405
  'Download' => %i[dataset_id format outcome sample open bytes http_status apikey_id client_ip user_agent created],
402
406
  }.freeze
403
407
 
404
- # The detail objects, each `{}` under a false flag (the spec's `allOf`
405
- # members), so an empty one is present and empty, while a populated one
406
- # carries every member the spec requires of it. test/database_test.rb holds
407
- # this to spec/openapi.yaml.
408
- DETAILS = %w[ClassDetail ProxyDetail PubproxyDetail CarrierDetail SatelliteDetail SshDetail SmtpDetail
409
- DnsResolverDetail BitTorrentDetail DisposableDetail].freeze
410
-
411
408
  # RFC 3339's full-date, the spec's `date`, and its date-time, the spec's
412
409
  # `date-time`, its `T` and `Z` in either case, as RFC 3339 allows: through
413
410
  # 2.8.4 a lowercase one failed the call. Anything else reached the
@@ -452,8 +449,7 @@ module InternetData
452
449
  else
453
450
  model = InternetData.const_get(type)
454
451
  if model.respond_to?(:openapi_types)
455
- value.is_a?(Hash) && ((value.empty? && DETAILS.include?(type)) ||
456
- model.openapi_types.all? { |attr, member| check_member!(model, attr, member, value, where) })
452
+ value.is_a?(Hash) && model.openapi_types.all? { |attr, member| check_member!(model, attr, member, value, where) }
457
453
  else
458
454
  value.is_a?(String) # an enum
459
455
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InternetData
4
- VERSION = '2.10.0'
4
+ VERSION = '2.10.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internetdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev