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,782 @@
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 Event < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :signal_tracker_id
21
+
22
+ attr_accessor :parent_event_id
23
+
24
+ attr_accessor :event_name
25
+
26
+ attr_accessor :event_time
27
+
28
+ attr_accessor :action_source
29
+
30
+ attr_accessor :event_class
31
+
32
+ attr_accessor :order_id
33
+
34
+ attr_accessor :value_amount
35
+
36
+ attr_accessor :value_currency
37
+
38
+ attr_accessor :created_at
39
+
40
+ attr_accessor :consent_basis
41
+
42
+ attr_accessor :measurement_class
43
+
44
+ attr_accessor :attribution_join
45
+
46
+ attr_accessor :enforcement_scope
47
+
48
+ attr_accessor :consent_normalization_version
49
+
50
+ attr_accessor :policy_class
51
+
52
+ attr_accessor :traffic_class
53
+
54
+ attr_accessor :consent
55
+
56
+ attr_accessor :user_data_hashed
57
+
58
+ attr_accessor :click_ids
59
+
60
+ attr_accessor :session
61
+
62
+ attr_accessor :value_data
63
+
64
+ attr_accessor :event_source
65
+
66
+ attr_accessor :payload_expired
67
+
68
+ attr_accessor :deliveries
69
+
70
+ class EnumAttributeValidator
71
+ attr_reader :datatype
72
+ attr_reader :allowable_values
73
+
74
+ def initialize(datatype, allowable_values)
75
+ @allowable_values = allowable_values.map do |value|
76
+ case datatype.to_s
77
+ when /Integer/i
78
+ value.to_i
79
+ when /Float/i
80
+ value.to_f
81
+ else
82
+ value
83
+ end
84
+ end
85
+ end
86
+
87
+ def valid?(value)
88
+ !value || allowable_values.include?(value)
89
+ end
90
+ end
91
+
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'id' => :'id',
96
+ :'signal_tracker_id' => :'signal_tracker_id',
97
+ :'parent_event_id' => :'parent_event_id',
98
+ :'event_name' => :'event_name',
99
+ :'event_time' => :'event_time',
100
+ :'action_source' => :'action_source',
101
+ :'event_class' => :'event_class',
102
+ :'order_id' => :'order_id',
103
+ :'value_amount' => :'value_amount',
104
+ :'value_currency' => :'value_currency',
105
+ :'created_at' => :'created_at',
106
+ :'consent_basis' => :'consent_basis',
107
+ :'measurement_class' => :'measurement_class',
108
+ :'attribution_join' => :'attribution_join',
109
+ :'enforcement_scope' => :'enforcement_scope',
110
+ :'consent_normalization_version' => :'consent_normalization_version',
111
+ :'policy_class' => :'policy_class',
112
+ :'traffic_class' => :'traffic_class',
113
+ :'consent' => :'consent',
114
+ :'user_data_hashed' => :'user_data_hashed',
115
+ :'click_ids' => :'click_ids',
116
+ :'session' => :'session',
117
+ :'value_data' => :'value_data',
118
+ :'event_source' => :'event_source',
119
+ :'payload_expired' => :'payload_expired',
120
+ :'deliveries' => :'deliveries'
121
+ }
122
+ end
123
+
124
+ # Returns attribute mapping this model knows about
125
+ def self.acceptable_attribute_map
126
+ attribute_map
127
+ end
128
+
129
+ # Returns all the JSON keys this model knows about
130
+ def self.acceptable_attributes
131
+ acceptable_attribute_map.values
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.openapi_types
136
+ {
137
+ :'id' => :'String',
138
+ :'signal_tracker_id' => :'String',
139
+ :'parent_event_id' => :'String',
140
+ :'event_name' => :'String',
141
+ :'event_time' => :'Time',
142
+ :'action_source' => :'String',
143
+ :'event_class' => :'String',
144
+ :'order_id' => :'String',
145
+ :'value_amount' => :'Integer',
146
+ :'value_currency' => :'String',
147
+ :'created_at' => :'Time',
148
+ :'consent_basis' => :'String',
149
+ :'measurement_class' => :'String',
150
+ :'attribution_join' => :'String',
151
+ :'enforcement_scope' => :'String',
152
+ :'consent_normalization_version' => :'String',
153
+ :'policy_class' => :'JurisdictionPolicyClass',
154
+ :'traffic_class' => :'TrafficClass',
155
+ :'consent' => :'String',
156
+ :'user_data_hashed' => :'String',
157
+ :'click_ids' => :'String',
158
+ :'session' => :'String',
159
+ :'value_data' => :'String',
160
+ :'event_source' => :'String',
161
+ :'payload_expired' => :'Boolean',
162
+ :'deliveries' => :'Array<Object>'
163
+ }
164
+ end
165
+
166
+ # List of attributes with nullable: true
167
+ def self.openapi_nullable
168
+ Set.new([
169
+ :'parent_event_id',
170
+ :'order_id',
171
+ :'value_amount',
172
+ :'value_currency',
173
+ ])
174
+ end
175
+
176
+ # Initializes the object
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ def initialize(attributes = {})
179
+ if (!attributes.is_a?(Hash))
180
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::Event` initialize method"
181
+ end
182
+
183
+ # check to see if the attribute exists and convert string to symbol for hash key
184
+ acceptable_attribute_map = self.class.acceptable_attribute_map
185
+ attributes = attributes.each_with_object({}) { |(k, v), h|
186
+ if (!acceptable_attribute_map.key?(k.to_sym))
187
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::Event`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
188
+ end
189
+ h[k.to_sym] = v
190
+ }
191
+
192
+ if attributes.key?(:'id')
193
+ self.id = attributes[:'id']
194
+ else
195
+ self.id = nil
196
+ end
197
+
198
+ if attributes.key?(:'signal_tracker_id')
199
+ self.signal_tracker_id = attributes[:'signal_tracker_id']
200
+ else
201
+ self.signal_tracker_id = nil
202
+ end
203
+
204
+ if attributes.key?(:'parent_event_id')
205
+ self.parent_event_id = attributes[:'parent_event_id']
206
+ else
207
+ self.parent_event_id = nil
208
+ end
209
+
210
+ if attributes.key?(:'event_name')
211
+ self.event_name = attributes[:'event_name']
212
+ else
213
+ self.event_name = nil
214
+ end
215
+
216
+ if attributes.key?(:'event_time')
217
+ self.event_time = attributes[:'event_time']
218
+ else
219
+ self.event_time = nil
220
+ end
221
+
222
+ if attributes.key?(:'action_source')
223
+ self.action_source = attributes[:'action_source']
224
+ else
225
+ self.action_source = nil
226
+ end
227
+
228
+ if attributes.key?(:'event_class')
229
+ self.event_class = attributes[:'event_class']
230
+ else
231
+ self.event_class = nil
232
+ end
233
+
234
+ if attributes.key?(:'order_id')
235
+ self.order_id = attributes[:'order_id']
236
+ else
237
+ self.order_id = nil
238
+ end
239
+
240
+ if attributes.key?(:'value_amount')
241
+ self.value_amount = attributes[:'value_amount']
242
+ else
243
+ self.value_amount = nil
244
+ end
245
+
246
+ if attributes.key?(:'value_currency')
247
+ self.value_currency = attributes[:'value_currency']
248
+ else
249
+ self.value_currency = nil
250
+ end
251
+
252
+ if attributes.key?(:'created_at')
253
+ self.created_at = attributes[:'created_at']
254
+ else
255
+ self.created_at = nil
256
+ end
257
+
258
+ if attributes.key?(:'consent_basis')
259
+ self.consent_basis = attributes[:'consent_basis']
260
+ else
261
+ self.consent_basis = nil
262
+ end
263
+
264
+ if attributes.key?(:'measurement_class')
265
+ self.measurement_class = attributes[:'measurement_class']
266
+ else
267
+ self.measurement_class = nil
268
+ end
269
+
270
+ if attributes.key?(:'attribution_join')
271
+ self.attribution_join = attributes[:'attribution_join']
272
+ else
273
+ self.attribution_join = nil
274
+ end
275
+
276
+ if attributes.key?(:'enforcement_scope')
277
+ self.enforcement_scope = attributes[:'enforcement_scope']
278
+ else
279
+ self.enforcement_scope = nil
280
+ end
281
+
282
+ if attributes.key?(:'consent_normalization_version')
283
+ self.consent_normalization_version = attributes[:'consent_normalization_version']
284
+ else
285
+ self.consent_normalization_version = nil
286
+ end
287
+
288
+ if attributes.key?(:'policy_class')
289
+ self.policy_class = attributes[:'policy_class']
290
+ else
291
+ self.policy_class = nil
292
+ end
293
+
294
+ if attributes.key?(:'traffic_class')
295
+ self.traffic_class = attributes[:'traffic_class']
296
+ else
297
+ self.traffic_class = nil
298
+ end
299
+
300
+ if attributes.key?(:'consent')
301
+ self.consent = attributes[:'consent']
302
+ else
303
+ self.consent = nil
304
+ end
305
+
306
+ if attributes.key?(:'user_data_hashed')
307
+ self.user_data_hashed = attributes[:'user_data_hashed']
308
+ else
309
+ self.user_data_hashed = nil
310
+ end
311
+
312
+ if attributes.key?(:'click_ids')
313
+ self.click_ids = attributes[:'click_ids']
314
+ else
315
+ self.click_ids = nil
316
+ end
317
+
318
+ if attributes.key?(:'session')
319
+ self.session = attributes[:'session']
320
+ else
321
+ self.session = nil
322
+ end
323
+
324
+ if attributes.key?(:'value_data')
325
+ self.value_data = attributes[:'value_data']
326
+ else
327
+ self.value_data = nil
328
+ end
329
+
330
+ if attributes.key?(:'event_source')
331
+ self.event_source = attributes[:'event_source']
332
+ else
333
+ self.event_source = nil
334
+ end
335
+
336
+ if attributes.key?(:'payload_expired')
337
+ self.payload_expired = attributes[:'payload_expired']
338
+ else
339
+ self.payload_expired = nil
340
+ end
341
+
342
+ if attributes.key?(:'deliveries')
343
+ if (value = attributes[:'deliveries']).is_a?(Array)
344
+ self.deliveries = value
345
+ end
346
+ else
347
+ self.deliveries = nil
348
+ end
349
+ end
350
+
351
+ # Show invalid properties with the reasons. Usually used together with valid?
352
+ # @return Array for valid properties with the reasons
353
+ def list_invalid_properties
354
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
355
+ invalid_properties = Array.new
356
+ if @id.nil?
357
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
358
+ end
359
+
360
+ if @signal_tracker_id.nil?
361
+ invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
362
+ end
363
+
364
+ if @event_name.nil?
365
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
366
+ end
367
+
368
+ if @event_time.nil?
369
+ invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
370
+ end
371
+
372
+ if @action_source.nil?
373
+ invalid_properties.push('invalid value for "action_source", action_source cannot be nil.')
374
+ end
375
+
376
+ if @event_class.nil?
377
+ invalid_properties.push('invalid value for "event_class", event_class cannot be nil.')
378
+ end
379
+
380
+ if @created_at.nil?
381
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
382
+ end
383
+
384
+ if @consent_basis.nil?
385
+ invalid_properties.push('invalid value for "consent_basis", consent_basis cannot be nil.')
386
+ end
387
+
388
+ if @measurement_class.nil?
389
+ invalid_properties.push('invalid value for "measurement_class", measurement_class cannot be nil.')
390
+ end
391
+
392
+ if @attribution_join.nil?
393
+ invalid_properties.push('invalid value for "attribution_join", attribution_join cannot be nil.')
394
+ end
395
+
396
+ if @enforcement_scope.nil?
397
+ invalid_properties.push('invalid value for "enforcement_scope", enforcement_scope cannot be nil.')
398
+ end
399
+
400
+ if @consent_normalization_version.nil?
401
+ invalid_properties.push('invalid value for "consent_normalization_version", consent_normalization_version cannot be nil.')
402
+ end
403
+
404
+ if @policy_class.nil?
405
+ invalid_properties.push('invalid value for "policy_class", policy_class cannot be nil.')
406
+ end
407
+
408
+ if @traffic_class.nil?
409
+ invalid_properties.push('invalid value for "traffic_class", traffic_class cannot be nil.')
410
+ end
411
+
412
+ if @consent.nil?
413
+ invalid_properties.push('invalid value for "consent", consent cannot be nil.')
414
+ end
415
+
416
+ if @user_data_hashed.nil?
417
+ invalid_properties.push('invalid value for "user_data_hashed", user_data_hashed cannot be nil.')
418
+ end
419
+
420
+ if @click_ids.nil?
421
+ invalid_properties.push('invalid value for "click_ids", click_ids cannot be nil.')
422
+ end
423
+
424
+ if @session.nil?
425
+ invalid_properties.push('invalid value for "session", session cannot be nil.')
426
+ end
427
+
428
+ if @value_data.nil?
429
+ invalid_properties.push('invalid value for "value_data", value_data cannot be nil.')
430
+ end
431
+
432
+ if @event_source.nil?
433
+ invalid_properties.push('invalid value for "event_source", event_source cannot be nil.')
434
+ end
435
+
436
+ if @payload_expired.nil?
437
+ invalid_properties.push('invalid value for "payload_expired", payload_expired cannot be nil.')
438
+ end
439
+
440
+ if @deliveries.nil?
441
+ invalid_properties.push('invalid value for "deliveries", deliveries cannot be nil.')
442
+ end
443
+
444
+ invalid_properties
445
+ end
446
+
447
+ # Check to see if the all the properties in the model are valid
448
+ # @return true if the model is valid
449
+ def valid?
450
+ warn '[DEPRECATED] the `valid?` method is obsolete'
451
+ return false if @id.nil?
452
+ return false if @signal_tracker_id.nil?
453
+ return false if @event_name.nil?
454
+ return false if @event_time.nil?
455
+ return false if @action_source.nil?
456
+ return false if @event_class.nil?
457
+ return false if @created_at.nil?
458
+ return false if @consent_basis.nil?
459
+ return false if @measurement_class.nil?
460
+ return false if @attribution_join.nil?
461
+ return false if @enforcement_scope.nil?
462
+ return false if @consent_normalization_version.nil?
463
+ return false if @policy_class.nil?
464
+ return false if @traffic_class.nil?
465
+ return false if @consent.nil?
466
+ return false if @user_data_hashed.nil?
467
+ return false if @click_ids.nil?
468
+ return false if @session.nil?
469
+ return false if @value_data.nil?
470
+ return false if @event_source.nil?
471
+ return false if @payload_expired.nil?
472
+ return false if @deliveries.nil?
473
+ true
474
+ end
475
+
476
+ # Custom attribute writer method with validation
477
+ # @param [Object] id Value to be assigned
478
+ def id=(id)
479
+ if id.nil?
480
+ fail ArgumentError, 'id cannot be nil'
481
+ end
482
+
483
+ @id = id
484
+ end
485
+
486
+ # Custom attribute writer method with validation
487
+ # @param [Object] signal_tracker_id Value to be assigned
488
+ def signal_tracker_id=(signal_tracker_id)
489
+ if signal_tracker_id.nil?
490
+ fail ArgumentError, 'signal_tracker_id cannot be nil'
491
+ end
492
+
493
+ @signal_tracker_id = signal_tracker_id
494
+ end
495
+
496
+ # Custom attribute writer method with validation
497
+ # @param [Object] event_name Value to be assigned
498
+ def event_name=(event_name)
499
+ if event_name.nil?
500
+ fail ArgumentError, 'event_name cannot be nil'
501
+ end
502
+
503
+ @event_name = event_name
504
+ end
505
+
506
+ # Custom attribute writer method with validation
507
+ # @param [Object] event_time Value to be assigned
508
+ def event_time=(event_time)
509
+ if event_time.nil?
510
+ fail ArgumentError, 'event_time cannot be nil'
511
+ end
512
+
513
+ @event_time = event_time
514
+ end
515
+
516
+ # Custom attribute writer method with validation
517
+ # @param [Object] action_source Value to be assigned
518
+ def action_source=(action_source)
519
+ if action_source.nil?
520
+ fail ArgumentError, 'action_source cannot be nil'
521
+ end
522
+
523
+ @action_source = action_source
524
+ end
525
+
526
+ # Custom attribute writer method with validation
527
+ # @param [Object] event_class Value to be assigned
528
+ def event_class=(event_class)
529
+ if event_class.nil?
530
+ fail ArgumentError, 'event_class cannot be nil'
531
+ end
532
+
533
+ @event_class = event_class
534
+ end
535
+
536
+ # Custom attribute writer method with validation
537
+ # @param [Object] created_at Value to be assigned
538
+ def created_at=(created_at)
539
+ if created_at.nil?
540
+ fail ArgumentError, 'created_at cannot be nil'
541
+ end
542
+
543
+ @created_at = created_at
544
+ end
545
+
546
+ # Custom attribute writer method with validation
547
+ # @param [Object] consent_basis Value to be assigned
548
+ def consent_basis=(consent_basis)
549
+ if consent_basis.nil?
550
+ fail ArgumentError, 'consent_basis cannot be nil'
551
+ end
552
+
553
+ @consent_basis = consent_basis
554
+ end
555
+
556
+ # Custom attribute writer method with validation
557
+ # @param [Object] measurement_class Value to be assigned
558
+ def measurement_class=(measurement_class)
559
+ if measurement_class.nil?
560
+ fail ArgumentError, 'measurement_class cannot be nil'
561
+ end
562
+
563
+ @measurement_class = measurement_class
564
+ end
565
+
566
+ # Custom attribute writer method with validation
567
+ # @param [Object] attribution_join Value to be assigned
568
+ def attribution_join=(attribution_join)
569
+ if attribution_join.nil?
570
+ fail ArgumentError, 'attribution_join cannot be nil'
571
+ end
572
+
573
+ @attribution_join = attribution_join
574
+ end
575
+
576
+ # Custom attribute writer method with validation
577
+ # @param [Object] enforcement_scope Value to be assigned
578
+ def enforcement_scope=(enforcement_scope)
579
+ if enforcement_scope.nil?
580
+ fail ArgumentError, 'enforcement_scope cannot be nil'
581
+ end
582
+
583
+ @enforcement_scope = enforcement_scope
584
+ end
585
+
586
+ # Custom attribute writer method with validation
587
+ # @param [Object] consent_normalization_version Value to be assigned
588
+ def consent_normalization_version=(consent_normalization_version)
589
+ if consent_normalization_version.nil?
590
+ fail ArgumentError, 'consent_normalization_version cannot be nil'
591
+ end
592
+
593
+ @consent_normalization_version = consent_normalization_version
594
+ end
595
+
596
+ # Custom attribute writer method with validation
597
+ # @param [Object] policy_class Value to be assigned
598
+ def policy_class=(policy_class)
599
+ if policy_class.nil?
600
+ fail ArgumentError, 'policy_class cannot be nil'
601
+ end
602
+
603
+ @policy_class = policy_class
604
+ end
605
+
606
+ # Custom attribute writer method with validation
607
+ # @param [Object] traffic_class Value to be assigned
608
+ def traffic_class=(traffic_class)
609
+ if traffic_class.nil?
610
+ fail ArgumentError, 'traffic_class cannot be nil'
611
+ end
612
+
613
+ @traffic_class = traffic_class
614
+ end
615
+
616
+ # Custom attribute writer method with validation
617
+ # @param [Object] consent Value to be assigned
618
+ def consent=(consent)
619
+ if consent.nil?
620
+ fail ArgumentError, 'consent cannot be nil'
621
+ end
622
+
623
+ @consent = consent
624
+ end
625
+
626
+ # Custom attribute writer method with validation
627
+ # @param [Object] user_data_hashed Value to be assigned
628
+ def user_data_hashed=(user_data_hashed)
629
+ if user_data_hashed.nil?
630
+ fail ArgumentError, 'user_data_hashed cannot be nil'
631
+ end
632
+
633
+ @user_data_hashed = user_data_hashed
634
+ end
635
+
636
+ # Custom attribute writer method with validation
637
+ # @param [Object] click_ids Value to be assigned
638
+ def click_ids=(click_ids)
639
+ if click_ids.nil?
640
+ fail ArgumentError, 'click_ids cannot be nil'
641
+ end
642
+
643
+ @click_ids = click_ids
644
+ end
645
+
646
+ # Custom attribute writer method with validation
647
+ # @param [Object] session Value to be assigned
648
+ def session=(session)
649
+ if session.nil?
650
+ fail ArgumentError, 'session cannot be nil'
651
+ end
652
+
653
+ @session = session
654
+ end
655
+
656
+ # Custom attribute writer method with validation
657
+ # @param [Object] value_data Value to be assigned
658
+ def value_data=(value_data)
659
+ if value_data.nil?
660
+ fail ArgumentError, 'value_data cannot be nil'
661
+ end
662
+
663
+ @value_data = value_data
664
+ end
665
+
666
+ # Custom attribute writer method with validation
667
+ # @param [Object] event_source Value to be assigned
668
+ def event_source=(event_source)
669
+ if event_source.nil?
670
+ fail ArgumentError, 'event_source cannot be nil'
671
+ end
672
+
673
+ @event_source = event_source
674
+ end
675
+
676
+ # Custom attribute writer method with validation
677
+ # @param [Object] payload_expired Value to be assigned
678
+ def payload_expired=(payload_expired)
679
+ if payload_expired.nil?
680
+ fail ArgumentError, 'payload_expired cannot be nil'
681
+ end
682
+
683
+ @payload_expired = payload_expired
684
+ end
685
+
686
+ # Custom attribute writer method with validation
687
+ # @param [Object] deliveries Value to be assigned
688
+ def deliveries=(deliveries)
689
+ if deliveries.nil?
690
+ fail ArgumentError, 'deliveries cannot be nil'
691
+ end
692
+
693
+ @deliveries = deliveries
694
+ end
695
+
696
+ # Checks equality by comparing each attribute.
697
+ # @param [Object] Object to be compared
698
+ def ==(o)
699
+ return true if self.equal?(o)
700
+ self.class == o.class &&
701
+ id == o.id &&
702
+ signal_tracker_id == o.signal_tracker_id &&
703
+ parent_event_id == o.parent_event_id &&
704
+ event_name == o.event_name &&
705
+ event_time == o.event_time &&
706
+ action_source == o.action_source &&
707
+ event_class == o.event_class &&
708
+ order_id == o.order_id &&
709
+ value_amount == o.value_amount &&
710
+ value_currency == o.value_currency &&
711
+ created_at == o.created_at &&
712
+ consent_basis == o.consent_basis &&
713
+ measurement_class == o.measurement_class &&
714
+ attribution_join == o.attribution_join &&
715
+ enforcement_scope == o.enforcement_scope &&
716
+ consent_normalization_version == o.consent_normalization_version &&
717
+ policy_class == o.policy_class &&
718
+ traffic_class == o.traffic_class &&
719
+ consent == o.consent &&
720
+ user_data_hashed == o.user_data_hashed &&
721
+ click_ids == o.click_ids &&
722
+ session == o.session &&
723
+ value_data == o.value_data &&
724
+ event_source == o.event_source &&
725
+ payload_expired == o.payload_expired &&
726
+ deliveries == o.deliveries
727
+ end
728
+
729
+ # @see the `==` method
730
+ # @param [Object] Object to be compared
731
+ def eql?(o)
732
+ self == o
733
+ end
734
+
735
+ # Calculates hash code according to all attributes.
736
+ # @return [Integer] Hash code
737
+ def hash
738
+ [id, signal_tracker_id, parent_event_id, event_name, event_time, action_source, event_class, order_id, value_amount, value_currency, created_at, consent_basis, measurement_class, attribution_join, enforcement_scope, consent_normalization_version, policy_class, traffic_class, consent, user_data_hashed, click_ids, session, value_data, event_source, payload_expired, deliveries].hash
739
+ end
740
+
741
+ # Builds the object from hash
742
+ # @param [Hash] attributes Model attributes in the form of hash
743
+ # @return [Object] Returns the model itself
744
+ def self.build_from_hash(attributes)
745
+ return nil unless attributes.is_a?(Hash)
746
+ attributes = attributes.transform_keys(&:to_sym)
747
+ transformed_hash = {}
748
+ openapi_types.each_pair do |key, type|
749
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
750
+ transformed_hash["#{key}"] = nil
751
+ elsif type =~ /\AArray<(.*)>/i
752
+ # check to ensure the input is an array given that the attribute
753
+ # is documented as an array but the input is not
754
+ if attributes[attribute_map[key]].is_a?(Array)
755
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
756
+ end
757
+ elsif !attributes[attribute_map[key]].nil?
758
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
759
+ end
760
+ end
761
+ new(transformed_hash)
762
+ end
763
+
764
+ # Returns the object in the form of hash
765
+ # @return [Hash] Returns the object in the form of hash
766
+ def to_hash
767
+ hash = {}
768
+ self.class.attribute_map.each_pair do |attr, param|
769
+ value = self.send(attr)
770
+ if value.nil?
771
+ is_nullable = self.class.openapi_nullable.include?(attr)
772
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
773
+ end
774
+
775
+ hash[param] = _to_hash(value)
776
+ end
777
+ hash
778
+ end
779
+
780
+ end
781
+
782
+ end