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.
@@ -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?(:'recursion_available')
99
97
  self.recursion_available = attributes[:'recursion_available']
100
- else
101
- self.recursion_available = nil
102
98
  end
103
99
 
104
100
  if attributes.key?(:'rcode')
105
101
  self.rcode = attributes[:'rcode']
106
- else
107
- self.rcode = nil
108
102
  end
109
103
 
110
104
  if attributes.key?(:'answer_correct')
111
105
  self.answer_correct = attributes[:'answer_correct']
112
- else
113
- self.answer_correct = 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 @recursion_available.nil?
139
- invalid_properties.push('invalid value for "recursion_available", recursion_available cannot be nil.')
140
- end
141
-
142
- if @rcode.nil?
143
- invalid_properties.push('invalid value for "rcode", rcode cannot be nil.')
144
- end
145
-
146
- if @answer_correct.nil?
147
- invalid_properties.push('invalid value for "answer_correct", answer_correct 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 @recursion_available.nil?
167
- return false if @rcode.nil?
168
- return false if @answer_correct.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] recursion_available Value to be assigned
186
- def recursion_available=(recursion_available)
187
- if recursion_available.nil?
188
- fail ArgumentError, 'recursion_available cannot be nil'
189
- end
190
-
191
- @recursion_available = recursion_available
192
- end
193
-
194
- # Custom attribute writer method with validation
195
- # @param [Object] rcode Value to be assigned
196
- def rcode=(rcode)
197
- if rcode.nil?
198
- fail ArgumentError, 'rcode cannot be nil'
199
- end
200
-
201
- @rcode = rcode
202
- end
203
-
204
- # Custom attribute writer method with validation
205
- # @param [Object] answer_correct Value to be assigned
206
- def answer_correct=(answer_correct)
207
- if answer_correct.nil?
208
- fail ArgumentError, 'answer_correct cannot be nil'
209
- end
210
-
211
- @answer_correct = answer_correct
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)
@@ -96,44 +96,30 @@ module InternetData
96
96
 
97
97
  if attributes.key?(:'provider')
98
98
  self.provider = attributes[:'provider']
99
- else
100
- self.provider = nil
101
99
  end
102
100
 
103
101
  if attributes.key?(:'provider_name')
104
102
  self.provider_name = attributes[:'provider_name']
105
- else
106
- self.provider_name = nil
107
103
  end
108
104
 
109
105
  if attributes.key?(:'first_seen')
110
106
  self.first_seen = attributes[:'first_seen']
111
- else
112
- self.first_seen = nil
113
107
  end
114
108
 
115
109
  if attributes.key?(:'last_seen')
116
110
  self.last_seen = attributes[:'last_seen']
117
- else
118
- self.last_seen = nil
119
111
  end
120
112
 
121
113
  if attributes.key?(:'hits')
122
114
  self.hits = attributes[:'hits']
123
- else
124
- self.hits = nil
125
115
  end
126
116
 
127
117
  if attributes.key?(:'hits_days_pct')
128
118
  self.hits_days_pct = attributes[:'hits_days_pct']
129
- else
130
- self.hits_days_pct = nil
131
119
  end
132
120
 
133
121
  if attributes.key?(:'providers_num')
134
122
  self.providers_num = attributes[:'providers_num']
135
- else
136
- self.providers_num = nil
137
123
  end
138
124
  end
139
125
 
@@ -142,34 +128,6 @@ module InternetData
142
128
  def list_invalid_properties
143
129
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
144
130
  invalid_properties = Array.new
145
- if @provider.nil?
146
- invalid_properties.push('invalid value for "provider", provider cannot be nil.')
147
- end
148
-
149
- if @provider_name.nil?
150
- invalid_properties.push('invalid value for "provider_name", provider_name cannot be nil.')
151
- end
152
-
153
- if @first_seen.nil?
154
- invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.')
155
- end
156
-
157
- if @last_seen.nil?
158
- invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.')
159
- end
160
-
161
- if @hits.nil?
162
- invalid_properties.push('invalid value for "hits", hits cannot be nil.')
163
- end
164
-
165
- if @hits_days_pct.nil?
166
- invalid_properties.push('invalid value for "hits_days_pct", hits_days_pct cannot be nil.')
167
- end
168
-
169
- if @providers_num.nil?
170
- invalid_properties.push('invalid value for "providers_num", providers_num cannot be nil.')
171
- end
172
-
173
131
  invalid_properties
174
132
  end
175
133
 
