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,318 @@
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
+ class BatchSummary < ApiModelBase
18
+ # Total number of requested items.
19
+ attr_accessor :total
20
+
21
+ # Items that resolved to a positive deliverable result.
22
+ attr_accessor :found
23
+
24
+ # Items that completed cleanly with a negative result.
25
+ attr_accessor :not_found
26
+
27
+ # Items that ended with an operational verification error rather than a mailbox verdict.
28
+ attr_accessor :errors
29
+
30
+ # Distinct mailbox domains represented in the batch.
31
+ attr_accessor :unique_domains
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'total' => :'total',
37
+ :'found' => :'found',
38
+ :'not_found' => :'not_found',
39
+ :'errors' => :'errors',
40
+ :'unique_domains' => :'unique_domains'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'total' => :'Integer',
58
+ :'found' => :'Integer',
59
+ :'not_found' => :'Integer',
60
+ :'errors' => :'Integer',
61
+ :'unique_domains' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RelentlessIdentity::BatchSummary` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RelentlessIdentity::BatchSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'total')
88
+ self.total = attributes[:'total']
89
+ else
90
+ self.total = nil
91
+ end
92
+
93
+ if attributes.key?(:'found')
94
+ self.found = attributes[:'found']
95
+ else
96
+ self.found = nil
97
+ end
98
+
99
+ if attributes.key?(:'not_found')
100
+ self.not_found = attributes[:'not_found']
101
+ else
102
+ self.not_found = nil
103
+ end
104
+
105
+ if attributes.key?(:'errors')
106
+ self.errors = attributes[:'errors']
107
+ else
108
+ self.errors = nil
109
+ end
110
+
111
+ if attributes.key?(:'unique_domains')
112
+ self.unique_domains = attributes[:'unique_domains']
113
+ else
114
+ self.unique_domains = nil
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ if @total.nil?
124
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
125
+ end
126
+
127
+ if @total < 0
128
+ invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
129
+ end
130
+
131
+ if @found.nil?
132
+ invalid_properties.push('invalid value for "found", found cannot be nil.')
133
+ end
134
+
135
+ if @found < 0
136
+ invalid_properties.push('invalid value for "found", must be greater than or equal to 0.')
137
+ end
138
+
139
+ if @not_found.nil?
140
+ invalid_properties.push('invalid value for "not_found", not_found cannot be nil.')
141
+ end
142
+
143
+ if @not_found < 0
144
+ invalid_properties.push('invalid value for "not_found", must be greater than or equal to 0.')
145
+ end
146
+
147
+ if @errors.nil?
148
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
149
+ end
150
+
151
+ if @errors < 0
152
+ invalid_properties.push('invalid value for "errors", must be greater than or equal to 0.')
153
+ end
154
+
155
+ if @unique_domains.nil?
156
+ invalid_properties.push('invalid value for "unique_domains", unique_domains cannot be nil.')
157
+ end
158
+
159
+ if @unique_domains < 0
160
+ invalid_properties.push('invalid value for "unique_domains", must be greater than or equal to 0.')
161
+ end
162
+
163
+ invalid_properties
164
+ end
165
+
166
+ # Check to see if the all the properties in the model are valid
167
+ # @return true if the model is valid
168
+ def valid?
169
+ warn '[DEPRECATED] the `valid?` method is obsolete'
170
+ return false if @total.nil?
171
+ return false if @total < 0
172
+ return false if @found.nil?
173
+ return false if @found < 0
174
+ return false if @not_found.nil?
175
+ return false if @not_found < 0
176
+ return false if @errors.nil?
177
+ return false if @errors < 0
178
+ return false if @unique_domains.nil?
179
+ return false if @unique_domains < 0
180
+ true
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] total Value to be assigned
185
+ def total=(total)
186
+ if total.nil?
187
+ fail ArgumentError, 'total cannot be nil'
188
+ end
189
+
190
+ if total < 0
191
+ fail ArgumentError, 'invalid value for "total", must be greater than or equal to 0.'
192
+ end
193
+
194
+ @total = total
195
+ end
196
+
197
+ # Custom attribute writer method with validation
198
+ # @param [Object] found Value to be assigned
199
+ def found=(found)
200
+ if found.nil?
201
+ fail ArgumentError, 'found cannot be nil'
202
+ end
203
+
204
+ if found < 0
205
+ fail ArgumentError, 'invalid value for "found", must be greater than or equal to 0.'
206
+ end
207
+
208
+ @found = found
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] not_found Value to be assigned
213
+ def not_found=(not_found)
214
+ if not_found.nil?
215
+ fail ArgumentError, 'not_found cannot be nil'
216
+ end
217
+
218
+ if not_found < 0
219
+ fail ArgumentError, 'invalid value for "not_found", must be greater than or equal to 0.'
220
+ end
221
+
222
+ @not_found = not_found
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] errors Value to be assigned
227
+ def errors=(errors)
228
+ if errors.nil?
229
+ fail ArgumentError, 'errors cannot be nil'
230
+ end
231
+
232
+ if errors < 0
233
+ fail ArgumentError, 'invalid value for "errors", must be greater than or equal to 0.'
234
+ end
235
+
236
+ @errors = errors
237
+ end
238
+
239
+ # Custom attribute writer method with validation
240
+ # @param [Object] unique_domains Value to be assigned
241
+ def unique_domains=(unique_domains)
242
+ if unique_domains.nil?
243
+ fail ArgumentError, 'unique_domains cannot be nil'
244
+ end
245
+
246
+ if unique_domains < 0
247
+ fail ArgumentError, 'invalid value for "unique_domains", must be greater than or equal to 0.'
248
+ end
249
+
250
+ @unique_domains = unique_domains
251
+ end
252
+
253
+ # Checks equality by comparing each attribute.
254
+ # @param [Object] Object to be compared
255
+ def ==(o)
256
+ return true if self.equal?(o)
257
+ self.class == o.class &&
258
+ total == o.total &&
259
+ found == o.found &&
260
+ not_found == o.not_found &&
261
+ errors == o.errors &&
262
+ unique_domains == o.unique_domains
263
+ end
264
+
265
+ # @see the `==` method
266
+ # @param [Object] Object to be compared
267
+ def eql?(o)
268
+ self == o
269
+ end
270
+
271
+ # Calculates hash code according to all attributes.
272
+ # @return [Integer] Hash code
273
+ def hash
274
+ [total, found, not_found, errors, unique_domains].hash
275
+ end
276
+
277
+ # Builds the object from hash
278
+ # @param [Hash] attributes Model attributes in the form of hash
279
+ # @return [Object] Returns the model itself
280
+ def self.build_from_hash(attributes)
281
+ return nil unless attributes.is_a?(Hash)
282
+ attributes = attributes.transform_keys(&:to_sym)
283
+ transformed_hash = {}
284
+ openapi_types.each_pair do |key, type|
285
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
286
+ transformed_hash["#{key}"] = nil
287
+ elsif type =~ /\AArray<(.*)>/i
288
+ # check to ensure the input is an array given that the attribute
289
+ # is documented as an array but the input is not
290
+ if attributes[attribute_map[key]].is_a?(Array)
291
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
292
+ end
293
+ elsif !attributes[attribute_map[key]].nil?
294
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
295
+ end
296
+ end
297
+ new(transformed_hash)
298
+ end
299
+
300
+ # Returns the object in the form of hash
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_hash
303
+ hash = {}
304
+ self.class.attribute_map.each_pair do |attr, param|
305
+ value = self.send(attr)
306
+ if value.nil?
307
+ is_nullable = self.class.openapi_nullable.include?(attr)
308
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
309
+ end
310
+
311
+ hash[param] = _to_hash(value)
312
+ end
313
+ hash
314
+ end
315
+
316
+ end
317
+
318
+ end
@@ -0,0 +1,307 @@
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
+ # Background job detail plus paginated item results.
18
+ class ClientBackgroundJobDetailResponse < ApiModelBase
19
+ attr_accessor :job
20
+
21
+ attr_accessor :items
22
+
23
+ attr_accessor :total_items
24
+
25
+ attr_accessor :page
26
+
27
+ attr_accessor :page_size
28
+
29
+ attr_accessor :total_pages
30
+
31
+ # Whether the stored item payload rows have already expired and been pruned.
32
+ attr_accessor :results_expired
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'job' => :'job',
38
+ :'items' => :'items',
39
+ :'total_items' => :'total_items',
40
+ :'page' => :'page',
41
+ :'page_size' => :'page_size',
42
+ :'total_pages' => :'total_pages',
43
+ :'results_expired' => :'results_expired'
44
+ }
45
+ end
46
+
47
+ # Returns attribute mapping this model knows about
48
+ def self.acceptable_attribute_map
49
+ attribute_map
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ acceptable_attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'job' => :'ClientBackgroundJobResponse',
61
+ :'items' => :'Array<ClientBackgroundJobItemResponse>',
62
+ :'total_items' => :'Integer',
63
+ :'page' => :'Integer',
64
+ :'page_size' => :'Integer',
65
+ :'total_pages' => :'Integer',
66
+ :'results_expired' => :'Boolean'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RelentlessIdentity::ClientBackgroundJobDetailResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RelentlessIdentity::ClientBackgroundJobDetailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'job')
93
+ self.job = attributes[:'job']
94
+ else
95
+ self.job = nil
96
+ end
97
+
98
+ if attributes.key?(:'items')
99
+ if (value = attributes[:'items']).is_a?(Array)
100
+ self.items = value
101
+ end
102
+ else
103
+ self.items = nil
104
+ end
105
+
106
+ if attributes.key?(:'total_items')
107
+ self.total_items = attributes[:'total_items']
108
+ else
109
+ self.total_items = nil
110
+ end
111
+
112
+ if attributes.key?(:'page')
113
+ self.page = attributes[:'page']
114
+ else
115
+ self.page = nil
116
+ end
117
+
118
+ if attributes.key?(:'page_size')
119
+ self.page_size = attributes[:'page_size']
120
+ else
121
+ self.page_size = nil
122
+ end
123
+
124
+ if attributes.key?(:'total_pages')
125
+ self.total_pages = attributes[:'total_pages']
126
+ else
127
+ self.total_pages = nil
128
+ end
129
+
130
+ if attributes.key?(:'results_expired')
131
+ self.results_expired = attributes[:'results_expired']
132
+ end
133
+ end
134
+
135
+ # Show invalid properties with the reasons. Usually used together with valid?
136
+ # @return Array for valid properties with the reasons
137
+ def list_invalid_properties
138
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
139
+ invalid_properties = Array.new
140
+ if @job.nil?
141
+ invalid_properties.push('invalid value for "job", job cannot be nil.')
142
+ end
143
+
144
+ if @items.nil?
145
+ invalid_properties.push('invalid value for "items", items cannot be nil.')
146
+ end
147
+
148
+ if @total_items.nil?
149
+ invalid_properties.push('invalid value for "total_items", total_items cannot be nil.')
150
+ end
151
+
152
+ if @page.nil?
153
+ invalid_properties.push('invalid value for "page", page cannot be nil.')
154
+ end
155
+
156
+ if @page_size.nil?
157
+ invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
158
+ end
159
+
160
+ if @total_pages.nil?
161
+ invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
162
+ end
163
+
164
+ invalid_properties
165
+ end
166
+
167
+ # Check to see if the all the properties in the model are valid
168
+ # @return true if the model is valid
169
+ def valid?
170
+ warn '[DEPRECATED] the `valid?` method is obsolete'
171
+ return false if @job.nil?
172
+ return false if @items.nil?
173
+ return false if @total_items.nil?
174
+ return false if @page.nil?
175
+ return false if @page_size.nil?
176
+ return false if @total_pages.nil?
177
+ true
178
+ end
179
+
180
+ # Custom attribute writer method with validation
181
+ # @param [Object] job Value to be assigned
182
+ def job=(job)
183
+ if job.nil?
184
+ fail ArgumentError, 'job cannot be nil'
185
+ end
186
+
187
+ @job = job
188
+ end
189
+
190
+ # Custom attribute writer method with validation
191
+ # @param [Object] items Value to be assigned
192
+ def items=(items)
193
+ if items.nil?
194
+ fail ArgumentError, 'items cannot be nil'
195
+ end
196
+
197
+ @items = items
198
+ end
199
+
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] total_items Value to be assigned
202
+ def total_items=(total_items)
203
+ if total_items.nil?
204
+ fail ArgumentError, 'total_items cannot be nil'
205
+ end
206
+
207
+ @total_items = total_items
208
+ end
209
+
210
+ # Custom attribute writer method with validation
211
+ # @param [Object] page Value to be assigned
212
+ def page=(page)
213
+ if page.nil?
214
+ fail ArgumentError, 'page cannot be nil'
215
+ end
216
+
217
+ @page = page
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param [Object] page_size Value to be assigned
222
+ def page_size=(page_size)
223
+ if page_size.nil?
224
+ fail ArgumentError, 'page_size cannot be nil'
225
+ end
226
+
227
+ @page_size = page_size
228
+ end
229
+
230
+ # Custom attribute writer method with validation
231
+ # @param [Object] total_pages Value to be assigned
232
+ def total_pages=(total_pages)
233
+ if total_pages.nil?
234
+ fail ArgumentError, 'total_pages cannot be nil'
235
+ end
236
+
237
+ @total_pages = total_pages
238
+ end
239
+
240
+ # Checks equality by comparing each attribute.
241
+ # @param [Object] Object to be compared
242
+ def ==(o)
243
+ return true if self.equal?(o)
244
+ self.class == o.class &&
245
+ job == o.job &&
246
+ items == o.items &&
247
+ total_items == o.total_items &&
248
+ page == o.page &&
249
+ page_size == o.page_size &&
250
+ total_pages == o.total_pages &&
251
+ results_expired == o.results_expired
252
+ end
253
+
254
+ # @see the `==` method
255
+ # @param [Object] Object to be compared
256
+ def eql?(o)
257
+ self == o
258
+ end
259
+
260
+ # Calculates hash code according to all attributes.
261
+ # @return [Integer] Hash code
262
+ def hash
263
+ [job, items, total_items, page, page_size, total_pages, results_expired].hash
264
+ end
265
+
266
+ # Builds the object from hash
267
+ # @param [Hash] attributes Model attributes in the form of hash
268
+ # @return [Object] Returns the model itself
269
+ def self.build_from_hash(attributes)
270
+ return nil unless attributes.is_a?(Hash)
271
+ attributes = attributes.transform_keys(&:to_sym)
272
+ transformed_hash = {}
273
+ openapi_types.each_pair do |key, type|
274
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
275
+ transformed_hash["#{key}"] = nil
276
+ elsif type =~ /\AArray<(.*)>/i
277
+ # check to ensure the input is an array given that the attribute
278
+ # is documented as an array but the input is not
279
+ if attributes[attribute_map[key]].is_a?(Array)
280
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
281
+ end
282
+ elsif !attributes[attribute_map[key]].nil?
283
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
284
+ end
285
+ end
286
+ new(transformed_hash)
287
+ end
288
+
289
+ # Returns the object in the form of hash
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_hash
292
+ hash = {}
293
+ self.class.attribute_map.each_pair do |attr, param|
294
+ value = self.send(attr)
295
+ if value.nil?
296
+ is_nullable = self.class.openapi_nullable.include?(attr)
297
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
298
+ end
299
+
300
+ hash[param] = _to_hash(value)
301
+ end
302
+ hash
303
+ end
304
+
305
+ end
306
+
307
+ end