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,450 @@
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 completed direct request visible in the user's request history.
18
+ class ClientRequestHistoryItem < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ attr_accessor :request_type
22
+
23
+ attr_accessor :input_name
24
+
25
+ attr_accessor :input_domain
26
+
27
+ attr_accessor :input_email
28
+
29
+ # Compact human-readable identifier for the original request input.
30
+ attr_accessor :input_label
31
+
32
+ attr_accessor :state
33
+
34
+ attr_accessor :outcome
35
+
36
+ attr_accessor :resolved_address
37
+
38
+ attr_accessor :duration_ms
39
+
40
+ attr_accessor :provider
41
+
42
+ attr_accessor :identity_providers
43
+
44
+ attr_accessor :mx_hosts
45
+
46
+ # Small transport and outcome metadata associated with the request.
47
+ attr_accessor :metadata
48
+
49
+ attr_accessor :is_alias
50
+
51
+ attr_accessor :is_catchall
52
+
53
+ attr_accessor :request_id
54
+
55
+ attr_accessor :created_at
56
+
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'id' => :'id',
83
+ :'request_type' => :'request_type',
84
+ :'input_name' => :'input_name',
85
+ :'input_domain' => :'input_domain',
86
+ :'input_email' => :'input_email',
87
+ :'input_label' => :'input_label',
88
+ :'state' => :'state',
89
+ :'outcome' => :'outcome',
90
+ :'resolved_address' => :'resolved_address',
91
+ :'duration_ms' => :'duration_ms',
92
+ :'provider' => :'provider',
93
+ :'identity_providers' => :'identity_providers',
94
+ :'mx_hosts' => :'mx_hosts',
95
+ :'metadata' => :'metadata',
96
+ :'is_alias' => :'is_alias',
97
+ :'is_catchall' => :'is_catchall',
98
+ :'request_id' => :'request_id',
99
+ :'created_at' => :'created_at'
100
+ }
101
+ end
102
+
103
+ # Returns attribute mapping this model knows about
104
+ def self.acceptable_attribute_map
105
+ attribute_map
106
+ end
107
+
108
+ # Returns all the JSON keys this model knows about
109
+ def self.acceptable_attributes
110
+ acceptable_attribute_map.values
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.openapi_types
115
+ {
116
+ :'id' => :'String',
117
+ :'request_type' => :'String',
118
+ :'input_name' => :'String',
119
+ :'input_domain' => :'String',
120
+ :'input_email' => :'String',
121
+ :'input_label' => :'String',
122
+ :'state' => :'String',
123
+ :'outcome' => :'String',
124
+ :'resolved_address' => :'String',
125
+ :'duration_ms' => :'Integer',
126
+ :'provider' => :'String',
127
+ :'identity_providers' => :'Array<Hash<String, Object>>',
128
+ :'mx_hosts' => :'Array<String>',
129
+ :'metadata' => :'Hash<String, Object>',
130
+ :'is_alias' => :'Boolean',
131
+ :'is_catchall' => :'Boolean',
132
+ :'request_id' => :'String',
133
+ :'created_at' => :'Time'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ def self.openapi_nullable
139
+ Set.new([
140
+ :'input_name',
141
+ :'input_domain',
142
+ :'input_email',
143
+ :'resolved_address',
144
+ :'duration_ms',
145
+ :'provider',
146
+ :'request_id',
147
+ ])
148
+ end
149
+
150
+ # Initializes the object
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ def initialize(attributes = {})
153
+ if (!attributes.is_a?(Hash))
154
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RelentlessIdentity::ClientRequestHistoryItem` initialize method"
155
+ end
156
+
157
+ # check to see if the attribute exists and convert string to symbol for hash key
158
+ acceptable_attribute_map = self.class.acceptable_attribute_map
159
+ attributes = attributes.each_with_object({}) { |(k, v), h|
160
+ if (!acceptable_attribute_map.key?(k.to_sym))
161
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RelentlessIdentity::ClientRequestHistoryItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
162
+ end
163
+ h[k.to_sym] = v
164
+ }
165
+
166
+ if attributes.key?(:'id')
167
+ self.id = attributes[:'id']
168
+ else
169
+ self.id = nil
170
+ end
171
+
172
+ if attributes.key?(:'request_type')
173
+ self.request_type = attributes[:'request_type']
174
+ else
175
+ self.request_type = nil
176
+ end
177
+
178
+ if attributes.key?(:'input_name')
179
+ self.input_name = attributes[:'input_name']
180
+ end
181
+
182
+ if attributes.key?(:'input_domain')
183
+ self.input_domain = attributes[:'input_domain']
184
+ end
185
+
186
+ if attributes.key?(:'input_email')
187
+ self.input_email = attributes[:'input_email']
188
+ end
189
+
190
+ if attributes.key?(:'input_label')
191
+ self.input_label = attributes[:'input_label']
192
+ else
193
+ self.input_label = nil
194
+ end
195
+
196
+ if attributes.key?(:'state')
197
+ self.state = attributes[:'state']
198
+ else
199
+ self.state = nil
200
+ end
201
+
202
+ if attributes.key?(:'outcome')
203
+ self.outcome = attributes[:'outcome']
204
+ else
205
+ self.outcome = nil
206
+ end
207
+
208
+ if attributes.key?(:'resolved_address')
209
+ self.resolved_address = attributes[:'resolved_address']
210
+ end
211
+
212
+ if attributes.key?(:'duration_ms')
213
+ self.duration_ms = attributes[:'duration_ms']
214
+ end
215
+
216
+ if attributes.key?(:'provider')
217
+ self.provider = attributes[:'provider']
218
+ end
219
+
220
+ if attributes.key?(:'identity_providers')
221
+ if (value = attributes[:'identity_providers']).is_a?(Array)
222
+ self.identity_providers = value
223
+ end
224
+ end
225
+
226
+ if attributes.key?(:'mx_hosts')
227
+ if (value = attributes[:'mx_hosts']).is_a?(Array)
228
+ self.mx_hosts = value
229
+ end
230
+ end
231
+
232
+ if attributes.key?(:'metadata')
233
+ if (value = attributes[:'metadata']).is_a?(Hash)
234
+ self.metadata = value
235
+ end
236
+ end
237
+
238
+ if attributes.key?(:'is_alias')
239
+ self.is_alias = attributes[:'is_alias']
240
+ else
241
+ self.is_alias = false
242
+ end
243
+
244
+ if attributes.key?(:'is_catchall')
245
+ self.is_catchall = attributes[:'is_catchall']
246
+ else
247
+ self.is_catchall = false
248
+ end
249
+
250
+ if attributes.key?(:'request_id')
251
+ self.request_id = attributes[:'request_id']
252
+ end
253
+
254
+ if attributes.key?(:'created_at')
255
+ self.created_at = attributes[:'created_at']
256
+ else
257
+ self.created_at = nil
258
+ end
259
+ end
260
+
261
+ # Show invalid properties with the reasons. Usually used together with valid?
262
+ # @return Array for valid properties with the reasons
263
+ def list_invalid_properties
264
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
265
+ invalid_properties = Array.new
266
+ if @id.nil?
267
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
268
+ end
269
+
270
+ if @request_type.nil?
271
+ invalid_properties.push('invalid value for "request_type", request_type cannot be nil.')
272
+ end
273
+
274
+ if @input_label.nil?
275
+ invalid_properties.push('invalid value for "input_label", input_label cannot be nil.')
276
+ end
277
+
278
+ if @state.nil?
279
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
280
+ end
281
+
282
+ if @outcome.nil?
283
+ invalid_properties.push('invalid value for "outcome", outcome cannot be nil.')
284
+ end
285
+
286
+ if @created_at.nil?
287
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
288
+ end
289
+
290
+ invalid_properties
291
+ end
292
+
293
+ # Check to see if the all the properties in the model are valid
294
+ # @return true if the model is valid
295
+ def valid?
296
+ warn '[DEPRECATED] the `valid?` method is obsolete'
297
+ return false if @id.nil?
298
+ return false if @request_type.nil?
299
+ request_type_validator = EnumAttributeValidator.new('String', ["finder", "probe"])
300
+ return false unless request_type_validator.valid?(@request_type)
301
+ return false if @input_label.nil?
302
+ return false if @state.nil?
303
+ state_validator = EnumAttributeValidator.new('String', ["deliverable", "undeliverable"])
304
+ return false unless state_validator.valid?(@state)
305
+ return false if @outcome.nil?
306
+ outcome_validator = EnumAttributeValidator.new('String', ["found", "not_found", "error"])
307
+ return false unless outcome_validator.valid?(@outcome)
308
+ return false if @created_at.nil?
309
+ true
310
+ end
311
+
312
+ # Custom attribute writer method with validation
313
+ # @param [Object] id Value to be assigned
314
+ def id=(id)
315
+ if id.nil?
316
+ fail ArgumentError, 'id cannot be nil'
317
+ end
318
+
319
+ @id = id
320
+ end
321
+
322
+ # Custom attribute writer method checking allowed values (enum).
323
+ # @param [Object] request_type Object to be assigned
324
+ def request_type=(request_type)
325
+ validator = EnumAttributeValidator.new('String', ["finder", "probe"])
326
+ unless validator.valid?(request_type)
327
+ fail ArgumentError, "invalid value for \"request_type\", must be one of #{validator.allowable_values}."
328
+ end
329
+ @request_type = request_type
330
+ end
331
+
332
+ # Custom attribute writer method with validation
333
+ # @param [Object] input_label Value to be assigned
334
+ def input_label=(input_label)
335
+ if input_label.nil?
336
+ fail ArgumentError, 'input_label cannot be nil'
337
+ end
338
+
339
+ @input_label = input_label
340
+ end
341
+
342
+ # Custom attribute writer method checking allowed values (enum).
343
+ # @param [Object] state Object to be assigned
344
+ def state=(state)
345
+ validator = EnumAttributeValidator.new('String', ["deliverable", "undeliverable"])
346
+ unless validator.valid?(state)
347
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
348
+ end
349
+ @state = state
350
+ end
351
+
352
+ # Custom attribute writer method checking allowed values (enum).
353
+ # @param [Object] outcome Object to be assigned
354
+ def outcome=(outcome)
355
+ validator = EnumAttributeValidator.new('String', ["found", "not_found", "error"])
356
+ unless validator.valid?(outcome)
357
+ fail ArgumentError, "invalid value for \"outcome\", must be one of #{validator.allowable_values}."
358
+ end
359
+ @outcome = outcome
360
+ end
361
+
362
+ # Custom attribute writer method with validation
363
+ # @param [Object] created_at Value to be assigned
364
+ def created_at=(created_at)
365
+ if created_at.nil?
366
+ fail ArgumentError, 'created_at cannot be nil'
367
+ end
368
+
369
+ @created_at = created_at
370
+ end
371
+
372
+ # Checks equality by comparing each attribute.
373
+ # @param [Object] Object to be compared
374
+ def ==(o)
375
+ return true if self.equal?(o)
376
+ self.class == o.class &&
377
+ id == o.id &&
378
+ request_type == o.request_type &&
379
+ input_name == o.input_name &&
380
+ input_domain == o.input_domain &&
381
+ input_email == o.input_email &&
382
+ input_label == o.input_label &&
383
+ state == o.state &&
384
+ outcome == o.outcome &&
385
+ resolved_address == o.resolved_address &&
386
+ duration_ms == o.duration_ms &&
387
+ provider == o.provider &&
388
+ identity_providers == o.identity_providers &&
389
+ mx_hosts == o.mx_hosts &&
390
+ metadata == o.metadata &&
391
+ is_alias == o.is_alias &&
392
+ is_catchall == o.is_catchall &&
393
+ request_id == o.request_id &&
394
+ created_at == o.created_at
395
+ end
396
+
397
+ # @see the `==` method
398
+ # @param [Object] Object to be compared
399
+ def eql?(o)
400
+ self == o
401
+ end
402
+
403
+ # Calculates hash code according to all attributes.
404
+ # @return [Integer] Hash code
405
+ def hash
406
+ [id, request_type, input_name, input_domain, input_email, input_label, state, outcome, resolved_address, duration_ms, provider, identity_providers, mx_hosts, metadata, is_alias, is_catchall, request_id, created_at].hash
407
+ end
408
+
409
+ # Builds the object from hash
410
+ # @param [Hash] attributes Model attributes in the form of hash
411
+ # @return [Object] Returns the model itself
412
+ def self.build_from_hash(attributes)
413
+ return nil unless attributes.is_a?(Hash)
414
+ attributes = attributes.transform_keys(&:to_sym)
415
+ transformed_hash = {}
416
+ openapi_types.each_pair do |key, type|
417
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
418
+ transformed_hash["#{key}"] = nil
419
+ elsif type =~ /\AArray<(.*)>/i
420
+ # check to ensure the input is an array given that the attribute
421
+ # is documented as an array but the input is not
422
+ if attributes[attribute_map[key]].is_a?(Array)
423
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
424
+ end
425
+ elsif !attributes[attribute_map[key]].nil?
426
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
427
+ end
428
+ end
429
+ new(transformed_hash)
430
+ end
431
+
432
+ # Returns the object in the form of hash
433
+ # @return [Hash] Returns the object in the form of hash
434
+ def to_hash
435
+ hash = {}
436
+ self.class.attribute_map.each_pair do |attr, param|
437
+ value = self.send(attr)
438
+ if value.nil?
439
+ is_nullable = self.class.openapi_nullable.include?(attr)
440
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
441
+ end
442
+
443
+ hash[param] = _to_hash(value)
444
+ end
445
+ hash
446
+ end
447
+
448
+ end
449
+
450
+ end