plainrouter-sdk 0.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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +202 -0
  3. data/README.md +59 -0
  4. data/lib/plainrouter/client.rb +44 -0
  5. data/lib/plainrouter/openapi/api/event_api.rb +213 -0
  6. data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
  7. data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
  8. data/lib/plainrouter/openapi/api_client.rb +441 -0
  9. data/lib/plainrouter/openapi/api_error.rb +58 -0
  10. data/lib/plainrouter/openapi/api_model_base.rb +88 -0
  11. data/lib/plainrouter/openapi/configuration.rb +399 -0
  12. data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
  13. data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
  14. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
  15. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
  16. data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
  17. data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
  18. data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
  19. data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
  20. data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
  21. data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
  22. data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
  23. data/lib/plainrouter/openapi/models/destination.rb +354 -0
  24. data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
  25. data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
  26. data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
  27. data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
  28. data/lib/plainrouter/openapi/models/error_message.rb +164 -0
  29. data/lib/plainrouter/openapi/models/event.rb +782 -0
  30. data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
  31. data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
  32. data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
  33. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
  34. data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
  35. data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
  36. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
  37. data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
  38. data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
  39. data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
  40. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
  41. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
  42. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
  43. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
  44. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
  45. data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
  46. data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
  47. data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
  48. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
  49. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
  50. data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
  51. data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
  52. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
  53. data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
  54. data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
  55. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
  56. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
  57. data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
  58. data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
  59. data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
  60. data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
  61. data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
  62. data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
  63. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
  64. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
  65. data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
  66. data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
  67. data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
  68. data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
  69. data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
  70. data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
  71. data/lib/plainrouter/openapi/version.rb +15 -0
  72. data/lib/plainrouter/openapi.rb +102 -0
  73. data/lib/plainrouter/version.rb +6 -0
  74. data/lib/plainrouter.rb +10 -0
  75. metadata +176 -0