@@ -177,86 +135,9 @@ module InternetData
177
135
  # @return true if the model is valid
178
136
  def valid?
179
137
  warn '[DEPRECATED] the `valid?` method is obsolete'
180
- return false if @provider.nil?
181
- return false if @provider_name.nil?
182
- return false if @first_seen.nil?
183
- return false if @last_seen.nil?
184
- return false if @hits.nil?
185
- return false if @hits_days_pct.nil?
186
- return false if @providers_num.nil?
187
138
  true
188
139
  end
189
140
 
190
- # Custom attribute writer method with validation
191
- # @param [Object] provider Value to be assigned
192
- def provider=(provider)
193
- if provider.nil?
194
- fail ArgumentError, 'provider cannot be nil'
195
- end
196
-
197
- @provider = provider
198
- end
199
-
200
- # Custom attribute writer method with validation
201
- # @param [Object] provider_name Value to be assigned
202
- def provider_name=(provider_name)
203
- if provider_name.nil?
204
- fail ArgumentError, 'provider_name cannot be nil'
205
- end
206
-
207
- @provider_name = provider_name
208
- end
209
-
210
- # Custom attribute writer method with validation
211
- # @param [Object] first_seen Value to be assigned
212
- def first_seen=(first_seen)
213
- if first_seen.nil?
214
- fail ArgumentError, 'first_seen cannot be nil'
215
- end
216
-
217
- @first_seen = first_seen
218
- end
219
-
220
- # Custom attribute writer method with validation
221
- # @param [Object] last_seen Value to be assigned
222
- def last_seen=(last_seen)
223
- if last_seen.nil?
224
- fail ArgumentError, 'last_seen cannot be nil'
225
- end
226
-
227
- @last_seen = last_seen
228
- end
229
-
230
- # Custom attribute writer method with validation
231
- # @param [Object] hits Value to be assigned
232
- def hits=(hits)
233
- if hits.nil?
234
- fail ArgumentError, 'hits cannot be nil'
235
- end
236
-
237
- @hits = hits
238
- end
239
-
240
- # Custom attribute writer method with validation
241
- # @param [Object] hits_days_pct Value to be assigned
242
- def hits_days_pct=(hits_days_pct)
243
- if hits_days_pct.nil?
244
- fail ArgumentError, 'hits_days_pct cannot be nil'
245
- end
246
-
247
- @hits_days_pct = hits_days_pct
248
- end
249
-
250
- # Custom attribute writer method with validation
251
- # @param [Object] providers_num Value to be assigned
252
- def providers_num=(providers_num)
253
- if providers_num.nil?
254
- fail ArgumentError, 'providers_num cannot be nil'
255
- end
256
-
257
- @providers_num = providers_num
258
- end
259
-
260
141
  # Checks equality by comparing each attribute.
261
142
  # @param [Object] Object to be compared
262
143
  def ==(o)
@@ -96,46 +96,32 @@ module InternetData
96
96
 
97
97
  if attributes.key?(:'entry')
98
98
  self.entry = attributes[:'entry']
99
- else
100
- self.entry = nil
101
99
  end
102
100
 
103
101
  if attributes.key?(:'exit')
104
102
  self.exit = attributes[:'exit']
105
- else
106
- self.exit = nil
107
103
  end
108
104
 
109
105
  if attributes.key?(:'protocols')
110
106
  if (value = attributes[:'protocols']).is_a?(Array)
111
107
  self.protocols = value
112
108
  end
113
- else
114
- self.protocols = nil
115
109
  end
116
110
 
117
111
  if attributes.key?(:'num_ports')
118
112
  self.num_ports = attributes[:'num_ports']
119
- else
120
- self.num_ports = nil
121
113
  end
122
114
 
123
115
  if attributes.key?(:'num_proxies')
124
116
  self.num_proxies = attributes[:'num_proxies']
125
- else
126
- self.num_proxies = nil
127
117
  end
128
118
 
129
119
  if attributes.key?(:'last_seen')
130
120
  self.last_seen = attributes[:'last_seen']
131
- else
132
- self.last_seen = nil
133
121
  end
134
122
 
135
123
  if attributes.key?(:'last_usable')
136
124
  self.last_usable = attributes[:'last_usable']
137
- else
138
- self.last_usable = nil
139
125
  end
140
126
  end
141
127
 
@@ -144,34 +130,6 @@ module InternetData
144
130
  def list_invalid_properties
145
131
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
132
  invalid_properties = Array.new
