vpndetection 1.0.0 → 1.1.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/lib/vpndetection/models/dataset_metadata.rb +26 -4
- data/lib/vpndetection/models/download.rb +81 -1
- data/lib/vpndetection/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ae49d52c110940f0953fd2091be89062c5a48377899035144f4c6a11cab9148
|
|
4
|
+
data.tar.gz: 7ce7f5b6dd548195246ff9faf274f4f40230f5cbccfb78654569efcf9820cae2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa3bc5edec10052c27a3f86deff3dd6959268d274c6204d9c6a4c4054f453fef0f718c9e05f096f8e3cc782822ddb4409a1d813244a403ae788194d83c5edf66
|
|
7
|
+
data.tar.gz: 44c2f25963ba7425f288307089a4d6763ecc8516e3e68c0bca3ae0150f0d1a04adad2fe8c37c886016909938241e7ec1156171978b72ea45ad60d0a27e51b8d0
|
|
@@ -34,6 +34,12 @@ module VPNDetection
|
|
|
34
34
|
# Bytes per format
|
|
35
35
|
attr_accessor :size
|
|
36
36
|
|
|
37
|
+
# Bytes per format of the evaluation sample, where one is published
|
|
38
|
+
attr_accessor :sample_size
|
|
39
|
+
|
|
40
|
+
# Row count in the evaluation sample
|
|
41
|
+
attr_accessor :sample_entries
|
|
42
|
+
|
|
37
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
44
|
def self.attribute_map
|
|
39
45
|
{
|
|
@@ -43,7 +49,9 @@ module VPNDetection
|
|
|
43
49
|
:'entries' => :'entries',
|
|
44
50
|
:'schema' => :'schema',
|
|
45
51
|
:'sample' => :'sample',
|
|
46
|
-
:'size' => :'size'
|
|
52
|
+
:'size' => :'size',
|
|
53
|
+
:'sample_size' => :'sample_size',
|
|
54
|
+
:'sample_entries' => :'sample_entries'
|
|
47
55
|
}
|
|
48
56
|
end
|
|
49
57
|
|
|
@@ -66,7 +74,9 @@ module VPNDetection
|
|
|
66
74
|
:'entries' => :'Integer',
|
|
67
75
|
:'schema' => :'Hash<String, Array<DatasetMetadataColumn>>',
|
|
68
76
|
:'sample' => :'Hash<String, Array<Object>>',
|
|
69
|
-
:'size' => :'Hash<String, Integer>'
|
|
77
|
+
:'size' => :'Hash<String, Integer>',
|
|
78
|
+
:'sample_size' => :'Hash<String, Integer>',
|
|
79
|
+
:'sample_entries' => :'Integer'
|
|
70
80
|
}
|
|
71
81
|
end
|
|
72
82
|
|
|
@@ -133,6 +143,16 @@ module VPNDetection
|
|
|
133
143
|
self.size = value
|
|
134
144
|
end
|
|
135
145
|
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'sample_size')
|
|
148
|
+
if (value = attributes[:'sample_size']).is_a?(Hash)
|
|
149
|
+
self.sample_size = value
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'sample_entries')
|
|
154
|
+
self.sample_entries = attributes[:'sample_entries']
|
|
155
|
+
end
|
|
136
156
|
end
|
|
137
157
|
|
|
138
158
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -221,7 +241,9 @@ module VPNDetection
|
|
|
221
241
|
entries == o.entries &&
|
|
222
242
|
schema == o.schema &&
|
|
223
243
|
sample == o.sample &&
|
|
224
|
-
size == o.size
|
|
244
|
+
size == o.size &&
|
|
245
|
+
sample_size == o.sample_size &&
|
|
246
|
+
sample_entries == o.sample_entries
|
|
225
247
|
end
|
|
226
248
|
|
|
227
249
|
# @see the `==` method
|
|
@@ -233,7 +255,7 @@ module VPNDetection
|
|
|
233
255
|
# Calculates hash code according to all attributes.
|
|
234
256
|
# @return [Integer] Hash code
|
|
235
257
|
def hash
|
|
236
|
-
[id, update_freq, updated, entries, schema, sample, size].hash
|
|
258
|
+
[id, update_freq, updated, entries, schema, sample, size, sample_size, sample_entries].hash
|
|
237
259
|
end
|
|
238
260
|
|
|
239
261
|
# Builds the object from hash
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VPNDetection
|
|
17
|
+
# One download ATTEMPT, refusals included - a denial is what answers \"it stopped working\", so they are listed rather than dropped.
|
|
17
18
|
class Download < ApiModelBase
|
|
18
19
|
attr_accessor :dataset_id
|
|
19
20
|
|
|
@@ -21,8 +22,21 @@ module VPNDetection
|
|
|
21
22
|
|
|
22
23
|
attr_accessor :outcome
|
|
23
24
|
|
|
25
|
+
# The evaluation sample rather than the database itself.
|
|
26
|
+
attr_accessor :sample
|
|
27
|
+
|
|
28
|
+
# Object size at redirect time, NOT bytes delivered: the transfer is a presigned redirect straight to object storage, so we never observe it.
|
|
24
29
|
attr_accessor :bytes
|
|
25
30
|
|
|
31
|
+
attr_accessor :http_status
|
|
32
|
+
|
|
33
|
+
# The key that made the request. Null when the org acted through the console rather than through a key.
|
|
34
|
+
attr_accessor :apikey_id
|
|
35
|
+
|
|
36
|
+
attr_accessor :client_ip
|
|
37
|
+
|
|
38
|
+
attr_accessor :user_agent
|
|
39
|
+
|
|
26
40
|
attr_accessor :created
|
|
27
41
|
|
|
28
42
|
class EnumAttributeValidator
|
|
@@ -53,7 +67,12 @@ module VPNDetection
|
|
|
53
67
|
:'dataset_id' => :'dataset_id',
|
|
54
68
|
:'format' => :'format',
|
|
55
69
|
:'outcome' => :'outcome',
|
|
70
|
+
:'sample' => :'sample',
|
|
56
71
|
:'bytes' => :'bytes',
|
|
72
|
+
:'http_status' => :'http_status',
|
|
73
|
+
:'apikey_id' => :'apikey_id',
|
|
74
|
+
:'client_ip' => :'client_ip',
|
|
75
|
+
:'user_agent' => :'user_agent',
|
|
57
76
|
:'created' => :'created'
|
|
58
77
|
}
|
|
59
78
|
end
|
|
@@ -74,7 +93,12 @@ module VPNDetection
|
|
|
74
93
|
:'dataset_id' => :'String',
|
|
75
94
|
:'format' => :'String',
|
|
76
95
|
:'outcome' => :'String',
|
|
96
|
+
:'sample' => :'Boolean',
|
|
77
97
|
:'bytes' => :'Integer',
|
|
98
|
+
:'http_status' => :'Integer',
|
|
99
|
+
:'apikey_id' => :'String',
|
|
100
|
+
:'client_ip' => :'String',
|
|
101
|
+
:'user_agent' => :'String',
|
|
78
102
|
:'created' => :'Time'
|
|
79
103
|
}
|
|
80
104
|
end
|
|
@@ -83,6 +107,10 @@ module VPNDetection
|
|
|
83
107
|
def self.openapi_nullable
|
|
84
108
|
Set.new([
|
|
85
109
|
:'bytes',
|
|
110
|
+
:'http_status',
|
|
111
|
+
:'apikey_id',
|
|
112
|
+
:'client_ip',
|
|
113
|
+
:'user_agent',
|
|
86
114
|
])
|
|
87
115
|
end
|
|
88
116
|
|
|
@@ -120,8 +148,40 @@ module VPNDetection
|
|
|
120
148
|
self.outcome = nil
|
|
121
149
|
end
|
|
122
150
|
|
|
151
|
+
if attributes.key?(:'sample')
|
|
152
|
+
self.sample = attributes[:'sample']
|
|
153
|
+
else
|
|
154
|
+
self.sample = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
123
157
|
if attributes.key?(:'bytes')
|
|
124
158
|
self.bytes = attributes[:'bytes']
|
|
159
|
+
else
|
|
160
|
+
self.bytes = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'http_status')
|
|
164
|
+
self.http_status = attributes[:'http_status']
|
|
165
|
+
else
|
|
166
|
+
self.http_status = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'apikey_id')
|
|
170
|
+
self.apikey_id = attributes[:'apikey_id']
|
|
171
|
+
else
|
|
172
|
+
self.apikey_id = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'client_ip')
|
|
176
|
+
self.client_ip = attributes[:'client_ip']
|
|
177
|
+
else
|
|
178
|
+
self.client_ip = nil
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'user_agent')
|
|
182
|
+
self.user_agent = attributes[:'user_agent']
|
|
183
|
+
else
|
|
184
|
+
self.user_agent = nil
|
|
125
185
|
end
|
|
126
186
|
|
|
127
187
|
if attributes.key?(:'created')
|
|
@@ -148,6 +208,10 @@ module VPNDetection
|
|
|
148
208
|
invalid_properties.push('invalid value for "outcome", outcome cannot be nil.')
|
|
149
209
|
end
|
|
150
210
|
|
|
211
|
+
if @sample.nil?
|
|
212
|
+
invalid_properties.push('invalid value for "sample", sample cannot be nil.')
|
|
213
|
+
end
|
|
214
|
+
|
|
151
215
|
if @created.nil?
|
|
152
216
|
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
|
153
217
|
end
|
|
@@ -164,6 +228,7 @@ module VPNDetection
|
|
|
164
228
|
return false if @outcome.nil?
|
|
165
229
|
outcome_validator = EnumAttributeValidator.new('String', ["ok", "unauthorized", "denied", "expired", "unknown", "unavailable"])
|
|
166
230
|
return false unless outcome_validator.valid?(@outcome)
|
|
231
|
+
return false if @sample.nil?
|
|
167
232
|
return false if @created.nil?
|
|
168
233
|
true
|
|
169
234
|
end
|
|
@@ -198,6 +263,16 @@ module VPNDetection
|
|
|
198
263
|
@outcome = outcome
|
|
199
264
|
end
|
|
200
265
|
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] sample Value to be assigned
|
|
268
|
+
def sample=(sample)
|
|
269
|
+
if sample.nil?
|
|
270
|
+
fail ArgumentError, 'sample cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@sample = sample
|
|
274
|
+
end
|
|
275
|
+
|
|
201
276
|
# Custom attribute writer method with validation
|
|
202
277
|
# @param [Object] created Value to be assigned
|
|
203
278
|
def created=(created)
|
|
@@ -216,7 +291,12 @@ module VPNDetection
|
|
|
216
291
|
dataset_id == o.dataset_id &&
|
|
217
292
|
format == o.format &&
|
|
218
293
|
outcome == o.outcome &&
|
|
294
|
+
sample == o.sample &&
|
|
219
295
|
bytes == o.bytes &&
|
|
296
|
+
http_status == o.http_status &&
|
|
297
|
+
apikey_id == o.apikey_id &&
|
|
298
|
+
client_ip == o.client_ip &&
|
|
299
|
+
user_agent == o.user_agent &&
|
|
220
300
|
created == o.created
|
|
221
301
|
end
|
|
222
302
|
|
|
@@ -229,7 +309,7 @@ module VPNDetection
|
|
|
229
309
|
# Calculates hash code according to all attributes.
|
|
230
310
|
# @return [Integer] Hash code
|
|
231
311
|
def hash
|
|
232
|
-
[dataset_id, format, outcome, bytes, created].hash
|
|
312
|
+
[dataset_id, format, outcome, sample, bytes, http_status, apikey_id, client_ip, user_agent, created].hash
|
|
233
313
|
end
|
|
234
314
|
|
|
235
315
|
# Builds the object from hash
|
data/lib/vpndetection/version.rb
CHANGED