@@ -0,0 +1,192 @@
1
+ =begin
2
+ #PlainRouter Conversion API
3
+
4
+ #PlainRouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
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 PlainRouter::OpenAPI
17
+ class GetReconciliationReport200Response < ApiModelBase
18
+ attr_accessor :date
19
+
20
+ attr_accessor :reports
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'date' => :'date',
26
+ :'reports' => :'reports'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'date' => :'String',
44
+ :'reports' => :'Array<GetReconciliationReport200ResponseReportsInner>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetReconciliationReport200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetReconciliationReport200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'date')
71
+ self.date = attributes[:'date']
72
+ else
73
+ self.date = nil
74
+ end
75
+
76
+ if attributes.key?(:'reports')
77
+ if (value = attributes[:'reports']).is_a?(Array)
78
+ self.reports = value
79
+ end
80
+ else
81
+ self.reports = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @date.nil?
91
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
92
+ end
93
+
94
+ if @reports.nil?
95
+ invalid_properties.push('invalid value for "reports", reports cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @date.nil?
106
+ return false if @reports.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] date Value to be assigned
112
+ def date=(date)
113
+ if date.nil?
114
+ fail ArgumentError, 'date cannot be nil'
115
+ end
116
+
117
+ @date = date
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] reports Value to be assigned
122
+ def reports=(reports)
123
+ if reports.nil?
124
+ fail ArgumentError, 'reports cannot be nil'
125
+ end
126
+
127
+ @reports = reports
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ date == o.date &&
136
+ reports == o.reports
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [date, reports].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -0,0 +1,476 @@
1
+ =begin
2
+ #PlainRouter Conversion API
3
+
4
+ #PlainRouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
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 PlainRouter::OpenAPI
17
+ class GetReconciliationReport200ResponseReportsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :signal_tracker_id
21
+
22
+ attr_accessor :destination_id
23
+
24
+ attr_accessor :report_date
25
+
26
+ attr_accessor :accepted_count
27
+
28
+ attr_accessor :meta_count
29
+
30
+ attr_accessor :observed_gap
31
+
32
+ attr_accessor :event_counts
33
+
34
+ attr_accessor :buckets
35
+
36
+ attr_accessor :unexplained_residual
37
+
38
+ attr_accessor :status
39
+
40
+ attr_accessor :created_at
41
+
42
+ attr_accessor :updated_at
43
+
44
+ attr_accessor :destination
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'id' => :'id',
50
+ :'signal_tracker_id' => :'signal_tracker_id',
51
+ :'destination_id' => :'destination_id',
52
+ :'report_date' => :'report_date',
53
+ :'accepted_count' => :'accepted_count',
54
+ :'meta_count' => :'meta_count',
55
+ :'observed_gap' => :'observed_gap',
56
+ :'event_counts' => :'event_counts',
57
+ :'buckets' => :'buckets',
58
+ :'unexplained_residual' => :'unexplained_residual',
59
+ :'status' => :'status',
60
+ :'created_at' => :'created_at',
61
+ :'updated_at' => :'updated_at',
62
+ :'destination' => :'destination'
63
+ }
64
+ end
65
+
66
+ # Returns attribute mapping this model knows about
67
+ def self.acceptable_attribute_map
68
+ attribute_map
69
+ end
70
+
71
+ # Returns all the JSON keys this model knows about
72
+ def self.acceptable_attributes
73
+ acceptable_attribute_map.values
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ def self.openapi_types
78
+ {
79
+ :'id' => :'Integer',
80
+ :'signal_tracker_id' => :'String',
81
+ :'destination_id' => :'String',
82
+ :'report_date' => :'String',
83
+ :'accepted_count' => :'Integer',
84
+ :'meta_count' => :'Integer',
85
+ :'observed_gap' => :'Integer',
86
+ :'event_counts' => :'GetReconciliationReport200ResponseReportsInnerEventCounts',
87
+ :'buckets' => :'Hash<String, GetReconciliationReport200ResponseReportsInnerBucketsValue>',
88
+ :'unexplained_residual' => :'Integer',
89
+ :'status' => :'String',
90
+ :'created_at' => :'String',
91
+ :'updated_at' => :'String',
92
+ :'destination' => :'SetDestinationTestMode200ResponseDestination'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ :'created_at',
100
+ :'updated_at',
101
+ ])
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ if (!attributes.is_a?(Hash))
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetReconciliationReport200ResponseReportsInner` initialize method"
109
+ end
110
+
111
+ # check to see if the attribute exists and convert string to symbol for hash key
112
+ acceptable_attribute_map = self.class.acceptable_attribute_map
113
+ attributes = attributes.each_with_object({}) { |(k, v), h|
114
+ if (!acceptable_attribute_map.key?(k.to_sym))
115
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetReconciliationReport200ResponseReportsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
116
+ end
117
+ h[k.to_sym] = v
118
+ }
119
+
120
+ if attributes.key?(:'id')
121
+ self.id = attributes[:'id']
122
+ else
123
+ self.id = nil
124
+ end
125
+
126
+ if attributes.key?(:'signal_tracker_id')
127
+ self.signal_tracker_id = attributes[:'signal_tracker_id']
128
+ else
129
+ self.signal_tracker_id = nil
130
+ end
131
+
132
+ if attributes.key?(:'destination_id')
133
+ self.destination_id = attributes[:'destination_id']
134
+ else
135
+ self.destination_id = nil
136
+ end
137
+
138
+ if attributes.key?(:'report_date')
139
+ self.report_date = attributes[:'report_date']
140
+ else
141
+ self.report_date = nil
142
+ end
143
+
144
+ if attributes.key?(:'accepted_count')
145
+ self.accepted_count = attributes[:'accepted_count']
146
+ else
147
+ self.accepted_count = nil
148
+ end
149
+
150
+ if attributes.key?(:'meta_count')
151
+ self.meta_count = attributes[:'meta_count']
152
+ else
153
+ self.meta_count = nil
154
+ end
155
+
156
+ if attributes.key?(:'observed_gap')
157
+ self.observed_gap = attributes[:'observed_gap']
158
+ else
159
+ self.observed_gap = nil
160
+ end
161
+
162
+ if attributes.key?(:'event_counts')
163
+ self.event_counts = attributes[:'event_counts']
164
+ else
165
+ self.event_counts = nil
166
+ end
167
+
168
+ if attributes.key?(:'buckets')
169
+ if (value = attributes[:'buckets']).is_a?(Hash)
170
+ self.buckets = value
171
+ end
172
+ else
173
+ self.buckets = nil
174
+ end
175
+
176
+ if attributes.key?(:'unexplained_residual')
177
+ self.unexplained_residual = attributes[:'unexplained_residual']
178
+ else
179
+ self.unexplained_residual = nil
180
+ end
181
+
182
+ if attributes.key?(:'status')
183
+ self.status = attributes[:'status']
184
+ else
185
+ self.status = nil
186
+ end
187
+
188
+ if attributes.key?(:'created_at')
189
+ self.created_at = attributes[:'created_at']
190
+ else
191
+ self.created_at = nil
192
+ end
193
+
194
+ if attributes.key?(:'updated_at')
195
+ self.updated_at = attributes[:'updated_at']
196
+ else
197
+ self.updated_at = nil
198
+ end
199
+
200
+ if attributes.key?(:'destination')
201
+ self.destination = attributes[:'destination']
202
+ else
203
+ self.destination = nil
204
+ end
205
+ end
206
+
207
+ # Show invalid properties with the reasons. Usually used together with valid?
208
+ # @return Array for valid properties with the reasons
209
+ def list_invalid_properties
210
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
211
+ invalid_properties = Array.new
212
+ if @id.nil?
213
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
214
+ end
215
+
216
+ if @signal_tracker_id.nil?
217
+ invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
218
+ end
219
+
220
+ if @destination_id.nil?
221
+ invalid_properties.push('invalid value for "destination_id", destination_id cannot be nil.')
222
+ end
223
+
224
+ if @report_date.nil?
225
+ invalid_properties.push('invalid value for "report_date", report_date cannot be nil.')
226
+ end
227
+
228
+ if @accepted_count.nil?
229
+ invalid_properties.push('invalid value for "accepted_count", accepted_count cannot be nil.')
230
+ end
231
+
232
+ if @meta_count.nil?
233
+ invalid_properties.push('invalid value for "meta_count", meta_count cannot be nil.')
234
+ end
235
+
236
+ if @observed_gap.nil?
237
+ invalid_properties.push('invalid value for "observed_gap", observed_gap cannot be nil.')
238
+ end
239
+
240
+ if @event_counts.nil?
241
+ invalid_properties.push('invalid value for "event_counts", event_counts cannot be nil.')
242
+ end
243
+
244
+ if @buckets.nil?
245
+ invalid_properties.push('invalid value for "buckets", buckets cannot be nil.')
246
+ end
247
+
248
+ if @unexplained_residual.nil?
249
+ invalid_properties.push('invalid value for "unexplained_residual", unexplained_residual cannot be nil.')
250
+ end
251
+
252
+ if @status.nil?
253
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
254
+ end
255
+
256
+ if @destination.nil?
257
+ invalid_properties.push('invalid value for "destination", destination cannot be nil.')
258
+ end
259
+
260
+ invalid_properties
261
+ end
262
+
263
+ # Check to see if the all the properties in the model are valid
264
+ # @return true if the model is valid
265
+ def valid?
266
+ warn '[DEPRECATED] the `valid?` method is obsolete'
267
+ return false if @id.nil?
268
+ return false if @signal_tracker_id.nil?
269
+ return false if @destination_id.nil?
270
+ return false if @report_date.nil?
271
+ return false if @accepted_count.nil?
272
+ return false if @meta_count.nil?
273
+ return false if @observed_gap.nil?
274
+ return false if @event_counts.nil?
275
+ return false if @buckets.nil?
276
+ return false if @unexplained_residual.nil?
277
+ return false if @status.nil?
278
+ return false if @destination.nil?
279
+ true
280
+ end
281
+
282
+ # Custom attribute writer method with validation
283
+ # @param [Object] id Value to be assigned
284
+ def id=(id)
285
+ if id.nil?
286
+ fail ArgumentError, 'id cannot be nil'
287
+ end
288
+
289
+ @id = id
290
+ end
291
+
292
+ # Custom attribute writer method with validation
293
+ # @param [Object] signal_tracker_id Value to be assigned
294
+ def signal_tracker_id=(signal_tracker_id)
295
+ if signal_tracker_id.nil?
296
+ fail ArgumentError, 'signal_tracker_id cannot be nil'
297
+ end
298
+
299
+ @signal_tracker_id = signal_tracker_id
300
+ end
301
+
302
+ # Custom attribute writer method with validation
303
+ # @param [Object] destination_id Value to be assigned
304
+ def destination_id=(destination_id)
305
+ if destination_id.nil?
306
+ fail ArgumentError, 'destination_id cannot be nil'
307
+ end
308
+
309
+ @destination_id = destination_id
310
+ end
311
+
312
+ # Custom attribute writer method with validation
313
+ # @param [Object] report_date Value to be assigned
314
+ def report_date=(report_date)
315
+ if report_date.nil?
316
+ fail ArgumentError, 'report_date cannot be nil'
317
+ end
318
+
319
+ @report_date = report_date
320
+ end
321
+
322
+ # Custom attribute writer method with validation
323
+ # @param [Object] accepted_count Value to be assigned
324
+ def accepted_count=(accepted_count)
325
+ if accepted_count.nil?
326
+ fail ArgumentError, 'accepted_count cannot be nil'
327
+ end
328
+
329
+ @accepted_count = accepted_count
330
+ end
331
+
332
+ # Custom attribute writer method with validation
333
+ # @param [Object] meta_count Value to be assigned
334
+ def meta_count=(meta_count)
335
+ if meta_count.nil?
336
+ fail ArgumentError, 'meta_count cannot be nil'
337
+ end
338
+
339
+ @meta_count = meta_count
340
+ end
341
+
342
+ # Custom attribute writer method with validation
343
+ # @param [Object] observed_gap Value to be assigned
344
+ def observed_gap=(observed_gap)
345
+ if observed_gap.nil?
346
+ fail ArgumentError, 'observed_gap cannot be nil'
347
+ end
348
+
349
+ @observed_gap = observed_gap
350
+ end
351
+
352
+ # Custom attribute writer method with validation
353
+ # @param [Object] event_counts Value to be assigned
354
+ def event_counts=(event_counts)
355
+ if event_counts.nil?
356
+ fail ArgumentError, 'event_counts cannot be nil'
357
+ end
358
+
359
+ @event_counts = event_counts
360
+ end
361
+
362
+ # Custom attribute writer method with validation
363
+ # @param [Object] buckets Value to be assigned
364
+ def buckets=(buckets)
365
+ if buckets.nil?
366
+ fail ArgumentError, 'buckets cannot be nil'
367
+ end
368
+
369
+ @buckets = buckets
370
+ end
371
+
372
+ # Custom attribute writer method with validation
373
+ # @param [Object] unexplained_residual Value to be assigned
374
+ def unexplained_residual=(unexplained_residual)
375
+ if unexplained_residual.nil?
376
+ fail ArgumentError, 'unexplained_residual cannot be nil'
377
+ end
378
+
379
+ @unexplained_residual = unexplained_residual
380
+ end
381
+
382
+ # Custom attribute writer method with validation
383
+ # @param [Object] status Value to be assigned
384
+ def status=(status)
385
+ if status.nil?
386
+ fail ArgumentError, 'status cannot be nil'
387
+ end
388
+
389
+ @status = status
390
+ end
391
+
392
+ # Custom attribute writer method with validation
393
+ # @param [Object] destination Value to be assigned
394
+ def destination=(destination)
395
+ if destination.nil?
396
+ fail ArgumentError, 'destination cannot be nil'
397
+ end
398
+
399
+ @destination = destination
400
+ end
401
+
402
+ # Checks equality by comparing each attribute.
403
+ # @param [Object] Object to be compared
404
+ def ==(o)
405
+ return true if self.equal?(o)
406
+ self.class == o.class &&
407
+ id == o.id &&
408
+ signal_tracker_id == o.signal_tracker_id &&
409
+ destination_id == o.destination_id &&
410
+ report_date == o.report_date &&
411
+ accepted_count == o.accepted_count &&
412
+ meta_count == o.meta_count &&
413
+ observed_gap == o.observed_gap &&
414
+ event_counts == o.event_counts &&
415
+ buckets == o.buckets &&
416
+ unexplained_residual == o.unexplained_residual &&
417
+ status == o.status &&
418
+ created_at == o.created_at &&
419
+ updated_at == o.updated_at &&
420
+ destination == o.destination
421
+ end
422
+
423
+ # @see the `==` method
424
+ # @param [Object] Object to be compared
425
+ def eql?(o)
426
+ self == o
427
+ end
428
+
429
+ # Calculates hash code according to all attributes.
430
+ # @return [Integer] Hash code
431
+ def hash
432
+ [id, signal_tracker_id, destination_id, report_date, accepted_count, meta_count, observed_gap, event_counts, buckets, unexplained_residual, status, created_at, updated_at, destination].hash
433
+ end
434
+
435
+ # Builds the object from hash
436
+ # @param [Hash] attributes Model attributes in the form of hash
437
+ # @return [Object] Returns the model itself
438
+ def self.build_from_hash(attributes)
439
+ return nil unless attributes.is_a?(Hash)
440
+ attributes = attributes.transform_keys(&:to_sym)
441
+ transformed_hash = {}
442
+ openapi_types.each_pair do |key, type|
443
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
444
+ transformed_hash["#{key}"] = nil
445
+ elsif type =~ /\AArray<(.*)>/i
446
+ # check to ensure the input is an array given that the attribute
447
+ # is documented as an array but the input is not
448
+ if attributes[attribute_map[key]].is_a?(Array)
449
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
450
+ end
451
+ elsif !attributes[attribute_map[key]].nil?
452
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
453
+ end
454
+ end
455
+ new(transformed_hash)
456
+ end
457
+
458
+ # Returns the object in the form of hash
459
+ # @return [Hash] Returns the object in the form of hash
460
+ def to_hash
461
+ hash = {}
462
+ self.class.attribute_map.each_pair do |attr, param|
463
+ value = self.send(attr)
464
+ if value.nil?
465
+ is_nullable = self.class.openapi_nullable.include?(attr)
466
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
467
+ end
468
+
469
+ hash[param] = _to_hash(value)
470
+ end
471
+ hash
472
+ end
473
+
474
+ end
475
+
476
+ end