internetdata 2.9.1 → 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 +12 -5
- 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,897 @@
|
|
|
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
|
+
# What every database says about one address.
|
|
18
|
+
class LookupResponse < ApiModelBase
|
|
19
|
+
# The address looked up, as parsed: `::ffff:a.b.c.d` answers as `a.b.c.d`.
|
|
20
|
+
attr_accessor :ip
|
|
21
|
+
|
|
22
|
+
# Reserved space, answered from the address alone.
|
|
23
|
+
attr_accessor :is_bogon
|
|
24
|
+
|
|
25
|
+
# In VPN IP: a VPN service's server. Paid plans and the trial.
|
|
26
|
+
attr_accessor :is_vpn
|
|
27
|
+
|
|
28
|
+
# In Tor IP: a Tor exit.
|
|
29
|
+
attr_accessor :is_tor
|
|
30
|
+
|
|
31
|
+
# In Relay IP: an anonymizing relay such as iCloud Private Relay.
|
|
32
|
+
attr_accessor :is_relay
|
|
33
|
+
|
|
34
|
+
# In Residential Proxy IP's 90-day window: a residential proxy exit. Paid plans and the trial.
|
|
35
|
+
attr_accessor :is_resproxy
|
|
36
|
+
|
|
37
|
+
# In Datacenter Proxy IP's 90-day window. Paid plans and the trial.
|
|
38
|
+
attr_accessor :is_dcproxy
|
|
39
|
+
|
|
40
|
+
# In Mobile Proxy IP's 90-day window. Paid plans and the trial.
|
|
41
|
+
attr_accessor :is_mobproxy
|
|
42
|
+
|
|
43
|
+
# In Public Proxy IP: a public proxy listens here, or its traffic left from here. Paid plans and the trial.
|
|
44
|
+
attr_accessor :is_pubproxy
|
|
45
|
+
|
|
46
|
+
# In Hosting IP: a hosting or cloud network. Paid plans and the trial.
|
|
47
|
+
attr_accessor :is_hosting
|
|
48
|
+
|
|
49
|
+
# In CDN IP: a content delivery network. Paid plans and the trial.
|
|
50
|
+
attr_accessor :is_cdn
|
|
51
|
+
|
|
52
|
+
# In Anycast IP: announced from many places at once.
|
|
53
|
+
attr_accessor :is_anycast
|
|
54
|
+
|
|
55
|
+
# In Carrier IP: a mobile carrier's address space.
|
|
56
|
+
attr_accessor :is_carrier
|
|
57
|
+
|
|
58
|
+
# In Satellite IP: a satellite operator's address space.
|
|
59
|
+
attr_accessor :is_satellite
|
|
60
|
+
|
|
61
|
+
# In SSH IP: an SSH server answered here.
|
|
62
|
+
attr_accessor :is_ssh
|
|
63
|
+
|
|
64
|
+
# In SMTP IP: a mail server answered here.
|
|
65
|
+
attr_accessor :is_smtp
|
|
66
|
+
|
|
67
|
+
# In Web IP: a web server answered here on port 80 or 443.
|
|
68
|
+
attr_accessor :is_web
|
|
69
|
+
|
|
70
|
+
# In DNS Resolver IP: an open DNS resolver answered here.
|
|
71
|
+
attr_accessor :is_dns_resolver
|
|
72
|
+
|
|
73
|
+
# In BitTorrent IP: a BitTorrent client was seen here in the last 90 days.
|
|
74
|
+
attr_accessor :is_bittorrent
|
|
75
|
+
|
|
76
|
+
# VPN IP's row, `{}` when `is_vpn` is false. Paid plans and the trial.
|
|
77
|
+
attr_accessor :vpn
|
|
78
|
+
|
|
79
|
+
# Tor IP's row, `{}` when `is_tor` is false.
|
|
80
|
+
attr_accessor :tor
|
|
81
|
+
|
|
82
|
+
# Relay IP's row, `{}` when `is_relay` is false.
|
|
83
|
+
attr_accessor :relay
|
|
84
|
+
|
|
85
|
+
# `{}` when `is_resproxy` is false. Paid plans and the trial.
|
|
86
|
+
attr_accessor :resproxy
|
|
87
|
+
|
|
88
|
+
# `{}` when `is_dcproxy` is false. Paid plans and the trial.
|
|
89
|
+
attr_accessor :dcproxy
|
|
90
|
+
|
|
91
|
+
# `{}` when `is_mobproxy` is false. Paid plans and the trial.
|
|
92
|
+
attr_accessor :mobproxy
|
|
93
|
+
|
|
94
|
+
# `{}` when `is_pubproxy` is false. Paid plans and the trial.
|
|
95
|
+
attr_accessor :pubproxy
|
|
96
|
+
|
|
97
|
+
# `{}` when `is_hosting` is false. Paid plans and the trial.
|
|
98
|
+
attr_accessor :hosting
|
|
99
|
+
|
|
100
|
+
# `{}` when `is_cdn` is false. Paid plans and the trial.
|
|
101
|
+
attr_accessor :cdn
|
|
102
|
+
|
|
103
|
+
# `{}` when `is_carrier` is false. Paid plans and the trial.
|
|
104
|
+
attr_accessor :carrier
|
|
105
|
+
|
|
106
|
+
# `{}` when `is_satellite` is false. Paid plans and the trial.
|
|
107
|
+
attr_accessor :satellite
|
|
108
|
+
|
|
109
|
+
# `{}` when `is_ssh` is false. Paid plans and the trial.
|
|
110
|
+
attr_accessor :ssh
|
|
111
|
+
|
|
112
|
+
# `{}` when `is_smtp` is false. Paid plans and the trial.
|
|
113
|
+
attr_accessor :smtp
|
|
114
|
+
|
|
115
|
+
# A row per port that answered, lowest first; `[]` when `is_web` is false. Paid plans and the trial.
|
|
116
|
+
attr_accessor :web
|
|
117
|
+
|
|
118
|
+
# `{}` when `is_dns_resolver` is false. Paid plans and the trial.
|
|
119
|
+
attr_accessor :dns_resolver
|
|
120
|
+
|
|
121
|
+
# `{}` when `is_bittorrent` is false. Paid plans and the trial.
|
|
122
|
+
attr_accessor :bittorrent
|
|
123
|
+
|
|
124
|
+
attr_accessor :location
|
|
125
|
+
|
|
126
|
+
attr_accessor :asn
|
|
127
|
+
|
|
128
|
+
attr_accessor :company
|
|
129
|
+
|
|
130
|
+
# The name the address's reverse DNS (PTR) record points to in IP RDNS, empty when it has none.
|
|
131
|
+
attr_accessor :hostname
|
|
132
|
+
|
|
133
|
+
attr_accessor :abuse
|
|
134
|
+
|
|
135
|
+
attr_accessor :whois
|
|
136
|
+
|
|
137
|
+
attr_accessor :rwhois
|
|
138
|
+
|
|
139
|
+
attr_accessor :hosted_domains
|
|
140
|
+
|
|
141
|
+
# On every answer to a key on the free plan, and on no other: `false` while the day's trial of every field lasts, `true` once the answer has Unlimited's fields.
|
|
142
|
+
attr_accessor :trial_expired
|
|
143
|
+
|
|
144
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
145
|
+
def self.attribute_map
|
|
146
|
+
{
|
|
147
|
+
:'ip' => :'ip',
|
|
148
|
+
:'is_bogon' => :'is_bogon',
|
|
149
|
+
:'is_vpn' => :'is_vpn',
|
|
150
|
+
:'is_tor' => :'is_tor',
|
|
151
|
+
:'is_relay' => :'is_relay',
|
|
152
|
+
:'is_resproxy' => :'is_resproxy',
|
|
153
|
+
:'is_dcproxy' => :'is_dcproxy',
|
|
154
|
+
:'is_mobproxy' => :'is_mobproxy',
|
|
155
|
+
:'is_pubproxy' => :'is_pubproxy',
|
|
156
|
+
:'is_hosting' => :'is_hosting',
|
|
157
|
+
:'is_cdn' => :'is_cdn',
|
|
158
|
+
:'is_anycast' => :'is_anycast',
|
|
159
|
+
:'is_carrier' => :'is_carrier',
|
|
160
|
+
:'is_satellite' => :'is_satellite',
|
|
161
|
+
:'is_ssh' => :'is_ssh',
|
|
162
|
+
:'is_smtp' => :'is_smtp',
|
|
163
|
+
:'is_web' => :'is_web',
|
|
164
|
+
:'is_dns_resolver' => :'is_dns_resolver',
|
|
165
|
+
:'is_bittorrent' => :'is_bittorrent',
|
|
166
|
+
:'vpn' => :'vpn',
|
|
167
|
+
:'tor' => :'tor',
|
|
168
|
+
:'relay' => :'relay',
|
|
169
|
+
:'resproxy' => :'resproxy',
|
|
170
|
+
:'dcproxy' => :'dcproxy',
|
|
171
|
+
:'mobproxy' => :'mobproxy',
|
|
172
|
+
:'pubproxy' => :'pubproxy',
|
|
173
|
+
:'hosting' => :'hosting',
|
|
174
|
+
:'cdn' => :'cdn',
|
|
175
|
+
:'carrier' => :'carrier',
|
|
176
|
+
:'satellite' => :'satellite',
|
|
177
|
+
:'ssh' => :'ssh',
|
|
178
|
+
:'smtp' => :'smtp',
|
|
179
|
+
:'web' => :'web',
|
|
180
|
+
:'dns_resolver' => :'dns_resolver',
|
|
181
|
+
:'bittorrent' => :'bittorrent',
|
|
182
|
+
:'location' => :'location',
|
|
183
|
+
:'asn' => :'asn',
|
|
184
|
+
:'company' => :'company',
|
|
185
|
+
:'hostname' => :'hostname',
|
|
186
|
+
:'abuse' => :'abuse',
|
|
187
|
+
:'whois' => :'whois',
|
|
188
|
+
:'rwhois' => :'rwhois',
|
|
189
|
+
:'hosted_domains' => :'hosted_domains',
|
|
190
|
+
:'trial_expired' => :'trial_expired'
|
|
191
|
+
}
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns attribute mapping this model knows about
|
|
195
|
+
def self.acceptable_attribute_map
|
|
196
|
+
attribute_map
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns all the JSON keys this model knows about
|
|
200
|
+
def self.acceptable_attributes
|
|
201
|
+
acceptable_attribute_map.values
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Attribute type mapping.
|
|
205
|
+
def self.openapi_types
|
|
206
|
+
{
|
|
207
|
+
:'ip' => :'String',
|
|
208
|
+
:'is_bogon' => :'Boolean',
|
|
209
|
+
:'is_vpn' => :'Boolean',
|
|
210
|
+
:'is_tor' => :'Boolean',
|
|
211
|
+
:'is_relay' => :'Boolean',
|
|
212
|
+
:'is_resproxy' => :'Boolean',
|
|
213
|
+
:'is_dcproxy' => :'Boolean',
|
|
214
|
+
:'is_mobproxy' => :'Boolean',
|
|
215
|
+
:'is_pubproxy' => :'Boolean',
|
|
216
|
+
:'is_hosting' => :'Boolean',
|
|
217
|
+
:'is_cdn' => :'Boolean',
|
|
218
|
+
:'is_anycast' => :'Boolean',
|
|
219
|
+
:'is_carrier' => :'Boolean',
|
|
220
|
+
:'is_satellite' => :'Boolean',
|
|
221
|
+
:'is_ssh' => :'Boolean',
|
|
222
|
+
:'is_smtp' => :'Boolean',
|
|
223
|
+
:'is_web' => :'Boolean',
|
|
224
|
+
:'is_dns_resolver' => :'Boolean',
|
|
225
|
+
:'is_bittorrent' => :'Boolean',
|
|
226
|
+
:'vpn' => :'ClassDetail',
|
|
227
|
+
:'tor' => :'ClassDetail',
|
|
228
|
+
:'relay' => :'ClassDetail',
|
|
229
|
+
:'resproxy' => :'ProxyDetail',
|
|
230
|
+
:'dcproxy' => :'ProxyDetail',
|
|
231
|
+
:'mobproxy' => :'ProxyDetail',
|
|
232
|
+
:'pubproxy' => :'PubproxyDetail',
|
|
233
|
+
:'hosting' => :'ClassDetail',
|
|
234
|
+
:'cdn' => :'ClassDetail',
|
|
235
|
+
:'carrier' => :'CarrierDetail',
|
|
236
|
+
:'satellite' => :'SatelliteDetail',
|
|
237
|
+
:'ssh' => :'SshDetail',
|
|
238
|
+
:'smtp' => :'SmtpDetail',
|
|
239
|
+
:'web' => :'Array<WebDetail>',
|
|
240
|
+
:'dns_resolver' => :'DnsResolverDetail',
|
|
241
|
+
:'bittorrent' => :'BitTorrentDetail',
|
|
242
|
+
:'location' => :'Location',
|
|
243
|
+
:'asn' => :'Asn',
|
|
244
|
+
:'company' => :'Company',
|
|
245
|
+
:'hostname' => :'String',
|
|
246
|
+
:'abuse' => :'AbuseContact',
|
|
247
|
+
:'whois' => :'Whois',
|
|
248
|
+
:'rwhois' => :'Rwhois',
|
|
249
|
+
:'hosted_domains' => :'HostedDomains',
|
|
250
|
+
:'trial_expired' => :'Boolean'
|
|
251
|
+
}
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# List of attributes with nullable: true
|
|
255
|
+
def self.openapi_nullable
|
|
256
|
+
Set.new([
|
|
257
|
+
])
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Initializes the object
|
|
261
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
262
|
+
def initialize(attributes = {})
|
|
263
|
+
if (!attributes.is_a?(Hash))
|
|
264
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::LookupResponse` initialize method"
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
268
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
269
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
270
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
271
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::LookupResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
272
|
+
end
|
|
273
|
+
h[k.to_sym] = v
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if attributes.key?(:'ip')
|
|
277
|
+
self.ip = attributes[:'ip']
|
|
278
|
+
else
|
|
279
|
+
self.ip = nil
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if attributes.key?(:'is_bogon')
|
|
283
|
+
self.is_bogon = attributes[:'is_bogon']
|
|
284
|
+
else
|
|
285
|
+
self.is_bogon = nil
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if attributes.key?(:'is_vpn')
|
|
289
|
+
self.is_vpn = attributes[:'is_vpn']
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if attributes.key?(:'is_tor')
|
|
293
|
+
self.is_tor = attributes[:'is_tor']
|
|
294
|
+
else
|
|
295
|
+
self.is_tor = nil
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if attributes.key?(:'is_relay')
|
|
299
|
+
self.is_relay = attributes[:'is_relay']
|
|
300
|
+
else
|
|
301
|
+
self.is_relay = nil
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'is_resproxy')
|
|
305
|
+
self.is_resproxy = attributes[:'is_resproxy']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'is_dcproxy')
|
|
309
|
+
self.is_dcproxy = attributes[:'is_dcproxy']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'is_mobproxy')
|
|
313
|
+
self.is_mobproxy = attributes[:'is_mobproxy']
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.key?(:'is_pubproxy')
|
|
317
|
+
self.is_pubproxy = attributes[:'is_pubproxy']
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.key?(:'is_hosting')
|
|
321
|
+
self.is_hosting = attributes[:'is_hosting']
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.key?(:'is_cdn')
|
|
325
|
+
self.is_cdn = attributes[:'is_cdn']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.key?(:'is_anycast')
|
|
329
|
+
self.is_anycast = attributes[:'is_anycast']
|
|
330
|
+
else
|
|
331
|
+
self.is_anycast = nil
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if attributes.key?(:'is_carrier')
|
|
335
|
+
self.is_carrier = attributes[:'is_carrier']
|
|
336
|
+
else
|
|
337
|
+
self.is_carrier = nil
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
if attributes.key?(:'is_satellite')
|
|
341
|
+
self.is_satellite = attributes[:'is_satellite']
|
|
342
|
+
else
|
|
343
|
+
self.is_satellite = nil
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.key?(:'is_ssh')
|
|
347
|
+
self.is_ssh = attributes[:'is_ssh']
|
|
348
|
+
else
|
|
349
|
+
self.is_ssh = nil
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if attributes.key?(:'is_smtp')
|
|
353
|
+
self.is_smtp = attributes[:'is_smtp']
|
|
354
|
+
else
|
|
355
|
+
self.is_smtp = nil
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if attributes.key?(:'is_web')
|
|
359
|
+
self.is_web = attributes[:'is_web']
|
|
360
|
+
else
|
|
361
|
+
self.is_web = nil
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
if attributes.key?(:'is_dns_resolver')
|
|
365
|
+
self.is_dns_resolver = attributes[:'is_dns_resolver']
|
|
366
|
+
else
|
|
367
|
+
self.is_dns_resolver = nil
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if attributes.key?(:'is_bittorrent')
|
|
371
|
+
self.is_bittorrent = attributes[:'is_bittorrent']
|
|
372
|
+
else
|
|
373
|
+
self.is_bittorrent = nil
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
if attributes.key?(:'vpn')
|
|
377
|
+
self.vpn = attributes[:'vpn']
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
if attributes.key?(:'tor')
|
|
381
|
+
self.tor = attributes[:'tor']
|
|
382
|
+
else
|
|
383
|
+
self.tor = nil
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
if attributes.key?(:'relay')
|
|
387
|
+
self.relay = attributes[:'relay']
|
|
388
|
+
else
|
|
389
|
+
self.relay = nil
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
if attributes.key?(:'resproxy')
|
|
393
|
+
self.resproxy = attributes[:'resproxy']
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
if attributes.key?(:'dcproxy')
|
|
397
|
+
self.dcproxy = attributes[:'dcproxy']
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
if attributes.key?(:'mobproxy')
|
|
401
|
+
self.mobproxy = attributes[:'mobproxy']
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
if attributes.key?(:'pubproxy')
|
|
405
|
+
self.pubproxy = attributes[:'pubproxy']
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
if attributes.key?(:'hosting')
|
|
409
|
+
self.hosting = attributes[:'hosting']
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
if attributes.key?(:'cdn')
|
|
413
|
+
self.cdn = attributes[:'cdn']
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
if attributes.key?(:'carrier')
|
|
417
|
+
self.carrier = attributes[:'carrier']
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
if attributes.key?(:'satellite')
|
|
421
|
+
self.satellite = attributes[:'satellite']
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
if attributes.key?(:'ssh')
|
|
425
|
+
self.ssh = attributes[:'ssh']
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
if attributes.key?(:'smtp')
|
|
429
|
+
self.smtp = attributes[:'smtp']
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
if attributes.key?(:'web')
|
|
433
|
+
if (value = attributes[:'web']).is_a?(Array)
|
|
434
|
+
self.web = value
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if attributes.key?(:'dns_resolver')
|
|
439
|
+
self.dns_resolver = attributes[:'dns_resolver']
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
if attributes.key?(:'bittorrent')
|
|
443
|
+
self.bittorrent = attributes[:'bittorrent']
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
if attributes.key?(:'location')
|
|
447
|
+
self.location = attributes[:'location']
|
|
448
|
+
else
|
|
449
|
+
self.location = nil
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
if attributes.key?(:'asn')
|
|
453
|
+
self.asn = attributes[:'asn']
|
|
454
|
+
else
|
|
455
|
+
self.asn = nil
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
if attributes.key?(:'company')
|
|
459
|
+
self.company = attributes[:'company']
|
|
460
|
+
else
|
|
461
|
+
self.company = nil
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
if attributes.key?(:'hostname')
|
|
465
|
+
self.hostname = attributes[:'hostname']
|
|
466
|
+
else
|
|
467
|
+
self.hostname = nil
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
if attributes.key?(:'abuse')
|
|
471
|
+
self.abuse = attributes[:'abuse']
|
|
472
|
+
else
|
|
473
|
+
self.abuse = nil
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
if attributes.key?(:'whois')
|
|
477
|
+
self.whois = attributes[:'whois']
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
if attributes.key?(:'rwhois')
|
|
481
|
+
self.rwhois = attributes[:'rwhois']
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if attributes.key?(:'hosted_domains')
|
|
485
|
+
self.hosted_domains = attributes[:'hosted_domains']
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
if attributes.key?(:'trial_expired')
|
|
489
|
+
self.trial_expired = attributes[:'trial_expired']
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
494
|
+
# @return Array for valid properties with the reasons
|
|
495
|
+
def list_invalid_properties
|
|
496
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
497
|
+
invalid_properties = Array.new
|
|
498
|
+
if @ip.nil?
|
|
499
|
+
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
if @is_bogon.nil?
|
|
503
|
+
invalid_properties.push('invalid value for "is_bogon", is_bogon cannot be nil.')
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
if @is_tor.nil?
|
|
507
|
+
invalid_properties.push('invalid value for "is_tor", is_tor cannot be nil.')
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
if @is_relay.nil?
|
|
511
|
+
invalid_properties.push('invalid value for "is_relay", is_relay cannot be nil.')
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
if @is_anycast.nil?
|
|
515
|
+
invalid_properties.push('invalid value for "is_anycast", is_anycast cannot be nil.')
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
if @is_carrier.nil?
|
|
519
|
+
invalid_properties.push('invalid value for "is_carrier", is_carrier cannot be nil.')
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
if @is_satellite.nil?
|
|
523
|
+
invalid_properties.push('invalid value for "is_satellite", is_satellite cannot be nil.')
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
if @is_ssh.nil?
|
|
527
|
+
invalid_properties.push('invalid value for "is_ssh", is_ssh cannot be nil.')
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
if @is_smtp.nil?
|
|
531
|
+
invalid_properties.push('invalid value for "is_smtp", is_smtp cannot be nil.')
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
if @is_web.nil?
|
|
535
|
+
invalid_properties.push('invalid value for "is_web", is_web cannot be nil.')
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
if @is_dns_resolver.nil?
|
|
539
|
+
invalid_properties.push('invalid value for "is_dns_resolver", is_dns_resolver cannot be nil.')
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
if @is_bittorrent.nil?
|
|
543
|
+
invalid_properties.push('invalid value for "is_bittorrent", is_bittorrent cannot be nil.')
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
if @tor.nil?
|
|
547
|
+
invalid_properties.push('invalid value for "tor", tor cannot be nil.')
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
if @relay.nil?
|
|
551
|
+
invalid_properties.push('invalid value for "relay", relay cannot be nil.')
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
if @location.nil?
|
|
555
|
+
invalid_properties.push('invalid value for "location", location cannot be nil.')
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
if @asn.nil?
|
|
559
|
+
invalid_properties.push('invalid value for "asn", asn cannot be nil.')
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
if @company.nil?
|
|
563
|
+
invalid_properties.push('invalid value for "company", company cannot be nil.')
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
if @hostname.nil?
|
|
567
|
+
invalid_properties.push('invalid value for "hostname", hostname cannot be nil.')
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
if @abuse.nil?
|
|
571
|
+
invalid_properties.push('invalid value for "abuse", abuse cannot be nil.')
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
invalid_properties
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Check to see if the all the properties in the model are valid
|
|
578
|
+
# @return true if the model is valid
|
|
579
|
+
def valid?
|
|
580
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
581
|
+
return false if @ip.nil?
|
|
582
|
+
return false if @is_bogon.nil?
|
|
583
|
+
return false if @is_tor.nil?
|
|
584
|
+
return false if @is_relay.nil?
|
|
585
|
+
return false if @is_anycast.nil?
|
|
586
|
+
return false if @is_carrier.nil?
|
|
587
|
+
return false if @is_satellite.nil?
|
|
588
|
+
return false if @is_ssh.nil?
|
|
589
|
+
return false if @is_smtp.nil?
|
|
590
|
+
return false if @is_web.nil?
|
|
591
|
+
return false if @is_dns_resolver.nil?
|
|
592
|
+
return false if @is_bittorrent.nil?
|
|
593
|
+
return false if @tor.nil?
|
|
594
|
+
return false if @relay.nil?
|
|
595
|
+
return false if @location.nil?
|
|
596
|
+
return false if @asn.nil?
|
|
597
|
+
return false if @company.nil?
|
|
598
|
+
return false if @hostname.nil?
|
|
599
|
+
return false if @abuse.nil?
|
|
600
|
+
true
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Custom attribute writer method with validation
|
|
604
|
+
# @param [Object] ip Value to be assigned
|
|
605
|
+
def ip=(ip)
|
|
606
|
+
if ip.nil?
|
|
607
|
+
fail ArgumentError, 'ip cannot be nil'
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
@ip = ip
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Custom attribute writer method with validation
|
|
614
|
+
# @param [Object] is_bogon Value to be assigned
|
|
615
|
+
def is_bogon=(is_bogon)
|
|
616
|
+
if is_bogon.nil?
|
|
617
|
+
fail ArgumentError, 'is_bogon cannot be nil'
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
@is_bogon = is_bogon
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# Custom attribute writer method with validation
|
|
624
|
+
# @param [Object] is_tor Value to be assigned
|
|
625
|
+
def is_tor=(is_tor)
|
|
626
|
+
if is_tor.nil?
|
|
627
|
+
fail ArgumentError, 'is_tor cannot be nil'
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
@is_tor = is_tor
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
# Custom attribute writer method with validation
|
|
634
|
+
# @param [Object] is_relay Value to be assigned
|
|
635
|
+
def is_relay=(is_relay)
|
|
636
|
+
if is_relay.nil?
|
|
637
|
+
fail ArgumentError, 'is_relay cannot be nil'
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
@is_relay = is_relay
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
# Custom attribute writer method with validation
|
|
644
|
+
# @param [Object] is_anycast Value to be assigned
|
|
645
|
+
def is_anycast=(is_anycast)
|
|
646
|
+
if is_anycast.nil?
|
|
647
|
+
fail ArgumentError, 'is_anycast cannot be nil'
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
@is_anycast = is_anycast
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
# Custom attribute writer method with validation
|
|
654
|
+
# @param [Object] is_carrier Value to be assigned
|
|
655
|
+
def is_carrier=(is_carrier)
|
|
656
|
+
if is_carrier.nil?
|
|
657
|
+
fail ArgumentError, 'is_carrier cannot be nil'
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
@is_carrier = is_carrier
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# Custom attribute writer method with validation
|
|
664
|
+
# @param [Object] is_satellite Value to be assigned
|
|
665
|
+
def is_satellite=(is_satellite)
|
|
666
|
+
if is_satellite.nil?
|
|
667
|
+
fail ArgumentError, 'is_satellite cannot be nil'
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
@is_satellite = is_satellite
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
# Custom attribute writer method with validation
|
|
674
|
+
# @param [Object] is_ssh Value to be assigned
|
|
675
|
+
def is_ssh=(is_ssh)
|
|
676
|
+
if is_ssh.nil?
|
|
677
|
+
fail ArgumentError, 'is_ssh cannot be nil'
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
@is_ssh = is_ssh
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
# Custom attribute writer method with validation
|
|
684
|
+
# @param [Object] is_smtp Value to be assigned
|
|
685
|
+
def is_smtp=(is_smtp)
|
|
686
|
+
if is_smtp.nil?
|
|
687
|
+
fail ArgumentError, 'is_smtp cannot be nil'
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
@is_smtp = is_smtp
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
# Custom attribute writer method with validation
|
|
694
|
+
# @param [Object] is_web Value to be assigned
|
|
695
|
+
def is_web=(is_web)
|
|
696
|
+
if is_web.nil?
|
|
697
|
+
fail ArgumentError, 'is_web cannot be nil'
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
@is_web = is_web
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
# Custom attribute writer method with validation
|
|
704
|
+
# @param [Object] is_dns_resolver Value to be assigned
|
|
705
|
+
def is_dns_resolver=(is_dns_resolver)
|
|
706
|
+
if is_dns_resolver.nil?
|
|
707
|
+
fail ArgumentError, 'is_dns_resolver cannot be nil'
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
@is_dns_resolver = is_dns_resolver
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# Custom attribute writer method with validation
|
|
714
|
+
# @param [Object] is_bittorrent Value to be assigned
|
|
715
|
+
def is_bittorrent=(is_bittorrent)
|
|
716
|
+
if is_bittorrent.nil?
|
|
717
|
+
fail ArgumentError, 'is_bittorrent cannot be nil'
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
@is_bittorrent = is_bittorrent
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
# Custom attribute writer method with validation
|
|
724
|
+
# @param [Object] tor Value to be assigned
|
|
725
|
+
def tor=(tor)
|
|
726
|
+
if tor.nil?
|
|
727
|
+
fail ArgumentError, 'tor cannot be nil'
|
|
728
|
+
end
|
|
729
|
+
|
|
730
|
+
@tor = tor
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Custom attribute writer method with validation
|
|
734
|
+
# @param [Object] relay Value to be assigned
|
|
735
|
+
def relay=(relay)
|
|
736
|
+
if relay.nil?
|
|
737
|
+
fail ArgumentError, 'relay cannot be nil'
|
|
738
|
+
end
|
|
739
|
+
|
|
740
|
+
@relay = relay
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
# Custom attribute writer method with validation
|
|
744
|
+
# @param [Object] location Value to be assigned
|
|
745
|
+
def location=(location)
|
|
746
|
+
if location.nil?
|
|
747
|
+
fail ArgumentError, 'location cannot be nil'
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
@location = location
|
|
751
|
+
end
|
|
752
|
+
|
|
753
|
+
# Custom attribute writer method with validation
|
|
754
|
+
# @param [Object] asn Value to be assigned
|
|
755
|
+
def asn=(asn)
|
|
756
|
+
if asn.nil?
|
|
757
|
+
fail ArgumentError, 'asn cannot be nil'
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
@asn = asn
|
|
761
|
+
end
|
|
762
|
+
|
|
763
|
+
# Custom attribute writer method with validation
|
|
764
|
+
# @param [Object] company Value to be assigned
|
|
765
|
+
def company=(company)
|
|
766
|
+
if company.nil?
|
|
767
|
+
fail ArgumentError, 'company cannot be nil'
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
@company = company
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
# Custom attribute writer method with validation
|
|
774
|
+
# @param [Object] hostname Value to be assigned
|
|
775
|
+
def hostname=(hostname)
|
|
776
|
+
if hostname.nil?
|
|
777
|
+
fail ArgumentError, 'hostname cannot be nil'
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
@hostname = hostname
|
|
781
|
+
end
|
|
782
|
+
|
|
783
|
+
# Custom attribute writer method with validation
|
|
784
|
+
# @param [Object] abuse Value to be assigned
|
|
785
|
+
def abuse=(abuse)
|
|
786
|
+
if abuse.nil?
|
|
787
|
+
fail ArgumentError, 'abuse cannot be nil'
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
@abuse = abuse
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
# Checks equality by comparing each attribute.
|
|
794
|
+
# @param [Object] Object to be compared
|
|
795
|
+
def ==(o)
|
|
796
|
+
return true if self.equal?(o)
|
|
797
|
+
self.class == o.class &&
|
|
798
|
+
ip == o.ip &&
|
|
799
|
+
is_bogon == o.is_bogon &&
|
|
800
|
+
is_vpn == o.is_vpn &&
|
|
801
|
+
is_tor == o.is_tor &&
|
|
802
|
+
is_relay == o.is_relay &&
|
|
803
|
+
is_resproxy == o.is_resproxy &&
|
|
804
|
+
is_dcproxy == o.is_dcproxy &&
|
|
805
|
+
is_mobproxy == o.is_mobproxy &&
|
|
806
|
+
is_pubproxy == o.is_pubproxy &&
|
|
807
|
+
is_hosting == o.is_hosting &&
|
|
808
|
+
is_cdn == o.is_cdn &&
|
|
809
|
+
is_anycast == o.is_anycast &&
|
|
810
|
+
is_carrier == o.is_carrier &&
|
|
811
|
+
is_satellite == o.is_satellite &&
|
|
812
|
+
is_ssh == o.is_ssh &&
|
|
813
|
+
is_smtp == o.is_smtp &&
|
|
814
|
+
is_web == o.is_web &&
|
|
815
|
+
is_dns_resolver == o.is_dns_resolver &&
|
|
816
|
+
is_bittorrent == o.is_bittorrent &&
|
|
817
|
+
vpn == o.vpn &&
|
|
818
|
+
tor == o.tor &&
|
|
819
|
+
relay == o.relay &&
|
|
820
|
+
resproxy == o.resproxy &&
|
|
821
|
+
dcproxy == o.dcproxy &&
|
|
822
|
+
mobproxy == o.mobproxy &&
|
|
823
|
+
pubproxy == o.pubproxy &&
|
|
824
|
+
hosting == o.hosting &&
|
|
825
|
+
cdn == o.cdn &&
|
|
826
|
+
carrier == o.carrier &&
|
|
827
|
+
satellite == o.satellite &&
|
|
828
|
+
ssh == o.ssh &&
|
|
829
|
+
smtp == o.smtp &&
|
|
830
|
+
web == o.web &&
|
|
831
|
+
dns_resolver == o.dns_resolver &&
|
|
832
|
+
bittorrent == o.bittorrent &&
|
|
833
|
+
location == o.location &&
|
|
834
|
+
asn == o.asn &&
|
|
835
|
+
company == o.company &&
|
|
836
|
+
hostname == o.hostname &&
|
|
837
|
+
abuse == o.abuse &&
|
|
838
|
+
whois == o.whois &&
|
|
839
|
+
rwhois == o.rwhois &&
|
|
840
|
+
hosted_domains == o.hosted_domains &&
|
|
841
|
+
trial_expired == o.trial_expired
|
|
842
|
+
end
|
|
843
|
+
|
|
844
|
+
# @see the `==` method
|
|
845
|
+
# @param [Object] Object to be compared
|
|
846
|
+
def eql?(o)
|
|
847
|
+
self == o
|
|
848
|
+
end
|
|
849
|
+
|
|
850
|
+
# Calculates hash code according to all attributes.
|
|
851
|
+
# @return [Integer] Hash code
|
|
852
|
+
def hash
|
|
853
|
+
[ip, is_bogon, is_vpn, is_tor, is_relay, is_resproxy, is_dcproxy, is_mobproxy, is_pubproxy, is_hosting, is_cdn, is_anycast, is_carrier, is_satellite, is_ssh, is_smtp, is_web, is_dns_resolver, is_bittorrent, vpn, tor, relay, resproxy, dcproxy, mobproxy, pubproxy, hosting, cdn, carrier, satellite, ssh, smtp, web, dns_resolver, bittorrent, location, asn, company, hostname, abuse, whois, rwhois, hosted_domains, trial_expired].hash
|
|
854
|
+
end
|
|
855
|
+
|
|
856
|
+
# Builds the object from hash
|
|
857
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
858
|
+
# @return [Object] Returns the model itself
|
|
859
|
+
def self.build_from_hash(attributes)
|
|
860
|
+
return nil unless attributes.is_a?(Hash)
|
|
861
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
862
|
+
transformed_hash = {}
|
|
863
|
+
openapi_types.each_pair do |key, type|
|
|
864
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
865
|
+
transformed_hash["#{key}"] = nil
|
|
866
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
867
|
+
# check to ensure the input is an array given that the attribute
|
|
868
|
+
# is documented as an array but the input is not
|
|
869
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
870
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
871
|
+
end
|
|
872
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
873
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
874
|
+
end
|
|
875
|
+
end
|
|
876
|
+
new(transformed_hash)
|
|
877
|
+
end
|
|
878
|
+
|
|
879
|
+
# Returns the object in the form of hash
|
|
880
|
+
# @return [Hash] Returns the object in the form of hash
|
|
881
|
+
def to_hash
|
|
882
|
+
hash = {}
|
|
883
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
884
|
+
value = self.send(attr)
|
|
885
|
+
if value.nil?
|
|
886
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
887
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
hash[param] = _to_hash(value)
|
|
891
|
+
end
|
|
892
|
+
hash
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
end
|
|
896
|
+
|
|
897
|
+
end
|