internetdata 1.0.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.
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #InternetData API
3
+
4
+ #The InternetData API. Please see https://docs.internetdata.io/api for more details.
5
+
6
+ The version of the OpenAPI document: 2026.09.04
7
+ Contact: dev@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 DatabaseList < ApiModelBase
18
+ attr_accessor :databases
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'databases' => :'databases'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'databases' => :'Array<Database>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::DatabaseList` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::DatabaseList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'databases')
67
+ if (value = attributes[:'databases']).is_a?(Array)
68
+ self.databases = value
69
+ end
70
+ else
71
+ self.databases = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @databases.nil?
81
+ invalid_properties.push('invalid value for "databases", databases cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @databases.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] databases Value to be assigned
97
+ def databases=(databases)
98
+ if databases.nil?
99
+ fail ArgumentError, 'databases cannot be nil'
100
+ end
101
+
102
+ @databases = databases
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ databases == o.databases
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [databases].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,299 @@
1
+ =begin
2
+ #InternetData API
3
+
4
+ #The InternetData API. Please see https://docs.internetdata.io/api for more details.
5
+
6
+ The version of the OpenAPI document: 2026.09.04
7
+ Contact: dev@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
+ # The build document written by the exporter, served through unchanged.
18
+ class DatabaseMetadata < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ # How often a new build is published.
22
+ attr_accessor :update_freq
23
+
24
+ # ISO-8601 date (YYYY-MM-DD) the published build was generated on.
25
+ attr_accessor :updated
26
+
27
+ # Row count in the current build.
28
+ attr_accessor :entries
29
+
30
+ # Columns, keyed by format.
31
+ attr_accessor :schema
32
+
33
+ # A few real rows, keyed by format.
34
+ attr_accessor :sample
35
+
36
+ # Bytes per format.
37
+ attr_accessor :size
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'id' => :'id',
43
+ :'update_freq' => :'update_freq',
44
+ :'updated' => :'updated',
45
+ :'entries' => :'entries',
46
+ :'schema' => :'schema',
47
+ :'sample' => :'sample',
48
+ :'size' => :'size'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'id' => :'String',
66
+ :'update_freq' => :'String',
67
+ :'updated' => :'Date',
68
+ :'entries' => :'Integer',
69
+ :'schema' => :'Hash<String, Array<DatabaseMetadataColumn>>',
70
+ :'sample' => :'Hash<String, Array<Object>>',
71
+ :'size' => :'Hash<String, Integer>'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::DatabaseMetadata` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::DatabaseMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'id')
98
+ self.id = attributes[:'id']
99
+ else
100
+ self.id = nil
101
+ end
102
+
103
+ if attributes.key?(:'update_freq')
104
+ self.update_freq = attributes[:'update_freq']
105
+ end
106
+
107
+ if attributes.key?(:'updated')
108
+ self.updated = attributes[:'updated']
109
+ else
110
+ self.updated = nil
111
+ end
112
+
113
+ if attributes.key?(:'entries')
114
+ self.entries = attributes[:'entries']
115
+ else
116
+ self.entries = nil
117
+ end
118
+
119
+ if attributes.key?(:'schema')
120
+ if (value = attributes[:'schema']).is_a?(Hash)
121
+ self.schema = value
122
+ end
123
+ else
124
+ self.schema = nil
125
+ end
126
+
127
+ if attributes.key?(:'sample')
128
+ if (value = attributes[:'sample']).is_a?(Hash)
129
+ self.sample = value
130
+ end
131
+ end
132
+
133
+ if attributes.key?(:'size')
134
+ if (value = attributes[:'size']).is_a?(Hash)
135
+ self.size = value
136
+ end
137
+ else
138
+ self.size = nil
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
+ invalid_properties = Array.new
147
+ if @id.nil?
148
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
149
+ end
150
+
151
+ if @updated.nil?
152
+ invalid_properties.push('invalid value for "updated", updated cannot be nil.')
153
+ end
154
+
155
+ if @entries.nil?
156
+ invalid_properties.push('invalid value for "entries", entries cannot be nil.')
157
+ end
158
+
159
+ if @schema.nil?
160
+ invalid_properties.push('invalid value for "schema", schema cannot be nil.')
161
+ end
162
+
163
+ if @size.nil?
164
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
165
+ end
166
+
167
+ invalid_properties
168
+ end
169
+
170
+ # Check to see if the all the properties in the model are valid
171
+ # @return true if the model is valid
172
+ def valid?
173
+ warn '[DEPRECATED] the `valid?` method is obsolete'
174
+ return false if @id.nil?
175
+ return false if @updated.nil?
176
+ return false if @entries.nil?
177
+ return false if @schema.nil?
178
+ return false if @size.nil?
179
+ true
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] id Value to be assigned
184
+ def id=(id)
185
+ if id.nil?
186
+ fail ArgumentError, 'id cannot be nil'
187
+ end
188
+
189
+ @id = id
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] updated Value to be assigned
194
+ def updated=(updated)
195
+ if updated.nil?
196
+ fail ArgumentError, 'updated cannot be nil'
197
+ end
198
+
199
+ @updated = updated
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] entries Value to be assigned
204
+ def entries=(entries)
205
+ if entries.nil?
206
+ fail ArgumentError, 'entries cannot be nil'
207
+ end
208
+
209
+ @entries = entries
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] schema Value to be assigned
214
+ def schema=(schema)
215
+ if schema.nil?
216
+ fail ArgumentError, 'schema cannot be nil'
217
+ end
218
+
219
+ @schema = schema
220
+ end
221
+
222
+ # Custom attribute writer method with validation
223
+ # @param [Object] size Value to be assigned
224
+ def size=(size)
225
+ if size.nil?
226
+ fail ArgumentError, 'size cannot be nil'
227
+ end
228
+
229
+ @size = size
230
+ end
231
+
232
+ # Checks equality by comparing each attribute.
233
+ # @param [Object] Object to be compared
234
+ def ==(o)
235
+ return true if self.equal?(o)
236
+ self.class == o.class &&
237
+ id == o.id &&
238
+ update_freq == o.update_freq &&
239
+ updated == o.updated &&
240
+ entries == o.entries &&
241
+ schema == o.schema &&
242
+ sample == o.sample &&
243
+ size == o.size
244
+ end
245
+
246
+ # @see the `==` method
247
+ # @param [Object] Object to be compared
248
+ def eql?(o)
249
+ self == o
250
+ end
251
+
252
+ # Calculates hash code according to all attributes.
253
+ # @return [Integer] Hash code
254
+ def hash
255
+ [id, update_freq, updated, entries, schema, sample, size].hash
256
+ end
257
+
258
+ # Builds the object from hash
259
+ # @param [Hash] attributes Model attributes in the form of hash
260
+ # @return [Object] Returns the model itself
261
+ def self.build_from_hash(attributes)
262
+ return nil unless attributes.is_a?(Hash)
263
+ attributes = attributes.transform_keys(&:to_sym)
264
+ transformed_hash = {}
265
+ openapi_types.each_pair do |key, type|
266
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
267
+ transformed_hash["#{key}"] = nil
268
+ elsif type =~ /\AArray<(.*)>/i
269
+ # check to ensure the input is an array given that the attribute
270
+ # is documented as an array but the input is not
271
+ if attributes[attribute_map[key]].is_a?(Array)
272
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
273
+ end
274
+ elsif !attributes[attribute_map[key]].nil?
275
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
276
+ end
277
+ end
278
+ new(transformed_hash)
279
+ end
280
+
281
+ # Returns the object in the form of hash
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_hash
284
+ hash = {}
285
+ self.class.attribute_map.each_pair do |attr, param|
286
+ value = self.send(attr)
287
+ if value.nil?
288
+ is_nullable = self.class.openapi_nullable.include?(attr)
289
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
290
+ end
291
+
292
+ hash[param] = _to_hash(value)
293
+ end
294
+ hash
295
+ end
296
+
297
+ end
298
+
299
+ end
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #InternetData API
3
+
4
+ #The InternetData API. Please see https://docs.internetdata.io/api for more details.
5
+
6
+ The version of the OpenAPI document: 2026.09.04
7
+ Contact: dev@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 DatabaseMetadataColumn < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :description
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'type' => :'type',
29
+ :'description' => :'description'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'name' => :'String',
47
+ :'type' => :'String',
48
+ :'description' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `InternetData::DatabaseMetadataColumn` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `InternetData::DatabaseMetadataColumn`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'name')
75
+ self.name = attributes[:'name']
76
+ else
77
+ self.name = nil
78
+ end
79
+
80
+ if attributes.key?(:'type')
81
+ self.type = attributes[:'type']
82
+ else
83
+ self.type = nil
84
+ end
85
+
86
+ if attributes.key?(:'description')
87
+ self.description = attributes[:'description']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @name.nil?
97
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
98
+ end
99
+
100
+ if @type.nil?
101
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @name.nil?
112
+ return false if @type.nil?
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] name Value to be assigned
118
+ def name=(name)
119
+ if name.nil?
120
+ fail ArgumentError, 'name cannot be nil'
121
+ end
122
+
123
+ @name = name
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] type Value to be assigned
128
+ def type=(type)
129
+ if type.nil?
130
+ fail ArgumentError, 'type cannot be nil'
131
+ end
132
+
133
+ @type = type
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ name == o.name &&
142
+ type == o.type &&
143
+ description == o.description
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [name, type, description].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end