relentless_identity 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.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +143 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +219 -0
  6. data/docs/AliasInfo.md +20 -0
  7. data/docs/BatchSummary.md +26 -0
  8. data/docs/ClientBackgroundJobDetailResponse.md +30 -0
  9. data/docs/ClientBackgroundJobItemResponse.md +48 -0
  10. data/docs/ClientBackgroundJobPageResponse.md +26 -0
  11. data/docs/ClientBackgroundJobResponse.md +76 -0
  12. data/docs/ClientBatchIdentityResponse.md +20 -0
  13. data/docs/ClientFinderResponse.md +34 -0
  14. data/docs/ClientFinderResponseAlias.md +20 -0
  15. data/docs/ClientIdentityResponse.md +34 -0
  16. data/docs/ClientRequestHistoryItem.md +52 -0
  17. data/docs/ClientRequestHistoryPageResponse.md +26 -0
  18. data/docs/ClientTokenStatusResponse.md +28 -0
  19. data/docs/ClientUsageResponse.md +54 -0
  20. data/docs/ErrorResponse.md +24 -0
  21. data/docs/FinderApi.md +77 -0
  22. data/docs/FinderBatchJobRequest.md +22 -0
  23. data/docs/FinderBatchJobRequestInputsInner.md +20 -0
  24. data/docs/FinderRequest.md +20 -0
  25. data/docs/HTTPValidationError.md +18 -0
  26. data/docs/IdentityProvider.md +20 -0
  27. data/docs/JobsApi.md +529 -0
  28. data/docs/LocationInner.md +15 -0
  29. data/docs/ProbeApi.md +147 -0
  30. data/docs/ProbeBatchJobBackgroundRequest.md +22 -0
  31. data/docs/ProbeBatchRequest.md +18 -0
  32. data/docs/ProbeRequest.md +18 -0
  33. data/docs/ValidationError.md +26 -0
  34. data/git_push.sh +57 -0
  35. data/lib/relentless_identity/api/account_api.rb +225 -0
  36. data/lib/relentless_identity/api/finder_api.rb +90 -0
  37. data/lib/relentless_identity/api/jobs_api.rb +535 -0
  38. data/lib/relentless_identity/api/probe_api.rb +158 -0
  39. data/lib/relentless_identity/api_client.rb +397 -0
  40. data/lib/relentless_identity/api_error.rb +58 -0
  41. data/lib/relentless_identity/api_model_base.rb +88 -0
  42. data/lib/relentless_identity/configuration.rb +309 -0
  43. data/lib/relentless_identity/models/alias_info.rb +159 -0
  44. data/lib/relentless_identity/models/batch_summary.rb +318 -0
  45. data/lib/relentless_identity/models/client_background_job_detail_response.rb +307 -0
  46. data/lib/relentless_identity/models/client_background_job_item_response.rb +455 -0
  47. data/lib/relentless_identity/models/client_background_job_page_response.rb +271 -0
  48. data/lib/relentless_identity/models/client_background_job_response.rb +745 -0
  49. data/lib/relentless_identity/models/client_batch_identity_response.rb +194 -0
  50. data/lib/relentless_identity/models/client_finder_response.rb +285 -0
  51. data/lib/relentless_identity/models/client_finder_response_alias.rb +104 -0
  52. data/lib/relentless_identity/models/client_identity_response.rb +285 -0
  53. data/lib/relentless_identity/models/client_request_history_item.rb +450 -0
  54. data/lib/relentless_identity/models/client_request_history_page_response.rb +271 -0
  55. data/lib/relentless_identity/models/client_token_status_response.rb +259 -0
  56. data/lib/relentless_identity/models/client_usage_response.rb +506 -0
  57. data/lib/relentless_identity/models/error_response.rb +178 -0
  58. data/lib/relentless_identity/models/finder_batch_job_request.rb +206 -0
  59. data/lib/relentless_identity/models/finder_batch_job_request_inputs_inner.rb +192 -0
  60. data/lib/relentless_identity/models/finder_request.rb +193 -0
  61. data/lib/relentless_identity/models/http_validation_error.rb +149 -0
  62. data/lib/relentless_identity/models/identity_provider.rb +157 -0
  63. data/lib/relentless_identity/models/location_inner.rb +103 -0
  64. data/lib/relentless_identity/models/probe_batch_job_background_request.rb +206 -0
  65. data/lib/relentless_identity/models/probe_batch_request.rb +186 -0
  66. data/lib/relentless_identity/models/probe_request.rb +166 -0
  67. data/lib/relentless_identity/models/validation_error.rb +237 -0
  68. data/lib/relentless_identity/version.rb +15 -0
  69. data/lib/relentless_identity.rb +69 -0
  70. data/relentless_identity.gemspec +39 -0
  71. data/spec/api/account_api_spec.rb +72 -0
  72. data/spec/api/finder_api_spec.rb +47 -0
  73. data/spec/api/jobs_api_spec.rb +130 -0
  74. data/spec/api/probe_api_spec.rb +59 -0
  75. data/spec/models/alias_info_spec.rb +42 -0
  76. data/spec/models/batch_summary_spec.rb +60 -0
  77. data/spec/models/client_background_job_detail_response_spec.rb +72 -0
  78. data/spec/models/client_background_job_item_response_spec.rb +138 -0
  79. data/spec/models/client_background_job_page_response_spec.rb +60 -0
  80. data/spec/models/client_background_job_response_spec.rb +222 -0
  81. data/spec/models/client_batch_identity_response_spec.rb +42 -0
  82. data/spec/models/client_finder_response_alias_spec.rb +21 -0
  83. data/spec/models/client_finder_response_spec.rb +92 -0
  84. data/spec/models/client_identity_response_spec.rb +92 -0
  85. data/spec/models/client_request_history_item_spec.rb +150 -0
  86. data/spec/models/client_request_history_page_response_spec.rb +60 -0
  87. data/spec/models/client_token_status_response_spec.rb +70 -0
  88. data/spec/models/client_usage_response_spec.rb +144 -0
  89. data/spec/models/error_response_spec.rb +54 -0
  90. data/spec/models/finder_batch_job_request_inputs_inner_spec.rb +42 -0
  91. data/spec/models/finder_batch_job_request_spec.rb +48 -0
  92. data/spec/models/finder_request_spec.rb +42 -0
  93. data/spec/models/http_validation_error_spec.rb +36 -0
  94. data/spec/models/identity_provider_spec.rb +42 -0
  95. data/spec/models/location_inner_spec.rb +21 -0
  96. data/spec/models/probe_batch_job_background_request_spec.rb +48 -0
  97. data/spec/models/probe_batch_request_spec.rb +36 -0
  98. data/spec/models/probe_request_spec.rb +36 -0
  99. data/spec/models/validation_error_spec.rb +60 -0
  100. data/spec/spec_helper.rb +111 -0
  101. metadata +213 -0
