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,344 @@
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 CreateEventRequestAnyOf < ApiModelBase
18
+ # Caller-supplied idempotency key; maximum 128 characters.
19
+ attr_accessor :event_id
20
+
21
+ # Signal event name; maximum 100 characters.
22
+ attr_accessor :event_name
23
+
24
+ # Optional parent event id; maximum 128 characters.
25
+ attr_accessor :parent_event_id
26
+
27
+ attr_accessor :event_time
28
+
29
+ # Optional absolute source URL.
30
+ attr_accessor :event_source
31
+
32
+ # Optional action source; defaults to website and is limited to 50 characters.
33
+ attr_accessor :action_source
34
+
35
+ # Optional visitor identifier; maximum 255 characters.
36
+ attr_accessor :visitor_id
37
+
38
+ # Legal basis for processing. Legitimate-interest revenue lifecycle events are rejected; use an authenticated server adapter.
39
+ attr_accessor :consent_basis
40
+
41
+ # Consent state supplied with the event.
42
+ attr_accessor :consent
43
+
44
+ # Consent Mode v2 signal values supplied with the event.
45
+ attr_accessor :consent_mode
46
+
47
+ # TCF v2 data containing string and optional captured_at.
48
+ attr_accessor :tcf
49
+
50
+ # Identity fields accepted by the tracker.
51
+ attr_accessor :user_data
52
+
53
+ # Advertising click identifiers.
54
+ attr_accessor :click_ids
55
+
56
+ attr_accessor :value_data
57
+
58
+ class EnumAttributeValidator
59
+ attr_reader :datatype
60
+ attr_reader :allowable_values
61
+
62
+ def initialize(datatype, allowable_values)
63
+ @allowable_values = allowable_values.map do |value|
64
+ case datatype.to_s
65
+ when /Integer/i
66
+ value.to_i
67
+ when /Float/i
68
+ value.to_f
69
+ else
70
+ value
71
+ end
72
+ end
73
+ end
74
+
75
+ def valid?(value)
76
+ !value || allowable_values.include?(value)
77
+ end
78
+ end
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'event_id' => :'event_id',
84
+ :'event_name' => :'event_name',
85
+ :'parent_event_id' => :'parent_event_id',
86
+ :'event_time' => :'event_time',
87
+ :'event_source' => :'event_source',
88
+ :'action_source' => :'action_source',
89
+ :'visitor_id' => :'visitor_id',
90
+ :'consent_basis' => :'consent_basis',
91
+ :'consent' => :'consent',
92
+ :'consent_mode' => :'consent_mode',
93
+ :'tcf' => :'tcf',
94
+ :'user_data' => :'user_data',
95
+ :'click_ids' => :'click_ids',
96
+ :'value_data' => :'value_data'
97
+ }
98
+ end
99
+
100
+ # Returns attribute mapping this model knows about
101
+ def self.acceptable_attribute_map
102
+ attribute_map
103
+ end
104
+
105
+ # Returns all the JSON keys this model knows about
106
+ def self.acceptable_attributes
107
+ acceptable_attribute_map.values
108
+ end
109
+
110
+ # Attribute type mapping.
111
+ def self.openapi_types
112
+ {
113
+ :'event_id' => :'String',
114
+ :'event_name' => :'String',
115
+ :'parent_event_id' => :'String',
116
+ :'event_time' => :'CreateEventRequestAnyOfEventTime',
117
+ :'event_source' => :'String',
118
+ :'action_source' => :'String',
119
+ :'visitor_id' => :'String',
120
+ :'consent_basis' => :'String',
121
+ :'consent' => :'Hash<String, Object>',
122
+ :'consent_mode' => :'Hash<String, Object>',
123
+ :'tcf' => :'Hash<String, Object>',
124
+ :'user_data' => :'Hash<String, Object>',
125
+ :'click_ids' => :'Hash<String, Object>',
126
+ :'value_data' => :'CreateEventRequestAnyOfValueData'
127
+ }
128
+ end
129
+
130
+ # List of attributes with nullable: true
131
+ def self.openapi_nullable
132
+ Set.new([
133
+ ])
134
+ end
135
+
136
+ # Initializes the object
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ def initialize(attributes = {})
139
+ if (!attributes.is_a?(Hash))
140
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::CreateEventRequestAnyOf` initialize method"
141
+ end
142
+
143
+ # check to see if the attribute exists and convert string to symbol for hash key
144
+ acceptable_attribute_map = self.class.acceptable_attribute_map
145
+ attributes = attributes.each_with_object({}) { |(k, v), h|
146
+ if (!acceptable_attribute_map.key?(k.to_sym))
147
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::CreateEventRequestAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
148
+ end
149
+ h[k.to_sym] = v
150
+ }
151
+
152
+ if attributes.key?(:'event_id')
153
+ self.event_id = attributes[:'event_id']
154
+ end
155
+
156
+ if attributes.key?(:'event_name')
157
+ self.event_name = attributes[:'event_name']
158
+ else
159
+ self.event_name = nil
160
+ end
161
+
162
+ if attributes.key?(:'parent_event_id')
163
+ self.parent_event_id = attributes[:'parent_event_id']
164
+ end
165
+
166
+ if attributes.key?(:'event_time')
167
+ self.event_time = attributes[:'event_time']
168
+ end
169
+
170
+ if attributes.key?(:'event_source')
171
+ self.event_source = attributes[:'event_source']
172
+ end
173
+
174
+ if attributes.key?(:'action_source')
175
+ self.action_source = attributes[:'action_source']
176
+ end
177
+
178
+ if attributes.key?(:'visitor_id')
179
+ self.visitor_id = attributes[:'visitor_id']
180
+ end
181
+
182
+ if attributes.key?(:'consent_basis')
183
+ self.consent_basis = attributes[:'consent_basis']
184
+ else
185
+ self.consent_basis = nil
186
+ end
187
+
188
+ if attributes.key?(:'consent')
189
+ if (value = attributes[:'consent']).is_a?(Hash)
190
+ self.consent = value
191
+ end
192
+ end
193
+
194
+ if attributes.key?(:'consent_mode')
195
+ if (value = attributes[:'consent_mode']).is_a?(Hash)
196
+ self.consent_mode = value
197
+ end
198
+ end
199
+
200
+ if attributes.key?(:'tcf')
201
+ if (value = attributes[:'tcf']).is_a?(Hash)
202
+ self.tcf = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'user_data')
207
+ if (value = attributes[:'user_data']).is_a?(Hash)
208
+ self.user_data = value
209
+ end
210
+ end
211
+
212
+ if attributes.key?(:'click_ids')
213
+ if (value = attributes[:'click_ids']).is_a?(Hash)
214
+ self.click_ids = value
215
+ end
216
+ end
217
+
218
+ if attributes.key?(:'value_data')
219
+ self.value_data = attributes[:'value_data']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
227
+ invalid_properties = Array.new
228
+ if @event_name.nil?
229
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
230
+ end
231
+
232
+ if @consent_basis.nil?
233
+ invalid_properties.push('invalid value for "consent_basis", consent_basis cannot be nil.')
234
+ end
235
+
236
+ invalid_properties
237
+ end
238
+
239
+ # Check to see if the all the properties in the model are valid
240
+ # @return true if the model is valid
241
+ def valid?
242
+ warn '[DEPRECATED] the `valid?` method is obsolete'
243
+ return false if @event_name.nil?
244
+ return false if @consent_basis.nil?
245
+ consent_basis_validator = EnumAttributeValidator.new('String', ["consent"])
246
+ return false unless consent_basis_validator.valid?(@consent_basis)
247
+ true
248
+ end
249
+
250
+ # Custom attribute writer method with validation
251
+ # @param [Object] event_name Value to be assigned
252
+ def event_name=(event_name)
253
+ if event_name.nil?
254
+ fail ArgumentError, 'event_name cannot be nil'
255
+ end
256
+
257
+ @event_name = event_name
258
+ end
259
+
260
+ # Custom attribute writer method checking allowed values (enum).
261
+ # @param [Object] consent_basis Object to be assigned
262
+ def consent_basis=(consent_basis)
263
+ validator = EnumAttributeValidator.new('String', ["consent"])
264
+ unless validator.valid?(consent_basis)
265
+ fail ArgumentError, "invalid value for \"consent_basis\", must be one of #{validator.allowable_values}."
266
+ end
267
+ @consent_basis = consent_basis
268
+ end
269
+
270
+ # Checks equality by comparing each attribute.
271
+ # @param [Object] Object to be compared
272
+ def ==(o)
273
+ return true if self.equal?(o)
274
+ self.class == o.class &&
275
+ event_id == o.event_id &&
276
+ event_name == o.event_name &&
277
+ parent_event_id == o.parent_event_id &&
278
+ event_time == o.event_time &&
279
+ event_source == o.event_source &&
280
+ action_source == o.action_source &&
281
+ visitor_id == o.visitor_id &&
282
+ consent_basis == o.consent_basis &&
283
+ consent == o.consent &&
284
+ consent_mode == o.consent_mode &&
285
+ tcf == o.tcf &&
286
+ user_data == o.user_data &&
287
+ click_ids == o.click_ids &&
288
+ value_data == o.value_data
289
+ end
290
+
291
+ # @see the `==` method
292
+ # @param [Object] Object to be compared
293
+ def eql?(o)
294
+ self == o
295
+ end
296
+
297
+ # Calculates hash code according to all attributes.
298
+ # @return [Integer] Hash code
299
+ def hash
300
+ [event_id, event_name, parent_event_id, event_time, event_source, action_source, visitor_id, consent_basis, consent, consent_mode, tcf, user_data, click_ids, value_data].hash
301
+ end
302
+
303
+ # Builds the object from hash
304
+ # @param [Hash] attributes Model attributes in the form of hash
305
+ # @return [Object] Returns the model itself
306
+ def self.build_from_hash(attributes)
307
+ return nil unless attributes.is_a?(Hash)
308
+ attributes = attributes.transform_keys(&:to_sym)
309
+ transformed_hash = {}
310
+ openapi_types.each_pair do |key, type|
311
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
312
+ transformed_hash["#{key}"] = nil
313
+ elsif type =~ /\AArray<(.*)>/i
314
+ # check to ensure the input is an array given that the attribute
315
+ # is documented as an array but the input is not
316
+ if attributes[attribute_map[key]].is_a?(Array)
317
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
318
+ end
319
+ elsif !attributes[attribute_map[key]].nil?
320
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
321
+ end
322
+ end
323
+ new(transformed_hash)
324
+ end
325
+
326
+ # Returns the object in the form of hash
327
+ # @return [Hash] Returns the object in the form of hash
328
+ def to_hash
329
+ hash = {}
330
+ self.class.attribute_map.each_pair do |attr, param|
331
+ value = self.send(attr)
332
+ if value.nil?
333
+ is_nullable = self.class.openapi_nullable.include?(attr)
334
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
335
+ end
336
+
337
+ hash[param] = _to_hash(value)
338
+ end
339
+ hash
340
+ end
341
+
342
+ end
343
+
344
+ end
@@ -0,0 +1,346 @@
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 CreateEventRequestAnyOf1 < ApiModelBase
18
+ # Caller-supplied idempotency key; maximum 128 characters.
19
+ attr_accessor :event_id
20
+
21
+ # Signal event name; maximum 100 characters.
22
+ attr_accessor :event_name
23
+
24
+ # Optional parent event id; maximum 128 characters.
25
+ attr_accessor :parent_event_id
26
+
27
+ attr_accessor :event_time
28
+
29
+ # Optional absolute source URL.
30
+ attr_accessor :event_source
31
+
32
+ # Optional action source; defaults to website and is limited to 50 characters.
33
+ attr_accessor :action_source
34
+
35
+ # Optional visitor identifier; maximum 255 characters.
36
+ attr_accessor :visitor_id
37
+
38
+ # Legal basis for processing. Legitimate-interest revenue lifecycle events are rejected; use an authenticated server adapter.
39
+ attr_accessor :consent_basis
40
+
41
+ # Consent state supplied with the event.
42
+ attr_accessor :consent
43
+
44
+ # Consent Mode v2 signal values supplied with the event.
45
+ attr_accessor :consent_mode
46
+
47
+ # TCF v2 data containing string and optional captured_at.
48
+ attr_accessor :tcf
49
+
50
+ # Identity fields accepted by the tracker.
51
+ attr_accessor :user_data
52
+
53
+ # Advertising click identifiers.
54
+ attr_accessor :click_ids
55
+
56
+ attr_accessor :value_data
57
+
58
+ class EnumAttributeValidator
59
+ attr_reader :datatype
60
+ attr_reader :allowable_values
61
+
62
+ def initialize(datatype, allowable_values)
63
+ @allowable_values = allowable_values.map do |value|
64
+ case datatype.to_s
65
+ when /Integer/i
66
+ value.to_i
67
+ when /Float/i
68
+ value.to_f
69
+ else
70
+ value
71
+ end
72
+ end
73
+ end
74
+
75
+ def valid?(value)
76
+ !value || allowable_values.include?(value)
77
+ end
78
+ end
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'event_id' => :'event_id',
84
+ :'event_name' => :'event_name',
85
+ :'parent_event_id' => :'parent_event_id',
86
+ :'event_time' => :'event_time',
87
+ :'event_source' => :'event_source',
88
+ :'action_source' => :'action_source',
89
+ :'visitor_id' => :'visitor_id',
90
+ :'consent_basis' => :'consent_basis',
91
+ :'consent' => :'consent',
92
+ :'consent_mode' => :'consent_mode',
93
+ :'tcf' => :'tcf',
94
+ :'user_data' => :'user_data',
95
+ :'click_ids' => :'click_ids',
96
+ :'value_data' => :'value_data'
97
+ }
98
+ end
99
+
100
+ # Returns attribute mapping this model knows about
101
+ def self.acceptable_attribute_map
102
+ attribute_map
103
+ end
104
+
105
+ # Returns all the JSON keys this model knows about
106
+ def self.acceptable_attributes
107
+ acceptable_attribute_map.values
108
+ end
109
+
110
+ # Attribute type mapping.
111
+ def self.openapi_types
112
+ {
113
+ :'event_id' => :'String',
114
+ :'event_name' => :'String',
115
+ :'parent_event_id' => :'String',
116
+ :'event_time' => :'CreateEventRequestAnyOfEventTime',
117
+ :'event_source' => :'String',
118
+ :'action_source' => :'String',
119
+ :'visitor_id' => :'String',
120
+ :'consent_basis' => :'String',
121
+ :'consent' => :'Hash<String, Object>',
122
+ :'consent_mode' => :'Hash<String, Object>',
123
+ :'tcf' => :'Hash<String, Object>',
124
+ :'user_data' => :'Hash<String, Object>',
125
+ :'click_ids' => :'Hash<String, Object>',
126
+ :'value_data' => :'CreateEventRequestAnyOfValueData'
127
+ }
128
+ end
129
+
130
+ # List of attributes with nullable: true
131
+ def self.openapi_nullable
132
+ Set.new([
133
+ ])
134
+ end
135
+
136
+ # Initializes the object
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ def initialize(attributes = {})
139
+ if (!attributes.is_a?(Hash))
140
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::CreateEventRequestAnyOf1` initialize method"
141
+ end
142
+
143
+ # check to see if the attribute exists and convert string to symbol for hash key
144
+ acceptable_attribute_map = self.class.acceptable_attribute_map
145
+ attributes = attributes.each_with_object({}) { |(k, v), h|
146
+ if (!acceptable_attribute_map.key?(k.to_sym))
147
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::CreateEventRequestAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
148
+ end
149
+ h[k.to_sym] = v
150
+ }
151
+
152
+ if attributes.key?(:'event_id')
153
+ self.event_id = attributes[:'event_id']
154
+ end
155
+
156
+ if attributes.key?(:'event_name')
157
+ self.event_name = attributes[:'event_name']
158
+ else
159
+ self.event_name = nil
160
+ end
161
+
162
+ if attributes.key?(:'parent_event_id')
163
+ self.parent_event_id = attributes[:'parent_event_id']
164
+ end
165
+
166
+ if attributes.key?(:'event_time')
167
+ self.event_time = attributes[:'event_time']
168
+ end
169
+
170
+ if attributes.key?(:'event_source')
171
+ self.event_source = attributes[:'event_source']
172
+ end
173
+
174
+ if attributes.key?(:'action_source')
175
+ self.action_source = attributes[:'action_source']
176
+ end
177
+
178
+ if attributes.key?(:'visitor_id')
179
+ self.visitor_id = attributes[:'visitor_id']
180
+ end
181
+
182
+ if attributes.key?(:'consent_basis')
183
+ self.consent_basis = attributes[:'consent_basis']
184
+ else
185
+ self.consent_basis = nil
186
+ end
187
+
188
+ if attributes.key?(:'consent')
189
+ if (value = attributes[:'consent']).is_a?(Hash)
190
+ self.consent = value
191
+ end
192
+ end
193
+
194
+ if attributes.key?(:'consent_mode')
195
+ if (value = attributes[:'consent_mode']).is_a?(Hash)
196
+ self.consent_mode = value
197
+ end
198
+ end
199
+
200
+ if attributes.key?(:'tcf')
201
+ if (value = attributes[:'tcf']).is_a?(Hash)
202
+ self.tcf = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'user_data')
207
+ if (value = attributes[:'user_data']).is_a?(Hash)
208
+ self.user_data = value
209
+ end
210
+ end
211
+
212
+ if attributes.key?(:'click_ids')
213
+ if (value = attributes[:'click_ids']).is_a?(Hash)
214
+ self.click_ids = value
215
+ end
216
+ end
217
+
218
+ if attributes.key?(:'value_data')
219
+ self.value_data = attributes[:'value_data']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
227
+ invalid_properties = Array.new
228
+ if @event_name.nil?
229
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
230
+ end
231
+
232
+ if @consent_basis.nil?
233
+ invalid_properties.push('invalid value for "consent_basis", consent_basis cannot be nil.')
234
+ end
235
+
236
+ invalid_properties
237
+ end
238
+
239
+ # Check to see if the all the properties in the model are valid
240
+ # @return true if the model is valid
241
+ def valid?
242
+ warn '[DEPRECATED] the `valid?` method is obsolete'
243
+ return false if @event_name.nil?
244
+ event_name_validator = EnumAttributeValidator.new('String', ["signal_verification", "consent_withdrawal"])
245
+ return false unless event_name_validator.valid?(@event_name)
246
+ return false if @consent_basis.nil?
247
+ consent_basis_validator = EnumAttributeValidator.new('String', ["legitimate_interest"])
248
+ return false unless consent_basis_validator.valid?(@consent_basis)
249
+ true
250
+ end
251
+
252
+ # Custom attribute writer method checking allowed values (enum).
253
+ # @param [Object] event_name Object to be assigned
254
+ def event_name=(event_name)
255
+ validator = EnumAttributeValidator.new('String', ["signal_verification", "consent_withdrawal"])
256
+ unless validator.valid?(event_name)
257
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
258
+ end
259
+ @event_name = event_name
260
+ end
261
+
262
+ # Custom attribute writer method checking allowed values (enum).
263
+ # @param [Object] consent_basis Object to be assigned
264
+ def consent_basis=(consent_basis)
265
+ validator = EnumAttributeValidator.new('String', ["legitimate_interest"])
266
+ unless validator.valid?(consent_basis)
267
+ fail ArgumentError, "invalid value for \"consent_basis\", must be one of #{validator.allowable_values}."
268
+ end
269
+ @consent_basis = consent_basis
270
+ end
271
+
272
+ # Checks equality by comparing each attribute.
273
+ # @param [Object] Object to be compared
274
+ def ==(o)
275
+ return true if self.equal?(o)
276
+ self.class == o.class &&
277
+ event_id == o.event_id &&
278
+ event_name == o.event_name &&
279
+ parent_event_id == o.parent_event_id &&
280
+ event_time == o.event_time &&
281
+ event_source == o.event_source &&
282
+ action_source == o.action_source &&
283
+ visitor_id == o.visitor_id &&
284
+ consent_basis == o.consent_basis &&
285
+ consent == o.consent &&
286
+ consent_mode == o.consent_mode &&
287
+ tcf == o.tcf &&
288
+ user_data == o.user_data &&
289
+ click_ids == o.click_ids &&
290
+ value_data == o.value_data
291
+ end
292
+
293
+ # @see the `==` method
294
+ # @param [Object] Object to be compared
295
+ def eql?(o)
296
+ self == o
297
+ end
298
+
299
+ # Calculates hash code according to all attributes.
300
+ # @return [Integer] Hash code
301
+ def hash
302
+ [event_id, event_name, parent_event_id, event_time, event_source, action_source, visitor_id, consent_basis, consent, consent_mode, tcf, user_data, click_ids, value_data].hash
303
+ end
304
+
305
+ # Builds the object from hash
306
+ # @param [Hash] attributes Model attributes in the form of hash
307
+ # @return [Object] Returns the model itself
308
+ def self.build_from_hash(attributes)
309
+ return nil unless attributes.is_a?(Hash)
310
+ attributes = attributes.transform_keys(&:to_sym)
311
+ transformed_hash = {}
312
+ openapi_types.each_pair do |key, type|
313
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
314
+ transformed_hash["#{key}"] = nil
315
+ elsif type =~ /\AArray<(.*)>/i
316
+ # check to ensure the input is an array given that the attribute
317
+ # is documented as an array but the input is not
318
+ if attributes[attribute_map[key]].is_a?(Array)
319
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
320
+ end
321
+ elsif !attributes[attribute_map[key]].nil?
322
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
323
+ end
324
+ end
325
+ new(transformed_hash)
326
+ end
327
+
328
+ # Returns the object in the form of hash
329
+ # @return [Hash] Returns the object in the form of hash
330
+ def to_hash
331
+ hash = {}
332
+ self.class.attribute_map.each_pair do |attr, param|
333
+ value = self.send(attr)
334
+ if value.nil?
335
+ is_nullable = self.class.openapi_nullable.include?(attr)
336
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
337
+ end
338
+
339
+ hash[param] = _to_hash(value)
340
+ end
341
+ hash
342
+ end
343
+
344
+ end
345
+
346
+ end