147
- if @entry.nil?
148
- invalid_properties.push('invalid value for "entry", entry cannot be nil.')
149
- end
150
-
151
- if @exit.nil?
152
- invalid_properties.push('invalid value for "exit", exit cannot be nil.')
153
- end
154
-
155
- if @protocols.nil?
156
- invalid_properties.push('invalid value for "protocols", protocols cannot be nil.')
157
- end
158
-
159
- if @num_ports.nil?
160
- invalid_properties.push('invalid value for "num_ports", num_ports cannot be nil.')
161
- end
162
-
163
- if @num_proxies.nil?
164
- invalid_properties.push('invalid value for "num_proxies", num_proxies cannot be nil.')
165
- end
166
-
167
- if @last_seen.nil?
168
- invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.')
169
- end
170
-
171
- if @last_usable.nil?
172
- invalid_properties.push('invalid value for "last_usable", last_usable cannot be nil.')
173
- end
174
-
175
133
  invalid_properties
176
134
  end
177
135
 
@@ -179,86 +137,9 @@ module InternetData
179
137
  # @return true if the model is valid
180
138
  def valid?
181
139
  warn '[DEPRECATED] the `valid?` method is obsolete'
182
- return false if @entry.nil?
183
- return false if @exit.nil?
184
- return false if @protocols.nil?
185
- return false if @num_ports.nil?
186
- return false if @num_proxies.nil?
187
- return false if @last_seen.nil?
188
- return false if @last_usable.nil?
189
140
  true
190
141
  end
191
142
 
192
- # Custom attribute writer method with validation
193
- # @param [Object] entry Value to be assigned
194
- def entry=(entry)
195
- if entry.nil?
196
- fail ArgumentError, 'entry cannot be nil'
197
- end
198
-
199
- @entry = entry
200
- end
201
-
202
- # Custom attribute writer method with validation
203
- # @param [Object] exit Value to be assigned
204
- def exit=(exit)
205
- if exit.nil?
206
- fail ArgumentError, 'exit cannot be nil'
207
- end
208
-
209
- @exit = exit
210
- end
211
-
212
- # Custom attribute writer method with validation
213
- # @param [Object] protocols Value to be assigned
214
- def protocols=(protocols)
215
- if protocols.nil?
216
- fail ArgumentError, 'protocols cannot be nil'
217
- end
218
-
219
- @protocols = protocols
220
- end
221
-
222
- # Custom attribute writer method with validation
223
- # @param [Object] num_ports Value to be assigned
224
- def num_ports=(num_ports)
225
- if num_ports.nil?
226
- fail ArgumentError, 'num_ports cannot be nil'
227
- end
228
-
229
- @num_ports = num_ports
230
- end
231
-
232
- # Custom attribute writer method with validation
233
- # @param [Object] num_proxies Value to be assigned
234
- def num_proxies=(num_proxies)
235
- if num_proxies.nil?
236
- fail ArgumentError, 'num_proxies cannot be nil'
237
- end
238
-
239
- @num_proxies = num_proxies
240
- end
241
-
242
- # Custom attribute writer method with validation
243
- # @param [Object] last_seen Value to be assigned
244
- def last_seen=(last_seen)
245
- if last_seen.nil?
246
- fail ArgumentError, 'last_seen cannot be nil'
247
- end
248
-
249
- @last_seen = last_seen
250
- end
251
-
252
- # Custom attribute writer method with validation
253
- # @param [Object] last_usable Value to be assigned
254
- def last_usable=(last_usable)
255
- if last_usable.nil?
256
- fail ArgumentError, 'last_usable cannot be nil'
257
- end
258
-
259
- @last_usable = last_usable
260
- end
261
-
262
143
  # Checks equality by comparing each attribute.
263
144
  # @param [Object] Object to be compared
264
145
  def ==(o)
@@ -96,44 +96,30 @@ module InternetData
96
96
 
97
97
  if attributes.key?(:'provider')
98
98
  self.provider = attributes[:'provider']
99
- else
100
- self.provider = nil
101
99
  end
102
100
 
103
101
  if attributes.key?(:'provider_name')
104
102
  self.provider_name = attributes[:'provider_name']
105
- else
106
- self.provider_name = nil
107
103
  end
108
104
 
109
105
  if attributes.key?(:'orbit')
110
106
  self.orbit = attributes[:'orbit']
111
- else
112
- self.orbit = nil
113
107
  end
114
108
 
115
109
  if attributes.key?(:'segment')