@@ -0,0 +1,455 @@
1
+ =begin
2
+ #Relentless Identity API
3
+
4
+ #Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RelentlessIdentity
17
+ # One item inside a background job payload.
18
+ class ClientBackgroundJobItemResponse < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ attr_accessor :item_index
22
+
23
+ attr_accessor :status
24
+
25
+ attr_accessor :request_type
26
+
27
+ # Original submitted input for this item.
28
+ attr_accessor :input
29
+
30
+ attr_accessor :result
31
+
32
+ attr_accessor :result_state
33
+
34
+ attr_accessor :result_outcome
35
+
36
+ attr_accessor :resolved_address
37
+
38
+ attr_accessor :provider
39
+
40
+ attr_accessor :charge_micros
41
+
42
+ attr_accessor :error_message
43
+
44
+ attr_accessor :started_at
45
+
46
+ attr_accessor :completed_at
47
+
48
+ attr_accessor :created_at
49
+
50
+ attr_accessor :updated_at
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'id' => :'id',
78
+ :'item_index' => :'item_index',
79
+ :'status' => :'status',
80
+ :'request_type' => :'request_type',
81
+ :'input' => :'input',
82
+ :'result' => :'result',
83
+ :'result_state' => :'result_state',
84
+ :'result_outcome' => :'result_outcome',
85
+ :'resolved_address' => :'resolved_address',
86
+ :'provider' => :'provider',
87
+ :'charge_micros' => :'charge_micros',
88
+ :'error_message' => :'error_message',
89
+ :'started_at' => :'started_at',
90
+ :'completed_at' => :'completed_at',
91
+ :'created_at' => :'created_at',
92
+ :'updated_at' => :'updated_at'
93
+ }
94
+ end
95
+
96
+ # Returns attribute mapping this model knows about
97
+ def self.acceptable_attribute_map
98
+ attribute_map
99
+ end
100
+
101
+ # Returns all the JSON keys this model knows about
102
+ def self.acceptable_attributes
103
+ acceptable_attribute_map.values
104
+ end
105
+
106
+ # Attribute type mapping.
107
+ def self.openapi_types
108
+ {
109
+ :'id' => :'String',
110
+ :'item_index' => :'Integer',
111
+ :'status' => :'String',
112
+ :'request_type' => :'String',
113
+ :'input' => :'Hash<String, Object>',
114
+ :'result' => :'Hash<String, Object>',
115
+ :'result_state' => :'String',
116
+ :'result_outcome' => :'String',
117
+ :'resolved_address' => :'String',
118
+ :'provider' => :'String',
119
+ :'charge_micros' => :'Integer',
120
+ :'error_message' => :'String',
121
+ :'started_at' => :'Time',
122
+ :'completed_at' => :'Time',
123
+ :'created_at' => :'Time',
124
+ :'updated_at' => :'Time'
125
+ }
126
+ end
127
+
128
+ # List of attributes with nullable: true
129
+ def self.openapi_nullable
130
+ Set.new([
131
+ :'result',
132
+ :'result_state',
133
+ :'result_outcome',
134
+ :'resolved_address',
135
+ :'provider',
136
+ :'error_message',
137
+ :'started_at',
138
+ :'completed_at',
139
+ ])
140
+ end
141
+
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ if (!attributes.is_a?(Hash))
146
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RelentlessIdentity::ClientBackgroundJobItemResponse` initialize method"
147
+ end
148
+
149
+ # check to see if the attribute exists and convert string to symbol for hash key
150
+ acceptable_attribute_map = self.class.acceptable_attribute_map
151
+ attributes = attributes.each_with_object({}) { |(k, v), h|
152
+ if (!acceptable_attribute_map.key?(k.to_sym))
153
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RelentlessIdentity::ClientBackgroundJobItemResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
154
+ end
155
+ h[k.to_sym] = v
156
+ }
157
+
158
+ if attributes.key?(:'id')
159
+ self.id = attributes[:'id']
160
+ else
161
+ self.id = nil
162
+ end
163
+
164
+ if attributes.key?(:'item_index')
165
+ self.item_index = attributes[:'item_index']
166
+ else
167
+ self.item_index = nil
168
+ end
169
+
170
+ if attributes.key?(:'status')
171
+ self.status = attributes[:'status']
172
+ else
173
+ self.status = nil
174
+ end
175
+
176
+ if attributes.key?(:'request_type')
177
+ self.request_type = attributes[:'request_type']
178
+ else
179
+ self.request_type = nil
180
+ end
181
+
182
+ if attributes.key?(:'input')
183
+ if (value = attributes[:'input']).is_a?(Hash)
184
+ self.input = value
185
+ end
186
+ else
187
+ self.input = nil
188
+ end
189
+
190
+ if attributes.key?(:'result')
191
+ if (value = attributes[:'result']).is_a?(Hash)
192
+ self.result = value
193
+ end
194
+ end
195
+
196
+ if attributes.key?(:'result_state')
197
+ self.result_state = attributes[:'result_state']
198
+ end
199
+
200
+ if attributes.key?(:'result_outcome')
201
+ self.result_outcome = attributes[:'result_outcome']
202
+ end
203
+
204
+ if attributes.key?(:'resolved_address')
205
+ self.resolved_address = attributes[:'resolved_address']
206
+ end
207
+
208
+ if attributes.key?(:'provider')
209
+ self.provider = attributes[:'provider']
210
+ end
211
+
212
+ if attributes.key?(:'charge_micros')
213
+ self.charge_micros = attributes[:'charge_micros']
214
+ else
215
+ self.charge_micros = 0
216
+ end
217
+
218
+ if attributes.key?(:'error_message')
219
+ self.error_message = attributes[:'error_message']
220
+ end
221
+
222
+ if attributes.key?(:'started_at')
223
+ self.started_at = attributes[:'started_at']
224
+ end
225
+
226
+ if attributes.key?(:'completed_at')
227
+ self.completed_at = attributes[:'completed_at']
228
+ end
229
+
230
+ if attributes.key?(:'created_at')
231
+ self.created_at = attributes[:'created_at']
232
+ else
233
+ self.created_at = nil
234
+ end
235
+
236
+ if attributes.key?(:'updated_at')
237
+ self.updated_at = attributes[:'updated_at']
238
+ else
239
+ self.updated_at = nil
240
+ end
241
+ end
242
+
243
+ # Show invalid properties with the reasons. Usually used together with valid?
244
+ # @return Array for valid properties with the reasons
245
+ def list_invalid_properties
246
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
247
+ invalid_properties = Array.new
248
+ if @id.nil?
249
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
250
+ end
251
+
252
+ if @item_index.nil?
253
+ invalid_properties.push('invalid value for "item_index", item_index cannot be nil.')
254
+ end
255
+
256
+ if @status.nil?
257
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
258
+ end
259
+
260
+ if @request_type.nil?
261
+ invalid_properties.push('invalid value for "request_type", request_type cannot be nil.')
262
+ end
263
+
264
+ if @input.nil?
265
+ invalid_properties.push('invalid value for "input", input cannot be nil.')
266
+ end
267
+
268
+ if @created_at.nil?
269
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
270
+ end
271
+
272
+ if @updated_at.nil?
273
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
274
+ end
275
+
276
+ invalid_properties
277
+ end
278
+
279
+ # Check to see if the all the properties in the model are valid
280
+ # @return true if the model is valid
281
+ def valid?
282
+ warn '[DEPRECATED] the `valid?` method is obsolete'
283
+ return false if @id.nil?
284
+ return false if @item_index.nil?
285
+ return false if @status.nil?
286
+ status_validator = EnumAttributeValidator.new('String', ["queued", "processing", "completed", "error", "canceled"])
287
+ return false unless status_validator.valid?(@status)
288
+ return false if @request_type.nil?
289
+ request_type_validator = EnumAttributeValidator.new('String', ["finder", "probe"])
290
+ return false unless request_type_validator.valid?(@request_type)
291
+ return false if @input.nil?
292
+ result_outcome_validator = EnumAttributeValidator.new('String', ["found", "not_found", "error"])
293
+ return false unless result_outcome_validator.valid?(@result_outcome)
294
+ return false if @created_at.nil?
295
+ return false if @updated_at.nil?
296
+ true
297
+ end
298
+
299
+ # Custom attribute writer method with validation
300
+ # @param [Object] id Value to be assigned
301
+ def id=(id)
302
+ if id.nil?
303
+ fail ArgumentError, 'id cannot be nil'
304
+ end
305
+
306
+ @id = id
307
+ end
308
+
309
+ # Custom attribute writer method with validation
310
+ # @param [Object] item_index Value to be assigned
311
+ def item_index=(item_index)
312
+ if item_index.nil?
313
+ fail ArgumentError, 'item_index cannot be nil'
314
+ end
315
+
316
+ @item_index = item_index
317
+ end
318
+
319
+ # Custom attribute writer method checking allowed values (enum).
320
+ # @param [Object] status Object to be assigned
321
+ def status=(status)
322
+ validator = EnumAttributeValidator.new('String', ["queued", "processing", "completed", "error", "canceled"])
323
+ unless validator.valid?(status)
324
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
325
+ end
326
+ @status = status
327
+ end
328
+
329
+ # Custom attribute writer method checking allowed values (enum).
330
+ # @param [Object] request_type Object to be assigned
331
+ def request_type=(request_type)
332
+ validator = EnumAttributeValidator.new('String', ["finder", "probe"])
333
+ unless validator.valid?(request_type)
334
+ fail ArgumentError, "invalid value for \"request_type\", must be one of #{validator.allowable_values}."
335
+ end
336
+ @request_type = request_type
337
+ end
338
+
339
+ # Custom attribute writer method with validation
340
+ # @param [Object] input Value to be assigned
341
+ def input=(input)
342
+ if input.nil?
343
+ fail ArgumentError, 'input cannot be nil'
344
+ end
345
+
346
+ @input = input
347
+ end
348
+
349
+ # Custom attribute writer method checking allowed values (enum).
350
+ # @param [Object] result_outcome Object to be assigned
351
+ def result_outcome=(result_outcome)
352
+ validator = EnumAttributeValidator.new('String', ["found", "not_found", "error"])
353
+ unless validator.valid?(result_outcome)
354
+ fail ArgumentError, "invalid value for \"result_outcome\", must be one of #{validator.allowable_values}."
355
+ end
356
+ @result_outcome = result_outcome
357
+ end
358
+
359
+ # Custom attribute writer method with validation
360
+ # @param [Object] created_at Value to be assigned
361
+ def created_at=(created_at)
362
+ if created_at.nil?
363
+ fail ArgumentError, 'created_at cannot be nil'
364
+ end
365
+
366
+ @created_at = created_at
367
+ end
368
+
369
+ # Custom attribute writer method with validation
370
+ # @param [Object] updated_at Value to be assigned
371
+ def updated_at=(updated_at)
372
+ if updated_at.nil?
373
+ fail ArgumentError, 'updated_at cannot be nil'
374
+ end
375
+
376
+ @updated_at = updated_at
377
+ end
378
+
379
+ # Checks equality by comparing each attribute.
380
+ # @param [Object] Object to be compared
381
+ def ==(o)
382
+ return true if self.equal?(o)
383
+ self.class == o.class &&
384
+ id == o.id &&
385
+ item_index == o.item_index &&
386
+ status == o.status &&
387
+ request_type == o.request_type &&
388
+ input == o.input &&
389
+ result == o.result &&
390
+ result_state == o.result_state &&
391
+ result_outcome == o.result_outcome &&
392
+ resolved_address == o.resolved_address &&
393
+ provider == o.provider &&
394
+ charge_micros == o.charge_micros &&
395
+ error_message == o.error_message &&
396
+ started_at == o.started_at &&
397
+ completed_at == o.completed_at &&
398
+ created_at == o.created_at &&
399
+ updated_at == o.updated_at
400
+ end
401
+
402
+ # @see the `==` method
403
+ # @param [Object] Object to be compared
404
+ def eql?(o)
405
+ self == o
406
+ end
407
+
408
+ # Calculates hash code according to all attributes.
409
+ # @return [Integer] Hash code
410
+ def hash
411
+ [id, item_index, status, request_type, input, result, result_state, result_outcome, resolved_address, provider, charge_micros, error_message, started_at, completed_at, created_at, updated_at].hash
412
+ end
413
+
414
+ # Builds the object from hash
415
+ # @param [Hash] attributes Model attributes in the form of hash
416
+ # @return [Object] Returns the model itself
417
+ def self.build_from_hash(attributes)
418
+ return nil unless attributes.is_a?(Hash)
419
+ attributes = attributes.transform_keys(&:to_sym)
420
+ transformed_hash = {}
421
+ openapi_types.each_pair do |key, type|
422
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
423
+ transformed_hash["#{key}"] = nil
424
+ elsif type =~ /\AArray<(.*)>/i
425
+ # check to ensure the input is an array given that the attribute
426
+ # is documented as an array but the input is not
427
+ if attributes[attribute_map[key]].is_a?(Array)
428
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
429
+ end
430
+ elsif !attributes[attribute_map[key]].nil?
431
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
432
+ end
433
+ end
434
+ new(transformed_hash)
435
+ end
436
+
437
+ # Returns the object in the form of hash
438
+ # @return [Hash] Returns the object in the form of hash
439
+ def to_hash
440
+ hash = {}
441
+ self.class.attribute_map.each_pair do |attr, param|
442
+ value = self.send(attr)
443
+ if value.nil?
444
+ is_nullable = self.class.openapi_nullable.include?(attr)
445
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
446
+ end
447
+
448
+ hash[param] = _to_hash(value)
449
+ end
450
+ hash
451
+ end
452
+
453
+ end
454
+
455
+ end