internetdata 2.9.2 → 2.10.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.
- checksums.yaml +4 -4
- data/README.md +146 -9
- data/lib/internetdata/api/database_v2_api.rb +2 -2
- data/lib/internetdata/api_client.rb +2 -2
- data/lib/internetdata/api_error.rb +2 -2
- data/lib/internetdata/api_model_base.rb +2 -2
- data/lib/internetdata/asn_result.rb +107 -0
- data/lib/internetdata/bogon.rb +87 -0
- data/lib/internetdata/bogons.rb +93 -0
- data/lib/internetdata/cache.rb +35 -0
- data/lib/internetdata/client.rb +388 -16
- data/lib/internetdata/configuration.rb +23 -2
- data/lib/internetdata/domain_result.rb +124 -0
- data/lib/internetdata/errors.rb +29 -6
- data/lib/internetdata/models/abuse_contact.rb +236 -0
- data/lib/internetdata/models/asn.rb +294 -0
- data/lib/internetdata/models/asn_lookup_response.rb +405 -0
- data/lib/internetdata/models/asn_prefix.rb +329 -0
- data/lib/internetdata/models/batch_lookup_error.rb +192 -0
- data/lib/internetdata/models/bit_torrent_detail.rb +410 -0
- data/lib/internetdata/models/carrier_detail.rb +273 -0
- data/lib/internetdata/models/class_detail.rb +246 -0
- data/lib/internetdata/models/client_registration.rb +2 -2
- data/lib/internetdata/models/company.rb +213 -0
- data/lib/internetdata/models/database.rb +2 -2
- data/lib/internetdata/models/database_checksums_response.rb +2 -2
- data/lib/internetdata/models/database_format.rb +2 -2
- data/lib/internetdata/models/database_list.rb +2 -2
- data/lib/internetdata/models/database_metadata.rb +2 -2
- data/lib/internetdata/models/database_metadata_column.rb +2 -2
- data/lib/internetdata/models/database_version.rb +2 -2
- data/lib/internetdata/models/db_checksums.rb +2 -2
- data/lib/internetdata/models/device_authorization.rb +2 -2
- data/lib/internetdata/models/disposable_detail.rb +248 -0
- data/lib/internetdata/models/dns_address_record.rb +192 -0
- data/lib/internetdata/models/dns_cname_record.rb +192 -0
- data/lib/internetdata/models/dns_mx_record.rb +219 -0
- data/lib/internetdata/models/dns_ns_record.rb +192 -0
- data/lib/internetdata/models/dns_resolver_detail.rb +300 -0
- data/lib/internetdata/models/domain_dns.rb +279 -0
- data/lib/internetdata/models/domain_ip_range.rb +219 -0
- data/lib/internetdata/models/domain_ip_ranges.rb +276 -0
- data/lib/internetdata/models/domain_lookup_response.rb +376 -0
- data/lib/internetdata/models/download.rb +2 -2
- data/lib/internetdata/models/download_list.rb +2 -2
- data/lib/internetdata/models/entitlement.rb +243 -0
- data/lib/internetdata/models/entitlement_apikey.rb +207 -0
- data/lib/internetdata/models/entitlement_plan.rb +216 -0
- data/lib/internetdata/models/entitlement_usage.rb +259 -0
- data/lib/internetdata/models/error_envelope.rb +2 -2
- data/lib/internetdata/models/hosted_domains.rb +166 -0
- data/lib/internetdata/models/location.rb +509 -0
- data/lib/internetdata/models/lookup_response.rb +897 -0
- data/lib/internetdata/models/oauth_metadata.rb +2 -2
- data/lib/internetdata/models/proxy_detail.rb +327 -0
- data/lib/internetdata/models/pubproxy_detail.rb +329 -0
- data/lib/internetdata/models/rwhois.rb +301 -0
- data/lib/internetdata/models/satellite_detail.rb +327 -0
- data/lib/internetdata/models/smtp_detail.rb +273 -0
- data/lib/internetdata/models/ssh_detail.rb +300 -0
- data/lib/internetdata/models/standing.rb +2 -2
- data/lib/internetdata/models/token_response.rb +2 -2
- data/lib/internetdata/models/web_detail.rb +516 -0
- data/lib/internetdata/models/whois.rb +382 -0
- data/lib/internetdata/oauth_api.rb +1 -1
- data/lib/internetdata/result.rb +431 -0
- data/lib/internetdata/transport.rb +215 -27
- data/lib/internetdata/version.rb +1 -1
- data/lib/internetdata.rb +17 -2
- metadata +58 -3
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#InternetData API
|
|
3
|
+
|
|
4
|
+
#The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026.11.13
|
|
7
|
+
Contact: support@internetdata.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 InternetData
|
|
17
|
+
class WebDetail < ApiModelBase
|
|
18
|
+
# 80 or 443.
|
|
19
|
+
attr_accessor :port
|
|
20
|
+
|
|
21
|
+
# A TLS handshake completed.
|
|
22
|
+
attr_accessor :tls_ok
|
|
23
|
+
|
|
24
|
+
# An HTTP response came back.
|
|
25
|
+
attr_accessor :session_ok
|
|
26
|
+
|
|
27
|
+
# Its status, 0 where none came.
|
|
28
|
+
attr_accessor :status_code
|
|
29
|
+
|
|
30
|
+
# Its `Server` header.
|
|
31
|
+
attr_accessor :server
|
|
32
|
+
|
|
33
|
+
# Where it redirected.
|
|
34
|
+
attr_accessor :location
|
|
35
|
+
|
|
36
|
+
# The page's title.
|
|
37
|
+
attr_accessor :title
|
|
38
|
+
|
|
39
|
+
# The certificate's subject common name.
|
|
40
|
+
attr_accessor :cert_subject_cn
|
|
41
|
+
|
|
42
|
+
# Its subject organization.
|
|
43
|
+
attr_accessor :cert_subject_o
|
|
44
|
+
|
|
45
|
+
# Its issuer.
|
|
46
|
+
attr_accessor :cert_issuer_dn
|
|
47
|
+
|
|
48
|
+
# Browsers trust it.
|
|
49
|
+
attr_accessor :cert_browser_trusted
|
|
50
|
+
|
|
51
|
+
# The TLS version negotiated, empty without TLS.
|
|
52
|
+
attr_accessor :tls_version
|
|
53
|
+
|
|
54
|
+
# The first day the port was open.
|
|
55
|
+
attr_accessor :first_seen
|
|
56
|
+
|
|
57
|
+
# The last day it was.
|
|
58
|
+
attr_accessor :last_seen
|
|
59
|
+
|
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
|
+
def self.attribute_map
|
|
62
|
+
{
|
|
63
|
+
:'port' => :'port',
|
|
64
|
+
:'tls_ok' => :'tls_ok',
|
|
65
|
+
:'session_ok' => :'session_ok',
|
|
66
|
+
:'status_code' => :'status_code',
|
|
67
|
+
:'server' => :'server',
|
|
68
|
+
:'location' => :'location',
|
|
69
|
+
:'title' => :'title',
|
|
70
|
+
:'cert_subject_cn' => :'cert_subject_cn',
|
|
71
|
+
:'cert_subject_o' => :'cert_subject_o',
|
|
72
|
+
:'cert_issuer_dn' => :'cert_issuer_dn',
|
|
73
|
+
:'cert_browser_trusted' => :'cert_browser_trusted',
|
|
74
|
+
:'tls_version' => :'tls_version',
|
|
75
|
+
:'first_seen' => :'first_seen',
|
|
76
|
+
:'last_seen' => :'last_seen'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns attribute mapping this model knows about
|
|
81
|
+
def self.acceptable_attribute_map
|
|
82
|
+
attribute_map
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Returns all the JSON keys this model knows about
|
|
86
|
+
def self.acceptable_attributes
|
|
87
|
+
acceptable_attribute_map.values
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Attribute type mapping.
|
|
91
|
+
def self.openapi_types
|
|
92
|
+
{
|
|
93
|
+
:'port' => :'Integer',
|
|
94
|
+
:'tls_ok' => :'Boolean',
|
|
95
|
+
:'session_ok' => :'Boolean',
|
|
96
|
+
:'status_code' => :'Integer',
|
|
97
|
+
:'server' => :'String',
|
|
98
|
+
:'location' => :'String',
|
|
99
|
+
:'title' => :'String',
|
|
100
|
+
:'cert_subject_cn' => :'String',
|
|
101
|
+
:'cert_subject_o' => :'String',
|
|
102
|
+
:'cert_issuer_dn' => :'String',
|
|
103
|
+
:'cert_browser_trusted' => :'Boolean',
|
|
104
|
+
:'tls_version' => :'String',
|
|
105
|
+
:'first_seen' => :'String',
|
|
106
|
+
:'last_seen' => :'String'
|
|
107
|
+
}
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# List of attributes with nullable: true
|
|
111
|
+
def self.openapi_nullable
|
|
112
|
+
Set.new([
|
|
113
|
+
])
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Initializes the object
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
def initialize(attributes = {})
|
|
119
|
+
if (!attributes.is_a?(Hash))
|
|
120
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::WebDetail` initialize method"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
124
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
125
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
126
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
127
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::WebDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
128
|
+
end
|
|
129
|
+
h[k.to_sym] = v
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'port')
|
|
133
|
+
self.port = attributes[:'port']
|
|
134
|
+
else
|
|
135
|
+
self.port = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'tls_ok')
|
|
139
|
+
self.tls_ok = attributes[:'tls_ok']
|
|
140
|
+
else
|
|
141
|
+
self.tls_ok = nil
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'session_ok')
|
|
145
|
+
self.session_ok = attributes[:'session_ok']
|
|
146
|
+
else
|
|
147
|
+
self.session_ok = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'status_code')
|
|
151
|
+
self.status_code = attributes[:'status_code']
|
|
152
|
+
else
|
|
153
|
+
self.status_code = nil
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'server')
|
|
157
|
+
self.server = attributes[:'server']
|
|
158
|
+
else
|
|
159
|
+
self.server = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'location')
|
|
163
|
+
self.location = attributes[:'location']
|
|
164
|
+
else
|
|
165
|
+
self.location = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'title')
|
|
169
|
+
self.title = attributes[:'title']
|
|
170
|
+
else
|
|
171
|
+
self.title = nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'cert_subject_cn')
|
|
175
|
+
self.cert_subject_cn = attributes[:'cert_subject_cn']
|
|
176
|
+
else
|
|
177
|
+
self.cert_subject_cn = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'cert_subject_o')
|
|
181
|
+
self.cert_subject_o = attributes[:'cert_subject_o']
|
|
182
|
+
else
|
|
183
|
+
self.cert_subject_o = nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'cert_issuer_dn')
|
|
187
|
+
self.cert_issuer_dn = attributes[:'cert_issuer_dn']
|
|
188
|
+
else
|
|
189
|
+
self.cert_issuer_dn = nil
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'cert_browser_trusted')
|
|
193
|
+
self.cert_browser_trusted = attributes[:'cert_browser_trusted']
|
|
194
|
+
else
|
|
195
|
+
self.cert_browser_trusted = nil
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'tls_version')
|
|
199
|
+
self.tls_version = attributes[:'tls_version']
|
|
200
|
+
else
|
|
201
|
+
self.tls_version = nil
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'first_seen')
|
|
205
|
+
self.first_seen = attributes[:'first_seen']
|
|
206
|
+
else
|
|
207
|
+
self.first_seen = nil
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'last_seen')
|
|
211
|
+
self.last_seen = attributes[:'last_seen']
|
|
212
|
+
else
|
|
213
|
+
self.last_seen = nil
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
218
|
+
# @return Array for valid properties with the reasons
|
|
219
|
+
def list_invalid_properties
|
|
220
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
221
|
+
invalid_properties = Array.new
|
|
222
|
+
if @port.nil?
|
|
223
|
+
invalid_properties.push('invalid value for "port", port cannot be nil.')
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if @tls_ok.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "tls_ok", tls_ok cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if @session_ok.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "session_ok", session_ok cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @status_code.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "status_code", status_code cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if @server.nil?
|
|
239
|
+
invalid_properties.push('invalid value for "server", server cannot be nil.')
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if @location.nil?
|
|
243
|
+
invalid_properties.push('invalid value for "location", location cannot be nil.')
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if @title.nil?
|
|
247
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if @cert_subject_cn.nil?
|
|
251
|
+
invalid_properties.push('invalid value for "cert_subject_cn", cert_subject_cn cannot be nil.')
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if @cert_subject_o.nil?
|
|
255
|
+
invalid_properties.push('invalid value for "cert_subject_o", cert_subject_o cannot be nil.')
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if @cert_issuer_dn.nil?
|
|
259
|
+
invalid_properties.push('invalid value for "cert_issuer_dn", cert_issuer_dn cannot be nil.')
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if @cert_browser_trusted.nil?
|
|
263
|
+
invalid_properties.push('invalid value for "cert_browser_trusted", cert_browser_trusted cannot be nil.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if @tls_version.nil?
|
|
267
|
+
invalid_properties.push('invalid value for "tls_version", tls_version cannot be nil.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if @first_seen.nil?
|
|
271
|
+
invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.')
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if @last_seen.nil?
|
|
275
|
+
invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.')
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
invalid_properties
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Check to see if the all the properties in the model are valid
|
|
282
|
+
# @return true if the model is valid
|
|
283
|
+
def valid?
|
|
284
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
285
|
+
return false if @port.nil?
|
|
286
|
+
return false if @tls_ok.nil?
|
|
287
|
+
return false if @session_ok.nil?
|
|
288
|
+
return false if @status_code.nil?
|
|
289
|
+
return false if @server.nil?
|
|
290
|
+
return false if @location.nil?
|
|
291
|
+
return false if @title.nil?
|
|
292
|
+
return false if @cert_subject_cn.nil?
|
|
293
|
+
return false if @cert_subject_o.nil?
|
|
294
|
+
return false if @cert_issuer_dn.nil?
|
|
295
|
+
return false if @cert_browser_trusted.nil?
|
|
296
|
+
return false if @tls_version.nil?
|
|
297
|
+
return false if @first_seen.nil?
|
|
298
|
+
return false if @last_seen.nil?
|
|
299
|
+
true
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Custom attribute writer method with validation
|
|
303
|
+
# @param [Object] port Value to be assigned
|
|
304
|
+
def port=(port)
|
|
305
|
+
if port.nil?
|
|
306
|
+
fail ArgumentError, 'port cannot be nil'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
@port = port
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Custom attribute writer method with validation
|
|
313
|
+
# @param [Object] tls_ok Value to be assigned
|
|
314
|
+
def tls_ok=(tls_ok)
|
|
315
|
+
if tls_ok.nil?
|
|
316
|
+
fail ArgumentError, 'tls_ok cannot be nil'
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
@tls_ok = tls_ok
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Custom attribute writer method with validation
|
|
323
|
+
# @param [Object] session_ok Value to be assigned
|
|
324
|
+
def session_ok=(session_ok)
|
|
325
|
+
if session_ok.nil?
|
|
326
|
+
fail ArgumentError, 'session_ok cannot be nil'
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
@session_ok = session_ok
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Custom attribute writer method with validation
|
|
333
|
+
# @param [Object] status_code Value to be assigned
|
|
334
|
+
def status_code=(status_code)
|
|
335
|
+
if status_code.nil?
|
|
336
|
+
fail ArgumentError, 'status_code cannot be nil'
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
@status_code = status_code
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Custom attribute writer method with validation
|
|
343
|
+
# @param [Object] server Value to be assigned
|
|
344
|
+
def server=(server)
|
|
345
|
+
if server.nil?
|
|
346
|
+
fail ArgumentError, 'server cannot be nil'
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
@server = server
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Custom attribute writer method with validation
|
|
353
|
+
# @param [Object] location Value to be assigned
|
|
354
|
+
def location=(location)
|
|
355
|
+
if location.nil?
|
|
356
|
+
fail ArgumentError, 'location cannot be nil'
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
@location = location
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Custom attribute writer method with validation
|
|
363
|
+
# @param [Object] title Value to be assigned
|
|
364
|
+
def title=(title)
|
|
365
|
+
if title.nil?
|
|
366
|
+
fail ArgumentError, 'title cannot be nil'
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
@title = title
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Custom attribute writer method with validation
|
|
373
|
+
# @param [Object] cert_subject_cn Value to be assigned
|
|
374
|
+
def cert_subject_cn=(cert_subject_cn)
|
|
375
|
+
if cert_subject_cn.nil?
|
|
376
|
+
fail ArgumentError, 'cert_subject_cn cannot be nil'
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
@cert_subject_cn = cert_subject_cn
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Custom attribute writer method with validation
|
|
383
|
+
# @param [Object] cert_subject_o Value to be assigned
|
|
384
|
+
def cert_subject_o=(cert_subject_o)
|
|
385
|
+
if cert_subject_o.nil?
|
|
386
|
+
fail ArgumentError, 'cert_subject_o cannot be nil'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
@cert_subject_o = cert_subject_o
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# Custom attribute writer method with validation
|
|
393
|
+
# @param [Object] cert_issuer_dn Value to be assigned
|
|
394
|
+
def cert_issuer_dn=(cert_issuer_dn)
|
|
395
|
+
if cert_issuer_dn.nil?
|
|
396
|
+
fail ArgumentError, 'cert_issuer_dn cannot be nil'
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
@cert_issuer_dn = cert_issuer_dn
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Custom attribute writer method with validation
|
|
403
|
+
# @param [Object] cert_browser_trusted Value to be assigned
|
|
404
|
+
def cert_browser_trusted=(cert_browser_trusted)
|
|
405
|
+
if cert_browser_trusted.nil?
|
|
406
|
+
fail ArgumentError, 'cert_browser_trusted cannot be nil'
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
@cert_browser_trusted = cert_browser_trusted
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Custom attribute writer method with validation
|
|
413
|
+
# @param [Object] tls_version Value to be assigned
|
|
414
|
+
def tls_version=(tls_version)
|
|
415
|
+
if tls_version.nil?
|
|
416
|
+
fail ArgumentError, 'tls_version cannot be nil'
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
@tls_version = tls_version
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# Custom attribute writer method with validation
|
|
423
|
+
# @param [Object] first_seen Value to be assigned
|
|
424
|
+
def first_seen=(first_seen)
|
|
425
|
+
if first_seen.nil?
|
|
426
|
+
fail ArgumentError, 'first_seen cannot be nil'
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
@first_seen = first_seen
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Custom attribute writer method with validation
|
|
433
|
+
# @param [Object] last_seen Value to be assigned
|
|
434
|
+
def last_seen=(last_seen)
|
|
435
|
+
if last_seen.nil?
|
|
436
|
+
fail ArgumentError, 'last_seen cannot be nil'
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
@last_seen = last_seen
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Checks equality by comparing each attribute.
|
|
443
|
+
# @param [Object] Object to be compared
|
|
444
|
+
def ==(o)
|
|
445
|
+
return true if self.equal?(o)
|
|
446
|
+
self.class == o.class &&
|
|
447
|
+
port == o.port &&
|
|
448
|
+
tls_ok == o.tls_ok &&
|
|
449
|
+
session_ok == o.session_ok &&
|
|
450
|
+
status_code == o.status_code &&
|
|
451
|
+
server == o.server &&
|
|
452
|
+
location == o.location &&
|
|
453
|
+
title == o.title &&
|
|
454
|
+
cert_subject_cn == o.cert_subject_cn &&
|
|
455
|
+
cert_subject_o == o.cert_subject_o &&
|
|
456
|
+
cert_issuer_dn == o.cert_issuer_dn &&
|
|
457
|
+
cert_browser_trusted == o.cert_browser_trusted &&
|
|
458
|
+
tls_version == o.tls_version &&
|
|
459
|
+
first_seen == o.first_seen &&
|
|
460
|
+
last_seen == o.last_seen
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# @see the `==` method
|
|
464
|
+
# @param [Object] Object to be compared
|
|
465
|
+
def eql?(o)
|
|
466
|
+
self == o
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Calculates hash code according to all attributes.
|
|
470
|
+
# @return [Integer] Hash code
|
|
471
|
+
def hash
|
|
472
|
+
[port, tls_ok, session_ok, status_code, server, location, title, cert_subject_cn, cert_subject_o, cert_issuer_dn, cert_browser_trusted, tls_version, first_seen, last_seen].hash
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# Builds the object from hash
|
|
476
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
477
|
+
# @return [Object] Returns the model itself
|
|
478
|
+
def self.build_from_hash(attributes)
|
|
479
|
+
return nil unless attributes.is_a?(Hash)
|
|
480
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
481
|
+
transformed_hash = {}
|
|
482
|
+
openapi_types.each_pair do |key, type|
|
|
483
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
484
|
+
transformed_hash["#{key}"] = nil
|
|
485
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
486
|
+
# check to ensure the input is an array given that the attribute
|
|
487
|
+
# is documented as an array but the input is not
|
|
488
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
489
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
490
|
+
end
|
|
491
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
492
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
new(transformed_hash)
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Returns the object in the form of hash
|
|
499
|
+
# @return [Hash] Returns the object in the form of hash
|
|
500
|
+
def to_hash
|
|
501
|
+
hash = {}
|
|
502
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
503
|
+
value = self.send(attr)
|
|
504
|
+
if value.nil?
|
|
505
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
506
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
hash[param] = _to_hash(value)
|
|
510
|
+
end
|
|
511
|
+
hash
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
end
|