116
110
  self.segment = attributes[:'segment']
117
- else
118
- self.segment = nil
119
111
  end
120
112
 
121
113
  if attributes.key?(:'country')
122
114
  self.country = attributes[:'country']
123
- else
124
- self.country = nil
125
115
  end
126
116
 
127
117
  if attributes.key?(:'asn')
128
118
  self.asn = attributes[:'asn']
129
- else
130
- self.asn = nil
131
119
  end
132
120
 
133
121
  if attributes.key?(:'confidence')
134
122
  self.confidence = attributes[:'confidence']
135
- else
136
- self.confidence = nil
137
123
  end
138
124
  end
139
125
 
@@ -142,34 +128,6 @@ module InternetData
142
128
  def list_invalid_properties
143
129
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
144
130
  invalid_properties = Array.new
145
- if @provider.nil?
146
- invalid_properties.push('invalid value for "provider", provider cannot be nil.')
147
- end
148
-
149
- if @provider_name.nil?
150
- invalid_properties.push('invalid value for "provider_name", provider_name cannot be nil.')
151
- end
152
-
153
- if @orbit.nil?
154
- invalid_properties.push('invalid value for "orbit", orbit cannot be nil.')
155
- end
156
-
157
- if @segment.nil?
158
- invalid_properties.push('invalid value for "segment", segment cannot be nil.')
159
- end
160
-
161
- if @country.nil?
162
- invalid_properties.push('invalid value for "country", country cannot be nil.')
163
- end
164
-
165
- if @asn.nil?
166
- invalid_properties.push('invalid value for "asn", asn cannot be nil.')
167
- end
168
-
169
- if @confidence.nil?
170
- invalid_properties.push('invalid value for "confidence", confidence cannot be nil.')
171
- end
172
-
173
131
  invalid_properties
174
132
  end
175
133
 
@@ -177,86 +135,9 @@ module InternetData
177
135
  # @return true if the model is valid
178
136
  def valid?
179
137
  warn '[DEPRECATED] the `valid?` method is obsolete'
180
- return false if @provider.nil?
181
- return false if @provider_name.nil?
182
- return false if @orbit.nil?
183
- return false if @segment.nil?
184
- return false if @country.nil?
185
- return false if @asn.nil?
186
- return false if @confidence.nil?
187
138
  true
188
139
  end
189
140
 
190
- # Custom attribute writer method with validation
191
- # @param [Object] provider Value to be assigned
192
- def provider=(provider)
193
- if provider.nil?
194
- fail ArgumentError, 'provider cannot be nil'
195
- end
196
-
197
- @provider = provider
198
- end
199
-
200
- # Custom attribute writer method with validation
201
- # @param [Object] provider_name Value to be assigned
202
- def provider_name=(provider_name)
203
- if provider_name.nil?
204
- fail ArgumentError, 'provider_name cannot be nil'
205
- end
206
-
207
- @provider_name = provider_name
208
- end
209
-
210
- # Custom attribute writer method with validation
211
- # @param [Object] orbit Value to be assigned
212
- def orbit=(orbit)
213
- if orbit.nil?
214
- fail ArgumentError, 'orbit cannot be nil'
215
- end
216
-
217
- @orbit = orbit
218
- end
219
-
220
- # Custom attribute writer method with validation
221
- # @param [Object] segment Value to be assigned
222
- def segment=(segment)
223
- if segment.nil?
224
- fail ArgumentError, 'segment cannot be nil'
225
- end
226
-
227
- @segment = segment
228
- end
229
-
230
- # Custom attribute writer method with validation
231
- # @param [Object] country Value to be assigned
232
- def country=(country)
233
- if country.nil?
234
- fail ArgumentError, 'country cannot be nil'
235
- end
236
-
237
- @country = country
238
- end
239
-
240
- # Custom attribute writer method with validation
241
- # @param [Object] asn Value to be assigned
242
- def asn=(asn)
243
- if asn.nil?
244
- fail ArgumentError, 'asn cannot be nil'
245
- end
246
-
247
- @asn = asn
248
- end
249
-
250
- # Custom attribute writer method with validation
251
- # @param [Object] confidence Value to be assigned
252
- def confidence=(confidence)
253
- if confidence.nil?
254
- fail ArgumentError, 'confidence cannot be nil'
255
- end
256
-
257
- @confidence = confidence
258
- end
259
-
260
141
  # Checks equality by comparing each attribute.
261
142
  # @param [Object] Object to be compared
262
143
  def ==(o)